Package: gtk

Class gtk:tooltip

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

None

Details

The gtk:tooltip object is an object representing a widget tooltip. Basic tooltips can be realized simply by using the gtk:widget-tooltip-text or gtk:widget-tooltip-markup functions without any explicit tooltip object.

When you need a tooltip with a little more fancy contents, like adding an image, or you want the tooltip to have different contents per gtk:tree-view row or cell, you will have to do a little more work:
  • Set the has-tooltip property to true, this will make GTK monitor the widget for motion and related events which are needed to determine when and where to show a tooltip.
  • Connect to the "query-tooltip" signal. The signal will be emitted when a tooltip is supposed to be shown. One of the arguments passed to the signal handler is a gtk:tooltip object. This is the object that we are about to display as a tooltip, and can be manipulated in your callback function using functions like the gtk:tooltip-set-icon function. There are functions for setting the markup of the tooltip, setting an image from a stock icon, or even putting in a custom widget.
  • Return true from your "query-tooltip" signal handler. This causes the tooltip to be show. If you return false, it will not be shown.
 

Inherited Slot Access Functions

See also

2024-7-8