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