Class: Gtk::Dialog
- Defined in:
- lib/knj/jruby-gtk2/dialog.rb,
lib/knj/ironruby-gtk2/dialog.rb
Constant Summary collapse
- RESPONSE_OK =
RealGtk::ResponseType.Ok
- RESPONSE_YES =
RealGtk::ResponseType.Yes
- RESPONSE_NO =
RealGtk::ResponseType.No
- RESPONSE_CANCEL =
RealGtk::ResponseType.Cancel
- RESPONSE_CLOSE =
RealGtk::ResponseType.Close
- RESPONSE_DELETE_EVENT =
RealGtk::ResponseType.DeleteEvent
- MODAL =
0
Instance Method Summary collapse
- #destroy ⇒ Object
- #has_separator=(newval) ⇒ Object
-
#initialize(*paras) ⇒ Dialog
constructor
A new instance of Dialog.
- #vbox ⇒ Object
Constructor Details
#initialize(*paras) ⇒ Dialog
Returns a new instance of Dialog.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/knj/jruby-gtk2/dialog.rb', line 12 def initialize(title = nil, win_parent = nil, modal = nil, *) if Gtk.takeob @ob = Gtk.takeob Gtk.takeob = nil else @ob = Gtk.evalob("org.gnome.gtk.Dialog").new(title, win_parent, modal) .each do || self.([0], [1]) end self.signal_connect("response") do self.destroy end end end |
Instance Method Details
#destroy ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/knj/jruby-gtk2/dialog.rb', line 37 def destroy if @ob @ob.hide end @ob = nil end |
#has_separator=(newval) ⇒ Object
33 34 35 |
# File 'lib/knj/jruby-gtk2/dialog.rb', line 33 def has_separator=(newval) # FIXME: No way to do this in Java-GTK? end |
#vbox ⇒ Object
29 30 31 |
# File 'lib/knj/jruby-gtk2/dialog.rb', line 29 def vbox return self end |