Class: RubyMVC::Toolkit::WxRuby::BoxLayout
- Inherits:
-
Object
- Object
- RubyMVC::Toolkit::WxRuby::BoxLayout
- Defined in:
- lib/ruby_mvc/toolkit/peers/wxruby/box_layout.rb
Instance Method Summary collapse
- #add(child, options = {}) ⇒ Object
-
#initialize(options) ⇒ BoxLayout
constructor
A new instance of BoxLayout.
Constructor Details
#initialize(options) ⇒ BoxLayout
Returns a new instance of BoxLayout.
32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby_mvc/toolkit/peers/wxruby/box_layout.rb', line 32 def initialize() @options = case([:axis]) when :horizontal, :x, :x_axis @widget = Wx::BoxSizer.new(Wx::HORIZONTAL) else @widget = Wx::BoxSizer.new(Wx::VERTICAL) end end |
Instance Method Details
#add(child, options = {}) ⇒ Object
42 43 44 |
# File 'lib/ruby_mvc/toolkit/peers/wxruby/box_layout.rb', line 42 def add(child, = {}) @widget.add end |