Main Page | Namespaces | Classes | Compounds | Files | Compound Members | Related GUIControl.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 00008 #ifndef __GUIControl 00009 #define __GUIControl 00010 00011 #include "WinForm.h" 00012 #include "Events.h" 00013 #include "Component.h" 00014 #include <iostream> 00015 #include <string> 00016 #include <sstream> 00017 00018 namespace GUIToolkit { 00019 00020 class TextBox; 00021 00023 00027 class GUIControl { 00028 00029 public: 00030 00035 GUIControl(HINSTANCE my_hInstance, int my_nCmdShow); 00036 00038 ~GUIControl() {}; 00039 00041 void MessageLoop(); 00042 00043 MSG Msg; 00044 00046 int Register(Component * m); 00047 00049 std::string getUniqueName(); 00050 00052 void RegisterEvents(Component * m, EventHandler * e); 00053 00056 int RegisterRaw(Component * m); 00057 00059 void RegisterManualDraw(HWND hwnd, Component * m); 00060 00066 static GUIControl * GUIInstance; 00067 00069 static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 00070 00072 HINSTANCE hInstance; 00073 00075 int nCmdShow; 00076 00078 HWND firstWindow; 00079 00081 TextBox * ErrorTextBox ; 00082 00084 void DEBUG(std::string t) ; 00085 00087 void DEBUG(char t[]) ; 00088 00090 void DEBUG(int t) ; 00091 00093 static std::string my_itos(int i); 00094 private: 00095 00096 int ComponentIDCounter; // A counter for a unique ID to every component 00097 int WINIDCounter; // A counter for a unique ID to every component 00098 00099 ComponentMap registreredComponents; // Table for components and their ID. 00100 ComponentEventMap registreredEventHandlers; // Table for eventhandlers. 00101 HWNDMap registerManualDraw; 00102 int testHack; 00103 }; 00104 00105 }; 00106 00107 #endif Docs made by Doxygen. Email: Mikael Christensen |