Mercurial > vba-linux
diff src/gtk/menuitem.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/gtk/menuitem.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,80 @@ 1.4 +// -*- C++ -*- 1.5 +// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. 1.6 +// Copyright (C) 1999-2003 Forgotten 1.7 +// Copyright (C) 2004 Forgotten and the VBA development team 1.8 + 1.9 +// This program is free software; you can redistribute it and/or modify 1.10 +// it under the terms of the GNU General Public License as published by 1.11 +// the Free Software Foundation; either version 2, or(at your option) 1.12 +// any later version. 1.13 +// 1.14 +// This program is distributed in the hope that it will be useful, 1.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of 1.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.17 +// GNU General Public License for more details. 1.18 +// 1.19 +// You should have received a copy of the GNU General Public License 1.20 +// along with this program; if not, write to the Free Software Foundation, 1.21 +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1.22 + 1.23 +#ifndef __VBA_MENUITEM_H__ 1.24 +#define __VBA_MENUITEM_H__ 1.25 + 1.26 +#include <gtkmm/menuitem.h> 1.27 +#include <gtkmm/imagemenuitem.h> 1.28 + 1.29 +#ifdef GTKMM20 1.30 +namespace Gtk { typedef Gtk::Menu_Helpers::AccelKey AccelKey; } 1.31 +#endif // GTKMM20 1.32 + 1.33 +namespace VBA 1.34 +{ 1.35 + 1.36 +class MenuItem : public Gtk::MenuItem 1.37 +{ 1.38 +public: 1.39 + MenuItem() 1.40 + {} 1.41 + 1.42 + MenuItem(Gtk::Widget & _roWidget) : 1.43 + Gtk::MenuItem(_roWidget) 1.44 + {} 1.45 + 1.46 + MenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : 1.47 + Gtk::MenuItem(_rsLabel, _bMnemonic) 1.48 + {} 1.49 + 1.50 + inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) 1.51 + { 1.52 + Gtk::MenuItem::set_accel_key(_roAccelKey); 1.53 + } 1.54 +}; 1.55 + 1.56 +class ImageMenuItem : public Gtk::ImageMenuItem 1.57 +{ 1.58 +public: 1.59 + ImageMenuItem() 1.60 + {} 1.61 + 1.62 + ImageMenuItem(Widget & _roImage, const Glib::ustring & _rsLabel, bool _bMnemonic = false) : 1.63 + Gtk::ImageMenuItem(_roImage, _rsLabel, _bMnemonic) 1.64 + {} 1.65 + 1.66 + ImageMenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : 1.67 + Gtk::ImageMenuItem(_rsLabel, _bMnemonic) 1.68 + {} 1.69 + 1.70 + ImageMenuItem(const Gtk::StockID & _roId) : 1.71 + Gtk::ImageMenuItem(_roId) 1.72 + {} 1.73 + 1.74 + inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) 1.75 + { 1.76 + Gtk::MenuItem::set_accel_key(_roAccelKey); 1.77 + } 1.78 +}; 1.79 + 1.80 +} // namespace VBA 1.81 + 1.82 + 1.83 +#endif // __VBA_MENUITEM_H__