Class Index Cross Index Namespace Index

Class Gtk::TipsQuery

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);
 

Description:

The Gtk::TipsQuery widget is a subclass of Gtk::Label which is used to display help about widgets in a user interface.

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


Function Member Descriptions:

Gtk::TipsQuery::gtkobj - Returns the underlaying gtk+ object.

GtkTipsQuery* gtkobj();

Gtk::TipsQuery::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::TipsQuery::set_caller - Emitted when a widget is entered by the pointer while the query is in effect. Emitted when a widget is selected during a query. Sets the widget which initiates the query, usually a button.

void set_caller(Gtk::Widget* caller=0);
If the caller is selected while the query is running, the query is automatically stopped.

caller: The widget which initiates the query.



Gtk::TipsQuery::set_caller - Sets the widget which initiates the query, usually a button.

void set_caller(Gtk::Widget& caller);
If the caller is selected while the query is running, the query is automatically stopped.

caller: The widget which initiates the query.



Gtk::TipsQuery::set_labels - Sets the text to display when the query is not in effect, and the text to display when the query is in effect but the widget beneath the pointer has no tooltip.

void set_labels(const string& label_inactive, const string& label_no_tip);
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.



Gtk::TipsQuery::start_query - Emitted when the query is started.

emitable signal void start_query();
virtual void start_query_impl();

Gtk::TipsQuery::stop_query - Emitted when the query is stopped.

emitable signal void stop_query();
virtual void stop_query_impl();