Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::Tooltips Class Reference

A GtkTooltips C++ wrapper class. More...

#include <xfc/gtk/tooltips.hh>

Inheritance diagram for Xfc::Gtk::Tooltips:

Xfc::Gtk::Object Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable List of all members.

Public Member Functions

Constructors
Accessors
Methods

Static Public Member Functions

Protected Member Functions

Constructors

Detailed Description

A GtkTooltips C++ wrapper class.

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 the default constructor Tooltips(). Every tooltip in the group can then be turned off with a call to disable() and enabled with enable(). To assign a tip to a particular Widget, set_tip() is used.

Note, Tooltips can only be set on widgets which have their own X window. To check if a widget has its own window use Gtk::Widget::has_no_window(). To add a tooltip to a widget that doesn't have its own window, place the widget inside an EventBox and add a tooltip to that instead.

The default appearance of all tooltips in a program is determined by the current GTK+ theme that the user has selected. Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using data_get().


Constructor & Destructor Documentation

Xfc::Gtk::Tooltips::Tooltips GtkTooltips *  tooltips,
bool  owns_reference = false
[explicit, protected]
 

Construct a new Tooltips from an existing GtkTooltips.

Parameters:
tooltips A pointer to a GtkTooltips.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The tooltips can be a newly created GtkTooltips or an existing GtkTooltips (see G::Object::Object).


Member Function Documentation

TooltipsData* Xfc::Gtk::Tooltips::data_get Widget widget  )  [static]
 

Retrieves any TooltipsData previously associated with the given widget.

Parameters:
widget A Widget.
Returns:
A TooltipsData object, or null if the widget has no tooltip.

void Xfc::Gtk::Tooltips::disable  ) 
 

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 enable().

void Xfc::Gtk::Tooltips::force_window  ) 
 

Ensures that the window used for displaying the given tooltips is created.

Applications should never have to call this method, since GTK+ takes care of this.

void Xfc::Gtk::Tooltips::set_tip Widget widget,
const String tip_text,
const String tip_private = 0
 

Adds a tooltip containing the message tip_text to the specified Widget.

Parameters:
widget The Widget you wish to associate the tip with.
tip_text A string containing the tip itself.
tip_private A string of any further information that may be useful if the user gets stuck.

void Xfc::Gtk::Tooltips::unset_tip Widget widget  ) 
 

Unsets any previously set tooltip associated with widget.

Parameters:
widget A Widget.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3