Class: Glimmer::LibUI::TabItemProxy
- Inherits:
-
ControlProxy
- Object
- ControlProxy
- Glimmer::LibUI::TabItemProxy
- Defined in:
- lib/glimmer/libui/tab_item_proxy.rb
Overview
Proxy for LibUI tab item objects
Follows the Proxy Design Pattern
Constant Summary
Constants inherited from ControlProxy
ControlProxy::BOOLEAN_PROPERTIES, ControlProxy::STRING_PROPERTIES
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Attributes inherited from ControlProxy
#args, #block, #keyword, #libui, #parent_proxy
Instance Method Summary collapse
-
#initialize(keyword, parent, args, &block) ⇒ TabItemProxy
constructor
A new instance of TabItemProxy.
- #margined(value = nil) ⇒ Object (also: #set_margined, #margined=, #margined?)
- #name ⇒ Object
Methods inherited from ControlProxy
#append_properties, #append_property, boolean_to_integer, #can_handle_listener?, #content, control_proxies, create, #default_destroy, #destroy, #destroy_child, #enabled, exists?, #handle_listener, image_proxies, integer_to_boolean, #libui_api_keyword, main_window_proxy, menu_proxies, #method_missing, new_control, #post_add_content, #post_initialize_child, #respond_to?, #respond_to_libui?, #send_to_libui, #visible, widget_proxy_class, #window_proxy
Constructor Details
#initialize(keyword, parent, args, &block) ⇒ TabItemProxy
Returns a new instance of TabItemProxy.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/glimmer/libui/tab_item_proxy.rb', line 33 def initialize(keyword, parent, args, &block) @keyword = keyword @parent_proxy = parent @args = args @block = block @enabled = 1 @index = @parent_proxy.num_pages @content = @block&.call build_control end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::LibUI::ControlProxy
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
31 32 33 |
# File 'lib/glimmer/libui/tab_item_proxy.rb', line 31 def index @index end |
Instance Method Details
#margined(value = nil) ⇒ Object Also known as: set_margined, margined=, margined?
48 49 50 51 52 53 54 |
# File 'lib/glimmer/libui/tab_item_proxy.rb', line 48 def margined(value = nil) if value.nil? @parent_proxy.margined(@index) else @parent_proxy.margined(@index, value) end end |
#name ⇒ Object
44 45 46 |
# File 'lib/glimmer/libui/tab_item_proxy.rb', line 44 def name @args.first end |