menu.h

Go to the documentation of this file.
00001 /*
00002  Copyright (C) 2001-2006, William Joseph.
00003  All Rights Reserved.
00004 
00005  This file is part of GtkRadiant.
00006 
00007  GtkRadiant is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by
00009  the Free Software Foundation; either version 2 of the License, or
00010  (at your option) any later version.
00011 
00012  GtkRadiant is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU General Public License for more details.
00016 
00017  You should have received a copy of the GNU General Public License
00018  along with GtkRadiant; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
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

Generated by  doxygen 1.6.2