Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl/glgui_handler.h @ 8471

Last change on this file since 8471 was 8324, checked in by bensch, 18 years ago

trunk: Texture-Sequence is initialized smoothly now in the GLGuiCursor

File size: 1.3 KB
RevLine 
[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"
[7919]10#include "glgui_widget.h"
[3655]11
[7779]12namespace OrxGui
13{
[7919]14
15  class GLGuiCursor;
16
[7779]17  // FORWARD DECLARATION
[3655]18
[7779]19  //! A singleton class for the GLGui-Handler
20  class GLGuiHandler : public EventListener
21  {
[3655]22
[7779]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; };
[3655]27
[7919]28    void activateCursor();
29    void deactivateCursor(/** ignore param */ bool deleteCursor = true);
[8324]30    GLGuiCursor* cursor() const { return this->_cursor; }
[7919]31
[8035]32    Vector2D cursorPositionOverFocusedWidget() const;
33    const Vector2D& cursorPositionAbs() const;
34    Vector2D cursorPositionRel(const GLGuiWidget* const widget) const;
35
[7779]36    void activate();
37    void deactivate();
[5388]38
39
[7779]40    virtual void process(const Event &event);
41    void draw();
42    void tick(float dt);
[5388]43
[7779]44  private:
45    GLGuiHandler(void);
46    static GLGuiHandler* singletonRef;
[5388]47
48
[7779]49    bool                 isActive;
[8324]50    GLGuiCursor*         _cursor;
[7919]51
[7779]52  };
53}
[3655]54
[5366]55#endif /* _GLGUI_HANDLER_H */
Note: See TracBrowser for help on using the repository browser.