00001 00002 00003 00004 00005 #ifndef MENUITEM_H 00006 #define MENUITEM_H 00007 00008 #include "Control.h" 00009 00010 namespace wkgl { 00011 00012 class MenuItem; //forward declaration 00013 00019 typedef BOOL (*MENUCALLBACK)( MenuItem* item, UINT message ); 00020 00038 class MenuItem 00039 { 00040 protected: 00041 HMENU hmenu; 00042 String *label; 00043 UINT command; 00044 00048 std::vector <MENUCALLBACK> mcallbacks; 00049 00053 static UINT command_inc; 00054 public: 00058 MenuItem(const char* label); 00059 00062 virtual ~MenuItem(); 00063 00067 virtual HMENU getMenuHandle(); 00068 00072 virtual UINT getCommand(); 00073 00077 virtual char* getLabelText(); 00078 00082 virtual BOOL fireMenuEvents( UINT message ); 00083 00087 virtual void addMenuCallBack( MENUCALLBACK mcallback ); 00088 00092 virtual BOOL create( MenuItem *parent ); 00093 }; 00094 } 00095 #endif
1.2.18