Main Page | Namespaces | Classes | Compounds | Files | Compound Members | Related menu.h00001 // 00002 // SYNTOPIA. See http://Syntopia.sourceforge.net for details and documentation. 00003 // 00004 // Author of this file: Mikael Hvidtfeldt Christensen (mikaelc@users.sourceforge.net) 00005 // 00006 00007 #ifndef __menu__ 00008 #define __menu__ 00009 00010 #include "WinForm.h" 00011 #include "GUIControl.h" 00012 #include "Component.h" 00013 00014 namespace GUIToolkit { 00015 00017 class menuItem : public Component { 00018 public: 00019 00021 menuItem(std::string s) { Label = s; ID = GUIControl::GUIInstance->Register(this); }; 00022 00024 ~menuItem() {}; 00025 00027 int ID; 00028 00030 std::string Label; 00031 private: 00032 }; 00033 00034 00036 class popupMenu : public Component { 00037 00038 public: 00039 00042 popupMenu(HWND hw); 00043 00045 ~popupMenu(); 00046 00048 void addToHWND(HWND hwnd) {hostHWND = hwnd;}; 00049 00051 void add(menuItem * item); 00052 00054 void showMenu(); 00055 00056 private: 00057 00058 HMENU hMenu; // pointer to the actual win menu. 00059 HWND hostHWND; // draw on this window 00060 }; 00061 00062 } 00063 00064 #endif Docs made by Doxygen. Email: Mikael Christensen |