rlm@1: // -*- C++ -*- rlm@1: // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. rlm@1: // Copyright (C) 1999-2003 Forgotten rlm@1: // Copyright (C) 2004 Forgotten and the VBA development team rlm@1: rlm@1: // This program is free software; you can redistribute it and/or modify rlm@1: // it under the terms of the GNU General Public License as published by rlm@1: // the Free Software Foundation; either version 2, or(at your option) rlm@1: // any later version. rlm@1: // rlm@1: // This program is distributed in the hope that it will be useful, rlm@1: // but WITHOUT ANY WARRANTY; without even the implied warranty of rlm@1: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the rlm@1: // GNU General Public License for more details. rlm@1: // rlm@1: // You should have received a copy of the GNU General Public License rlm@1: // along with this program; if not, write to the Free Software Foundation, rlm@1: // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. rlm@1: rlm@1: #ifndef __VBA_MENUITEM_H__ rlm@1: #define __VBA_MENUITEM_H__ rlm@1: rlm@1: #include rlm@1: #include rlm@1: rlm@1: #ifdef GTKMM20 rlm@1: namespace Gtk { typedef Gtk::Menu_Helpers::AccelKey AccelKey; } rlm@1: #endif // GTKMM20 rlm@1: rlm@1: namespace VBA rlm@1: { rlm@1: rlm@1: class MenuItem : public Gtk::MenuItem rlm@1: { rlm@1: public: rlm@1: MenuItem() rlm@1: {} rlm@1: rlm@1: MenuItem(Gtk::Widget & _roWidget) : rlm@1: Gtk::MenuItem(_roWidget) rlm@1: {} rlm@1: rlm@1: MenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : rlm@1: Gtk::MenuItem(_rsLabel, _bMnemonic) rlm@1: {} rlm@1: rlm@1: inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) rlm@1: { rlm@1: Gtk::MenuItem::set_accel_key(_roAccelKey); rlm@1: } rlm@1: }; rlm@1: rlm@1: class ImageMenuItem : public Gtk::ImageMenuItem rlm@1: { rlm@1: public: rlm@1: ImageMenuItem() rlm@1: {} rlm@1: rlm@1: ImageMenuItem(Widget & _roImage, const Glib::ustring & _rsLabel, bool _bMnemonic = false) : rlm@1: Gtk::ImageMenuItem(_roImage, _rsLabel, _bMnemonic) rlm@1: {} rlm@1: rlm@1: ImageMenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : rlm@1: Gtk::ImageMenuItem(_rsLabel, _bMnemonic) rlm@1: {} rlm@1: rlm@1: ImageMenuItem(const Gtk::StockID & _roId) : rlm@1: Gtk::ImageMenuItem(_roId) rlm@1: {} rlm@1: rlm@1: inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) rlm@1: { rlm@1: Gtk::MenuItem::set_accel_key(_roAccelKey); rlm@1: } rlm@1: }; rlm@1: rlm@1: } // namespace VBA rlm@1: rlm@1: rlm@1: #endif // __VBA_MENUITEM_H__