Sha256: b79511c6b8927828004ab2605d6c3a65b5016ef6ba7bc2822d5c965ade2b7e48

Contents?: true

Size: 1.02 KB

Versions: 101

Compression:

Stored size: 1.02 KB

Contents

Gtk.events << ["Dialog", "response", org.gnome.gtk.Dialog::Response, :onResponse, nil]

class Gtk::Dialog
  RESPONSE_OK = org.gnome.gtk.ResponseType::OK
  RESPONSE_YES = org.gnome.gtk.ResponseType::YES
  RESPONSE_NO = org.gnome.gtk.ResponseType::NO
  RESPONSE_CANCEL = org.gnome.gtk.ResponseType::CANCEL
  RESPONSE_CLOSE = org.gnome.gtk.ResponseType::CLOSE
  RESPONSE_DELETE_EVENT = org.gnome.gtk.ResponseType::DELETE_EVENT
  MODAL = true
  
  def initialize(title = nil, win_parent = nil, modal = nil, *buttons)
    if Gtk.takeob
      @ob = Gtk.takeob
      Gtk.takeob = nil
    else
      @ob = Gtk.evalob("org.gnome.gtk.Dialog").new(title, win_parent, modal)
      
      buttons.each do |button|
        self.add_button(button[0], button[1])
      end
      
      self.signal_connect("response") do
        self.destroy
      end
    end
  end
  
  def vbox
    return self
  end
  
  def has_separator=(newval)
    # FIXME: No way to do this in Java-GTK?
  end
  
  def destroy
    if @ob
      @ob.hide
    end
    
    @ob = nil
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
knjrbfw-0.0.116 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.115 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.114 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.113 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.111 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.110 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.109 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.108 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.107 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.105 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.104 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.103 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.102 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.101 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.100 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.99 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.98 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.97 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.96 lib/knj/jruby-gtk2/dialog.rb
knjrbfw-0.0.95 lib/knj/jruby-gtk2/dialog.rb