Changeset 5384 in orxonox.OLD for trunk/src/lib/gui
- Timestamp:
- Oct 15, 2005, 9:58:59 PM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/Makefile.am
r5366 r5384 11 11 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 12 12 glgui_handler.cc \ 13 glgui_mainwidget.cc \ 13 14 glgui_widget.cc \ 14 15 glgui_button.cc \ … … 22 23 noinst_HEADERS= glmenu/glmenu_imagescreen.h \ 23 24 glgui.h \ 25 glgui_handler.h \ 26 glgui_mainwidget.h \ 24 27 glgui_widget.h \ 25 28 glgui_button.h \ -
trunk/src/lib/gui/gl_gui/Makefile.in
r5366 r5384 56 56 am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT) \ 57 57 libORXglgui_a-glgui_handler.$(OBJEXT) \ 58 libORXglgui_a-glgui_mainwidget.$(OBJEXT) \ 58 59 libORXglgui_a-glgui_widget.$(OBJEXT) \ 59 60 libORXglgui_a-glgui_button.$(OBJEXT) \ … … 72 73 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_frame.Po \ 73 74 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_handler.Po \ 75 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po \ 74 76 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po \ 75 77 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_widget.Po \ … … 201 203 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 202 204 glgui_handler.cc \ 205 glgui_mainwidget.cc \ 203 206 glgui_widget.cc \ 204 207 glgui_button.cc \ … … 211 214 noinst_HEADERS = glmenu/glmenu_imagescreen.h \ 212 215 glgui.h \ 216 glgui_handler.h \ 217 glgui_mainwidget.h \ 213 218 glgui_widget.h \ 214 219 glgui_button.h \ … … 272 277 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_frame.Po@am__quote@ 273 278 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_handler.Po@am__quote@ 279 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po@am__quote@ 274 280 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po@am__quote@ 275 281 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_widget.Po@am__quote@ … … 324 330 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 325 331 @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` 332 333 libORXglgui_a-glgui_mainwidget.o: glgui_mainwidget.cc 334 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_mainwidget.o -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo" -c -o libORXglgui_a-glgui_mainwidget.o `test -f 'glgui_mainwidget.cc' || echo '$(srcdir)/'`glgui_mainwidget.cc; \ 335 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo"; exit 1; fi 336 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_mainwidget.cc' object='libORXglgui_a-glgui_mainwidget.o' libtool=no @AMDEPBACKSLASH@ 337 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_mainwidget.TPo' @AMDEPBACKSLASH@ 338 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 339 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_mainwidget.o `test -f 'glgui_mainwidget.cc' || echo '$(srcdir)/'`glgui_mainwidget.cc 340 341 libORXglgui_a-glgui_mainwidget.obj: glgui_mainwidget.cc 342 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_mainwidget.obj -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo" -c -o libORXglgui_a-glgui_mainwidget.obj `if test -f 'glgui_mainwidget.cc'; then $(CYGPATH_W) 'glgui_mainwidget.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_mainwidget.cc'; fi`; \ 343 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Tpo"; exit 1; fi 344 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_mainwidget.cc' object='libORXglgui_a-glgui_mainwidget.obj' libtool=no @AMDEPBACKSLASH@ 345 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_mainwidget.TPo' @AMDEPBACKSLASH@ 346 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 347 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_mainwidget.obj `if test -f 'glgui_mainwidget.cc'; then $(CYGPATH_W) 'glgui_mainwidget.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_mainwidget.cc'; fi` 326 348 327 349 libORXglgui_a-glgui_widget.o: glgui_widget.cc -
trunk/src/lib/gui/gl_gui/glgui_mainwidget.cc
r5382 r5384 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ 15 15 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include " proto_singleton.h"18 #include "glgui_mainwidget.h" 19 19 20 20 using namespace std; … … 24 24 * standard constructor 25 25 */ 26 ProtoSingleton::ProtoSingleton()26 GLGuiMainWidget::GLGuiMainWidget() 27 27 { 28 this->setClassID(CL_PROTO_ID, "ProtoSingleton"); 29 this->setName("ProtoSingleton"); 30 31 /* If you make a new class, what is most probably the case when you write this file 32 don't forget to: 33 1. Add the new file new_class.cc to the ./src/Makefile.am 34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS 35 !!!!!!!!!! IMPORTANT FOR SINGLETON !!!!!!!!!!!!!!!! 36 3. SingleTon MUST be CL_NEW_CLASS = 0x00000fxx 37 38 Advanced Topics: 39 - if you want to let your object be managed via the ObjectManager make sure to read 40 the object_manager.h header comments. You will use this most certanly only if you 41 make many objects of your class, like a weapon bullet. 42 */ 28 this->setClassID(CL_GLGUI_MAIN_WIDGET, "GLGuiMainWidget"); 29 this->setName("GLGuiMainWidget"); 43 30 } 44 31 … … 46 33 * the singleton reference to this class 47 34 */ 48 ProtoSingleton* ProtoSingleton::singletonRef = NULL;35 GLGuiMainWidget* GLGuiMainWidget::singletonRef = NULL; 49 36 50 37 /** 51 @briefstandard deconstructor38 * standard deconstructor 52 39 */ 53 ProtoSingleton::~ProtoSingleton()40 GLGuiMainWidget::~GLGuiMainWidget () 54 41 { 55 ProtoSingleton::singletonRef = NULL;42 GLGuiMainWidget::singletonRef = NULL; 56 43 } -
trunk/src/lib/gui/gl_gui/glgui_mainwidget.h
r5382 r5384 1 1 /*! 2 * @file proto_singleton.h3 * @brief Definition of the ...singleton Class4 */2 * @file glgui_mainwidget.h 3 * @brief Definition of the glGui singleton Class 4 */ 5 5 6 #ifndef _ PROTO_SINGLETON_H7 #define _ PROTO_SINGLETON_H6 #ifndef _GLGUI_MAINWIDGET_H 7 #define _GLGUI_MAINWIDGET_H 8 8 9 #include " base_object.h"9 #include "glgui_widget.h" 10 10 11 11 // FORWARD DEFINITION 12 12 13 13 //! A default singleton class. 14 class ProtoSingleton : public BaseObject {14 class GLGuiMainWidget : public GLGuiWidget { 15 15 16 16 public: 17 virtual ~ ProtoSingleton(void);17 virtual ~GLGuiMainWidget(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 GLGuiMainWidget* getInstance(void) { if (!GLGuiMainWidget::singletonRef) GLGuiMainWidget::singletonRef = new GLGuiMainWidget(); return GLGuiMainWidget::singletonRef; }; 20 21 virtual void update() {}; 22 virtual void draw() const {}; 20 23 21 24 private: 22 ProtoSingleton(void);23 static ProtoSingleton*singletonRef;25 GLGuiMainWidget(void); 26 static GLGuiMainWidget* singletonRef; 24 27 }; 25 28 26 #endif /* _ PROTO_SINGLETON_H */29 #endif /* _GLGUI_MAINWIDGET_H */ -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5366 r5384 23 23 * standard constructor 24 24 */ 25 GLGuiWidget::GLGuiWidget ( )25 GLGuiWidget::GLGuiWidget ( ) : Element2D(NULL) 26 26 { 27 27 this->init(); -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r5372 r5384 13 13 class Material; 14 14 15 //! This is part of the openglGUI class15 //! This is widget part of the openglGUI class 16 16 /** 17 17 * A widget is the main class of all the elements of th GUI. … … 28 28 29 29 30 virtual void draw() = 0;31 30 virtual void update() = 0; 32 31
Note: See TracChangeset
for help on using the changeset viewer.