Class Index | Cross Index | Namespace Index |
Displays help about widgets in the user interface.
Contained in: Gtk
Derived from:
Gtk::Label
Derived by:
none
#include <gtk--/tipsquery.h>
public function member index: |
||
TipsQuery | (); | |
GtkTipsQuery* | gtkobj | (); |
const GtkTipsQuery* | gtkobj | () const; |
static bool | isA | (Object* object); |
void | set_caller | (Gtk::Widget* caller=0); |
void | set_caller | (Gtk::Widget& caller); |
void | set_labels | (const string& label_inactive, const string& label_no_tip); |
emitable signal void | start_query | (); |
emitable signal void | stop_query | (); |
virtual | ~TipsQuery | (); |
protected function member index: |
||
virtual void | start_query_impl | (); |
virtual void | stop_query_impl | (); |
virtual void | widget_entered_impl | (Gtk::Widget* p0, const gchar* p1, const gchar* p2); |
virtual gint | widget_selected_impl | (Gtk::Widget* p0, const gchar* p1, const gchar* p2, GdkEventButton* p3); |
A query is started with a call to start_query, usually when some kind of 'Help' button is pressed. The Gtk::TipsQuery then grabs all events, stopping the user interface from functioning normally. Then as the user moves the mouse over the widgets, the Gtk::TipsQuery displays each widget's tooltip text.
By connecting to the "widget-entered" or "widget-selected" signals, it is possible to customize the Gtk::TipsQuery to perform other actions when widgets are entered or selected. For example, a help browser could be opened with documentation on the widget selected.
At some point a call to stop_query must be made in order to stop the query
and return the interface to its normal state. The set_caller function can be
used to specify a widget which the user can select to stop the query (often the
same button used to start the query).
If the caller is selected while the query is running, the query is automatically stopped.caller: The widget which initiates the query.
If the caller is selected while the query is running, the query is automatically stopped.caller: The widget which initiates the query.
label_inactive: The text to display when the query is not running.label_no_tip: The text to display when the query is running but the widget beneath the pointer has no tooltip.