Class: XRC2Ruby::ObjectTypes::ToolBar

Inherits:
Window show all
Includes:
Parent
Defined in:
lib/wx_sugar/xrc/xrc2ruby_types/toolbar.rb

Constant Summary

Constants inherited from Window

Window::BASE_NAME

Instance Attribute Summary collapse

Attributes included from Parent

#children, #main_sizer, #sizer_items

Attributes inherited from Window

#bg, #enabled, #exstyle, #fg, #help, #hidden, #tooltip

Attributes inherited from Object

#centered, #name, #parent, #sub_class, #win_class

Instance Method Summary collapse

Methods included from Parent

#add_child, #child_output, #named_windows, #output, #size_child

Methods inherited from Window

#args, #output

Methods included from InitArgs

#inherited, #init_arg, #init_args, #translatable_string_init_arg

Methods inherited from Object

#inspect, next_id, #output, #var_name

Constructor Details

#initialize(*args) ⇒ ToolBar

Returns a new instance of ToolBar.



5
6
7
8
# File 'lib/wx_sugar/xrc/xrc2ruby_types/toolbar.rb', line 5

def initialize(*args)
  super
  @tools = []
end

Instance Attribute Details

#dontattachtoframeObject

Returns the value of attribute dontattachtoframe.



4
5
6
# File 'lib/wx_sugar/xrc/xrc2ruby_types/toolbar.rb', line 4

def dontattachtoframe
  @dontattachtoframe
end

Instance Method Details

#add_tool(tool) ⇒ Object



10
11
12
# File 'lib/wx_sugar/xrc/xrc2ruby_types/toolbar.rb', line 10

def add_tool(tool)
  @tools << tool
end

#setupObject



14
15
16
# File 'lib/wx_sugar/xrc/xrc2ruby_types/toolbar.rb', line 14

def setup
  @tools.inject('') { | str, tool | str + tool.output }
end