GIMP Widgets Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
GimpHelpUIGimpHelpUI — Functions for setting tooltip and help identifier used by the GIMP help system. |
void (*GimpHelpFunc) (const gchar *help_id
,gpointer help_data
); #define GIMP_HELP_ID void gimp_help_enable_tooltips (void
); void gimp_help_disable_tooltips (void
); void gimp_standard_help_func (const gchar *help_id
,gpointer help_data
); void gimp_help_connect (GtkWidget *widget
,GimpHelpFunc help_func
,const gchar *help_id
,gpointer help_data
); void gimp_help_set_help_data (GtkWidget *widget
,const gchar *tooltip
,const gchar *help_id
); void gimp_help_set_help_data_with_markup (GtkWidget *widget
,const gchar *tooltip
,const gchar *help_id
); void gimp_context_help (GtkWidget *widget
);
void (*GimpHelpFunc) (const gchar *help_id
,gpointer help_data
);
This is the prototype for all functions you pass as help_func
to
the various GIMP dialog constructors like gimp_dialog_new()
,
gimp_query_int_box()
etc.
Help IDs are textual identifiers the help system uses to figure which page to display.
All these dialog constructors functions call gimp_help_connect()
.
In most cases it will be ok to use gimp_standard_help_func()
which
does nothing but passing the help_id
string to gimp_help()
. If
your plug-in needs some more sophisticated help handling you can
provide your own help_func
which has to call gimp_help()
to
actually display the help.
|
the help ID |
|
the help user data |
#define GIMP_HELP_ID (gimp_help_id_quark ())
The GQuark used to attach GIMP help IDs to widgets.
Since GIMP 2.2
void gimp_help_enable_tooltips (void
);
Enable tooltips to be shown in the GIMP user interface.
As a plug-in author, you don't need to care about this as this
function is called for you from gimp_ui_init()
. This ensures that
the user setting from the GIMP preferences dialog is respected in
all plug-in dialogs.
void gimp_help_disable_tooltips (void
);
Disable tooltips to be shown in the GIMP user interface.
As a plug-in author, you don't need to care about this as this
function is called for you from gimp_ui_init()
. This ensures that
the user setting from the GIMP preferences dialog is respected in
all plug-in dialogs.
void gimp_standard_help_func (const gchar *help_id
,gpointer help_data
);
This is the standard GIMP help function which does nothing but calling
gimp_help()
. It is the right function to use in almost all cases.
|
A unique help identifier. |
|
The help_data passed to gimp_help_connect() . |
void gimp_help_connect (GtkWidget *widget
,GimpHelpFunc help_func
,const gchar *help_id
,gpointer help_data
);
Note that this function is automatically called by all libgimp dialog constructors. You only have to call it for windows/dialogs you created "manually".
|
The widget you want to connect the help accelerator for. Will be a GtkWindow in most cases. |
|
The function which will be called if the user presses "F1". |
|
The help_id which will be passed to help_func . |
|
The help_data pointer which will be passed to help_func . |
void gimp_help_set_help_data (GtkWidget *widget
,const gchar *tooltip
,const gchar *help_id
);
The reason why we don't use gtk_widget_set_tooltip_text()
is that
elements in the GIMP user interface should, if possible, also have
a help_id
set for context-sensitive help.
This function can be called with NULL for tooltip
. Use this feature
if you want to set a help link for a widget which shouldn't have
a visible tooltip.
|
The GtkWidget you want to set a tooltip and/or help_id for. |
|
The text for this widget's tooltip (or NULL ). |
|
The help_id for the GtkTipsQuery tooltips inspector. |
void gimp_help_set_help_data_with_markup (GtkWidget *widget
,const gchar *tooltip
,const gchar *help_id
);
Just like gimp_help_set_help_data()
, but it allows to pass text which
is marked up with
Pango text markup language.
|
The GtkWidget you want to set a tooltip and/or help_id for. |
|
The markup for this widget's tooltip (or NULL ). |
|
The help_id for the GtkTipsQuery tooltips inspector. |
Since GIMP 2.6
void gimp_context_help (GtkWidget *widget
);
This function invokes the context help inspector.
The mouse cursor will turn turn into a question mark and the user can click on any widget of the application which started the inspector.
If the widget the user clicked on has a help_id
string attached
(see gimp_help_set_help_data()
), the corresponding help page will
be displayed. Otherwise the help system will ascend the widget hierarchy
until it finds an attached help_id
string (which should be the
case at least for every window/dialog).
|
Any GtkWidget on the screen. |