## gnome-app-helper gnome-app-helper — Useful functions for populating menus and toolbars. |

## Synopsis

    #include <libgnomeui/libgnomeui.h>

    enum                GnomeUIInfoType;
    enum                GnomeUIInfoConfigurableTypes;
    #define             GNOME_APP_CONFIGURABLE_ITEM_EXIT
    enum                GnomeUIPixmapType;
                        GnomeUIInfo;
                        GnomeUIBuilderData;
    #define             GNOMEUIINFO_KEY_UIDATA
    #define             GNOMEUIINFO_KEY_UIBDATA
    void                (*GnomeUISignalConnectFunc)         (GnomeUIInfo *uiinfo,
                                                             const char *signal_name,
                                                             GnomeUIBuilderData *uibdata);
    void                gnome_accelerators_sync             (void);
    void                gnome_app_fill_menu                 (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos);
    void                gnome_app_fill_menu_with_data       (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos,
                                                             gpointer user_data);
    void                gnome_app_fill_menu_custom          (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos);
    void                gnome_app_ui_configure_configurable (GnomeUIInfo *uiinfo);
    void                gnome_app_create_menus              (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);
    void                gnome_app_create_menus_interp       (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);
    void                gnome_app_create_menus_with_data    (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             gpointer user_data);
    void                gnome_app_create_menus_custom       (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);
    void                gnome_app_fill_toolbar              (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group);
    void                gnome_app_fill_toolbar_with_data    (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gpointer user_data);
    void                gnome_app_fill_toolbar_custom       (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata,
                                                             GtkAccelGroup *accel_group);
    void                gnome_app_create_toolbar            (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);
    void                gnome_app_create_toolbar_interp     (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);
    void                gnome_app_create_toolbar_with_data  (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             gpointer user_data);
    void                gnome_app_create_toolbar_custom     (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);
    GtkWidget*          gnome_app_find_menu_pos             (GtkWidget *parent,
                                                             const gchar *path,
                                                             gint *pos);
    void                gnome_app_remove_menus              (GnomeApp *app,
                                                             const gchar *path,
                                                             gint items);
    void                gnome_app_remove_menu_range         (GnomeApp *app,
                                                             const gchar *path,
                                                             gint start,
                                                             gint items);
    void                gnome_app_insert_menus_custom       (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);
    void                gnome_app_insert_menus              (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo);
    void                gnome_app_insert_menus_with_data    (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo,
                                                             gpointer data);
    void                gnome_app_insert_menus_interp       (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);
    void                gnome_app_install_appbar_menu_hints (GnomeAppBar *appbar,
                                                             GnomeUIInfo *uiinfo);
    void                gnome_app_install_statusbar_menu_hints
                                                            (GtkStatusbar *bar,
                                                             GnomeUIInfo *uiinfo);
    void                gnome_app_install_menu_hints        (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);
    void                gnome_app_setup_toolbar             (GtkToolbar *toolbar,
                                                             BonoboDockItem *dock_item);
    #define             GNOMEUIINFO_END
    #define             GNOMEUIINFO_SEPARATOR
    #define             GNOMEUIINFO_ITEM                    (label, tooltip, callback, xpm_data)
    #define             GNOMEUIINFO_ITEM_STOCK              (label, tooltip, callback, stock_id)
    #define             GNOMEUIINFO_ITEM_NONE               (label, tooltip, callback)
    #define             GNOMEUIINFO_ITEM_DATA               (label, tooltip, callback, user_data, xpm_data)
    #define             GNOMEUIINFO_TOGGLEITEM              (label, tooltip, callback, xpm_data)
    #define             GNOMEUIINFO_TOGGLEITEM_DATA         (label, tooltip, callback, user_data, xpm_data)
    #define             GNOMEUIINFO_HELP                    (app_name)
    #define             GNOMEUIINFO_SUBTREE                 (label, tree)
    #define             GNOMEUIINFO_SUBTREE_HINT            (label, hint, tree)
    #define             GNOMEUIINFO_SUBTREE_STOCK           (label, tree, stock_id)
    #define             GNOMEUIINFO_INCLUDE                 (tree)
    #define             GNOMEUIINFO_RADIOLIST               (list)
    #define             GNOMEUIINFO_RADIOITEM               (label, tooltip, callback, xpm_data)
    #define             GNOMEUIINFO_RADIOITEM_DATA          (label, tooltip, callback, user_data, xpm_data)
    #define             GNOMEUIINFO_MENU_NEW_ITEM           (label, tip, cb, data)
    #define             GNOMEUIINFO_MENU_NEW_SUBTREE        (tree)
    #define             GNOMEUIINFO_MENU_OPEN_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_SAVE_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_SAVE_AS_ITEM       (cb, data)
    #define             GNOMEUIINFO_MENU_REVERT_ITEM        (cb, data)
    #define             GNOMEUIINFO_MENU_PRINT_ITEM         (cb, data)
    #define             GNOMEUIINFO_MENU_PRINT_SETUP_ITEM   (cb, data)
    #define             GNOMEUIINFO_MENU_CLOSE_ITEM         (cb, data)
    #define             GNOMEUIINFO_MENU_EXIT_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_QUIT_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_CUT_ITEM           (cb, data)
    #define             GNOMEUIINFO_MENU_COPY_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_PASTE_ITEM         (cb, data)
    #define             GNOMEUIINFO_MENU_SELECT_ALL_ITEM    (cb, data)
    #define             GNOMEUIINFO_MENU_CLEAR_ITEM         (cb, data)
    #define             GNOMEUIINFO_MENU_UNDO_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_REDO_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_FIND_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_FIND_AGAIN_ITEM    (cb, data)
    #define             GNOMEUIINFO_MENU_REPLACE_ITEM       (cb, data)
    #define             GNOMEUIINFO_MENU_PROPERTIES_ITEM    (cb, data)
    #define             GNOMEUIINFO_MENU_PREFERENCES_ITEM   (cb, data)
    #define             GNOMEUIINFO_MENU_NEW_WINDOW_ITEM    (cb, data)
    #define             GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM  (cb, data)
    #define             GNOMEUIINFO_MENU_ABOUT_ITEM         (cb, data)
    #define             GNOMEUIINFO_MENU_NEW_GAME_ITEM      (cb, data)
    #define             GNOMEUIINFO_MENU_PAUSE_GAME_ITEM    (cb, data)
    #define             GNOMEUIINFO_MENU_RESTART_GAME_ITEM  (cb, data)
    #define             GNOMEUIINFO_MENU_UNDO_MOVE_ITEM     (cb, data)
    #define             GNOMEUIINFO_MENU_REDO_MOVE_ITEM     (cb, data)
    #define             GNOMEUIINFO_MENU_HINT_ITEM          (cb, data)
    #define             GNOMEUIINFO_MENU_SCORES_ITEM        (cb, data)
    #define             GNOMEUIINFO_MENU_END_GAME_ITEM      (cb, data)
    #define             GNOMEUIINFO_MENU_FILE_TREE          (tree)
    #define             GNOMEUIINFO_MENU_EDIT_TREE          (tree)
    #define             GNOMEUIINFO_MENU_VIEW_TREE          (tree)
    #define             GNOMEUIINFO_MENU_SETTINGS_TREE      (tree)
    #define             GNOMEUIINFO_MENU_FILES_TREE         (tree)
    #define             GNOMEUIINFO_MENU_WINDOWS_TREE       (tree)
    #define             GNOMEUIINFO_MENU_HELP_TREE          (tree)
    #define             GNOMEUIINFO_MENU_GAME_TREE          (tree)
    #define             GNOME_MENU_FILE_STRING
    #define             GNOME_MENU_FILE_PATH
    #define             GNOME_MENU_EDIT_STRING
    #define             GNOME_MENU_EDIT_PATH
    #define             GNOME_MENU_VIEW_STRING
    #define             GNOME_MENU_VIEW_PATH
    #define             GNOME_MENU_SETTINGS_STRING
    #define             GNOME_MENU_SETTINGS_PATH
    #define             GNOME_MENU_NEW_STRING
    #define             GNOME_MENU_NEW_PATH
    #define             GNOME_MENU_FILES_STRING
    #define             GNOME_MENU_FILES_PATH
    #define             GNOME_MENU_WINDOWS_STRING
    #define             GNOME_MENU_WINDOWS_PATH
    const gchar*        gnome_app_helper_gettext            (const gchar *string);
    #define             L_                                  (x)
    #define             D_                                  (x)

## Description

This module lets a developer easily create menus and toolbars for use in their applications. Basically, a hierarchy of GnomeUIInfo structures are defined and then the appropriate functions from this module are called to create the menu or tool bars.

## Details

### enum GnomeUIInfoType

    typedef enum {
    	GNOME_APP_UI_ENDOFINFO,
    	GNOME_APP_UI_ITEM,
    	GNOME_APP_UI_TOGGLEITEM,
    	GNOME_APP_UI_RADIOITEMS,
    	GNOME_APP_UI_SUBTREE,
    	GNOME_APP_UI_SEPARATOR,
    	GNOME_APP_UI_HELP,
    	GNOME_APP_UI_BUILDER_DATA,
    	GNOME_APP_UI_ITEM_CONFIGURABLE,
    	GNOME_APP_UI_SUBTREE_STOCK,
    	GNOME_APP_UI_INCLUDE
    } GnomeUIInfoType;

These values identify the item type that a particular GnomeUIInfo structure specifies.

One should be careful when using gnome_app_create_[custom|interp|with_data] functions with GnomeUIInfo arrays containing GNOME_APP_UI_BUILDER_DATA items, since their GnomeUIBuilderData structures completely override the ones generated or supplied by the above functions.

`GNOME_APP_UI_ENDOFINFO` | No more items, use it at the end of an array.
`GNOME_APP_UI_ITEM` | Normal item, or radio item if it is inside a radioitems group.
`GNOME_APP_UI_TOGGLEITEM` | Toggle (check box) item.
`GNOME_APP_UI_RADIOITEMS` | Radio item group.
`GNOME_APP_UI_SUBTREE` | Item that defines a subtree/submenu.
`GNOME_APP_UI_SEPARATOR` | Separator line (menus) or blank space (toolbars).
`GNOME_APP_UI_HELP` | Create a list of help topics, used in the Help menu.
`GNOME_APP_UI_BUILDER_DATA` | Specifies the builder data for the following entries, see code for further info.
`GNOME_APP_UI_ITEM_CONFIGURABLE` | A configurable menu item.
`GNOME_APP_UI_SUBTREE_STOCK` | Item that defines a subtree/submenu, same as GNOME_APP_UI_SUBTREE, but the texts should be looked up in the libgnome catalog.
`GNOME_APP_UI_INCLUDE` | Almost like `GNOME_APP_UI_SUBTREE`, but inserts items into the current menu or whatever, instead of making a submenu.

### enum GnomeUIInfoConfigurableTypes

    typedef enum {
            /* 0 */
            GNOME_APP_CONFIGURABLE_ITEM_NEW,
            GNOME_APP_CONFIGURABLE_ITEM_OPEN,
            GNOME_APP_CONFIGURABLE_ITEM_SAVE,
            GNOME_APP_CONFIGURABLE_ITEM_SAVE_AS,
            GNOME_APP_CONFIGURABLE_ITEM_REVERT,
            GNOME_APP_CONFIGURABLE_ITEM_PRINT,
            GNOME_APP_CONFIGURABLE_ITEM_PRINT_SETUP,
            GNOME_APP_CONFIGURABLE_ITEM_CLOSE,
            GNOME_APP_CONFIGURABLE_ITEM_QUIT,
            GNOME_APP_CONFIGURABLE_ITEM_CUT,
    	/* 10 */
            GNOME_APP_CONFIGURABLE_ITEM_COPY,
            GNOME_APP_CONFIGURABLE_ITEM_PASTE,
            GNOME_APP_CONFIGURABLE_ITEM_CLEAR,
            GNOME_APP_CONFIGURABLE_ITEM_UNDO,
            GNOME_APP_CONFIGURABLE_ITEM_REDO,
            GNOME_APP_CONFIGURABLE_ITEM_FIND,
            GNOME_APP_CONFIGURABLE_ITEM_FIND_AGAIN,
            GNOME_APP_CONFIGURABLE_ITEM_REPLACE,
            GNOME_APP_CONFIGURABLE_ITEM_PROPERTIES,
            GNOME_APP_CONFIGURABLE_ITEM_PREFERENCES,
    	/* 20 */
            GNOME_APP_CONFIGURABLE_ITEM_ABOUT,
    	GNOME_APP_CONFIGURABLE_ITEM_SELECT_ALL,
    	GNOME_APP_CONFIGURABLE_ITEM_NEW_WINDOW,
    	GNOME_APP_CONFIGURABLE_ITEM_CLOSE_WINDOW,
    	GNOME_APP_CONFIGURABLE_ITEM_NEW_GAME,
    	GNOME_APP_CONFIGURABLE_ITEM_PAUSE_GAME,
    	GNOME_APP_CONFIGURABLE_ITEM_RESTART_GAME,
    	GNOME_APP_CONFIGURABLE_ITEM_UNDO_MOVE,
    	GNOME_APP_CONFIGURABLE_ITEM_REDO_MOVE,
    	GNOME_APP_CONFIGURABLE_ITEM_HINT,
    	/* 30 */
    	GNOME_APP_CONFIGURABLE_ITEM_SCORES,
    	GNOME_APP_CONFIGURABLE_ITEM_END_GAME
    } GnomeUIInfoConfigurableTypes;

A user can redefine the accelerator keys for each menu item (if the application supports this). This enum gives an identifier for each menu shortcut that can possible be redefined. If an application is not using one of these accelerators, then no shortcut redefinition is possible unless the application specifically implements it (moral: use standard menu items).

`GNOME_APP_CONFIGURABLE_ITEM_NEW` | The "New" menu.
`GNOME_APP_CONFIGURABLE_ITEM_OPEN` | The "Open" menu.
`GNOME_APP_CONFIGURABLE_ITEM_SAVE` | The "Save" menu.
`GNOME_APP_CONFIGURABLE_ITEM_SAVE_AS` | The "Save as..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_REVERT` | The "Revert" menu.
`GNOME_APP_CONFIGURABLE_ITEM_PRINT` | The "Print" menu.
`GNOME_APP_CONFIGURABLE_ITEM_PRINT_SETUP` | The "Print setup..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_CLOSE` | The "Close" menu.
`GNOME_APP_CONFIGURABLE_ITEM_QUIT` | The "Quit" menu.
`GNOME_APP_CONFIGURABLE_ITEM_CUT` | The "Cut" menu.
`GNOME_APP_CONFIGURABLE_ITEM_COPY` | The "Copy" menu.
`GNOME_APP_CONFIGURABLE_ITEM_PASTE` | The "Paste" menu.
`GNOME_APP_CONFIGURABLE_ITEM_CLEAR` | The "Clear" menu.
`GNOME_APP_CONFIGURABLE_ITEM_UNDO` | The "Undo" menu.
`GNOME_APP_CONFIGURABLE_ITEM_REDO` | The "Redo" menu.
`GNOME_APP_CONFIGURABLE_ITEM_FIND` | The "Find..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_FIND_AGAIN` | The "Find again" menu.
`GNOME_APP_CONFIGURABLE_ITEM_REPLACE` | The "Replace..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_PROPERTIES` | The "Properties..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_PREFERENCES` | The "Preferences..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_ABOUT` | The "About..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_SELECT_ALL` | The "Select all" menu.
`GNOME_APP_CONFIGURABLE_ITEM_NEW_WINDOW` | The "New window" menu.
`GNOME_APP_CONFIGURABLE_ITEM_CLOSE_WINDOW` | The "Close window" menu.
`GNOME_APP_CONFIGURABLE_ITEM_NEW_GAME` | The "New game" menu.
`GNOME_APP_CONFIGURABLE_ITEM_PAUSE_GAME` | The "Pause game" menu.
`GNOME_APP_CONFIGURABLE_ITEM_RESTART_GAME` | The "Restart game" menu.
`GNOME_APP_CONFIGURABLE_ITEM_UNDO_MOVE` | The "Undo move" menu.
`GNOME_APP_CONFIGURABLE_ITEM_REDO_MOVE` | The "Redo move" menu.
`GNOME_APP_CONFIGURABLE_ITEM_HINT` | The "Hint" menu.
`GNOME_APP_CONFIGURABLE_ITEM_SCORES` | The "Scores..." menu.
`GNOME_APP_CONFIGURABLE_ITEM_END_GAME` | The "End game" menu.

### GNOME_APP_CONFIGURABLE_ITEM_EXIT

    #define GNOME_APP_CONFIGURABLE_ITEM_EXIT	GNOME_APP_CONFIGURABLE_ITEM_QUIT

The `EXIT` and `QUIT` commands are synonyms (they were used interchangably and inconsistently in GNOME 1). This define just makes this the case for configurable menu items as well. Note, however, that in GNOME 2, the use of exit is deprecated and all new applications should use the word quit whenever termination of an application is being discussed.

### enum GnomeUIPixmapType

    typedef enum {
    	GNOME_APP_PIXMAP_NONE,
    	GNOME_APP_PIXMAP_STOCK,
    	GNOME_APP_PIXMAP_DATA,
    	GNOME_APP_PIXMAP_FILENAME
    } GnomeUIPixmapType;

These values identify the type of pixmap used in an item.

`GNOME_APP_PIXMAP_NONE` | No pixmap specified.
`GNOME_APP_PIXMAP_STOCK` | Use a stock pixmap (GnomeStock).
`GNOME_APP_PIXMAP_DATA` | Use a pixmap from inline xpm data.
`GNOME_APP_PIXMAP_FILENAME` | Use a pixmap from the specified filename.

### GnomeUIInfo

    typedef struct {
    	GnomeUIInfoType type;		/* Type of item */
    	gchar const *label;		/* String to use in item's label */
    	gchar const *hint;		/* Tooltip for toolbar items, status
    					   bar message for menu items. */
    	gpointer moreinfo;		/* Extra information; depends on the
    					   type. */
    	gpointer user_data;		/* User data sent to the callback. */
    	gpointer unused_data;		/* Should be NULL (reserved). */
    	GnomeUIPixmapType pixmap_type;	/* Type of pixmap for this item. */
    	gconstpointer pixmap_info;	/* Pointer to pixmap information. */
    	guint accelerator_key;		/* Accelerator key, or 0 for none. */
    	GdkModifierType ac_mods;	/* Mask of modifier keys for the
    					   accelerator. */
    	GtkWidget *widget;		/* Filled in by the gnome_app_create*
    					   functions. */
    } GnomeUIInfo;

This is the structure that defines an item in a menu bar or toolbar. The idea is to create an array of such structures with the information needed to create menus or toolbars. The most convenient way to create such a structure is to use the GNOMEUIINFO_* macros provided below.

The `moreinfo` parameter contents depend on the `type`. For 'item', 'toggleitem' and 'radioitem' types, this is a pointer to the function to call when the item is activated. For 'subtrees', it is a pointer to another array of GnomeUIInfo structures. For 'radioitem lead' entry, it is a pointer to an array of GnomeUIInfo structures for the radio item group. For a 'help' item, it specifies the help node to load (i.e. the application's identifier) or `NULL` for the main program's name. For 'builder data', `moreinfo` points to the GnomeUIBuilderData structure for the subsequent items.

The contents of the `pixmap_info` depend upon the value of `pixmap_type`. If `pixmap_type` is `GNOME_APP_PIXMAP_STOCK`, then `pixmap_info` is a pointer to a stock icon name. For GNOME_APP_PIXMAP_DATA pixmaps, `pixmap_info` is a pointer to inline xpm data. For GNOME_APP_PIXMAP_FILENAME pixmaps, it is a pointer to the filename string.

When `type` is GNOME_APP_UI_ITEM_CONFIGURABLE, `accelerator_key` is overloaded to be the name of the configurable pixmap (an element from the GnomeUIInfoConfigurableTypes enum). In this case `ac_mods` should be 0.

The `widget` field in the GnomeUIInfo structure is filled in by the creation function. It can be used to tweak the widgets once they have been created if the application requires that level of fine-grained control.

### GnomeUIBuilderData

    typedef struct {
    	GnomeUISignalConnectFunc connect_func;
    	gpointer data;
    	gboolean is_interp;
    	GtkCallbackMarshal relay_func;
    	GtkDestroyNotify destroy_func;
    } GnomeUIBuilderData;

This structure defines how the relevant menu items are to have their signals connected. This includes the activations signals, as well as the destroy notifications. The affected menu items are either the items following aA GNOME_APP_UI_BUILDER_DATA item in an array of GnomeUIInfo structures or all of the menu items that are connected as a result of a call to `gnome_app_create_menu_custom()` and similar functions.

GnomeUISignalConnectFunc `connect_func`; | Function that connects to the item's signals.
gpointer `data`; | User data pointer for the signal callback.
gboolean `is_interp`; | If `TRUE`, the signal should be connected with `g_signal_connect_closure_by_id()`, otherwise, `g_signal_connect()` is used.
GtkCallbackMarshal `relay_func`; | Marshaller function for language bindings.
GtkDestroyNotify `destroy_func`; | Destroy notification function for language bindings.

### GNOMEUIINFO_KEY_UIDATA

    #define GNOMEUIINFO_KEY_UIDATA		"uidata"

The `widget` element in a GnomeUIInfo structure will have this parameter set to the user data that was given in the GnomeUIInfo instance.

### GNOMEUIINFO_KEY_UIBDATA

    #define GNOMEUIINFO_KEY_UIBDATA		"uibdata"

The `widget` element in a GnomeUIInfo structure will have this parameter set to the user data that was given in the relevant GnomeUIBuilderData structure that was applicable at the time of construction of the widget.

### GnomeUISignalConnectFunc ()

    void                (*GnomeUISignalConnectFunc)         (GnomeUIInfo *uiinfo,
                                                             const char *signal_name,
                                                             GnomeUIBuilderData *uibdata);

The template for functions that are called as a result of signals being emitted from a menu or tool bar item. Fnuctions of this type are given as the first element of a GnomeUIBuilderData instance.

`uiinfo` : | The user data that was part of the GnomeUIInfo instance.
`signal_name` : | The name of the emitted signal.
`uibdata` : | The user data that was part of the relevant GnomeUIBuilderData instance.

### gnome_accelerators_sync ()

    void                gnome_accelerators_sync             (void);

Flush the accelerator definitions into the application specific configuration file $HOME/.gnome2/accels/<app-id>.

### gnome_app_fill_menu ()

    void                gnome_app_fill_menu                 (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos);

Fills the specified `menu_shell` with items created from the specified `uiinfo`, inserting them from the item number `pos` on. The `accel_` group will be used as the accel group for all newly created sub menus and serves as the global accel group for all menu item hotkeys. If it is passed as `NULL`, global hotkeys will be disabled.

`menu_shell` : | A GtkMenuShell instance (a menu bar).
`uiinfo` : | A pointer to the first element in an array of GnomeUIInfo structures. The last element of the array should have a type of GNOME_APP_UI_ENDOFINFO.
`accel_group` : | A GtkAccelGroup.
`uline_accels` : | `TRUE` if underline accelerators will be drawn for the menu item labels.
`pos` : | The position in the menu bar at which to start inserting items.

### gnome_app_fill_menu_with_data ()

    void                gnome_app_fill_menu_with_data       (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos,
                                                             gpointer user_data);

This is the same as `gnome_app_fill_menu()`, except that all the user data pointers are filled with the value of `user_data`.

`menu_shell` : | A GtkMenuShell instance (a menu bar).
`uiinfo` : | A pointer to the first element in an array of GnomeUIInfo structures. The last element of the array should have a type of GNOME_APP_UI_ENDOFINFO.
`accel_group` : | A GtkAccelGroup.
`uline_accels` : | `TRUE` if underline accelerators will be drawn for the menu item labels.
`pos` : | The position in the menu bar at which to start inserting items.
`user_data` : | Some application-specific data.

### gnome_app_fill_menu_custom ()

    void                gnome_app_fill_menu_custom          (GtkMenuShell *menu_shell,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata,
                                                             GtkAccelGroup *accel_group,
                                                             gboolean uline_accels,
                                                             gint pos);

Fills the specified menu shell with items created from the specified `uiinfo`, inserting them from item number `pos` on and using the specified builder data (`uibdata`) -- this is intended for language bindings.

The other parameters have the same meaning as in `gnome_app_fill_menu()`.

`menu_shell` : | A GtkMenuShell instance (a menu bar).
`uiinfo` : | A pointer to the first element in an array of GnomeUIInfo structures. The last element of the array should have a type of GNOME_APP_UI_ENDOFINFO.
`uibdata` : | A GnomeUIInfoBuilderData instance.
`accel_group` : | A GtkAccelGroup.
`uline_accels` : | `TRUE` if underline accelerators will be drawn for the menu item labels.
`pos` : | The position in the menu bar at which to start inserting items.

### gnome_app_ui_configure_configurable ()

    void                gnome_app_ui_configure_configurable (GnomeUIInfo *uiinfo);

Configure all user-configurable elements in the given UI info structure. This includes loading and setting previously-set options from GNOME config files.

Normally, `gnome_app_create_menus()` calls this function for the developer, but if something needs to be altered afterwards, this function can be called first. The main reason for this function being a public interface is so that it can be called from `gnome_popup_menu_new()`, which clears a copy of the pass in GnomeUIInfo structures.

`uiinfo` : | Pointer to GNOME UI menu/toolbar info

### gnome_app_create_menus ()

    void                gnome_app_create_menus              (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);

Constructs a menu bar and attaches it to the specified application window.

`app` : | A GnomeApp instance representing the current application.
`uiinfo` : | The first in an array GnomeUIInfo instances containing the menu data.

### gnome_app_create_menus_interp ()

    void                gnome_app_create_menus_interp       (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);

Identical to `gnome_app_create_menus()`, except that extra functions and data can be passed in for finer control of the destruction and marshalling.

`app` : | A GnomeApp instance, representing the current application.
`uiinfo` : | The first item in an array of GnomeUIInfo structures describing the menu bar.
`relay_func` : | A marshaller for the signal callbacks.
`data` : | Application specific data passed to the signal callback functions.
`destroy_func` : | The function to call when the menu bar is destroyed.

### gnome_app_create_menus_with_data ()

    void                gnome_app_create_menus_with_data    (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             gpointer user_data);

Identical to `gnome_app_create_menus()`, except that `user_data` is passed to all the callback functions when signals are emitted.

`app` : | A GnomeApp instance representing the current application.
`uiinfo` : | The first in an array GnomeUIInfo instances containing the menu data.
`user_data` : | Application-specific data that is passed to every callback function.

### gnome_app_create_menus_custom ()

    void                gnome_app_create_menus_custom       (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);

Identical to `gnome_app_create_menus()`, except that `uibdata` is also specified for creating the signal handlers. Mostly for use by language bindings.

`app` : | A GnomeApp instance representing the current application.
`uiinfo` : | The first in an array GnomeUIInfo instances containing the menu data.
`uibdata` : | An appropriate GnomeUIBuilderData instance.

### gnome_app_fill_toolbar ()

    void                gnome_app_fill_toolbar              (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group);

Fills `toolbar` with buttons specified in `uiinfo`. If `accel_group` is not `NULL`, the items' accelrator keys are put into it.

`toolbar` : | A GtkToolbar instance.
`uiinfo` : | An array of GnomeUIInfo structures containing the items for the toolbar.
`accel_group` : | A GtkAccelGroup for holding the accelerator keys of the items (or `NULL`).

### gnome_app_fill_toolbar_with_data ()

    void                gnome_app_fill_toolbar_with_data    (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkAccelGroup *accel_group,
                                                             gpointer user_data);

The same as `gnome_app_fill_toolbar()`, except that the user data pointers in the signal handlers are set to `user_data`.

`toolbar` : | A GtkToolbar instance.
`uiinfo` : | An array of GnomeUIInfo structures containing the items for the toolbar.
`accel_group` : | A GtkAccelGroup for holding the accelerator keys of the items (or `NULL`).
`user_data` : | Application specific data.

### gnome_app_fill_toolbar_custom ()

    void                gnome_app_fill_toolbar_custom       (GtkToolbar *toolbar,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata,
                                                             GtkAccelGroup *accel_group);

The same as `gnome_app_fill_toolbar()`, except that the sepcified `uibdata` instance is used. This is mostly for the benefit of language bindings.

`toolbar` : | A GtkToolbar instance.
`uiinfo` : | An array of GnomeUIInfo structures containing the items for the toolbar.
`uibdata` : | The GnomeUIBuilderData data for the toolbar.
`accel_group` : | A GtkAccelGroup for holding the accelerator keys of the items (or `NULL`).

### gnome_app_create_toolbar ()

    void                gnome_app_create_toolbar            (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);

Constructs a toolbar and attaches it to the specified application window.

`app` : | A GnomeApp instance.
`uiinfo` : | A GnomeUIInfo array specifying the contents of the toolbar.

### gnome_app_create_toolbar_interp ()

    void                gnome_app_create_toolbar_interp     (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);

Constructs a toolbar and attaches it to the specified application window -- this version is intended for language bindings.

`app` : | A GnomeApp instance.
`uiinfo` : | A GnomeUIInfo array specifying the contents of the toolbar.
`relay_func` : | Argument marshalling function.
`data` : | Application specific data to pass to signal callbacks.
`destroy_func` : | The function to call when the toolbar is destroyed.

### gnome_app_create_toolbar_with_data ()

    void                gnome_app_create_toolbar_with_data  (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             gpointer user_data);

Constructs a toolbar, sets all the user data pointers to `user_data`, and attaches it to `app`.

`app` : | A GnomeApp instance.
`uiinfo` : | A GnomeUIInfo array specifying the contents of the toolbar.
`user_data` : | Application specific data to be sent to each signal callback function.

### gnome_app_create_toolbar_custom ()

    void                gnome_app_create_toolbar_custom     (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);

Constructs a toolbar and attaches it to the `app` window, using `uibdata` builder data -- intended for language bindings.

`app` : | A GnomeApp instance.
`uiinfo` : | A GnomeUIInfo array specifying the contents of the toolbar.
`uibdata` : | A GnomeUIBuilderData instance specifying the handlers to use for the toolbar.

### gnome_app_find_menu_pos ()

    GtkWidget*          gnome_app_find_menu_pos             (GtkWidget *parent,
                                                             const gchar *path,
                                                             gint *pos);

Finds a menu item described by path starting in the GtkMenuShell top and returns its parent GtkMenuShell and the position after this item in `pos`. The meaning of `pos` is that a subsequent call to gtk_menu_shell_insert(p, w, pos) would then insert widget w in GtkMenuShell p right after the menu item described by path.

`parent` : | Root menu shell widget containing menu items to be searched.
`path` : | Specifies the target menu item by menu path.
`pos` : | Used to hold the returned menu items' position.
Returns : | The parent menu shell of `path`.

### gnome_app_remove_menus ()

    void                gnome_app_remove_menus              (GnomeApp *app,
                                                             const gchar *path,
                                                             gint items);

Removes `items` items from the existing `app`'s menu structure, beginning with item described by `path`.

The `path` argument should be in the form "File/.../.../Something". "" will insert the item as the first one in the menubar, "File/" will insert it as the first one in the File menu, "File/Settings" will insert it after the Setting item in the File menu use of "File/<Separator>" should be obvious. However, the use of "<Seperator>" stops after the first separator.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`items` : | The number of items to remove.

### gnome_app_remove_menu_range ()

    void                gnome_app_remove_menu_range         (GnomeApp *app,
                                                             const gchar *path,
                                                             gint start,
                                                             gint items);

Same as the `gnome_app_remove_menus()`, except it removes the specified number of `items` from the existing `app`'s menu structure begining with item described by (`path` plus `start`). This is very useful for adding and removing Recent document items in the File menu.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`start` : | An offset beyond the start of `path` at which to begin removing.
`items` : | The number of items to remove.

### gnome_app_insert_menus_custom ()

    void                gnome_app_insert_menus_custom       (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *uiinfo,
                                                             GnomeUIBuilderData *uibdata);

Inserts menus described by `uiinfo` in existing `app`'s menu structure right after the item described by `path`. The `uibdata` parameter makes this, again, most useful for language bindings.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`uiinfo` : | A GnomeUIInfo array describing the menus.
`uibdata` : | A GnomeUIBuilderData instance describing the functions to attach as the menu's callbacks.

### gnome_app_insert_menus ()

    void                gnome_app_insert_menus              (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo);

Insert the menus given by `menuinfo` beginning at `path` into the pre-existing `app`.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`menuinfo` : | A GnomeUIInfo array describing the menus.

### gnome_app_insert_menus_with_data ()

    void                gnome_app_insert_menus_with_data    (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo,
                                                             gpointer data);

This is the same as `gnome_app_insert_menus()`, except that the specified `data` is passed to each signal callback.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`menuinfo` : | A GnomeUIInfo array describing the menus.
`data` : | Application specific data to send to each signal callback.

### gnome_app_insert_menus_interp ()

    void                gnome_app_insert_menus_interp       (GnomeApp *app,
                                                             const gchar *path,
                                                             GnomeUIInfo *menuinfo,
                                                             GtkCallbackMarshal relay_func,
                                                             gpointer data,
                                                             GtkDestroyNotify destroy_func);

THe same as `gnome_app_insert_menus()`, except that the given functions are attached to each menu item. Mostly of use for language bindings.

`app` : | A GnomeApp instance.
`path` : | A path to the menu item concerned.
`menuinfo` : | A GnomeUIInfo array describing the menus.
`relay_func` : | A custom marshallar for signal data.,
`data` : | Application-specific data to send to each signal callback.
`destroy_func` : | The function to call when the menu item is destroyed.

### gnome_app_install_appbar_menu_hints ()

    void                gnome_app_install_appbar_menu_hints (GnomeAppBar *appbar,
                                                             GnomeUIInfo *uiinfo);

Install menu hints for the given `appbar` object. This function cannot just be called automatically, since it is impossible to reliably find the correct `appbar`.

`appbar` : | An existing GnomeAppBar instance.
`uiinfo` : | A GnomeUIInfo array of a menu for which hints will be set.

### gnome_app_install_statusbar_menu_hints ()

    void                gnome_app_install_statusbar_menu_hints
                                                            (GtkStatusbar *bar,
                                                             GnomeUIInfo *uiinfo);

Install menu hints for the given status bar.

`bar` : | Pointer to GtkStatusbar instance.
`uiinfo` : | GnomeUIInfo for the menu to be changed.

### gnome_app_install_menu_hints ()

    void                gnome_app_install_menu_hints        (GnomeApp *app,
                                                             GnomeUIInfo *uiinfo);

Set menu hints for the `app` object's attached status bar.

`app` : | An existing GnomeAppBar instance.
`uiinfo` : | A GnomeUIInfo array of a menu for which hints will be set.

### gnome_app_setup_toolbar ()

    void                gnome_app_setup_toolbar             (GtkToolbar *toolbar,
                                                             BonoboDockItem *dock_item);

Sets up a toolbar to use GNOME user preferences.

`toolbar` : | Pointer to a GtkToolbar instance.
`dock_item` : | Pointer to the BonoboDockItem the toolbar is inside, or `NULL` for none.

### GNOMEUIINFO_END

    #define             GNOMEUIINFO_END

A macro that can be used to terminate an arrau of GnomeUIInfo structures.

Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_SEPARATOR

    #define             GNOMEUIINFO_SEPARATOR

A macro that defines a menu seperator bar. Can be put into an array of GnomeUIInfo structures.

Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_ITEM()

    #define             GNOMEUIINFO_ITEM(label, tooltip, callback, xpm_data)

A generic menu item with an inline xpm icon.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_ITEM_STOCK()

    #define             GNOMEUIINFO_ITEM_STOCK(label, tooltip, callback, stock_id)

A menu item with a stock icon.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
`stock_id` : | The value of stock icon (from the gnome-stock-item module of this library).
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_ITEM_NONE()

    #define             GNOMEUIINFO_ITEM_NONE(label, tooltip, callback)

A menu item with no icon.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_ITEM_DATA()

    #define             GNOMEUIINFO_ITEM_DATA(label, tooltip, callback, user_data, xpm_data)

A menu item with an inline xpm icon and user data pointer for `callback`.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
`user_data` : | User data to pass to the callback function.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_TOGGLEITEM()

    #define             GNOMEUIINFO_TOGGLEITEM(label, tooltip, callback, xpm_data)

A toggle item (check box) with inline xpm icon.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_TOGGLEITEM_DATA()

    #define             GNOMEUIINFO_TOGGLEITEM_DATA(label, tooltip, callback, user_data, xpm_data)

A toggle item (chekc box) with inline xpm icon and user data pointer for `callback`.

`label` : | Menu label.
`tooltip` : | Tooltip for the label.
`callback` : | Function to call on selection of this item.
`user_data` : | User data to pass to the callback function.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_HELP()

    #define             GNOMEUIINFO_HELP(app_name)

A menu containing all help topics based on `app_name`.

`app_name` : | Application id string.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_SUBTREE()

    #define             GNOMEUIINFO_SUBTREE(label, tree)

A subtree (submenu).

`label` : | Submenu label.
`tree` : | A pointer to an array of GnomeUIInfo structures.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_SUBTREE_HINT()

    #define             GNOMEUIINFO_SUBTREE_HINT(label, hint, tree)

A subtree with a hint.

`label` : | Submenu label.
`hint` : | Hint for statusbar.
`tree` : | A pointer to an array of GnomeUIInfo structures.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_SUBTREE_STOCK()

    #define             GNOMEUIINFO_SUBTREE_STOCK(label, tree, stock_id)

A subtree using a stock icon.

`label` : |
`tree` : | A pointer to an array of GnomeUIInfo structs.
`stock_id` : | The value of stock icon (from the gnome-stock-item module of this library).
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_INCLUDE()

    #define             GNOMEUIINFO_INCLUDE(tree)

A menu that should be included at the current point of the current menu (like GNOMEUIINFO_SUBTREE, but doesn't create a submenu).

`tree` : | A pointer to an array of GnomeUIInfo structures.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_RADIOLIST()

    #define             GNOMEUIINFO_RADIOLIST(list)

A list of radio items.

`list` : | Pointer to a list of GNOMEUIINFO_RADIOITEM elements.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_RADIOITEM()

    #define             GNOMEUIINFO_RADIOITEM(label, tooltip, callback, xpm_data)

A radio item with an inline xpm icon.

`label` : | Item label.
`tooltip` : | Tooltip for the item.
`callback` : | Function to call on selection of this item.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_RADIOITEM_DATA()

    #define             GNOMEUIINFO_RADIOITEM_DATA(label, tooltip, callback, user_data, xpm_data)

A radio item with an inline xpm icon and user data for `callback`.

`label` : | Item label.
`tooltip` : | Tooltip for the item.
`callback` : | Function to call on selection of this item.
`user_data` : | User data for the callback function.
`xpm_data` : | Pixmap data.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_NEW_ITEM()

    #define             GNOMEUIINFO_MENU_NEW_ITEM(label, tip, cb, data)

A "New" entry (typically in the "File" menu).

`label` : | The label for the menu item (the thing being created).
`tip` : | Tooltip for the item.
`cb` : | Callback for when the menu item is selected.
`data` : | User data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_NEW_SUBTREE()

    #define             GNOMEUIINFO_MENU_NEW_SUBTREE(tree)

A "New" menu item that creates a subtree (for when you have more than one thing that can be created anew).

`tree` : | Pointer to a list of GnomeUIInfo menu structures.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_OPEN_ITEM()

    #define             GNOMEUIINFO_MENU_OPEN_ITEM(cb, data)

An "Open..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_SAVE_ITEM()

    #define             GNOMEUIINFO_MENU_SAVE_ITEM(cb, data)

A "Save" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_SAVE_AS_ITEM()

    #define             GNOMEUIINFO_MENU_SAVE_AS_ITEM(cb, data)

A "Save as..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_REVERT_ITEM()

    #define             GNOMEUIINFO_MENU_REVERT_ITEM(cb, data)

A "Revert" (to last saved) menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PRINT_ITEM()

    #define             GNOMEUIINFO_MENU_PRINT_ITEM(cb, data)

A "Print" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PRINT_SETUP_ITEM()

    #define             GNOMEUIINFO_MENU_PRINT_SETUP_ITEM(cb, data)

A "Print setup..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_CLOSE_ITEM()

    #define             GNOMEUIINFO_MENU_CLOSE_ITEM(cb, data)

A "Close" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_EXIT_ITEM()

    #define GNOMEUIINFO_MENU_EXIT_ITEM(cb, data)	GNOMEUIINFO_MENU_QUIT_ITEM(cb, data)

An "Exit" menu item (deprecated).

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_QUIT_ITEM()

    #define             GNOMEUIINFO_MENU_QUIT_ITEM(cb, data)

A "Quit" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_CUT_ITEM()

    #define             GNOMEUIINFO_MENU_CUT_ITEM(cb, data)

A "Cut" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_COPY_ITEM()

    #define             GNOMEUIINFO_MENU_COPY_ITEM(cb, data)

A "Copy" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PASTE_ITEM()

    #define             GNOMEUIINFO_MENU_PASTE_ITEM(cb, data)

A "Paste" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_SELECT_ALL_ITEM()

    #define             GNOMEUIINFO_MENU_SELECT_ALL_ITEM(cb, data)

A "Select All" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_CLEAR_ITEM()

    #define             GNOMEUIINFO_MENU_CLEAR_ITEM(cb, data)

A "clear" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_UNDO_ITEM()

    #define             GNOMEUIINFO_MENU_UNDO_ITEM(cb, data)

An "Undo" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_REDO_ITEM()

    #define             GNOMEUIINFO_MENU_REDO_ITEM(cb, data)

A "Redo" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_FIND_ITEM()

    #define             GNOMEUIINFO_MENU_FIND_ITEM(cb, data)

A "Find" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_FIND_AGAIN_ITEM()

    #define             GNOMEUIINFO_MENU_FIND_AGAIN_ITEM(cb, data)

A "Find Again" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_REPLACE_ITEM()

    #define             GNOMEUIINFO_MENU_REPLACE_ITEM(cb, data)

A "Replace" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PROPERTIES_ITEM()

    #define             GNOMEUIINFO_MENU_PROPERTIES_ITEM(cb, data)

A "Properties..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PREFERENCES_ITEM()

    #define             GNOMEUIINFO_MENU_PREFERENCES_ITEM(cb, data)

A "Preferences..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_NEW_WINDOW_ITEM()

    #define             GNOMEUIINFO_MENU_NEW_WINDOW_ITEM(cb, data)

A "New Window" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM()

    #define             GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM(cb, data)

A "Close Window" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_ABOUT_ITEM()

    #define             GNOMEUIINFO_MENU_ABOUT_ITEM(cb, data)

An "About..." menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_NEW_GAME_ITEM()

    #define             GNOMEUIINFO_MENU_NEW_GAME_ITEM(cb, data)

A "New Game" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_PAUSE_GAME_ITEM()

    #define             GNOMEUIINFO_MENU_PAUSE_GAME_ITEM(cb, data)

A "Pause Game" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_RESTART_GAME_ITEM()

    #define             GNOMEUIINFO_MENU_RESTART_GAME_ITEM(cb, data)

A "Restart Game" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_UNDO_MOVE_ITEM()

    #define             GNOMEUIINFO_MENU_UNDO_MOVE_ITEM(cb, data)

An "Undo Move" menu item (for games, usually).

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_REDO_MOVE_ITEM()

    #define             GNOMEUIINFO_MENU_REDO_MOVE_ITEM(cb, data)

A "Redo move" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_HINT_ITEM()

    #define             GNOMEUIINFO_MENU_HINT_ITEM(cb, data)

A "Hint" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_SCORES_ITEM()

    #define             GNOMEUIINFO_MENU_SCORES_ITEM(cb, data)

A "Scores" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_END_GAME_ITEM()

    #define             GNOMEUIINFO_MENU_END_GAME_ITEM(cb, data)

An "End Game" menu item.

`cb` : | Callback for when the menu item is selected.
`data` : | Used data to pass to the callback.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_FILE_TREE()

    #define             GNOMEUIINFO_MENU_FILE_TREE(tree)

A "File" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_EDIT_TREE()

    #define             GNOMEUIINFO_MENU_EDIT_TREE(tree)

An "Edit" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_VIEW_TREE()

    #define             GNOMEUIINFO_MENU_VIEW_TREE(tree)

A "View" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_SETTINGS_TREE()

    #define             GNOMEUIINFO_MENU_SETTINGS_TREE(tree)

A "Settings" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_FILES_TREE()

    #define             GNOMEUIINFO_MENU_FILES_TREE(tree)

A "Files" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_WINDOWS_TREE()

    #define             GNOMEUIINFO_MENU_WINDOWS_TREE(tree)

A "Windows" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_HELP_TREE()

    #define             GNOMEUIINFO_MENU_HELP_TREE(tree)

A "Help" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOMEUIINFO_MENU_GAME_TREE()

    #define             GNOMEUIINFO_MENU_GAME_TREE(tree)

A "Game" menu tree.

`tree` : | Pointer to a tree containing menu items for inside this menu.
Returns : | A GnomeUIInfo structure.

### GNOME_MENU_FILE_STRING

    #define GNOME_MENU_FILE_STRING D_("_File")

A string which is the title of the "File" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_FILE_PATH

    #define GNOME_MENU_FILE_PATH D_("_File/")

A pre-defined path to the "File" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_EDIT_STRING

    #define GNOME_MENU_EDIT_STRING D_("_Edit")

A string which is the title of the "Edit" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_EDIT_PATH

    #define GNOME_MENU_EDIT_PATH D_("_Edit/")

A pre-defined path to the "Edit" menu (when the menu is created using GNOMEUIINFO_MENU_EDIT_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_VIEW_STRING

    #define GNOME_MENU_VIEW_STRING D_("_View")

A string which is the title of the "View" menu (when the menu is created using GNOMEUIINFO_MENU_VIEW_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_VIEW_PATH

    #define GNOME_MENU_VIEW_PATH D_("_View/")

A pre-defined path to the "View" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_SETTINGS_STRING

    #define GNOME_MENU_SETTINGS_STRING D_("_Settings")

A string which is the title of the "Settings" menu (when the menu is created using GNOMEUIINFO_MENU_SETTINGS_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_SETTINGS_PATH

    #define GNOME_MENU_SETTINGS_PATH D_("_Settings/")

A pre-defined path to the "Settings" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_NEW_STRING

    #define GNOME_MENU_NEW_STRING D_("_New")

A string which is the title of the "New" menu (when the menu is created using GNOMEUIINFO_MENU_NEW_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_NEW_PATH

    #define GNOME_MENU_NEW_PATH D_("_New/")

A pre-defined path to the "New" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_FILES_STRING

    #define GNOME_MENU_FILES_STRING D_("Fi_les")

A string which is the title of the "Files" menu (when the menu is created using GNOMEUIINFO_MENU_FILES_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_FILES_PATH

    #define GNOME_MENU_FILES_PATH D_("Fi_les/")

A pre-defined path to the "Files" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_WINDOWS_STRING

    #define GNOME_MENU_WINDOWS_STRING D_("_Windows")

A string which is the title of the "Windows" menu (when the menu is created using GNOMEUIINFO_MENU_WINDOWS_TREE).

Returns : | A GnomeUIInfo structure.

### GNOME_MENU_WINDOWS_PATH

    #define GNOME_MENU_WINDOWS_PATH D_("_Windows/")

A pre-defined path to the "Windows" menu (when the menu is created using GNOMEUIINFO_MENU_FILE_TREE). Used in calls like `gnome_app_find_menu_pos()`.

Returns : | A GnomeUIInfo structure.

### gnome_app_helper_gettext ()

    const gchar*        gnome_app_helper_gettext            (const gchar *string);

Translate `string` by calling `gettext()` and then, if that did not change the string, `dgettext()` with the domain set to libgnome's message domain.

`string` : | The string to translate.
Returns : | The localised value of the string.

### L_()

    #define             L_(x)

Syntactic sugar for `gnome_app_helper_gettext()`.

`x` : |

### D_()

    #define             D_(x)

Syntactic sugar for calling `dgettext()` with the domain set to libgnome's message domain.

`x` : |