source:
orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_handler.h
@
6774
Last change on this file since 6774 was 5406, checked in by bensch, 19 years ago | |
---|---|
File size: 821 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
2 | * @file proto_singleton.h | |
[5405] | 3 | * @brief Definition of the GLGuiHandler singleton Class |
[3655] | 4 | */ |
5 | ||
[5366] | 6 | #ifndef _GLGUI_HANDLER_H |
7 | #define _GLGUI_HANDLER_H | |
[3655] | 8 | |
[5388] | 9 | #include "event_listener.h" |
[3655] | 10 | |
[5405] | 11 | // FORWARD DECLARATION |
[3655] | 12 | |
[5405] | 13 | //! A singleton class for the GLGui-Handler |
[5388] | 14 | class GLGuiHandler : public EventListener { |
[3655] | 15 | |
16 | public: | |
[5366] | 17 | virtual ~GLGuiHandler(void); |
[4838] | 18 | /** @returns a Pointer to the only object of this Class */ |
[5406] | 19 | inline static GLGuiHandler* getInstance(void) { if (!GLGuiHandler::singletonRef) GLGuiHandler::singletonRef = new GLGuiHandler(); return GLGuiHandler::singletonRef; }; |
[3655] | 20 | |
[5388] | 21 | void activate(); |
22 | void deactivate(); | |
23 | ||
24 | ||
25 | virtual void process(const Event &event); | |
[5406] | 26 | void draw(); |
27 | void tick(float dt); | |
[5388] | 28 | |
[3655] | 29 | private: |
[5366] | 30 | GLGuiHandler(void); |
31 | static GLGuiHandler* singletonRef; | |
[5388] | 32 | |
33 | ||
34 | bool isActive; | |
[3655] | 35 | }; |
36 | ||
[5366] | 37 | #endif /* _GLGUI_HANDLER_H */ |
Note: See TracBrowser
for help on using the repository browser.