Class: Glimmer::Tk::NotebookProxy

Inherits:
WidgetProxy show all
Defined in:
lib/glimmer/tk/notebook_proxy.rb

Overview

Proxy for Tk::Tile::Notebook

Follows the Proxy Design Pattern

Constant Summary collapse

TAB_OPTIONS =
['state', 'sticky', 'padding', 'text', 'image', 'compound', 'underline']

Constants inherited from WidgetProxy

WidgetProxy::DEFAULT_INITIALIZERS

Instance Attribute Summary collapse

Attributes inherited from WidgetProxy

#args, #keyword, #parent_proxy, #tk

Instance Method Summary collapse

Methods inherited from WidgetProxy

#add_observer, #attribute_setter, #content, create, #get_attribute, #handle_listener, #has_attribute?, #has_attributes_attribute?, #has_state?, #image_argument, #method_missing, #post_add_content, #respond_to?, #set_attribute, tk_widget_class_for, #tk_widget_has_attribute_getter_setter?, #tk_widget_has_attribute_setter?, #widget_attribute_listener_installers, #widget_custom_attribute_mapping, widget_exists?, widget_proxy_class

Constructor Details

#initialize(*args) ⇒ NotebookProxy

Returns a new instance of NotebookProxy.



34
35
36
37
# File 'lib/glimmer/tk/notebook_proxy.rb', line 34

def initialize(*args)
  @tab_proxies = []
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Glimmer::Tk::WidgetProxy

Instance Attribute Details

#tab_proxiesObject (readonly)

Returns the value of attribute tab_proxies.



32
33
34
# File 'lib/glimmer/tk/notebook_proxy.rb', line 32

def tab_proxies
  @tab_proxies
end

Instance Method Details

#post_initialize_child(child) ⇒ Object



39
40
41
42
# File 'lib/glimmer/tk/notebook_proxy.rb', line 39

def post_initialize_child(child)
  @tab_proxies << child
  @tk.add child.tk, child.tab_options
end