00001 /* 00002 ClanGUI, copyrights by various people. Have a look in the CREDITS file. 00003 00004 This sourcecode is distributed using the Library GNU Public Licence, 00005 version 2 or (at your option) any later version. Please read LICENSE 00006 for details. 00007 */ 00008 00010 00011 #ifndef header_gui_manager 00012 #define header_gui_manager 00013 00014 #include <stddef.h> 00015 00016 #include "component.h" 00017 00018 class CL_ComponentManager; 00019 class CL_StyleManager; 00020 00021 class CL_GUIManager : public CL_Component 00022 //: Manages the GUI; root component. 00023 { 00025 public: 00026 CL_GUIManager(CL_StyleManager *style); 00027 00028 CL_GUIManager(CL_Component *parent, CL_StyleManager *style); 00029 00030 virtual ~CL_GUIManager(); 00031 00033 public: 00034 CL_Component *get_focus(); 00035 //: Returns the currently focused component. 00036 00038 public: 00039 void set_focus(CL_Component *component); 00040 //: Sets the focus component of the gui. 00041 00042 void show(); 00043 //: Draws the GUI once. 00044 00045 void run(); 00046 //: Redraws the GUI continuosly. 00047 00048 void quit(); 00049 //: Break run loop. 00050 00051 void enable_input(); 00052 //: Tells the GUI to start accepting input. 00053 00054 void disable_input(); 00055 //: Tells the GUI to stop accepting input. 00056 00057 void gui_capture_mouse(CL_Component *component); 00058 //: Sets the GUI in capture mode. [should we move this out of API space? -- mbn] 00059 00060 void gui_release_mouse(); 00061 //: Takes GUI out of capture mode. [should we move this out of API space? -- mbn] 00062 00064 private: 00065 class CL_GUIManager_Generic *impl; 00066 }; 00067 00068 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001