Class: Tgui::MenuBar::MenuItem
Instance Attribute Summary
Attributes inherited from WidgetLike
#host, #id
Instance Method Summary
collapse
Methods inherited from WidgetLike
abi_attr, abi_bit_enum, abi_def, abi_enum, #flags=, #initialize, self_abi_def, self_abi_def_setter, self_abi_def_setter_with_id, self_abi_def_with_id, self_packers_id_extend
Methods included from BangDef
#def!
Methods included from BangNest
#method_missing, #respond_to?
#bang_method_missing, #bang_object_stack, #bang_respond_to?, #self!, #upon!
Constructor Details
This class inherits a constructor from WidgetLike
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class BangNest
Instance Method Details
#[](*path) ⇒ Object
159
160
161
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 159
def [](*path)
Item.new(host, self.path + path)
end
|
#on_press(&b) ⇒ Object
132
133
134
135
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 132
def on_press(&b)
signal = ItemPressSignal.new host, path
block_given? ? signal.connect(&b) : signal
end
|
#on_press=(b) ⇒ Object
137
138
139
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 137
def on_press=(b)
on_press &b
end
|
#remove_subitems ⇒ Object
141
142
143
144
145
146
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 141
def remove_subitems
host.self_path_block path do
host. _1, _2
host.self_tree.cut_branches *_3
end
end
|
155
156
157
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 155
def text
host.self_tree[*path].text
end
|
#text=(text) ⇒ Object
148
149
150
151
152
153
|
# File 'lib/white_gold/dsl/menu_bar.rb', line 148
def text=(text)
host.self_path_block path do
host. _1, _2, text
host.self_tree[*path].text = text
end
end
|