Class: TkScrollboxObjBoard

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

Instance Attribute Summary

Attributes inherited from ObjBoard

#objectsList

Instance Method Summary collapse

Methods inherited from ObjBoard

#get_string

Constructor Details

#initialize(_host) ⇒ TkScrollboxObjBoard

Returns a new instance of TkScrollboxObjBoard.


916
917
918
919
920
921
922
923
# File 'ext/ae-rad/ae-rad-inspector.rb', line 916

def initialize(_host)
  super
  @sb = TkScrollbox.new(_host, Arcadia.style('edit')){
    width  200
    height 200
    pack('fill'=>'both', :padx=>0, :pady=>0)
  }
end

Instance Method Details

#delete(_agobj) ⇒ Object


925
926
927
928
# File 'ext/ae-rad/ae-rad-inspector.rb', line 925

def delete(_agobj)
  super
  @sb.delete('active')
end

#insert(_agobj) ⇒ Object


930
931
932
933
# File 'ext/ae-rad/ae-rad-inspector.rb', line 930

def insert(_agobj)
  super
  @sb.insert('end', _agobj.i_name)
end

#select(_agobj) ⇒ Object


935
936
937
938
939
940
941
942
943
944
# File 'ext/ae-rad/ae-rad-inspector.rb', line 935

def select(_agobj)
  super
  @sb.selection_clear(0, @sb.size - 1)
  for i in 0..@sb.size - 1
    if @sb.get(i) == _agobj.i_name.to_s
      @sb.selection_set(i)
      break
    end
  end
end