synopsis#include <gtk/gtk.h> gtktipsquery; gtkwidget* gtk_tips_query_new (void); void gtk_tips_query_start_query (gtktipsquery *tips_query); void gtk_tips_query_stop_query (gtktipsquery *tips_query); void gtk_tips_query_set_caller (gtktipsquery *tips_query, gtkwidget *caller); void gtk_tips_query_set_labels (gtktipsquery *tips_query, const gchar *label_inactive, const gchar *label_no_tip); object hierarchygobject +----ginitiallyunowned +----gtkobject +----gtkwidget +----gtkmisc +----gtklabel +----gtktipsquery properties"caller" gtkwidget : read / write "emit-always" gboolean : read / write "label-inactive" gchararray : read / write "label-no-tip" gchararray : read / write signals"start-query" void user_function (gtktipsquery *tipsquery, gpointer user_data) : run first "stop-query" void user_function (gtktipsquery *tipsquery, gpointer user_data) : run first "widget-entered" void user_function (gtktipsquery *tipsquery, gtkwidget *widget, gchar *tip_text, gchar *tip_private, gpointer user_data) : run last "widget-selected" gboolean user_function (gtktipsquery *tipsquery, gtkwidget *widget, gchar *tip_text, gchar *tip_private, gdkeventbutton *event, gpointer user_data) : run last descriptionthe gtktipsquery widget is a subclass of gtklabel which is used to display help about widgets in a user interface. a query is started with a call to gtk_tips_query_start_query(), usually when some kind of 'help' button is pressed. the gtktipsquery then grabs all events, stopping the user interface from functioning normally. then as the user moves the mouse over the widgets, the gtktipsquery displays each widget's tooltip text. by connecting to the "widget-entered" or "widget-selected" signals, it is possible to customize the gtktipsquery 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 gtk_tips_query_stop_query() must be made in order to stop the query and return the interface to its normal state. the gtk_tips_query_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). detailsgtktipsquerytypedef struct _gtktipsquery gtktipsquery; warninggtktipsquery is deprecated and should not be used in newly-written code. the gtktipsquery-struct struct contains private data only, and should be accessed using the functions below. gtk_tips_query_new ()gtkwidget* gtk_tips_query_new (void); warninggtk_tips_query_new is deprecated and should not be used in newly-written code. creates a new gtktipsquery.
gtk_tips_query_start_query ()void gtk_tips_query_start_query (gtktipsquery *tips_query); warninggtk_tips_query_start_query is deprecated and should not be used in newly-written code. starts a query. the gtktipsquery widget will take control of the mouse and as the mouse moves it will display the tooltip of the widget beneath the mouse.
gtk_tips_query_stop_query ()void gtk_tips_query_stop_query (gtktipsquery *tips_query); warninggtk_tips_query_stop_query is deprecated and should not be used in newly-written code. stops a query.
gtk_tips_query_set_caller ()void gtk_tips_query_set_caller (gtktipsquery *tips_query, gtkwidget *caller); warninggtk_tips_query_set_caller is deprecated and should not be used in newly-written code. sets the widget which initiates the query, usually a button. if the caller is selected while the query is running, the query is automatically stopped.
gtk_tips_query_set_labels ()void gtk_tips_query_set_labels (gtktipsquery *tips_query, const gchar *label_inactive, const gchar *label_no_tip); warninggtk_tips_query_set_labels is deprecated and should not be used in newly-written code. 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.
property detailsthe "caller" property"caller" gtkwidget : read / write the widget that starts the tips query, usually a button. if it is selected while the query is in effect the query is automatically stopped. the "emit-always" property"emit-always" gboolean : read / write true if the widget-entered and widget-selected signals are emitted even when the widget has no tooltip set. default value: false the "label-inactive" property"label-inactive" gchararray : read / write the text to display in the gtktipsquery widget when the query is not in effect. default value: null the "label-no-tip" property"label-no-tip" gchararray : read / write the text to display in the gtktipsquery widget when the query is running and the widget that the pointer is over has no tooltip. default value: null signal detailsthe "start-query" signalvoid user_function (gtktipsquery *tipsquery, gpointer user_data) : run first emitted when the query is started.
the "stop-query" signalvoid user_function (gtktipsquery *tipsquery, gpointer user_data) : run first emitted when the query is stopped.
the "widget-entered" signalvoid user_function (gtktipsquery *tipsquery, gtkwidget *widget, gchar *tip_text, gchar *tip_private, gpointer user_data) : run last emitted when a widget is entered by the pointer while the query is in effect.
the "widget-selected" signalgboolean user_function (gtktipsquery *tipsquery, gtkwidget *widget, gchar *tip_text, gchar *tip_private, gdkeventbutton *event, gpointer user_data) : run last emitted when a widget is selected during a query.
|