Class: Glimmer::Tk::LabelProxy

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

Overview

Proxy for Tk::Tile::TLabel

Follows the Proxy Design Pattern

Constant Summary

Constants inherited from WidgetProxy

WidgetProxy::DEFAULT_INITIALIZERS

Instance Attribute Summary

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, #has_attribute?, #has_state?, #image_argument, #initialize, #method_missing, #post_add_content, #post_initialize_child, #respond_to?, 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

This class inherits a constructor from Glimmer::Tk::WidgetProxy

Dynamic Method Handling

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

Instance Method Details

#set_attribute(attribute, *args) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/glimmer/tk/label_proxy.rb', line 30

def set_attribute(attribute, *args)
  if attribute.to_s == 'font'
    args[0] = "tk_#{args[0]}_font".camelcase(:upper) if (args[0].is_a?(Symbol) || args[0].is_a?(String)) && args[0].to_s == args[0].to_s.downcase
    super
  else
    super
  end
end