Class: Tgui::MenuBar::Item
- Inherits:
-
MenuItem
- Object
- WidgetLike
- MenuItem
- Tgui::MenuBar::Item
- Defined in:
- lib/white_gold/dsl/menu_bar.rb
Instance Attribute Summary
Attributes inherited from WidgetLike
Instance Method Summary collapse
- #enabled=(enabled) ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize(menu_bar, path) ⇒ Item
constructor
A new instance of Item.
- #path ⇒ Object
- #remove ⇒ Object
Methods inherited from MenuItem
#[], #on_press, #on_press=, #remove_subitems, #text, #text=
Methods inherited from WidgetLike
abi_attr, abi_bit_enum, abi_def, abi_enum, #flags=, 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
Methods included from BangNest
Methods included from BangNestedCaller
#bang_method_missing, #bang_object_stack, #bang_respond_to?, #self!, #upon!
Constructor Details
#initialize(menu_bar, path) ⇒ Item
Returns a new instance of Item.
177 178 179 |
# File 'lib/white_gold/dsl/menu_bar.rb', line 177 def initialize , path super(, path.freeze) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BangNest
Instance Method Details
#enabled=(enabled) ⇒ Object
182 183 184 185 186 |
# File 'lib/white_gold/dsl/menu_bar.rb', line 182 def enabled=(enabled) host.self_path_block path do host. _1, _2, enabled end end |
#enabled? ⇒ Boolean
188 189 190 191 192 |
# File 'lib/white_gold/dsl/menu_bar.rb', line 188 def enabled? host.self_path_block path do host. _1, _2 end end |
#path ⇒ Object
201 202 203 |
# File 'lib/white_gold/dsl/menu_bar.rb', line 201 def path @id end |
#remove ⇒ Object
194 195 196 197 198 199 |
# File 'lib/white_gold/dsl/menu_bar.rb', line 194 def remove host.self_path_block path do host. _1, _2 host.self_tree.cut *_3 end end |