Class: AGTkLabelWatch

Inherits:
AGTkLabel show all
Defined in:
ext/ae-rad/lib/tk/al-tkcustom.rb

Instance Attribute Summary

Attributes inherited from AGTkBaseContainer

#where_x, #where_y

Attributes inherited from AGTk

#canvas, #l_manager, #x0, #x3, #y0, #y3

Attributes inherited from AG

#ag_parent, #i_ag, #i_name, #obj, #obj_class, #persistent, #props, #props_def, #props_kinds, #renderer, #sniffer, #sons

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AGTkContainer

class_sniffer

Methods inherited from AGTkBaseContainer

#initialize

Methods inherited from AGTkLayoutManaged

#start_properties

Methods inherited from AGTk

#activate, #active_move_tab, class_renderer, class_sniffer, #contains_events, #delete, #getFileName, #has_events, #initialize, #popup, #popup_items, #update_property

Methods inherited from AG

#activate, active, #add_require, #build_sons, class_renderer, class_sniffer, #defaults, #defaults_values, #del_require, #delete, #fill_defaults_value_from_agobj, #getControlClassName, #getFileName, #getInstanceClass, #getObjClass, #getViewClassName, #get_implementation_block, #get_implementation_code, #get_implementation_new, #get_path_i_name, #has_sons, #initialize, near_class_wrapped, near_class_wrapper, #new_id, #passed_object, #publish, #publish_def, #publish_del, #publish_mod, publish_property, #register, #retrive_values, #select, #start_properties, #update_property

Constructor Details

This class inherits a constructor from AGTkBaseContainer

Class Method Details

.class_wrappedObject


33
34
35
# File 'ext/ae-rad/lib/tk/al-tkcustom.rb', line 33

def AGTkLabelWatch.class_wrapped
  TkLabelWatch
end

Instance Method Details

#new_objectObject


37
38
39
40
# File 'ext/ae-rad/lib/tk/al-tkcustom.rb', line 37

def new_object
  @obj = TkLabelWatch.new(@ag_parent.obj)
  @obj.show
end

#propertiesObject


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'ext/ae-rad/lib/tk/al-tkcustom.rb', line 42

def properties
  super()
  mod_publish('property','name'=>'text','default'=> nil)
  publish('property','name'=>'active',
  'get'=> proc{ @obj.active? },
  'set'=> proc{|_val|
    if _val
      @obj.start
    else
      @obj.stop
    end
  },
  'def'=> proc{|value|
    if value
      return "start"
    else
      return ""
    end
  },
  'type'=> TkType::TkagBool
  )
end