Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

menus.h

Go to the documentation of this file.
00001 
00006 #ifndef MENUS_H
00007 #define MENUS_H
00008 
00009 #include <string>
00010 
00011 
00013 enum MenuId
00014 {
00015   MENU_INVALID = 0,
00016 
00017   /* file menu */
00018   MENU_LOAD_SIMULATION,
00019   MENU_RELOAD_SIMULATION
00020 };
00021 
00023 class MenuEvent
00024 {
00025 public:
00026   /* constructors */
00027   MenuEvent (void) : id (MENU_INVALID) { }
00028   MenuEvent (MenuId i) : id(i) { }
00029   MenuEvent (MenuId i, const std::string &s) : id (i), str (s) { }
00030 
00031   /* data accessors */
00032   MenuId Id () const { return id; };
00033   const std::string &String (void) const { return str; }
00034 
00035 private:
00036   /* event ID */
00037   MenuId id;
00038 
00039   /* some events may pass in a string */
00040   std::string str;
00041 };
00042 
00043 #endif

Generated on Fri Jan 12 14:15:02 2007 for Construct by  doxygen 1.4.3-20050530