Class: AGTkLabelWatch

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

Class Method Summary collapse

Instance Method Summary collapse

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