![]() | ![]() | ![]() | GIMP Widgets Library Reference Manual | ![]() |
---|
GimpHelpUI — Functions for setting
void (*GimpHelpFunc) (constgchar *help_data); void gimp_help_enable_tooltips (void); void gimp_help_disable_tooltips (void); void gimp_standard_help_func (constgchar *help_data); void gimp_help_connect (GtkWidget *widget, GimpHelpFunc help_func, constgchar *help_data); void gimp_help_set_help_data (GtkWidget *widget, constgchar *tooltip, constgchar *help_data); void gimp_context_help (void);
void (*GimpHelpFunc) (constgchar *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.
Note that all help paths are relative to the root of the help system in the current language. So if your language is "C", a help path of "filters/foo_bar.html" will expand to "${gimp_data_dir}/help/C/filters/foo_bar.html".
All these functions finally call
In most cases it will be ok to use
help_data : | A string containing the path to a HTML page. |
void gimp_help_enable_tooltips (void);
This function calls
void gimp_help_disable_tooltips (void);
This function calls
void gimp_standard_help_func (constgchar *help_data);
This is the standard GIMP help function which does nothing but calling
Currently, gimp_standard_help_func() and
See GimpHelpFunc for the naming conventions of HTML help files.
help_data : | A string containing the path to a HTML page. |
void gimp_help_connect (GtkWidget *widget, GimpHelpFunc help_func, constgchar *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".
widget : | The widget you want to connect the help accelerator for. Will
be a |
help_func : | The function which will be called if the user presses "F1". |
help_data : | The data pointer which will be passed to help_func. |
void gimp_help_set_help_data (GtkWidget *widget, constgchar *tooltip, constgchar *help_data);
The reason why we don't use
This function can be called with NULL for tooltip. Use this feature if you want to set a HTML help link for a widget which shouldn't have a visible tooltip.
You can e.g. set a help_data string to a complete HTML page for a
container widget (e.g. a
If the tooltips inspector (Shift + "F1") is invoked and the user clicks on one of the widgets which only contain a "#" link, the help system will automatically ascend the widget hierarchy until it finds another widget with help_data attached and concatenates both to a complete help path.
widget : | The |
tooltip : | The text for this widget's tooltip (or NULL). |
help_data : | The help_data for the |
void gimp_context_help (void);
This function invokes the
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_data string attached (see gimp_help_set_help_data()), the corresponding HTML page will be displayed. Otherwise the help system will ascend the widget hierarchy until it finds an attached help_data string (which should be the case at least for every window/dialog).
<< Part II. GIMP Widgets Utilities | GimpQueryBox >> |