Changeset 5366 in orxonox.OLD for trunk/src/lib/gui/gl_gui
- Timestamp:
- Oct 12, 2005, 1:23:08 AM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/Makefile.am
r5364 r5366 10 10 11 11 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 12 glgui_handler.cc \ 12 13 glgui_widget.cc \ 13 14 glgui_button.cc \ -
trunk/src/lib/gui/gl_gui/Makefile.in
r5364 r5366 55 55 libORXglgui_a_LIBADD = 56 56 am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT) \ 57 libORXglgui_a-glgui_handler.$(OBJEXT) \ 57 58 libORXglgui_a-glgui_widget.$(OBJEXT) \ 58 59 libORXglgui_a-glgui_button.$(OBJEXT) \ … … 70 71 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_container.Po \ 71 72 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_frame.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_handler.Po \ 72 74 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po \ 73 75 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_widget.Po \ … … 198 200 libORXglgui_a_CPPFLAGS = -DBUILD_ORXONOX 199 201 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 202 glgui_handler.cc \ 200 203 glgui_widget.cc \ 201 204 glgui_button.cc \ … … 268 271 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_container.Po@am__quote@ 269 272 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_frame.Po@am__quote@ 273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_handler.Po@am__quote@ 270 274 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po@am__quote@ 271 275 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_widget.Po@am__quote@ … … 304 308 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 305 309 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glmenu_imagescreen.obj `if test -f 'glmenu/glmenu_imagescreen.cc'; then $(CYGPATH_W) 'glmenu/glmenu_imagescreen.cc'; else $(CYGPATH_W) '$(srcdir)/glmenu/glmenu_imagescreen.cc'; fi` 310 311 libORXglgui_a-glgui_handler.o: glgui_handler.cc 312 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_handler.o -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" -c -o libORXglgui_a-glgui_handler.o `test -f 'glgui_handler.cc' || echo '$(srcdir)/'`glgui_handler.cc; \ 313 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_handler.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo"; exit 1; fi 314 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_handler.cc' object='libORXglgui_a-glgui_handler.o' libtool=no @AMDEPBACKSLASH@ 315 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_handler.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_handler.TPo' @AMDEPBACKSLASH@ 316 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 317 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_handler.o `test -f 'glgui_handler.cc' || echo '$(srcdir)/'`glgui_handler.cc 318 319 libORXglgui_a-glgui_handler.obj: glgui_handler.cc 320 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_handler.obj -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" -c -o libORXglgui_a-glgui_handler.obj `if test -f 'glgui_handler.cc'; then $(CYGPATH_W) 'glgui_handler.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_handler.cc'; fi`; \ 321 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_handler.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo"; exit 1; fi 322 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_handler.cc' object='libORXglgui_a-glgui_handler.obj' libtool=no @AMDEPBACKSLASH@ 323 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_handler.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_handler.TPo' @AMDEPBACKSLASH@ 324 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 325 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_handler.obj `if test -f 'glgui_handler.cc'; then $(CYGPATH_W) 'glgui_handler.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_handler.cc'; fi` 306 326 307 327 libORXglgui_a-glgui_widget.o: glgui_widget.cc -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc
r5360 r5366 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include "glgui_ .h"18 #include "glgui_checkbutton.h" 19 19 20 20 using namespace std; … … 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiCheckButton::GLGuiCheckButton () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiCheckButton::~GLGuiCheckButton() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui ::init()43 GLGuiCheckButton::init() 44 44 { 45 this->setClassID(CL_GLGUI_ , "GLGui");45 this->setClassID(CL_GLGUI_CHECKBUTTON, "GLGuiCheckButton"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiCheckButton 51 51 */ 52 void GLGui ::draw()52 void GLGuiCheckButton::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h2 * @file glgui_checkbutton.h 3 3 * The gl_ widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H7 #ifndef _GLGUI_CHECKBUTTON_H 8 8 #define _GLGUI__H 9 9 10 #include " base_object.h"10 #include "glgui_button.h" 11 11 12 12 // FORWARD DECLARATION … … 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiCheckButton : public GLGuiButton { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiCheckButton(); 22 virtual ~GLGuiCheckButton(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_CHECKBUTTON_H */ -
trunk/src/lib/gui/gl_gui/glgui_handler.cc
r5316 r5366 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "glgui_handler.h" 19 19 20 20 using namespace std; 21 22 21 23 22 /** 24 23 * standard constructor 25 24 */ 26 ProtoSingleton::ProtoSingleton()25 GLGuiHandler::GLGuiHandler () 27 26 { 28 this->setClassID(CL_ PROTO_ID, "ProtoSingleton");29 this->setName(" ProtoSingleton");27 this->setClassID(CL_GLGUI_HANDLER, "GLGuiHandler"); 28 this->setName("GLGuiHandler"); 30 29 31 30 /* If you make a new class, what is most probably the case when you write this file … … 46 45 * the singleton reference to this class 47 46 */ 48 ProtoSingleton* ProtoSingleton::singletonRef = NULL;47 GLGuiHandler* GLGuiHandler::singletonRef = NULL; 49 48 50 49 /** 51 50 @brief standard deconstructor 52 51 */ 53 ProtoSingleton::~ProtoSingleton()52 GLGuiHandler::~GLGuiHandler () 54 53 { 55 ProtoSingleton::singletonRef = NULL;54 GLGuiHandler::singletonRef = NULL; 56 55 } -
trunk/src/lib/gui/gl_gui/glgui_handler.h
r5316 r5366 4 4 */ 5 5 6 #ifndef _ PROTO_SINGLETON_H7 #define _ PROTO_SINGLETON_H6 #ifndef _GLGUI_HANDLER_H 7 #define _GLGUI_HANDLER_H 8 8 9 9 #include "base_object.h" … … 12 12 13 13 //! A default singleton class. 14 class ProtoSingleton: public BaseObject {14 class GLGuiHandler : public BaseObject { 15 15 16 16 public: 17 virtual ~ ProtoSingleton(void);17 virtual ~GLGuiHandler(void); 18 18 /** @returns a Pointer to the only object of this Class */ 19 inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; };19 inline static GLGuiHandler* getInstance(void) { if (!singletonRef) singletonRef = new GLGuiHandler(); return singletonRef; }; 20 20 21 21 private: 22 ProtoSingleton(void);23 static ProtoSingleton* singletonRef;22 GLGuiHandler(void); 23 static GLGuiHandler* singletonRef; 24 24 }; 25 25 26 #endif /* _ PROTO_SINGLETON_H */26 #endif /* _GLGUI_HANDLER_H */ -
trunk/src/lib/gui/gl_gui/glgui_image.cc
r5360 r5366 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include "glgui_ .h"18 #include "glgui_image.h" 19 19 20 20 using namespace std; … … 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiImage::GLGuiImage () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiImage::~GLGuiImage() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui::init()43 void GLGuiImage::init() 44 44 { 45 this->setClassID(CL_GLGUI_, "GLGui ");45 this->setClassID(CL_GLGUI_, "GLGuiImage"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiImage 51 51 */ 52 void GLGui ::draw()52 void GLGuiImage::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_image.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h3 * The gl_ widget of th openglGUI2 * @file glgui_image.h 3 * The gl_Image widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H8 #define _GLGUI_ _H7 #ifndef _GLGUI_IMAGE_H 8 #define _GLGUI_IMAGE_H 9 9 10 10 #include "base_object.h" … … 12 12 // FORWARD DECLARATION 13 13 14 //! This is part of the openglGUI class14 //! This is Image part of the openglGUI class 15 15 /** 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiImage : public GLGuiWidget { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiImage(); 22 virtual ~GLGuiImage(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_IMAGE_H */ -
trunk/src/lib/gui/gl_gui/glgui_menu.cc
r5360 r5366 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiMenu::GLGuiMenu () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiMenu::~GLGuiMenu() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui::init()43 void GLGuiMenu::init() 44 44 { 45 this->setClassID(CL_GLGUI_ , "GLGui");45 this->setClassID(CL_GLGUI_MENU, "GLGuiMenu"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiMenu 51 51 */ 52 void GLGui ::draw()52 void GLGuiMenu::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_menu.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h3 * The gl_ widget of th openglGUI2 * @file glgui_menu.h 3 * The gl_Menu widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H8 #define _GLGUI_ _H7 #ifndef _GLGUI_MENU_H 8 #define _GLGUI_MENU_H 9 9 10 10 #include "base_object.h" … … 12 12 // FORWARD DECLARATION 13 13 14 //! This is part of the openglGUI class14 //! This is Menu part of the openglGUI class 15 15 /** 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiMenu : public GLGuiMenu { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiMenu(); 22 virtual ~GLGuiMenu(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_MENU_H */ -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5364 r5366 46 46 this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget"); 47 47 48 this->managed = false; 49 this->focusable = true; 50 this->clickable = true; 51 52 this->backGround = NULL; 53 this->renderModel = 0; 48 54 } -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r5365 r5366 1 1 /*! 2 3 4 2 * @file glgui_widget.h 3 * The gl_widget of the openglGUI 4 */ 5 5 6 6 #ifndef _GLGUI_WIDGET_H … … 15 15 //! This is part of the openglGUI class 16 16 /** 17 18 17 * A widget is the main class of all the elements of th GUI. 18 */ 19 19 class GLGuiWidget : public Element2D { 20 public:21 GLGuiWidget();22 virtual ~GLGuiWidget();20 public: 21 GLGuiWidget(); 22 virtual ~GLGuiWidget(); 23 23 24 void init();24 void init(); 25 25 26 void show();27 void hide();26 void show(); 27 void hide(); 28 28 29 29 30 virtual void draw() = 0;31 virtual void update() = 0;30 virtual void draw() = 0; 31 virtual void update() = 0; 32 32 33 private: 34 bool managed; //!< if this GUI-element should be managed. true means it gets deleted with the deletion of it's parent. 35 bool focusable; //!< If it can receive focus. 36 bool clickable; //!< if it can be clicked upon. 33 protected: 34 Material* backGround; 35 GLuint renderModel; 37 36 38 Material* backGround; 39 GLuint renderModel; 37 private: 38 bool managed; //!< if this GUI-element should be managed. true means it gets deleted with the deletion of it's parent. 39 bool focusable; //!< If it can receive focus. 40 bool clickable; //!< if it can be clicked upon. 41 40 42 41 43
Note: See TracChangeset
for help on using the changeset viewer.