Logo Search packages:      
Sourcecode: accerciser version File versions

def event_monitor::EventMonitor::_onLinkMotion (   self,
  textview,
  event 
) [private]

Change mouse cursor shape when hovering over a link.

@param textview: Monitor's text view.
@type textview: gtk.TextView
@param event: Event object
@type event: gtk.gdk.Event

@return: Return False so event continues in callback chain.
@rtype: boolean

Definition at line 416 of file event_monitor.py.

00416                                           :
    '''
    Change mouse cursor shape when hovering over a link.
    
    @param textview: Monitor's text view.
    @type textview: gtk.TextView
    @param event: Event object
    @type event: gtk.gdk.Event
    
    @return: Return False so event continues in callback chain.
    @rtype: boolean
    '''
    x, y = textview.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET,
                                             int(event.x), int(event.y))
    iter = textview.get_iter_at_location(x, y)
    cursor = gtk.gdk.Cursor(gtk.gdk.XTERM)
    for tag in iter.get_tags():
      if tag.get_data('islink'):
        cursor = gtk.gdk.Cursor(gtk.gdk.HAND2)
        break
    textview.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(cursor)
    textview.window.get_pointer()
    return False

  def _handleAccEvent(self, event):


Generated by  Doxygen 1.6.0   Back to index