Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_handler.h @ 7972

Last change on this file since 7972 was 7919, checked in by bensch, 19 years ago

orxonox/trunk: merged the gui branche back
merged with command:
https://svn.orxonox.net/orxonox/branches/gui
no conflicts

File size: 1.1 KB
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#include "glgui_widget.h"
11
12namespace OrxGui
13{
14
15  class GLGuiCursor;
16
17  // FORWARD DECLARATION
18
19  //! A singleton class for the GLGui-Handler
20  class GLGuiHandler : public EventListener
21  {
22
23  public:
24    virtual ~GLGuiHandler(void);
25    /** @returns a Pointer to the only object of this Class */
26    inline static GLGuiHandler* getInstance(void) { if (!GLGuiHandler::singletonRef) GLGuiHandler::singletonRef = new GLGuiHandler();  return GLGuiHandler::singletonRef; };
27
28    void activateCursor();
29    void deactivateCursor(/** ignore param */ bool deleteCursor = true);
30    GLGuiCursor* getCursor() const { return this->cursor; }
31
32    void activate();
33    void deactivate();
34
35
36    virtual void process(const Event &event);
37    void draw();
38    void tick(float dt);
39
40  private:
41    GLGuiHandler(void);
42    static GLGuiHandler* singletonRef;
43
44
45    bool                 isActive;
46    GLGuiCursor*         cursor;
47
48  };
49}
50
51#endif /* _GLGUI_HANDLER_H */
Note: See TracBrowser for help on using the repository browser.