Class: PropLine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_parent, _name, _prop) ⇒ PropLine

Returns a new instance of PropLine.



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'ext/ae-rad/ae-rad-inspector.rb', line 353

def initialize(_parent, _name, _prop)
  @parent = _parent
  @prop = _prop
  
  @propkey = TkLabel.new(@parent.left_text, Arcadia.style('label')){
    text _name
    justify 'right'
    anchor 'w'
    borderwidth '1'
    relief 'groove'
  }
  
  TkTextWindow.new(@parent.left_text, 'end', 'window'=> @propkey)
  @propkey.pack('fill'=>'x',:padx=>0, :pady=>0)
  @parent.left_text.insert('end',"\n")
  if !defined? _prop['type']
    _prop['type'] = 'StringType'
  end
  @valueobj = ValueRap.new(@parent, @prop)
end

Instance Attribute Details

#valueobjObject (readonly)

Returns the value of attribute valueobj.



352
353
354
# File 'ext/ae-rad/ae-rad-inspector.rb', line 352

def valueobj
  @valueobj
end

Instance Method Details

#freeObject



374
375
376
377
378
379
380
# File 'ext/ae-rad/ae-rad-inspector.rb', line 374

def free
  @propkey.destroy if @propkey !=nil
  @valueobj.free if @valueobj !=nil
  @valueobj = nil
  @parent.left_text.delete('end -1 lines linestart','end')
  @parent.right_text.delete('end -1 lines linestart','end')
end

#setvalue(_value) ⇒ Object



382
383
384
# File 'ext/ae-rad/ae-rad-inspector.rb', line 382

def setvalue(_value)
  @valueobj.updatevalue(_value)
end

#updatekeyvalue(_agobj, _name, _prop) ⇒ Object



386
387
388
389
390
# File 'ext/ae-rad/ae-rad-inspector.rb', line 386

def updatekeyvalue(_agobj, _name, _prop)
  @prop = _prop
  @propkey.configure('text'=>_name) # chiave
  @valueobj.recicle(@parent.family, _agobj, @prop)
end