/*! * @file glgui_widget.h * The gl_widget of the openglGUI */ #ifndef _GLGUI_WIDGET_H #define _GLGUI_WIDGET_H #include "element_2d.h" #include "glincl.h" // FORWARD DECLARATION class Material; //! if the Element should be visible by default. #define GLGUI_WIDGET_DEFAULT_VISIBLE false //! This is widget part of the openglGUI class /** * A widget is the main class of all the elements of th GUI. */ class GLGuiWidget : public Element2D { public: GLGuiWidget(); virtual ~GLGuiWidget(); void init(); void show(); void hide(); virtual void update() = 0; protected: Material* backMat; GLuint backModel; Material* frontMat; GLuint frontModel; private: bool focusable; //!< If this widget can receive focus. bool clickable; //!< if this widget can be clicked upon. }; #endif /* _GLGUI_WIDGET_H */