Class: Glimmer::LibUI::FontButtonProxy
- Inherits:
-
ControlProxy
- Object
- ControlProxy
- Glimmer::LibUI::FontButtonProxy
- Defined in:
- lib/glimmer/libui/font_button_proxy.rb
Overview
Proxy for LibUI font button objects
Follows the Proxy Design Pattern
Constant Summary
Constants inherited from ControlProxy
ControlProxy::BOOLEAN_PROPERTIES, ControlProxy::STRING_PROPERTIES
Instance Attribute Summary
Attributes inherited from ControlProxy
#args, #block, #keyword, #libui, #parent_proxy
Instance Method Summary collapse
- #destroy ⇒ Object
- #family ⇒ Object
- #font ⇒ Object
- #italic ⇒ Object
- #size ⇒ Object
- #stretch ⇒ Object
- #weight ⇒ Object
Methods inherited from ControlProxy
#append_properties, #append_property, boolean_to_integer, #can_handle_listener?, #content, control_proxies, create, #default_destroy, #destroy_child, #enabled, exists?, #handle_listener, image_proxies, #initialize, 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
This class inherits a constructor from Glimmer::LibUI::ControlProxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::LibUI::ControlProxy
Instance Method Details
#destroy ⇒ Object
62 63 64 65 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 62 def destroy ::LibUI.(@font_descriptor) unless @font_descriptor.nil? super end |
#family ⇒ Object
42 43 44 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 42 def family font[:family] end |
#font ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 30 def font @font_descriptor ||= ::LibUI::FFI::FontDescriptor.malloc ::LibUI.(@libui, @font_descriptor) { family: @font_descriptor.Family.to_s, size: @font_descriptor.Size, weight: @font_descriptor.Weight, italic: @font_descriptor.Italic, stretch: @font_descriptor.Stretch } end |
#italic ⇒ Object
54 55 56 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 54 def italic font[:italic] end |
#size ⇒ Object
46 47 48 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 46 def size font[:size] end |
#stretch ⇒ Object
58 59 60 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 58 def stretch font[:stretch] end |
#weight ⇒ Object
50 51 52 |
# File 'lib/glimmer/libui/font_button_proxy.rb', line 50 def weight font[:weight] end |