Rev | Line | |
---|
[4838] | 1 | /*! |
---|
[5384] | 2 | * @file glgui_mainwidget.h |
---|
| 3 | * @brief Definition of the glGui singleton Class |
---|
| 4 | */ |
---|
[3655] | 5 | |
---|
[5384] | 6 | #ifndef _GLGUI_MAINWIDGET_H |
---|
| 7 | #define _GLGUI_MAINWIDGET_H |
---|
[3655] | 8 | |
---|
[5384] | 9 | #include "glgui_widget.h" |
---|
[3655] | 10 | |
---|
[7779] | 11 | namespace OrxGui |
---|
| 12 | { |
---|
[3655] | 13 | |
---|
[7779] | 14 | //! A default singleton class. |
---|
| 15 | class GLGuiMainWidget : public GLGuiWidget |
---|
| 16 | { |
---|
[3655] | 17 | |
---|
[7779] | 18 | public: |
---|
| 19 | virtual ~GLGuiMainWidget(void); |
---|
| 20 | /** @returns a Pointer to the only object of this Class */ |
---|
| 21 | inline static GLGuiMainWidget* getInstance(void) { if (!GLGuiMainWidget::singletonRef) GLGuiMainWidget::singletonRef = new GLGuiMainWidget(); return GLGuiMainWidget::singletonRef; }; |
---|
[3655] | 22 | |
---|
[5384] | 23 | virtual void update() {}; |
---|
[7779] | 24 | virtual void draw() const {}; |
---|
[5384] | 25 | |
---|
[7779] | 26 | private: |
---|
| 27 | GLGuiMainWidget(void); |
---|
| 28 | static GLGuiMainWidget* singletonRef; |
---|
| 29 | }; |
---|
| 30 | } |
---|
[3655] | 31 | |
---|
[5384] | 32 | #endif /* _GLGUI_MAINWIDGET_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.