Class: Glimmer::LibUI::ImageProxy

Inherits:
ControlProxy show all
Defined in:
lib/glimmer/libui/image_proxy.rb

Overview

Proxy for LibUI image 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

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, #respond_to?, #respond_to_libui?, #send_to_libui, #visible, widget_proxy_class, #window_proxy

Constructor Details

#initialize(keyword, parent, args, &block) ⇒ ImageProxy



33
34
35
36
37
38
39
40
41
# File 'lib/glimmer/libui/image_proxy.rb', line 33

def initialize(keyword, parent, args, &block)
  @keyword = keyword
  @parent_proxy = parent
  @args = args
  @block = block
  @enabled = true
  @children = []
  post_add_content if @block.nil?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Glimmer::LibUI::ControlProxy

Instance Method Details

#post_add_contentObject



43
44
45
46
# File 'lib/glimmer/libui/image_proxy.rb', line 43

def post_add_content
  build_control
  super
end

#post_initialize_child(child) ⇒ Object



48
49
50
# File 'lib/glimmer/libui/image_proxy.rb', line 48

def post_initialize_child(child)
  @children << child
end