Class: RubyMVC::Toolkit::WxRuby::BoxLayout

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_mvc/toolkit/peers/wxruby/box_layout.rb

Instance Method Summary collapse

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)
  @options = options
  case(options[: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, options = {})
  @widget.add
end