Class: AGINTk

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

Direct Known Subclasses

ATkTileStyle

Instance Attribute Summary collapse

Attributes inherited from AG

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

Instance Method Summary collapse

Methods inherited from AG

#activate, active, #add_require, #build_sons, class_renderer, class_sniffer, class_wrapped, #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, near_class_wrapped, near_class_wrapper, #new_id, #passed_object, #properties, #publish, #publish_def, #publish_del, #publish_mod, publish_property, #register, #retrive_values, #select, #start_properties, #update_property

Constructor Details

#initialize(_ag_parent = nil, _object = nil) ⇒ AGINTk

Returns a new instance of AGINTk.



857
858
859
860
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 857

def initialize(_ag_parent = nil, _object = nil)
  super(_ag_parent, _object)
  object_inspector_select
end

Instance Attribute Details

#graphic_objObject (readonly)

Returns the value of attribute graphic_obj.



855
856
857
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 855

def graphic_obj
  @graphic_obj
end

Instance Method Details

#new_graphic_rappresentationObject



878
879
880
881
882
883
884
885
886
887
888
889
890
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 878

def new_graphic_rappresentation
  @graphic_obj = TkLabel.new(@ag_parent.obj){
    background	'#fab4b9'
    background	'#fab4b9'
    foreground	'#a30c17'
    text	'obj'
  }
  if (defined? @ag_parent.where_x)&&(defined? @ag_parent.where_y)
    @graphic_obj.place('x'=>@ag_parent.where_x,'y'=>@ag_parent.where_y)
  end
  AGTkObjPlace.new(@graphic_obj)
  @graphic_obj.bind_append("ButtonPress-1", proc{object_inspector_select; @graphic_obj.callback_break })
end

#new_objectObject



862
863
864
865
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 862

def new_object
  super
  new_graphic_rappresentation
end

#object_inspector_selectObject



892
893
894
895
896
897
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 892

def object_inspector_select
  AGTkLManager.deactivate_all
  self.select
  self.activate
  #@object_inspector.select(self, true) if !defined? @object_inspector.active_object or @object_inspector.active_object != self
end

#update(_event, _agobj) ⇒ Object



867
868
869
870
871
872
873
874
875
876
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 867

def update(_event, _agobj)
  case _event
  when 'SELECT'
    if _agobj == self
      @graphic_obj.configure('relief'=>	'ridge')
    else
      @graphic_obj.configure('relief'=>	'flat')
    end
  end
end