home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / gtk / menuitem.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-03  |  2.1 KB  |  81 lines

  1. // -*- C++ -*-
  2. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  3. // Copyright (C) 1999-2003 Forgotten
  4. // Copyright (C) 2004 Forgotten and the VBA development team
  5.  
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2, or(at your option)
  9. // any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software Foundation,
  18. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. #ifndef __VBA_MENUITEM_H__
  21. #define __VBA_MENUITEM_H__
  22.  
  23. #include <gtkmm/menuitem.h>
  24. #include <gtkmm/imagemenuitem.h>
  25.  
  26. #ifdef GTKMM20
  27. namespace Gtk { typedef Gtk::Menu_Helpers::AccelKey AccelKey; }
  28. #endif // GTKMM20
  29.  
  30. namespace VBA
  31. {
  32.  
  33. class MenuItem : public Gtk::MenuItem
  34. {
  35. public:
  36.   MenuItem()
  37.     {}
  38.  
  39.   MenuItem(Gtk::Widget & _roWidget) :
  40.     Gtk::MenuItem(_roWidget)
  41.     {}
  42.  
  43.   MenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) :
  44.     Gtk::MenuItem(_rsLabel, _bMnemonic)
  45.     {}
  46.  
  47.   inline void set_accel_key(const Gtk::AccelKey & _roAccelKey)
  48.     {
  49.       Gtk::MenuItem::set_accel_key(_roAccelKey);
  50.     }
  51. };
  52.  
  53. class ImageMenuItem : public Gtk::ImageMenuItem
  54. {
  55. public:
  56.   ImageMenuItem()
  57.     {}
  58.  
  59.   ImageMenuItem(Widget & _roImage, const Glib::ustring & _rsLabel, bool _bMnemonic = false) :
  60.     Gtk::ImageMenuItem(_roImage, _rsLabel, _bMnemonic)
  61.     {}
  62.  
  63.   ImageMenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) :
  64.     Gtk::ImageMenuItem(_rsLabel, _bMnemonic)
  65.     {}
  66.  
  67.   ImageMenuItem(const Gtk::StockID & _roId) :
  68.     Gtk::ImageMenuItem(_roId)
  69.     {}
  70.  
  71.   inline void set_accel_key(const Gtk::AccelKey & _roAccelKey)
  72.     {
  73.       Gtk::MenuItem::set_accel_key(_roAccelKey);
  74.     }
  75. };
  76.  
  77. } // namespace VBA
  78.  
  79.  
  80. #endif // __VBA_MENUITEM_H__
  81.