gnome-app-helper

Name

gnome-app-helper -- Simplified menu and toolbar creation.

Synopsis


#include <gnome.h>


enum        GnomeUIInfoType;
enum        GnomeUIInfoConfigurableTypes;
enum        GnomeUIPixmapType;
struct      GnomeUIInfo;
#define     GNOMEUIINFO_KEY_UIDATA
#define     GNOMEUIINFO_KEY_UIBDATA
#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_STOCK       (label, tree, stock_id)
#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_ABOUT_ITEM     (cb, data)
#define     GNOMEUIINFO_MENU_CLEAR_ITEM     (cb, data)
#define     GNOMEUIINFO_MENU_CLOSE_ITEM     (cb, data)
#define     GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_COPY_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_CUT_ITEM       (cb, data)
#define     GNOMEUIINFO_MENU_EDIT_TREE      (tree)
#define     GNOMEUIINFO_MENU_END_GAME_ITEM  (cb, data)
#define     GNOMEUIINFO_MENU_EXIT_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_FILES_TREE     (tree)
#define     GNOMEUIINFO_MENU_FILE_TREE      (tree)
#define     GNOMEUIINFO_MENU_FIND_AGAIN_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_FIND_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_GAME_TREE      (tree)
#define     GNOMEUIINFO_MENU_HELP_TREE      (tree)
#define     GNOMEUIINFO_MENU_HINT_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_NEW_GAME_ITEM  (cb, data)
#define     GNOMEUIINFO_MENU_NEW_ITEM       (label, tip, cb, data)
#define     GNOMEUIINFO_MENU_NEW_SUBTREE    (tree)
#define     GNOMEUIINFO_MENU_NEW_WINDOW_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_OPEN_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_PASTE_ITEM     (cb, data)
#define     GNOMEUIINFO_MENU_PAUSE_GAME_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_PREFERENCES_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_PRINT_ITEM     (cb, data)
#define     GNOMEUIINFO_MENU_PRINT_SETUP_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_PROPERTIES_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_REDO_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_REDO_MOVE_ITEM (cb, data)
#define     GNOMEUIINFO_MENU_REPLACE_ITEM   (cb, data)
#define     GNOMEUIINFO_MENU_RESTART_GAME_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_REVERT_ITEM    (cb, data)
#define     GNOMEUIINFO_MENU_SAVE_AS_ITEM   (cb, data)
#define     GNOMEUIINFO_MENU_SAVE_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_SCORES_ITEM    (cb, data)
#define     GNOMEUIINFO_MENU_SELECT_ALL_ITEM(cb, data)
#define     GNOMEUIINFO_MENU_SETTINGS_TREE  (tree)
#define     GNOMEUIINFO_MENU_UNDO_ITEM      (cb, data)
#define     GNOMEUIINFO_MENU_UNDO_MOVE_ITEM (cb, data)
#define     GNOMEUIINFO_MENU_VIEW_TREE      (tree)
#define     GNOMEUIINFO_MENU_WINDOWS_TREE   (tree)
#define     GNOMEUIINFO_SUBTREE_HINT        (label, hint, 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_FILES_STRING
#define     GNOME_MENU_FILES_PATH
#define     GNOME_MENU_WINDOWS_STRING
#define     GNOME_MENU_WINDOWS_PATH
struct      GnomeUIBuilderData;
void        (*GnomeUISignalConnectFunc)     (GnomeUIInfo *uiinfo,
                                             gchar *signal_name,
                                             GnomeUIBuilderData *uibdata);
void        gnome_app_fill_menu             (GtkMenuShell *menu_shell,
                                             GnomeUIInfo *uiinfo,
                                             GtkAccelGroup *accel_group,
                                             gboolean uline_accels,
                                             gint pos);
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_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,
                                             gchar *path,
                                             gint *pos);
void        gnome_app_remove_menus          (GnomeApp *app,
                                             gchar *path,
                                             gint items);
void        gnome_app_remove_menu_range     (GnomeApp *app,
                                             gchar *path,
                                             gint start,
                                             gint items);
void        gnome_app_insert_menus_custom   (GnomeApp *app,
                                             gchar *path,
                                             GnomeUIInfo *menuinfo,
                                             GnomeUIBuilderData *uibdata);
void        gnome_app_insert_menus          (GnomeApp *app,
                                             gchar *path,
                                             GnomeUIInfo *menuinfo);
void        gnome_app_insert_menus_with_data
                                            (GnomeApp *app,
                                             gchar *path,
                                             GnomeUIInfo *menuinfo,
                                             gpointer data);
void        gnome_app_insert_menus_interp   (GnomeApp *app,
                                             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 *uinfo);

Description

The GNOME App Helper module contains macros, functions and data structures used to simplify the creation of menus and toolbars for GNOME applications.

Menus and toolbars created with GnomeApp helper ensure a consistent user interface.

The basic building block is an array of GnomeUIInfoType structures. You can use a number of macros to fill in each one of these structure entries, or you can fill each parameter manually if you wish to do so (although, it is not recommended, as it is an error-prone task).

GNOME user interface recomendations for applications

The following is a list of suggestions to improve the consistency of your application with the rest of the GNOME tools


Defining menus and toolbars.

All of the macros prefixed with GNOMEUIINFO_MENU_ can be used to simplify the task of making your application consistent with the GNOME user interface recomendations. The macros include the default texts to show, images (in case they have one), pop-up tooltips and in some cases default key-bindings.

A toplevel menu (like the one used by the GnomeApp widget) is just an array of structures of type GnomeUIInfoType. Each record of type GnomeUIInfoType in this array can represent a menu item that the user can select, a radio-button, a check-box, a division line, or a submenu.

There are a number of macros that will help you fill in this structure to make your application conform to the GNOME user interface guidelines.

The following macros can be used to create consistent toplevel menus and they provide the standard naming for your toplevel menus as well as translated texts for the various languages supported by the GNOME libraries:

Details

enum GnomeUIInfoType

typedef enum {
	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. */
	/* 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_SUBTREE_STOCK	/* Item that defines a 
					   subtree/submenu, same as GNOME_APP_UI_SUBTREE,
					   but the texts should be looked up in the
					   gnome-libs catalog
					*/
} GnomeUIInfoType;

This enumeration is used to set the value in a GnomeUIInfo record to specify the type of the record. There are macros that can do all the work for you. Use those instead of these macros. It is defined as follows:


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_EXIT,
        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;


enum GnomeUIPixmapType

typedef enum {
	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 */
} GnomeUIPixmapType;


struct GnomeUIInfo

typedef struct {
	GnomeUIInfoType type;		/* Type of item */
	gchar *label;			/* String to use in the label */
	gchar *hint;			/* For toolbar items, the tooltip. For 
					   menu items, the status bar message */
	gpointer moreinfo;		/* For an item, toggleitem, or 
					   radioitem, this is a pointer to the 
					   function to call when the item is 
					   activated. For a subtree, a pointer 
					   to another array of GnomeUIInfo 
					   structures. For a radioitem lead 
					   entry, a pointer to an array of 
					   GnomeUIInfo structures for the radio 
					   item group. For a help item, 
					   specifies the help node to load 
					   (i.e. the application's identifier) 
					   or NULL for the main program's name.
					   For builder data, points to the 
					   GnomeUIBuilderData structure for 
					   the following items */
	gpointer user_data;		/* Data pointer to pass to callbacks */
	gpointer unused_data;		/* Reserved for future expansion, 
					   should be NULL */
	GnomeUIPixmapType pixmap_type;	/* Type of pixmap for the item */
	gpointer pixmap_info;		/* Pointer to the pixmap information:
					 *
					 * For GNOME_APP_PIXMAP_STOCK, a 
					 * pointer to the stock icon name.
					 *
					 * For GNOME_APP_PIXMAP_DATA, a 
					 * pointer to the inline xpm data.
					 *
					 * For GNOME_APP_PIXMAP_FILENAME, a 
					 * pointer to the filename string.
					 */
	guint accelerator_key;		/* Accelerator key, or 0 for none */
	GdkModifierType ac_mods;	/* Mask of modifier keys for the 
					   accelerator */

	GtkWidget *widget;		/* Filled in by gnome_app_create*, you 
					   can use this to tweak the widgets 
					   once they have been created */
} GnomeUIInfo;


GNOMEUIINFO_KEY_UIDATA

#define GNOMEUIINFO_KEY_UIDATA		"uidata"


GNOMEUIINFO_KEY_UIBDATA

#define GNOMEUIINFO_KEY_UIBDATA		"uibdata"


GNOMEUIINFO_END

#define     GNOMEUIINFO_END

Use this macro to tag the end of a menu or toolbar definition.


GNOMEUIINFO_SEPARATOR

#define     GNOMEUIINFO_SEPARATOR

Use this macro to include a separator in your menu.


GNOMEUIINFO_ITEM()

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

Generic menu or toolbar item which includes a label, a tooltip and an optional pixmap (in xpm format) to be displayed next to the entry.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_ITEM_STOCK()

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

Use this macro to include an item in your menu that includes a GNOME-stock image.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
stock_id :A GNOME-stock pixmap name.


GNOMEUIINFO_ITEM_NONE()

#define     GNOMEUIINFO_ITEM_NONE(label, tooltip, callback)

Use this macro to add an item to the menu that has no pixmap associated with it.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.


GNOMEUIINFO_ITEM_DATA()

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

Use this macro to create a menu item and keep some information in the structure.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
user_data :Data passed around.
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_TOGGLEITEM()

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

Creates a toggle-item (a checkbox) in a menu, this includes an xpm graphic.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_TOGGLEITEM_DATA()

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

Creates a toggle-item (a checkbox) in a menu, this includes an xpm graphic. Allows you to specify the data to be passed around to your callback routine.

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
user_data :Data to pass to callback routine.
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_HELP()

#define     GNOMEUIINFO_HELP(app_name)

This special item inserts all of the topics defined by the application in the topic.dat file. The menu is constructed from the information stored in the file associated with the app_name you provide. The information is usually taken from $(datadir)/help/app_name/$LANG/topic.dat. Where $LANG is the language chosen when running the application.

app_name :The application name. Used to locate the correct topic.dat file.


GNOMEUIINFO_SUBTREE()

#define     GNOMEUIINFO_SUBTREE(label, tree)

Creates a submenu or a sub-tree in the menu structure. The argument passed is an array of GnomeUIInfo.

label :The text that will be displayed
tree :A pointer to a GnomeUIInfo.


GNOMEUIINFO_SUBTREE_STOCK()

#define     GNOMEUIINFO_SUBTREE_STOCK(label, tree, stock_id)

Creates a submenu or a sub-tree in the menu structure with a stock pixmap displayed. The argument passed is an array of GnomeUIInfo.

label :The text that will be displayed
tree :A pointer to a GnomeUIInfo.
stock_id :A GNOME-stock pixmap name.


GNOMEUIINFO_RADIOLIST()

#define     GNOMEUIINFO_RADIOLIST(list)

list : 


GNOMEUIINFO_RADIOITEM()

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

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_RADIOITEM_DATA()

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

label :The text that will be displayed
tooltip :The tooltip that will popup.
callback :Callback routine to invoke.
user_data : 
xpm_data :Pointer to a pixmap to display (in C-xpm format).


GNOMEUIINFO_MENU_ABOUT_ITEM()

#define     GNOMEUIINFO_MENU_ABOUT_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include an "About" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_CLEAR_ITEM()

#define     GNOMEUIINFO_MENU_CLEAR_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include a "Clear" option. This is used typically in the Edit menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_CLOSE_ITEM()

#define     GNOMEUIINFO_MENU_CLOSE_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include a "Close" menu entry. This is used typically in the File menu or the Game menu to close the toplevel window.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM()

#define     GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include a "Close" option. This is used typically in the Window menu if your application includes one.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_COPY_ITEM()

#define     GNOMEUIINFO_MENU_COPY_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include a "Copy" option. This is used typically in the Edit menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_CUT_ITEM()

#define     GNOMEUIINFO_MENU_CUT_ITEM(cb, data)

Use this macro inside a GnomeUIInfo structure to include a "Cut" option. This is used typically in the Edit menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_EDIT_TREE()

#define     GNOMEUIINFO_MENU_EDIT_TREE(tree)

Inserts a top-level "Edit" menu. The argument is a pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_END_GAME_ITEM()

#define     GNOMEUIINFO_MENU_END_GAME_ITEM(cb, data)

Use this macro to include an "End game" menu item.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_EXIT_ITEM()

#define     GNOMEUIINFO_MENU_EXIT_ITEM(cb, data)

Use this macro to include an "Exit" menu entry. To be included in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_FILES_TREE()

#define     GNOMEUIINFO_MENU_FILES_TREE(tree)

Inserts a top-level "Files" menu. The argument is pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_FILE_TREE()

#define     GNOMEUIINFO_MENU_FILE_TREE(tree)

Inserts a top-level "File" menu. The argument is pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_FIND_AGAIN_ITEM()

#define     GNOMEUIINFO_MENU_FIND_AGAIN_ITEM(cb, data)

Use this macro to include a "Find again" menu entry. To be included in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_FIND_ITEM()

#define     GNOMEUIINFO_MENU_FIND_ITEM(cb, data)

Use this macro to include a "Find" menu entry. To be included in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_GAME_TREE()

#define     GNOMEUIINFO_MENU_GAME_TREE(tree)

Inserts a top-level "Game" menu. The argument is a pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_HELP_TREE()

#define     GNOMEUIINFO_MENU_HELP_TREE(tree)

Inserts a top-level "Game" menu. The argument is pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_HINT_ITEM()

#define     GNOMEUIINFO_MENU_HINT_ITEM(cb, data)

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_NEW_GAME_ITEM()

#define     GNOMEUIINFO_MENU_NEW_GAME_ITEM(cb, data)

Use this macro to include an "New game" menu entry. To be included in the "Game" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_NEW_ITEM()

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

Use this macro to include a "New" menu entry. To be included in the "File" menu.

label :The text that will be displayed
tip : 
cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_NEW_SUBTREE()

#define     GNOMEUIINFO_MENU_NEW_SUBTREE(tree)

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_NEW_WINDOW_ITEM()

#define     GNOMEUIINFO_MENU_NEW_WINDOW_ITEM(cb, data)

Use this macro to include a "New window" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_OPEN_ITEM()

#define     GNOMEUIINFO_MENU_OPEN_ITEM(cb, data)

Use this macro to include an "Open" menu entry. To be used in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PASTE_ITEM()

#define     GNOMEUIINFO_MENU_PASTE_ITEM(cb, data)

Use this macro to include a "Paste" menu entry. To be used in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PAUSE_GAME_ITEM()

#define     GNOMEUIINFO_MENU_PAUSE_GAME_ITEM(cb, data)

Use this macro to include a "Pause game" menu entry. To be used in the "Game" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PREFERENCES_ITEM()

#define     GNOMEUIINFO_MENU_PREFERENCES_ITEM(cb, data)

Use this macro to include a "Preferences" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PRINT_ITEM()

#define     GNOMEUIINFO_MENU_PRINT_ITEM(cb, data)

Use this macro to include a "Print" menu entry. To be used in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PRINT_SETUP_ITEM()

#define     GNOMEUIINFO_MENU_PRINT_SETUP_ITEM(cb, data)

Use this macro to include a "Print setup" menu entry. To be used in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_PROPERTIES_ITEM()

#define     GNOMEUIINFO_MENU_PROPERTIES_ITEM(cb, data)

Use this macro to include a "Properties" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_REDO_ITEM()

#define     GNOMEUIINFO_MENU_REDO_ITEM(cb, data)

Use this macro to include a "Redo" menu entry. Most likely to be put in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_REDO_MOVE_ITEM()

#define     GNOMEUIINFO_MENU_REDO_MOVE_ITEM(cb, data)

Use this macro to include a "Redo move" menu entry. Most likely to be put in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_REPLACE_ITEM()

#define     GNOMEUIINFO_MENU_REPLACE_ITEM(cb, data)

Use this macro to include a "Replace" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_RESTART_GAME_ITEM()

#define     GNOMEUIINFO_MENU_RESTART_GAME_ITEM(cb, data)

Use this macro to include a "Restart game" menu entry. To be used in the "Game" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_REVERT_ITEM()

#define     GNOMEUIINFO_MENU_REVERT_ITEM(cb, data)

Use this macro to include a "Revert" menu entry.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_SAVE_AS_ITEM()

#define     GNOMEUIINFO_MENU_SAVE_AS_ITEM(cb, data)

Use this macro to include a "Save as" menu entry. To be used in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_SAVE_ITEM()

#define     GNOMEUIINFO_MENU_SAVE_ITEM(cb, data)

Use this macro to include a "Save" menu entry. To be used in the "File" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_SCORES_ITEM()

#define     GNOMEUIINFO_MENU_SCORES_ITEM(cb, data)

Use this macro to include a "Scores" menu entry. To be used in the "Game" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_SELECT_ALL_ITEM()

#define     GNOMEUIINFO_MENU_SELECT_ALL_ITEM(cb, data)

Use this macro to include a "Select all" menu entry. Most likely to be used in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_SETTINGS_TREE()

#define     GNOMEUIINFO_MENU_SETTINGS_TREE(tree)

Inserts a top-level "Settings" menu. The argument is a pointer to GnomeUIInfo that will contain the submenu to insert.

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_UNDO_ITEM()

#define     GNOMEUIINFO_MENU_UNDO_ITEM(cb, data)

Use this macro to include an "Undo" menu entry. Most likely to be used in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_UNDO_MOVE_ITEM()

#define     GNOMEUIINFO_MENU_UNDO_MOVE_ITEM(cb, data)

Use this macro to include an "Undo move" menu entry. Most likely to be used in the "Edit" menu.

cb :Specifies the routine to be invoked when the menu is selected
data :The data passed to your routine.


GNOMEUIINFO_MENU_VIEW_TREE()

#define     GNOMEUIINFO_MENU_VIEW_TREE(tree)

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_MENU_WINDOWS_TREE()

#define     GNOMEUIINFO_MENU_WINDOWS_TREE(tree)

tree :array of GnomeUIInfo structures for the submenu.


GNOMEUIINFO_SUBTREE_HINT()

#define     GNOMEUIINFO_SUBTREE_HINT(label, hint, tree)

label :The text that will be displayed
hint : 
tree :array of GnomeUIInfo structures for the submenu.


GNOME_MENU_FILE_STRING

#define GNOME_MENU_FILE_STRING D_("_File")


GNOME_MENU_FILE_PATH

#define GNOME_MENU_FILE_PATH D_("_File/")


GNOME_MENU_EDIT_STRING

#define GNOME_MENU_EDIT_STRING D_("_Edit")


GNOME_MENU_EDIT_PATH

#define GNOME_MENU_EDIT_PATH D_("_Edit/")


GNOME_MENU_VIEW_STRING

#define GNOME_MENU_VIEW_STRING D_("_View")


GNOME_MENU_VIEW_PATH

#define GNOME_MENU_VIEW_PATH D_("_View/")


GNOME_MENU_SETTINGS_STRING

#define GNOME_MENU_SETTINGS_STRING D_("_Settings")


GNOME_MENU_SETTINGS_PATH

#define GNOME_MENU_SETTINGS_PATH D_("_Settings/")


GNOME_MENU_FILES_STRING

#define GNOME_MENU_FILES_STRING D_("Fi_les")


GNOME_MENU_FILES_PATH

#define GNOME_MENU_FILES_PATH D_("Fi_les/")


GNOME_MENU_WINDOWS_STRING

#define GNOME_MENU_WINDOWS_STRING D_("_Windows")


GNOME_MENU_WINDOWS_PATH

#define GNOME_MENU_WINDOWS_PATH D_("_Windows/")


struct GnomeUIBuilderData

struct GnomeUIBuilderData {
	GnomeUISignalConnectFunc connect_func;	/* Function that connects to the item's signals */
	gpointer data;				/* User data pointer */
	gboolean is_interp;			/* Should use gtk_signal_connect_interp or normal gtk_signal_connect? */
	GtkCallbackMarshal relay_func;		/* Marshaller function for language bindings */
	GtkDestroyNotify destroy_func;		/* Destroy notification function for language bindings */
};


GnomeUISignalConnectFunc ()

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

uiinfo : 
signal_name : 
uibdata : 


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 info, inserting them from the item no. 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. The uline_accels argument determines whether underline accelerators will be featured from the menu item labels.

menu_shell : 
uiinfo : 
accel_group : 
uline_accels : 
pos : 


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 info, inserting them from item no. pos on and using the specified builder data -- this is intended for language bindings. 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. The uline_accels argument determines whether underline accelerators will be featured from the menu item labels.

menu_shell : 
uiinfo : 
uibdata : 
accel_group : 
uline_accels : 
pos : 


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.

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 : Pointer to GNOME app object.
uiinfo : 


gnome_app_create_menus_interp ()

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

app : Pointer to GNOME app object.
uiinfo : 
relay_func : 
data : 
destroy_func : 


gnome_app_create_menus_with_data ()

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

app : Pointer to GNOME app object.
uiinfo : 
user_data : 


gnome_app_create_menus_custom ()

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

app : Pointer to GNOME app object.
uiinfo : 
uibdata : 


gnome_app_fill_toolbar ()

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

toolbar : 
uiinfo : 
accel_group : 


gnome_app_fill_toolbar_custom ()

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

toolbar : 
uiinfo : 
uibdata : 
accel_group : 


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 : Pointer to GNOME app object.
uiinfo : 


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 : Pointer to GNOME app object.
uiinfo : 
relay_func : 
data : 
destroy_func : 


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 : Pointer to GNOME app object.
uiinfo : 
user_data : 


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 : Pointer to GNOME app object.
uiinfo : 
uibdata : 


gnome_app_find_menu_pos ()

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

finds menu item described by path starting in the GtkMenuShell top and returns its parent GtkMenuShell and the position after this item in pos: 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 : (output) returned item position
Returns : 


gnome_app_remove_menus ()

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

removes num items from the existing app's menu structure beginning with item described by path

app : Pointer to GNOME app object.
path : 
items : 


gnome_app_remove_menu_range ()

void        gnome_app_remove_menu_range     (GnomeApp *app,
                                             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 the number specified by start - very useful for adding and removing Recent document items in the File menu.

app : Pointer to GNOME app object.
path : 
start : 
items : 


gnome_app_insert_menus_custom ()

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

inserts menus described by uiinfo in existing app's menu structure right after the item described by path.

app : Pointer to GNOME app object.
path : 
menuinfo : 
uibdata : 


gnome_app_insert_menus ()

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

app : Pointer to GNOME app object.
path : 
menuinfo : 


gnome_app_insert_menus_with_data ()

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

app : Pointer to GNOME app object.
path : 
menuinfo : 
data : 


gnome_app_insert_menus_interp ()

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

app : Pointer to GNOME app object.
path : 
menuinfo : 
relay_func : 
data : 
destroy_func : 


gnome_app_install_appbar_menu_hints ()

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

Install menu hints for the given GNOME app bar object.

appbar : Pointer to GNOME app bar object.
uiinfo : GNOME UI info for menu


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 Gtk+ status bar object
uiinfo : Gnome UI info for the menu to be changed


gnome_app_install_menu_hints ()

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

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

app : Pointer to GNOME app object
uinfo :