class Gtk::Dialog
Constants
- MODAL
- RESPONSE_CANCEL
- RESPONSE_CLOSE
- RESPONSE_DELETE_EVENT
- RESPONSE_NO
- RESPONSE_OK
- RESPONSE_YES
Public Class Methods
new(*paras)
click to toggle source
# File lib/knj/ironruby-gtk2/dialog.rb, line 10 def initialize(*paras) if Gtk.takeob @ob = Gtk.takeob Gtk.takeob = nil else splitted = self.class.to_s.split("::") @ob = RealGtk.const_get(splitted.last).new(*paras) end if paras.length > 3 3.upto(paras.length) do |count| data = paras[count] if data.is_a?(Array) @ob.method(:add_button).overload(System::String, RealGtk::ResponseType).call(data[0], data[1]) elsif data.is_a?(NilClass) #do nothing. else #raise "Unhandeled data: #{data.class.to_s}" end end end if !@ob raise "Object was not spawned: #{self.class.to_s}" end end
Public Instance Methods
destroy()
click to toggle source
# File lib/knj/jruby-gtk2/dialog.rb, line 37 def destroy if @ob @ob.hide end @ob = nil end
has_separator=(newval)
click to toggle source
# File lib/knj/jruby-gtk2/dialog.rb, line 33 def has_separator=(newval) # FIXME: No way to do this in Java-GTK? end
vbox()
click to toggle source
# File lib/knj/ironruby-gtk2/dialog.rb, line 38 def vbox Gtk.takeob = @ob.VBox conv_widget = Gtk::VBox.new return conv_widget end