Sha256: 40809473deb97cb2f7f9c6bf1e2ddac4553993446f8b0c3909228045046af6d4

Contents?: true

Size: 1.09 KB

Versions: 101

Compression:

Stored size: 1.09 KB

Contents

class Gtk::Dialog
  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
  
  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
  
  def vbox
    Gtk.takeob = @ob.VBox
    conv_widget = Gtk::VBox.new
    
    return conv_widget
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
knjrbfw-0.0.94 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.93 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.92 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.91 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.90 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.89 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.88 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.87 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.86 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.85 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.84 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.83 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.82 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.81 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.80 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.79 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.78 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.77 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.75 lib/knj/ironruby-gtk2/dialog.rb
knjrbfw-0.0.74 lib/knj/ironruby-gtk2/dialog.rb