Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5384 in orxonox.OLD for trunk/src/lib/gui


Ignore:
Timestamp:
Oct 15, 2005, 9:58:59 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: introducing the GLGuiMainWidget-class, that is the topmost of all widgets

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  
    1111libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
    1212                        glgui_handler.cc \
     13                        glgui_mainwidget.cc \
    1314                        glgui_widget.cc \
    1415                        glgui_button.cc \
     
    2223noinst_HEADERS= glmenu/glmenu_imagescreen.h \
    2324                glgui.h \
     25                glgui_handler.h \
     26                glgui_mainwidget.h \
    2427                glgui_widget.h \
    2528                glgui_button.h \
  • trunk/src/lib/gui/gl_gui/Makefile.in

    r5366 r5384  
    5656am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT) \
    5757        libORXglgui_a-glgui_handler.$(OBJEXT) \
     58        libORXglgui_a-glgui_mainwidget.$(OBJEXT) \
    5859        libORXglgui_a-glgui_widget.$(OBJEXT) \
    5960        libORXglgui_a-glgui_button.$(OBJEXT) \
     
    7273@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glgui_frame.Po \
    7374@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glgui_handler.Po \
     75@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glgui_mainwidget.Po \
    7476@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po \
    7577@AMDEP_TRUE@    ./$(DEPDIR)/libORXglgui_a-glgui_widget.Po \
     
    201203libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
    202204                        glgui_handler.cc \
     205                        glgui_mainwidget.cc \
    203206                        glgui_widget.cc \
    204207                        glgui_button.cc \
     
    211214noinst_HEADERS = glmenu/glmenu_imagescreen.h \
    212215                glgui.h \
     216                glgui_handler.h \
     217                glgui_mainwidget.h \
    213218                glgui_widget.h \
    214219                glgui_button.h \
     
    272277@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_frame.Po@am__quote@
    273278@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@
    274280@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po@am__quote@
    275281@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_widget.Po@am__quote@
     
    324330@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    325331@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
     333libORXglgui_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
     341libORXglgui_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`
    326348
    327349libORXglgui_a-glgui_widget.o: glgui_widget.cc
  • trunk/src/lib/gui/gl_gui/glgui_mainwidget.cc

    r5382 r5384  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
    1515
    16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
    1717
    18 #include "proto_singleton.h"
     18#include "glgui_mainwidget.h"
    1919
    2020using namespace std;
     
    2424 * standard constructor
    2525 */
    26 ProtoSingleton::ProtoSingleton ()
     26GLGuiMainWidget::GLGuiMainWidget()
    2727{
    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");
    4330}
    4431
     
    4633 *  the singleton reference to this class
    4734 */
    48 ProtoSingleton* ProtoSingleton::singletonRef = NULL;
     35GLGuiMainWidget* GLGuiMainWidget::singletonRef = NULL;
    4936
    5037/**
    51    @brief standard deconstructor
     38 * standard deconstructor
    5239 */
    53 ProtoSingleton::~ProtoSingleton ()
     40GLGuiMainWidget::~GLGuiMainWidget ()
    5441{
    55   ProtoSingleton::singletonRef = NULL;
     42  GLGuiMainWidget::singletonRef = NULL;
    5643}
  • trunk/src/lib/gui/gl_gui/glgui_mainwidget.h

    r5382 r5384  
    11/*!
    2  * @file proto_singleton.h
    3  * @brief Definition of the ... singleton Class
    4 */
     2 * @file glgui_mainwidget.h
     3 * @brief Definition of the glGui singleton Class
     4 */
    55
    6 #ifndef _PROTO_SINGLETON_H
    7 #define _PROTO_SINGLETON_H
     6#ifndef _GLGUI_MAINWIDGET_H
     7#define _GLGUI_MAINWIDGET_H
    88
    9 #include "base_object.h"
     9#include "glgui_widget.h"
    1010
    1111// FORWARD DEFINITION
    1212
    1313//! A default singleton class.
    14 class ProtoSingleton : public BaseObject {
     14class GLGuiMainWidget : public GLGuiWidget {
    1515
    1616 public:
    17   virtual ~ProtoSingleton(void);
     17  virtual ~GLGuiMainWidget(void);
    1818  /** @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 {};
    2023
    2124 private:
    22   ProtoSingleton(void);
    23   static ProtoSingleton* singletonRef;
     25  GLGuiMainWidget(void);
     26  static GLGuiMainWidget*      singletonRef;
    2427};
    2528
    26 #endif /* _PROTO_SINGLETON_H */
     29#endif /* _GLGUI_MAINWIDGET_H */
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5366 r5384  
    2323 * standard constructor
    2424*/
    25 GLGuiWidget::GLGuiWidget ()
     25GLGuiWidget::GLGuiWidget ( ) : Element2D(NULL)
    2626{
    2727  this->init();
  • trunk/src/lib/gui/gl_gui/glgui_widget.h

    r5372 r5384  
    1313class Material;
    1414
    15 //! This is part of the openglGUI class
     15//! This is widget part of the openglGUI class
    1616/**
    1717* A widget is the main class of all the elements of th GUI.
     
    2828
    2929
    30     virtual void draw() = 0;
    3130    virtual void update() = 0;
    3231
Note: See TracChangeset for help on using the changeset viewer.