Class: Glimmer::Tk::TreeviewProxy

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

Overview

Custom treeview widget implementation

Constant Summary

Constants inherited from WidgetProxy

WidgetProxy::FONTS_PREDEFINED, WidgetProxy::HEXADECIMAL_CHARACTERS

Instance Attribute Summary

Attributes inherited from WidgetProxy

#args, #bind_ids, #children, #destroyed, #keyword, #parent_proxy, #tk

Attributes included from DraggableAndDroppable

#on_drag_motion_block

Instance Method Summary collapse

Methods inherited from WidgetProxy

#add_observer, #ancestor_proxies, #apply_style, #attribute_argument_normalizers, #attribute_setter, #clear_children, #content, create, #destroy, #disabled, #disabled=, #enabled, #enabled=, #event_generate, #font=, #grid, #handle_listener, #has_attributes_attribute?, #has_state?, #hidden, #hidden=, #image_argument, #initialize, #inspect, #method_missing, #normalize_attribute_arguments, #on, #post_add_content, #post_initialize_child, #respond_to?, #root_parent_proxy, #style=, tk_widget_class_for, #tk_widget_has_attribute_getter_setter?, #tk_widget_has_attribute_setter?, #toplevel_parent_proxy, #unbind_all, #visible, #visible=, #widget_attribute_listener_installers, #widget_custom_attribute_mapping, widget_exists?, widget_proxy_class, #window?

Methods included from DraggableAndDroppable

#drag_source=, #drop_target=, #handle_listener, #make_draggable, #make_droppable, #make_non_draggable, #make_non_droppable, #on_drag_start_block=, #on_drop_block=, #textvariable_defined?

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

#get_attribute(attribute) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/glimmer/tk/treeview_proxy.rb', line 40

def get_attribute(attribute)
  if attribute == 'columns'
    self[attribute]
  else
    super
  end
end

#has_attribute?(attribute, *args) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/glimmer/tk/treeview_proxy.rb', line 28

def has_attribute?(attribute, *args)
  attribute == 'columns' || super
end

#set_attribute(attribute, *args) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/glimmer/tk/treeview_proxy.rb', line 32

def set_attribute(attribute, *args)
  if attribute == 'columns'
    self[attribute] = args.first
  else
    super
  end
end