Class: TkProcType

Inherits:
TkStringType show all
Defined in:
ext/ae-rad/ae-rad-inspector.rb

Instance Attribute Summary

Attributes inherited from TkTy

#agobj, #labelhost, #prop

Instance Method Summary collapse

Methods inherited from TkStringType

#do_update, #free, #setpropvalue

Methods inherited from TkTy

#free

Constructor Details

#initialize(_host, _family, _agobj, _prop) ⇒ TkProcType

Returns a new instance of TkProcType.


79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'ext/ae-rad/ae-rad-inspector.rb', line 79

def initialize(_host,  _family, _agobj, _prop)
  super(_host, _family, _agobj, _prop, true)
  @bProp = TkButton.new(@propobj, Arcadia.style('toolbarbutton')){
    text  '...'
    #relief  'flat'
    anchor  'e'
    padx  0
    pady  0
    #activebackground background
    #activeforeground 'red'
    #borderwidth 1
    pack('side' => 'right','fill' => 'y')
  }
  do_proc_update = proc{
    _pr = @prop['type'].procReturn
    $arcadia['objic.action.raise_active_obj'].call
    if _pr && (_pr.length > 0)
      @etext = _pr if _pr != ''
      do_update
      @propobj.value = @etext
    end
  }
  @propobj.bind("Double-1", do_proc_update)
  @bProp.bind("ButtonRelease-1", do_proc_update)
end