/****************************************************************************** * FILE: menu_handle.h * Some functions to create and manage menu for a gnome application. * * Author: Dana Vrajitoru, IUSB * Class: C481 B581 Computer Graphics ******************************************************************************/ #ifndef MENU_HANDLE_H #define MENU_HANDLE_H #include // Add a simple item to the menu at the position indicated by // where. There is no icon display on the item line, nor shortcut key, // and no data to be passed to the callback function. The label is // what will appear in this place in the menu (place an underline // before the character in the label to be used as meta (accelerator) // character for the item. The tooltip is a comment that appears in // the status bar if the application defines one. The last parameter // is the name of the function to be called when the menu item is // activated. void Menu_add_item_simple(GnomeUIInfo *menu, int where, gchar *label, gchar *tooltip, void (*callback) (GtkWidget *, gpointer) ); // Adding a menu item that causes to exit the application. The where // parameter is the index in the array of menu items where the exit // item is placed. void Menu_add_exit(GnomeUIInfo *menu, int where); // Ending a menu. The where parameter is the index in the array of // menu items where the end of menu is placed. void Menu_end(GnomeUIInfo *menu, int where); // Adding a separator (horizontal line) to the menu at the position // indicated by where. void Menu_add_separator(GnomeUIInfo *menu, int where); // Composing the individual menus. // Add a file menu (3rd parameter) to the menu bar (first parameter) // at the beginning. void Menu_add_file(GnomeUIInfo *menu, GnomeUIInfo *file_menu); // Add a submenu to a menu at the position where. The label is what // will appear in this place in the menu (place an //underline before the character in the label to be used as meta //(accelerator) character for the item. void Menu_add_subtree(GnomeUIInfo *menu, int where, GnomeUIInfo *sub_menu, gchar *label); #endif