Gnome User Interface Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <gnome.h> #define gnome_widget_add_help (widget, help) void gnome_widget_add_help_with_uidata (GtkWidget *widget, gchar *help, GnomeUIInfo *menuinfo, gpointer user_data); |
This will add a popup-menu to a non GTK_WIDGET_NO_WINDOW() widget. It also has the ability to add "cut", "copy" and "paste" to GtkEditable widgets if needed. It is important to not run this on a widget without a window, as doing so can lead to stuck pointer grabs. This function should be used where possible everywhere else.
#define gnome_widget_add_help(widget, help) |
This is the same as gnome_widget_add_help_with_uidata() but without the options for the extra menu fields.
void gnome_widget_add_help_with_uidata (GtkWidget *widget, gchar *help, GnomeUIInfo *menuinfo, gpointer user_data); |
This creates a popup menu on widget with one entry. The menu, invoked by pressing button three on the widget, will have one entry entitled: "Help with this." Selecting this entry will bring up a tooltip with the help variable as its text. In addition, if the widget is a descendent of GtkEditable, it will add "cut", "copy", and "paste" to the menu. If help is NULL, then it will <emphasis>just</emphasis> add the "cut", "copy", and "paste". Finally, if menuinfo is non-NULL, it will append the menu defined by it on the end of the popup menu, with user_data passed to the callbacks. This function currently only works on non GTK_WIDGET_NO_WINDOW() widgets (ie. it only works on widgets with windows.) If you would actually like a handle to the popup menu, call gnome_popup_menu_get() as normal.
This creates a popup menu on widget with one entry. The menu, invoked by pressing button three on the widget, will have one entry entitled: "Help with this." Selecting this entry will bring up a tooltip with the help variable as its text. In addition, if the widget is a descendent of GtkEditable, it will add "cut", "copy", and "paste" to the menu. If help is NULL, then it will just add the "cut", "copy", and "paste". Finally, if menuinfo is non-NULL, it will append the menu defined by it on the end of the popup menu, with user_data passed to the callbacks. This function currently only works on non GTK_WIDGET_NO_WINDOW() widgets (ie. it only works on widgets with windows.) If you would actually like a handle to the popup menu, call gnome_popup_menu_get() as normal.