Class: Gtk::Window
- Defined in:
- lib/knj/jruby-gtk2/window.rb,
lib/knj/ironruby-gtk2/window.rb
Instance Method Summary collapse
- #add(widget) ⇒ Object
- #destroy ⇒ Object
-
#initialize(title = "") ⇒ Window
constructor
A new instance of Window.
- #set_frame_dimensions(arg1, arg2, arg3, arg4) ⇒ Object
Constructor Details
#initialize(title = "") ⇒ Window
Returns a new instance of Window.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/knj/ironruby-gtk2/window.rb', line 6 def initialize(title = "") if Gtk.takeob @ob = Gtk.takeob Gtk.takeob = nil else splitted = self.class.to_s.split("::") @ob = RealGtk.const_get(splitted.last).new(title) end if !@ob raise "Object was not spawned: #{self.class.to_s}" end end |
Instance Method Details
#add(widget) ⇒ Object
20 21 22 |
# File 'lib/knj/ironruby-gtk2/window.rb', line 20 def add() @ob.add(.ob) end |
#destroy ⇒ Object
4 5 6 |
# File 'lib/knj/jruby-gtk2/window.rb', line 4 def destroy @ob.hide #destroy does not exist in the Java-version? - knj end |
#set_frame_dimensions(arg1, arg2, arg3, arg4) ⇒ Object
8 9 10 |
# File 'lib/knj/jruby-gtk2/window.rb', line 8 def set_frame_dimensions(arg1, arg2, arg3, arg4) @ob.border_width = arg1 end |