Package zeroinstall :: Package gtkui :: Module treetips :: Class TreeTips
[frames] | no frames]

Class TreeTips

source code

This object allows you to set location-dependent tooltips on a TreeView. Connect your TreeView's leave-notify-event to the hide method. In your motion-notify-event handler, call prime when the pointer moves to an area with a new message. The message will be shown after a delay. If calculation of the message is expensive, override get_tooltip_text instead.

Instance Methods
 
show(self, parent) source code
 
prime(self, parent, item)
Call this whenever the pointer moves to an area with a different tooltip.
source code
 
tooltip_draw(self, widget, ev) source code
 
tooltip_destroyed(self, widget) source code
 
hide(self)
Hide the tooltip, if any.
source code
 
get_tooltip_text(self)
"Converts the object passed to prime to a string for display.
source code
Class Variables
  timeout = None
Create a new digest.
  widget = None
Create a new digest.
  item = None
Create a new digest.
  time = 0
Method Details

prime(self, parent, item)

source code 

Call this whenever the pointer moves to an area with a different tooltip.

Parameters:

hide(self)

source code 

Hide the tooltip, if any. Sets item to None.

get_tooltip_text(self)

source code 

"Converts the object passed to prime to a string for display. The default implementation just calls str, but subclasses can override it.

Returns:
the tooltip message