Method: AGTkPlaceManager#obj_bind

Defined in:
ext/ae-rad/lib/tk/al-tk.rb

#obj_bindObject



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 134

def obj_bind
  if (@agobj.ag_parent != nil)
    @agobj.obj.bind_append("ButtonPress-1", proc{|e| do_press_obj(e.x, e.y);@agobj.obj.callback_break})
    @agobj.obj.bind_append("ButtonRelease-1", proc{|e| do_release_obj(e.x, e.y)})
    @agobj.obj.bind("B1-Motion", proc{|x, y| do_mov_obj(x,y)},"%x %y")
    @agobj.obj.bind("Control-ButtonPress-1", proc{
      if active?
        deactivate
      else
        activate(false)
      end
      #do_bypass_parent_bind
    })
    @agobj.obj.bind("Control-ButtonRelease-1", proc{})
    if @agobj.obj.configure('cursor') != nil
      @agobj.obj.bind_append("Enter", proc{|x, y| do_enter_obj(x, y)}, "%x %y" )
      @agobj.obj.bind_append("Leave", proc{do_leave_obj})
    end
  end
end