gtk2hsContentsIndex
Tooltips
Description

Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose descriptions of things such as buttons in a toolbar.

An individual tooltip belongs to a group of tooltips. A group is created with a call to tooltipsNew. Every tooltip in the group can then be turned off with a call to tooltipsDisable and enabled with tooltipsEnable.

The length of time the user must keep the mouse over a widget before the tip is shown, can be altered with tooltipsSetDelay. This is set on a 'per group of tooltips' basis.

To assign a tip to a particular widget, tooltipsSetTip is used.

To associate Tooltips to a widget it is has to have its own DrawWindow. Otherwise the widget must be set into an EventBox.

Synopsis
tooltipsNew :: IO Tooltips
tooltipsEnable :: TooltipsClass t => t -> IO ()
tooltipsDisable :: TooltipsClass t => t -> IO ()
tooltipsSetDelay :: TooltipsClass t => t -> Int -> IO ()
tooltipsSetTip :: (TooltipsClass t, WidgetClass w) => t -> w -> String -> String -> IO ()
tooltipsDataGet :: WidgetClass w => w -> IO (Maybe (Tooltips, String, String))
Documentation
tooltipsNew :: IO Tooltips
Create a new goup of Tooltips.
tooltipsEnable :: TooltipsClass t => t -> IO ()
Display the help the Tooltips group provides.
tooltipsDisable :: TooltipsClass t => t -> IO ()

Disable Tooltips group.

  • Causes all tooltips in tooltips to become inactive. Any widgets that have tips associated with that group will no longer display their tips until they are enabled again with tooltipsEnable.
tooltipsSetDelay :: TooltipsClass t => t -> Int -> IO ()

Sets the time between the user moving the mouse over a widget and the widget's tooltip appearing.

  • The time parameter is in ms.
tooltipsSetTip :: (TooltipsClass t, WidgetClass w) => t -> w -> String -> String -> IO ()

Adds a tooltip containing the message tipText to the specified GtkWidget.

  • The tipPrivate parameter is meant to give a thorough explaination. This might someday be accessible to a questionmark cursor (like MS Windows).
tooltipsDataGet :: WidgetClass w => w -> IO (Maybe (Tooltips, String, String))
Retrieves any Tooltips previously associated with the given widget.
Produced by Haddock version 0.6