menu.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(INCLUDED_GTKUTIL_MENU_H)
00023 #define INCLUDED_GTKUTIL_MENU_H
00024
00025 #include "generic/callbackfwd.h"
00026 #include <string>
00027
00028 typedef int gint;
00029 typedef gint gboolean;
00030 typedef struct _GSList GSList;
00031 typedef struct _GtkMenu GtkMenu;
00032 typedef struct _GtkMenuBar GtkMenuBar;
00033 typedef struct _GtkMenuItem GtkMenuItem;
00034 typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
00035 typedef struct _GtkRadioMenuItem GtkRadioMenuItem;
00036 typedef struct _GtkTearoffMenuItem GtkTearoffMenuItem;
00037
00038 void menu_add_item (GtkMenu* menu, GtkMenuItem* item);
00039 void menu_remove_item (GtkMenu* menu, GtkMenuItem* item);
00040 GtkMenuItem* menu_separator (GtkMenu* menu);
00041 GtkTearoffMenuItem* menu_tearoff (GtkMenu* menu);
00042 GtkMenuItem* new_sub_menu_item_with_mnemonic (const std::string& mnemonic);
00043 GtkMenu* create_sub_menu_with_mnemonic (GtkMenuBar* bar, const std::string& mnemonic);
00044 GtkMenu* create_sub_menu_with_mnemonic (GtkMenu* parent, const std::string& mnemonic);
00045 GtkMenuItem* create_menu_item_with_mnemonic (GtkMenu* menu, const std::string& mnemonic, const Callback& callback,
00046 const std::string& icon = "");
00047 GtkCheckMenuItem* create_check_menu_item_with_mnemonic (GtkMenu* menu, const std::string& mnemonic,
00048 const Callback& callback, const std::string& icon);
00049 GtkRadioMenuItem* create_radio_menu_item_with_mnemonic (GtkMenu* menu, GSList** group, const std::string& mnemonic,
00050 const Callback& callback, const std::string& icon);
00051
00052 class Command;
00053 GtkMenuItem* create_menu_item_with_mnemonic (GtkMenu* menu, const std::string& mnemonic, const Command& command,
00054 const std::string& icon = "");
00055 class Toggle;
00056 GtkCheckMenuItem* create_check_menu_item_with_mnemonic (GtkMenu* menu, const std::string& mnemonic,
00057 const Toggle& toggle, const std::string& icon);
00058
00059 typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
00060 void check_menu_item_set_active_no_signal (GtkCheckMenuItem* item, gboolean active);
00061 typedef struct _GtkRadioMenuItem GtkRadioMenuItem;
00062 void radio_menu_item_set_active_no_signal (GtkRadioMenuItem* item, gboolean active);
00063
00064 #endif