Index: trunk/src/lib/gui/gl_gui/glgui.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui.h	(revision 7779)
@@ -6,7 +6,10 @@
 #ifndef _GLGUI_H
 #define _GLGUI_H
-
 #include "glgui_widget.h"
 
+namespace OrxGui
+{
+
+};
 
 
Index: trunk/src/lib/gui/gl_gui/glgui_bar.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_bar.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_bar.cc	(revision 7779)
@@ -18,62 +18,64 @@
 #include "glgui_bar.h"
 
-using namespace std;
 
-/**
- * @brief standard constructor
-*/
-GLGuiBar::GLGuiBar ()
+namespace OrxGui
 {
-  this->init();
 
-}
+  /**
+   * @brief standard constructor
+  */
+  GLGuiBar::GLGuiBar ()
+  {
+    this->init();
+
+  }
 
 
-/**
- * @brief standard deconstructor
- */
-GLGuiBar::~GLGuiBar()
-{
+  /**
+   * @brief standard deconstructor
+   */
+  GLGuiBar::~GLGuiBar()
+  {
+  }
 
+  /**
+   * @brief initializes the GUI-element
+   */
+  void GLGuiBar::init()
+  {
+    this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
+
+    this->frontMat.setDiffuse(1,1,1);
+
+    this->setSize2D(50, 10);
+
+    this->value = 0.5f;
+    this->minimum = 0.0f;
+    this->maximum = 1.0f;
+  }
+
+  /**
+   * @brief draws the GLGuiBar
+   */
+  void GLGuiBar::draw() const
+  {
+    this->startDraw();
+
+    GLGuiWidget::draw();
+
+    this->frontMat.select();
+    glBegin(GL_QUADS);
+
+    glTexCoord2f(0,0);
+    glVertex2f(3.0, 3.0);
+    glTexCoord2f(0, value/maximum);
+    glVertex2f(3.0, (this->getSizeY2D()-3.0)* (value/maximum));
+    glTexCoord2f(1, value/maximum);
+    glVertex2f(this->getSizeX2D()-3.0, (this->getSizeY2D()-3.0) * (value/maximum));
+    glTexCoord2f(1,0);
+    glVertex2f(this->getSizeX2D()-3.0, 3.0);
+
+    glEnd();
+    this->endDraw();
+  }
 }
-
-/**
- * @brief initializes the GUI-element
- */
-void GLGuiBar::init()
-{
-  this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
-
-  this->frontMat.setDiffuse(1,1,1);
-
-  this->setSize2D(50, 10);
-
-  this->value = 0.5f;
-  this->minimum = 0.0f;
-  this->maximum = 1.0f;
-}
-
-/**
- * @brief draws the GLGuiBar
- */
-void GLGuiBar::draw() const
-{
-  this->startDraw();
-
-  GLGuiWidget::draw();
-
-  this->frontMat.select();
-  glBegin(GL_QUADS);
-
-  glTexCoord2f(0,0);
-  glVertex2f(3.0, 3.0);
-  glTexCoord2f(0, value/maximum);
-  glVertex2f(3.0, (this->getSizeY2D()-3.0)* (value/maximum));
-  glTexCoord2f(1, value/maximum);
-  glVertex2f(this->getSizeX2D()-3.0, (this->getSizeY2D()-3.0) * (value/maximum));
-  glTexCoord2f(1,0);
-  glVertex2f(this->getSizeX2D()-3.0, 3.0);
-
-  glEnd();
-  this->endDraw();
-}
Index: trunk/src/lib/gui/gl_gui/glgui_bar.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_bar.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_bar.h	(revision 7779)
@@ -10,29 +10,33 @@
 #include "glgui_widget.h"
 
-// FORWARD DECLARATION
 
-//! This is Bar part of the openglGUI class
-/**
- * The Bar shows the part value.
- */
-class GLGuiBar : public GLGuiWidget {
+namespace OrxGui
+{
 
- public:
-  GLGuiBar();
-  virtual ~GLGuiBar();
 
-  void setValue(float value) { this->value = value; };
-  void setMinimum(float minimum) { this->minimum = minimum; };
-  void setMaximum(float maximum) { this->maximum = maximum; };
+  //! This is Bar part of the openglGUI class
+  /**
+   * The Bar shows the part value.
+   */
+  class GLGuiBar : public GLGuiWidget
+  {
 
-  float getValue() const { return this->value; };
-  float getMinimum() const { return this->minimum; };
-  float getMaximum() const { return this->maximum; };
+  public:
+    GLGuiBar();
+    virtual ~GLGuiBar();
 
-  virtual void update() { };
-  virtual void draw() const;
+    void setValue(float value) { this->value = value; };
+    void setMinimum(float minimum) { this->minimum = minimum; };
+    void setMaximum(float maximum) { this->maximum = maximum; };
 
- private:
-   void init();
+    float getValue() const { return this->value; };
+    float getMinimum() const { return this->minimum; };
+    float getMaximum() const { return this->maximum; };
+
+    virtual void update() { };
+    virtual void draw() const;
+
+  private:
+    void init();
 
   private:
@@ -41,5 +45,5 @@
     float minimum;
     float maximum;
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_box.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_box.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_box.cc	(revision 7779)
@@ -18,90 +18,89 @@
 #include "glgui_box.h"
 
-using namespace std;
+namespace OrxGui
+{
+  /**
+   * standard constructor
+  */
+  GLGuiBox::GLGuiBox (BoxType type)
+  {
+    this->init();
 
-/**
- * standard constructor
-*/
-GLGuiBox::GLGuiBox (GLGuiBoxType type)
-{
-  this->init();
-
-  this->setType (type);
-}
+    this->setType (type);
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiBox::~GLGuiBox()
-{
-}
+  /**
+   * standard deconstructor
+  */
+  GLGuiBox::~GLGuiBox()
+  {}
 
-/**
- * initializes the GUI-element
- */
-void GLGuiBox::init()
-{
-  this->setClassID(CL_GLGUI_BOX, "GLGuiBox");
-}
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiBox::init()
+  {
+    this->setClassID(CL_GLGUI_BOX, "GLGuiBox");
+  }
 
-void GLGuiBox::pack(GLGuiWidget* widget)
-{
-  if (widget == NULL)
-    return;
+  void GLGuiBox::pack(GLGuiWidget* widget)
+  {
+    if (widget == NULL)
+      return;
 
-  this->children.push_back(widget);
-}
+    this->children.push_back(widget);
+  }
 
 
-void GLGuiBox::unpack(GLGuiWidget* widget)
-{
-  if (widget == NULL)
+  void GLGuiBox::unpack(GLGuiWidget* widget)
   {
-    this->children.clear();
+    if (widget == NULL)
+    {
+      this->children.clear();
+    }
+    else
+    {
+      this->children.remove(widget);
+    }
   }
-  else
+
+  void GLGuiBox::showAll()
   {
-    this->children.remove(widget);
+    std::list<GLGuiWidget*>::iterator itC = this->children.begin();
+    while (itC != this->children.end())
+    {
+      if ((*itC)->isA(CL_GLGUI_CONTAINER))
+        static_cast<GLGuiContainer*>(*itC)->showAll();
+      else
+        (*itC)->show();
+      itC++;
+    }
+
+    this->show();
+
+  }
+
+  void GLGuiBox::hideAll()
+  {
+    std::list<GLGuiWidget*>::iterator itC = this->children.begin();
+    while (itC != this->children.end())
+    {
+      if ((*itC)->isA(CL_GLGUI_CONTAINER))
+        static_cast<GLGuiContainer*>(*itC)->hideAll();
+      else
+        (*itC)->hide();
+      itC++;
+    }
+
+    this->hide();
+  }
+
+
+  /**
+   * draws the GLGuiBox
+   */
+  void GLGuiBox::draw() const
+  {
   }
 }
-
-void GLGuiBox::showAll()
-{
-  std::list<GLGuiWidget*>::iterator itC = this->children.begin();
-  while (itC != this->children.end())
-  {
-    if ((*itC)->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(*itC)->showAll();
-    else
-      (*itC)->show();
-    itC++;
-  }
-
-  this->show();
-
-}
-
-void GLGuiBox::hideAll()
-{
-  std::list<GLGuiWidget*>::iterator itC = this->children.begin();
-  while (itC != this->children.end())
-  {
-    if ((*itC)->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(*itC)->hideAll();
-    else
-      (*itC)->hide();
-    itC++;
-  }
-
-  this->hide();
-}
-
-
-/**
- * draws the GLGuiBox
- */
-void GLGuiBox::draw() const
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_box.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_box.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_box.h	(revision 7779)
@@ -10,36 +10,38 @@
 #include "glgui_container.h"
 
-// FORWARD DECLARATION
 
-typedef enum
+namespace OrxGui
 {
-  GLGuiBox_H,
-  GLGuiBox_V,
-} GLGuiBoxType;
+  typedef enum
+  {
+    Box_H,
+    Box_V,
+  } BoxType;
 
-//! This is BOX part of the openglGUI class
-/**
- *
- */
-class GLGuiBox : public GLGuiContainer {
+  //! This is BOX part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiBox : public GLGuiContainer
+  {
 
- public:
-  GLGuiBox(GLGuiBoxType type = GLGuiBox_H);
-  virtual ~GLGuiBox();
+  public:
+    GLGuiBox(BoxType type = Box_H);
+    virtual ~GLGuiBox();
 
-  void init();
-  void setType(GLGuiBoxType type) { this->type = type; };
+    void init();
+    void setType(BoxType type) { this->type = type; };
 
-  virtual void pack(GLGuiWidget* widget);
-  virtual void unpack(GLGuiWidget* widget);
-  virtual void showAll();
-  virtual void hideAll();
+    virtual void pack(GLGuiWidget* widget);
+    virtual void unpack(GLGuiWidget* widget);
+    virtual void showAll();
+    virtual void hideAll();
 
-  virtual void draw() const;
+    virtual void draw() const;
 
- private:
-   GLGuiBoxType             type;
-   std::list<GLGuiWidget*>  children;
-};
-
+  private:
+    BoxType                  type;
+    std::list<GLGuiWidget*>  children;
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_button.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_button.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_button.cc	(revision 7779)
@@ -20,51 +20,53 @@
 #include "text.h"
 
-using namespace std;
 
-/**
- * standard constructor
-*/
-GLGuiButton::GLGuiButton ()
+namespace OrxGui
 {
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGuiButton::GLGuiButton ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiButton::~GLGuiButton()
-{
-  /* this does not have to be done, since the Label is a child,
-   * and will be deleted by Element2D's deletion Process
-   * delete this->label;
+  /**
+   * standard deconstructor
   */
-}
+  GLGuiButton::~GLGuiButton()
+  {
+    /* this does not have to be done, since the Label is a child,
+     * and will be deleted by Element2D's deletion Process
+     * delete this->label;
+    */
+  }
 
-/**
- * initializes the GUI-element
- */
-void GLGuiButton::init()
-{
-  this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiButton::init()
+  {
+    this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
 
-  this->label = new Text();
-  this->label->setParent2D(this);
-}
+    this->label = new Text();
+    this->label->setParent2D(this);
+  }
 
-void GLGuiButton::setLabel(const std::string& label)
-{
-  this->label->setText(label);
-  this->label->setRelCoor2D(5, 5);
-  this->setSize2D(this->label->getSizeX2D()+10, this->label->getSizeY2D()+10);
-}
+  void GLGuiButton::setLabel(const std::string& label)
+  {
+    this->label->setText(label);
+    this->label->setRelCoor2D(5, 5);
+    this->setSize2D(this->label->getSizeX2D()+10, this->label->getSizeY2D()+10);
+  }
 
 
-/**
- * draws the GLGuiButton
- */
-void GLGuiButton::draw() const
-{
-  GLGuiWidget::draw();
+  /**
+   * draws the GLGuiButton
+   */
+  void GLGuiButton::draw() const
+  {
+    GLGuiWidget::draw();
+  }
 }
Index: trunk/src/lib/gui/gl_gui/glgui_button.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_button.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_button.h	(revision 7779)
@@ -10,32 +10,34 @@
 #include "glgui_widget.h"
 
-typedef enum
-{
-  GLGui_Button_Active,
-  GLGui_Button_Inactive,
-  GLGui_Button_Pressed,
-  GLGui_Button_Released,
-  GLGui_Button_Activating,
-  GLGui_Button_Deactivating,
-
-} GLGui_ButtonState;
-
-// FORWARD DECLARATION
 class Text;
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiButton : public GLGuiWidget {
+namespace OrxGui
+{
+  typedef enum
+  {
+    Button_Active,
+    Button_Inactive,
+    Button_Pressed,
+    Button_Released,
+    Button_Activating,
+    Button_Deactivating,
 
- public:
-   GLGuiButton();
-   virtual ~GLGuiButton();
+  } ButtonState;
 
-   void init();
-   void setLabel(const std::string& label);
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiButton : public GLGuiWidget
+  {
 
-   virtual void draw() const;
+  public:
+    GLGuiButton();
+    virtual ~GLGuiButton();
+
+    void init();
+    void setLabel(const std::string& label);
+
+    virtual void draw() const;
 
   protected:
@@ -43,6 +45,6 @@
 
   private:
-    GLGui_ButtonState    state;
-};
-
+    ButtonState          state;
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc	(revision 7779)
@@ -20,38 +20,39 @@
 #include "text.h"
 
-using namespace std;
-
-/**
- * standard constructor
-*/
-GLGuiCheckButton::GLGuiCheckButton ()
+namespace OrxGui
 {
-  this->init();
-
-}
 
 
-/**
- * standard deconstructor
-*/
-GLGuiCheckButton::~GLGuiCheckButton()
-{
+  /**
+   * standard constructor
+  */
+  GLGuiCheckButton::GLGuiCheckButton ()
+  {
+    this->init();
 
+  }
+
+
+  /**
+   * standard deconstructor
+  */
+  GLGuiCheckButton::~GLGuiCheckButton()
+  {
+  }
+
+  /**
+   * initializes the GUI-element
+   */
+  GLGuiCheckButton::init()
+  {
+    this->setClassID(CL_GLGUI_CHECKBUTTON, "GLGuiCheckButton");
+
+  }
+
+  /**
+   * draws the GLGuiCheckButton
+   */
+  void GLGuiCheckButton::draw() const
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-GLGuiCheckButton::init()
-{
-  this->setClassID(CL_GLGUI_CHECKBUTTON, "GLGuiCheckButton");
-
-}
-
-/**
- * draws the GLGuiCheckButton
- */
-void GLGuiCheckButton::draw() const
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_checkbutton.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_checkbutton.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_checkbutton.h	(revision 7779)
@@ -10,28 +10,33 @@
 #include "glgui_button.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiCheckButton : public GLGuiButton {
+  // FORWARD DECLARATION
 
- public:
-  GLGuiCheckButton();
-  virtual ~GLGuiCheckButton();
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiCheckButton : public GLGuiButton
+  {
 
-  void init();
+  public:
+    GLGuiCheckButton();
+    virtual ~GLGuiCheckButton();
 
-  bool    isActive() { return this->bActive; };
-  void    setActivity(bool bActive);
+    void init();
 
-  virtual void draw() const;
-  virtual void update() {};
+    bool    isActive() { return this->bActive; };
+    void    setActivity(bool bActive);
 
- private:
-   bool             bActive;
+    virtual void draw() const;
+    virtual void update() {};
 
-};
+  private:
+    bool             bActive;
+
+  };
+}
 
 #endif /* _GLGUI_CHECKBUTTON_H */
Index: trunk/src/lib/gui/gl_gui/glgui_colorselector.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_colorselector.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_colorselector.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGui::GLGui ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGui::GLGui ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGui::~GLGui()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGui::~GLGui()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  GLGui::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGui");
+
+  }
+
+  /**
+   * draws the GLGui
+   */
+  void GLGui::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-GLGui::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGui");
-
-}
-
-/**
- * draws the GLGui
- */
-void GLGui::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_colorselector.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_colorselector.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_colorselector.h	(revision 7779)
@@ -10,23 +10,27 @@
 #include "base_object.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGui : public GLGui {
+  // FORWARD DECLARATION
 
- public:
-  GLGui();
-  virtual ~GLGui();
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGui : public GLGui
+  {
 
-  void init();
+  public:
+    GLGui();
+    virtual ~GLGui();
 
-  virtual void draw();
+    void init();
 
- private:
+    virtual void draw();
 
-};
+  private:
 
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_container.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_container.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_container.cc	(revision 7779)
@@ -18,37 +18,37 @@
 #include "glgui_container.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiContainer::GLGuiContainer ()
-{
-  this->init();
-}
+  /**
+   * standard constructor
+  */
+  GLGuiContainer::GLGuiContainer ()
+  {
+    this->init();
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiContainer::~GLGuiContainer()
-{
-}
+  /**
+   * standard deconstructor
+  */
+  GLGuiContainer::~GLGuiContainer()
+  {}
 
-/**
- * initializes the GUI-element
- */
-void GLGuiContainer::init()
-{
-  this->setClassID(CL_GLGUI_CONTAINER, "GLGuiContainer");
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiContainer::init()
+  {
+    this->setClassID(CL_GLGUI_CONTAINER, "GLGuiContainer");
 
-}
+  }
 
 
-/**
- * draws the GLGuiContainer
- */
-void GLGuiContainer::draw()
-{
-
+  /**
+   * draws the GLGuiContainer
+   */
+  void GLGuiContainer::draw()
+  {
+  }
 }
Index: trunk/src/lib/gui/gl_gui/glgui_container.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_container.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_container.h	(revision 7779)
@@ -10,34 +10,37 @@
 #include "glgui_widget.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiContainer : public GLGuiWidget {
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiContainer : public GLGuiWidget
+  {
 
- public:
-  GLGuiContainer();
-  virtual ~GLGuiContainer();
+  public:
+    GLGuiContainer();
+    virtual ~GLGuiContainer();
 
-  void init();
+    void init();
 
 
-  void setBorderWidth(float borderwidth);
+    void setBorderWidth(float borderwidth);
 
 
-  virtual void pack(GLGuiWidget* widget) = 0;
-  /** unpacks a Widget from this container. @param widget the GLGuiWidget to unpack, if NULL all subwidgets will be unpackt. */
-  virtual void unpack(GLGuiWidget* widget) = 0;
-  virtual void hideAll() = 0;
-  virtual void showAll() = 0;
+    virtual void pack(GLGuiWidget* widget) = 0;
+    /** unpacks a Widget from this container. @param widget the GLGuiWidget to unpack, if NULL all subwidgets will be unpackt. */
+    virtual void unpack(GLGuiWidget* widget) = 0;
+    virtual void hideAll() = 0;
+    virtual void showAll() = 0;
 
 
-  virtual void draw();
+    virtual void draw();
 
- private:
+  private:
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_cursor.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_cursor.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_cursor.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGui::GLGui ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGui::GLGui ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGui::~GLGui()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGui::~GLGui()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  GLGui::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGui");
+
+  }
+
+  /**
+   * draws the GLGui
+   */
+  void GLGui::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-GLGui::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGui");
-
-}
-
-/**
- * draws the GLGui
- */
-void GLGui::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_cursor.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_cursor.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_cursor.h	(revision 7779)
@@ -10,23 +10,26 @@
 #include "base_object.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGui : public GLGui {
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGui : public GLGui
+  {
 
- public:
-  GLGui();
-  virtual ~GLGui();
+  public:
+    GLGui();
+    virtual ~GLGui();
 
-  void init();
+    void init();
 
-  virtual void draw();
+    virtual void draw();
 
- private:
+  private:
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_element.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_element.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_element.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGui::GLGui ()
-{
-  this->init();
+  /**
+  * standard constructor
+  */
+  GLGui::GLGui ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGui::~GLGui()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGui::~GLGui()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  GLGui::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGui");
+
+  }
+
+  /**
+   * draws the GLGui
+   */
+  void GLGui::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-GLGui::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGui");
-
-}
-
-/**
- * draws the GLGui
- */
-void GLGui::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_element.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_element.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_element.h	(revision 7779)
@@ -10,23 +10,26 @@
 #include "base_object.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGui : public GLGui {
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGui : public GLGui
+  {
 
- public:
-  GLGui();
-  virtual ~GLGui();
+  public:
+    GLGui();
+    virtual ~GLGui();
 
-  void init();
+    void init();
 
-  virtual void draw();
+    virtual void draw();
 
- private:
+  private:
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_frame.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_frame.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_frame.cc	(revision 7779)
@@ -19,83 +19,82 @@
 
 #include "debug.h"
+namespace OrxGui
+{
 
-using namespace std;
+  /**
+   * standard constructor
+  */
+  GLGuiFrame::GLGuiFrame ()
+  {
+    this->init();
 
-/**
- * standard constructor
-*/
-GLGuiFrame::GLGuiFrame ()
-{
-  this->init();
-
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiFrame::~GLGuiFrame()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiFrame::~GLGuiFrame()
+  {
+  }
 
-}
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiFrame::init()
+  {
+    this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
+    this->child = NULL;
+  }
 
-/**
- * initializes the GUI-element
- */
-void GLGuiFrame::init()
-{
-  this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
-  this->child = NULL;
-}
+  void GLGuiFrame::pack(GLGuiWidget* widget)
+  {
+    if (widget == NULL)
+      return;
 
-void GLGuiFrame::pack(GLGuiWidget* widget)
-{
-  if (widget == NULL)
-    return;
+    if (this->child == NULL)
+      this->child = widget;
+    else
+    {
+      PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getName(), widget->getName());
+    }
+  }
 
-  if (this->child == NULL)
-    this->child = widget;
-  else
+  void GLGuiFrame::unpack(GLGuiWidget* widget)
   {
-    PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getName(), widget->getName());
+    if (widget == NULL || widget == this->child)
+      this->child = NULL;
+  }
+
+  void GLGuiFrame::showAll()
+  {
+    if (this->child != NULL)
+    {
+      if (this->child->isA(CL_GLGUI_CONTAINER))
+        static_cast<GLGuiContainer*>(this->child)->showAll();
+      else
+        this->child->show();
+    }
+    this->show();
+  }
+
+  void GLGuiFrame::hideAll()
+  {
+    if (this->child != NULL)
+    {
+      if (this->child->isA(CL_GLGUI_CONTAINER))
+        static_cast<GLGuiContainer*>(this->child)->hideAll();
+      else
+        this->child->hide();
+    }
+    this->hide();
+  }
+
+
+  /**
+   * draws the GLGuiFrame
+   */
+  void GLGuiFrame::draw()
+  {
   }
 }
-
-void GLGuiFrame::unpack(GLGuiWidget* widget)
-{
-  if (widget == NULL || widget == this->child)
-    this->child = NULL;
-}
-
-void GLGuiFrame::showAll()
-{
-  if (this->child != NULL)
-  {
-    if (this->child->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(this->child)->showAll();
-    else
-      this->child->show();
-  }
-  this->show();
-}
-
-void GLGuiFrame::hideAll()
-{
-  if (this->child != NULL)
-  {
-    if (this->child->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(this->child)->hideAll();
-    else
-      this->child->hide();
-  }
-  this->hide();
-}
-
-
-/**
- * draws the GLGuiFrame
- */
-void GLGuiFrame::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_frame.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_frame.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_frame.h	(revision 7779)
@@ -10,29 +10,32 @@
 #include "glgui_container.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
-//! This is Frame part of the openglGUI class
-/**
- *
- */
-class GLGuiFrame : public GLGuiContainer {
+  //! This is Frame part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiFrame : public GLGuiContainer
+  {
 
- public:
-  GLGuiFrame();
-  virtual ~GLGuiFrame();
+  public:
+    GLGuiFrame();
+    virtual ~GLGuiFrame();
 
-  void init();
+    void init();
 
-  virtual void pack(GLGuiWidget* widget);
-  virtual void unpack(GLGuiWidget* widget);
-  virtual void showAll();
-  virtual void hideAll();
+    virtual void pack(GLGuiWidget* widget);
+    virtual void unpack(GLGuiWidget* widget);
+    virtual void showAll();
+    virtual void hideAll();
 
-  virtual void draw();
+    virtual void draw();
 
- private:
-   GLGuiWidget*           child;
+  private:
+    GLGuiWidget*           child;
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_handler.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 7779)
@@ -21,57 +21,57 @@
 #include "glgui_mainwidget.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
- */
-GLGuiHandler::GLGuiHandler ()
-{
-   this->setClassID(CL_GLGUI_HANDLER, "GLGuiHandler");
-   this->setName("GLGuiHandler");
+  /**
+   * standard constructor
+   */
+  GLGuiHandler::GLGuiHandler ()
+  {
+    this->setClassID(CL_GLGUI_HANDLER, "GLGuiHandler");
+    this->setName("GLGuiHandler");
 
-}
+  }
 
-/**
- *  the singleton reference to this class
- */
-GLGuiHandler* GLGuiHandler::singletonRef = NULL;
+  /**
+   *  the singleton reference to this class
+   */
+  GLGuiHandler* GLGuiHandler::singletonRef = NULL;
 
-/**
-   @brief standard deconstructor
- */
-GLGuiHandler::~GLGuiHandler ()
-{
-  GLGuiHandler::singletonRef = NULL;
-}
+  /**
+     @brief standard deconstructor
+   */
+  GLGuiHandler::~GLGuiHandler ()
+  {
+    GLGuiHandler::singletonRef = NULL;
+  }
 
-void GLGuiHandler::activate()
-{
-  EventHandler::getInstance()->pushState(ES_MENU);
+  void GLGuiHandler::activate()
+  {
+    EventHandler::getInstance()->pushState(ES_MENU);
 
-}
+  }
 
-void GLGuiHandler::deactivate()
-{
-  EventHandler::getInstance()->popState();
+  void GLGuiHandler::deactivate()
+  {
+    EventHandler::getInstance()->popState();
 
-}
+  }
 
 
-void GLGuiHandler::process(const Event &event)
-{
+  void GLGuiHandler::process(const Event &event)
+  {
 
 
+  }
 
-}
-
-void GLGuiHandler::draw()
-{
-  GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
-}
+  void GLGuiHandler::draw()
+  {
+    GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
+  }
 
 
-void GLGuiHandler::tick(float dt)
-{
-
+  void GLGuiHandler::tick(float dt)
+  {
+  }
 }
Index: trunk/src/lib/gui/gl_gui/glgui_handler.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_handler.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_handler.h	(revision 7779)
@@ -9,29 +9,33 @@
 #include "event_listener.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
-//! A singleton class for the GLGui-Handler
-class GLGuiHandler : public EventListener {
+  //! A singleton class for the GLGui-Handler
+  class GLGuiHandler : public EventListener
+  {
 
- public:
-  virtual ~GLGuiHandler(void);
-  /** @returns a Pointer to the only object of this Class */
-  inline static GLGuiHandler* getInstance(void) { if (!GLGuiHandler::singletonRef) GLGuiHandler::singletonRef = new GLGuiHandler();  return GLGuiHandler::singletonRef; };
+  public:
+    virtual ~GLGuiHandler(void);
+    /** @returns a Pointer to the only object of this Class */
+    inline static GLGuiHandler* getInstance(void) { if (!GLGuiHandler::singletonRef) GLGuiHandler::singletonRef = new GLGuiHandler();  return GLGuiHandler::singletonRef; };
 
-  void activate();
-  void deactivate();
+    void activate();
+    void deactivate();
 
 
-  virtual void process(const Event &event);
-  void draw();
-  void tick(float dt);
+    virtual void process(const Event &event);
+    void draw();
+    void tick(float dt);
 
- private:
-  GLGuiHandler(void);
-  static GLGuiHandler* singletonRef;
+  private:
+    GLGuiHandler(void);
+    static GLGuiHandler* singletonRef;
 
 
-  bool                 isActive;
-};
+    bool                 isActive;
+  };
+}
 
 #endif /* _GLGUI_HANDLER_H */
Index: trunk/src/lib/gui/gl_gui/glgui_image.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_image.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_image.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_image.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiImage::GLGuiImage ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGuiImage::GLGuiImage ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiImage::~GLGuiImage()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiImage::~GLGuiImage()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiImage::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGuiImage");
+
+  }
+
+  /**
+   * draws the GLGuiImage
+   */
+  void GLGuiImage::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiImage::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGuiImage");
-
-}
-
-/**
- * draws the GLGuiImage
- */
-void GLGuiImage::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_image.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_image.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_image.h	(revision 7779)
@@ -12,25 +12,28 @@
 // FORWARD DECLARATION
 struct SDL_Surface;
+namespace OrxGui
+{
 
-//! This is Image part of the openglGUI class
-/**
- *
- */
-class GLGuiImage : public GLGuiWidget {
+  //! This is Image part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiImage : public GLGuiWidget
+  {
 
- public:
-  GLGuiImage();
-  virtual ~GLGuiImage();
+  public:
+    GLGuiImage();
+    virtual ~GLGuiImage();
 
-  void init();
-  void loadImageFromFile(const char* fileName);
-  void loadImageFromSDLSurface(SDL_Surface* surface);
-  void loadImageFromDisplayList(GLuint displayList);
+    void init();
+    void loadImageFromFile(const char* fileName);
+    void loadImageFromSDLSurface(SDL_Surface* surface);
+    void loadImageFromDisplayList(GLuint displayList);
 
-  virtual void draw();
+    virtual void draw();
 
- private:
+  private:
 
-};
-
+  };
+}
 #endif /* _GLGUI_IMAGE_H */
Index: trunk/src/lib/gui/gl_gui/glgui_mainwidget.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_mainwidget.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_mainwidget.cc	(revision 7779)
@@ -18,26 +18,28 @@
 #include "glgui_mainwidget.h"
 
-using namespace std;
+namespace OrxGui
+{
 
 
-/**
- * standard constructor
- */
-GLGuiMainWidget::GLGuiMainWidget()
-{
-  this->setClassID(CL_GLGUI_MAIN_WIDGET, "GLGuiMainWidget");
-  this->setName("GLGuiMainWidget");
+  /**
+   * standard constructor
+   */
+  GLGuiMainWidget::GLGuiMainWidget()
+  {
+    this->setClassID(CL_GLGUI_MAIN_WIDGET, "GLGuiMainWidget");
+    this->setName("GLGuiMainWidget");
+  }
+
+  /**
+   *  the singleton reference to this class
+   */
+  GLGuiMainWidget* GLGuiMainWidget::singletonRef = NULL;
+
+  /**
+   * standard deconstructor
+   */
+  GLGuiMainWidget::~GLGuiMainWidget ()
+  {
+    GLGuiMainWidget::singletonRef = NULL;
+  }
 }
-
-/**
- *  the singleton reference to this class
- */
-GLGuiMainWidget* GLGuiMainWidget::singletonRef = NULL;
-
-/**
- * standard deconstructor
- */
-GLGuiMainWidget::~GLGuiMainWidget ()
-{
-  GLGuiMainWidget::singletonRef = NULL;
-}
Index: trunk/src/lib/gui/gl_gui/glgui_mainwidget.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_mainwidget.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_mainwidget.h	(revision 7779)
@@ -9,21 +9,24 @@
 #include "glgui_widget.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
 
-//! A default singleton class.
-class GLGuiMainWidget : public GLGuiWidget {
+  //! A default singleton class.
+  class GLGuiMainWidget : public GLGuiWidget
+  {
 
- public:
-  virtual ~GLGuiMainWidget(void);
-  /** @returns a Pointer to the only object of this Class */
-  inline static GLGuiMainWidget* getInstance(void) { if (!GLGuiMainWidget::singletonRef) GLGuiMainWidget::singletonRef = new GLGuiMainWidget();  return GLGuiMainWidget::singletonRef; };
+  public:
+    virtual ~GLGuiMainWidget(void);
+    /** @returns a Pointer to the only object of this Class */
+    inline static GLGuiMainWidget* getInstance(void) { if (!GLGuiMainWidget::singletonRef) GLGuiMainWidget::singletonRef = new GLGuiMainWidget();  return GLGuiMainWidget::singletonRef; };
 
   virtual void update() {};
-  virtual void draw() const {};
+    virtual void draw() const {};
 
- private:
-  GLGuiMainWidget(void);
-  static GLGuiMainWidget*       singletonRef;
-};
+  private:
+    GLGuiMainWidget(void);
+    static GLGuiMainWidget*       singletonRef;
+  };
+}
 
 #endif /* _GLGUI_MAINWIDGET_H */
Index: trunk/src/lib/gui/gl_gui/glgui_menu.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_menu.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_menu.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiMenu::GLGuiMenu ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGuiMenu::GLGuiMenu ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiMenu::~GLGuiMenu()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiMenu::~GLGuiMenu()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiMenu::init()
+  {
+    this->setClassID(CL_GLGUI_MENU, "GLGuiMenu");
+
+  }
+
+  /**
+   * draws the GLGuiMenu
+   */
+  void GLGuiMenu::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiMenu::init()
-{
-  this->setClassID(CL_GLGUI_MENU, "GLGuiMenu");
-
-}
-
-/**
- * draws the GLGuiMenu
- */
-void GLGuiMenu::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_menu.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_menu.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_menu.h	(revision 7779)
@@ -9,31 +9,33 @@
 
 #include "base_object.h"
+namespace OrxGui
+{
 
-// FORWARD DECLARATION
-template<class T>  class tList;
-//! This is Menu part of the openglGUI class
-/**
- *
- */
-class GLGuiMenu : public GLGuiMenu {
+  // FORWARD DECLARATION
+  //! This is Menu part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiMenu : public GLGuiMenu
+  {
 
- public:
-  GLGuiMenu();
-  virtual ~GLGuiMenu();
+  public:
+    GLGuiMenu();
+    virtual ~GLGuiMenu();
 
-  void init();
+    void init();
 
-  void addItem(const std::string& itemName);
-  void removeItem(const std::string& itemName);
-  void removeItem(unsigned int itemNumber);
-  void selectItem(const std::string& itemName);
-  void selectItem(unsigned int itemNumber);
+    void addItem(const std::string& itemName);
+    void removeItem(const std::string& itemName);
+    void removeItem(unsigned int itemNumber);
+    void selectItem(const std::string& itemName);
+    void selectItem(unsigned int itemNumber);
 
-  virtual void draw();
+    virtual void draw();
 
- private:
-   tList<char>*           itemList;
+  private:
+    std::list<std::string>         itemList;
 
-};
-
+  };
+}
 #endif /* _GLGUI_MENU_H */
Index: trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 7779)
@@ -21,63 +21,63 @@
 #include "material.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiPushButton::GLGuiPushButton ()
-{
-  this->init();
-}
+  /**
+   * standard constructor
+  */
+  GLGuiPushButton::GLGuiPushButton ()
+  {
+    this->init();
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiPushButton::~GLGuiPushButton()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiPushButton::~GLGuiPushButton()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiPushButton::init()
+  {
+    this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
+    this->frontMat.setDiffuse(1,0,0);
+    //  this->label->setRelCoor2D(10, 10);
+  }
+
+  /**
+   * draws the GLGuiPushButton
+   */
+  void GLGuiPushButton::draw() const
+  {
+    this->startDraw();
+
+    //  GLGuiButton::draw();
+
+    this->frontMat.select();
+    glBegin(GL_QUADS);
+
+    glVertex2d(0,0);
+    glVertex2d(0, this->getSizeY2D());
+    glVertex2d(this->getSizeX2D(), this->getSizeY2D());
+    glVertex2d(this->getSizeX2D(),0);
+
+    glEnd();
+
+    this->endDraw();
+    //   this->label->draw();
+    //  printf("test");
+  }
+
+  /**
+   * updates the GLGuiPushButton
+   */
+  void GLGuiPushButton::update()
+  {
+
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiPushButton::init()
-{
-  this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
-  this->frontMat.setDiffuse(1,0,0);
-//  this->label->setRelCoor2D(10, 10);
-}
-
-/**
- * draws the GLGuiPushButton
- */
-void GLGuiPushButton::draw() const
-{
-  this->startDraw();
-
-//  GLGuiButton::draw();
-
-  this->frontMat.select();
-  glBegin(GL_QUADS);
-
-  glVertex2d(0,0);
-  glVertex2d(0, this->getSizeY2D());
-  glVertex2d(this->getSizeX2D(), this->getSizeY2D());
-  glVertex2d(this->getSizeX2D(),0);
-
-  glEnd();
-
-  this->endDraw();
-//   this->label->draw();
-//  printf("test");
-}
-
-/**
- * updates the GLGuiPushButton
- */
-void GLGuiPushButton::update()
-{
-
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_pushbutton.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_pushbutton.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_pushbutton.h	(revision 7779)
@@ -10,23 +10,27 @@
 #include "glgui_button.h"
 
-// FORWARD DECLARATION
+namespace OrxGui
+{
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiPushButton : public GLGuiButton {
+  // FORWARD DECLARATION
 
- public:
-  GLGuiPushButton();
-  virtual ~GLGuiPushButton();
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiPushButton : public GLGuiButton
+  {
 
-  void init();
+  public:
+    GLGuiPushButton();
+    virtual ~GLGuiPushButton();
 
-  virtual void draw() const;
-  virtual void update();
- private:
+    void init();
 
-};
+    virtual void draw() const;
+    virtual void update();
+  private:
 
+  };
+}
 #endif /* _GLGUI_PUSHBUTTON_H */
Index: trunk/src/lib/gui/gl_gui/glgui_slider.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_slider.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_slider.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_slider.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiSlider::GLGuiSlider ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGuiSlider::GLGuiSlider ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiSlider::~GLGuiSlider()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiSlider::~GLGuiSlider()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiSlider::init()
+  {
+    this->setClassID(CL_GLGUI_SLIDER, "GLGuiSlider");
+
+  }
+
+  /**
+   * draws the GLGuiSlider
+   */
+  void GLGuiSlider::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiSlider::init()
-{
-  this->setClassID(CL_GLGUI_SLIDER, "GLGuiSlider");
-
-}
-
-/**
- * draws the GLGuiSlider
- */
-void GLGuiSlider::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_slider.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_slider.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_slider.h	(revision 7779)
@@ -10,23 +10,27 @@
 #include "base_object.h"
 
-// FORWARD DECLARATION
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiSlider : public GLGuiSlider {
+namespace OrxGui
+{
+  // FORWARD DECLARATION
 
- public:
-  GLGuiSlider();
-  virtual ~GLGuiSlider();
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiSlider : public GLGuiSlider
+  {
 
-  void init();
+  public:
+    GLGuiSlider();
+    virtual ~GLGuiSlider();
 
-  virtual void draw();
+    void init();
 
- private:
+    virtual void draw();
 
-};
+  private:
 
+  };
+}
 #endif /* _GLGUI_SLIDER_H */
Index: trunk/src/lib/gui/gl_gui/glgui_text.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_text.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_text.cc	(revision 7779)
@@ -20,38 +20,37 @@
 #include "text.h"
 
-using namespace std;
+namespace OrxGui
+{
+  /**
+   * standard constructor
+  */
+  GLGuiText::GLGuiText ()
+  {
+    this->init();
 
-/**
- * standard constructor
-*/
-GLGuiText::GLGuiText ()
-{
-  this->init();
-
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiText::~GLGuiText()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiText::~GLGuiText()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiText::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGuiText");
+
+  }
+
+  /**
+   * draws the GLGuiText
+   */
+  void GLGuiText::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiText::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGuiText");
-
-}
-
-/**
- * draws the GLGuiText
- */
-void GLGuiText::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_text.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_text.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_text.h	(revision 7779)
@@ -12,22 +12,26 @@
 // FORWARD DECLARATION
 class Text;
+namespace OrxGui
+{
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiText : public GLWidget {
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiText : public GLWidget
+  {
 
- public:
-  GLGuiText();
-  virtual ~GLGuiText();
+  public:
+    GLGuiText();
+    virtual ~GLGuiText();
 
-  void init();
+    void init();
 
-  virtual void draw();
+    virtual void draw();
 
- private:
-  Text*             text;
-};
+  private:
+    Text*             text;
+  };
+}
 
 #endif /* _GLGUI_TEXT_H */
Index: trunk/src/lib/gui/gl_gui/glgui_textfield.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_textfield.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_textfield.cc	(revision 7779)
@@ -17,39 +17,38 @@
 
 #include "glgui_textfield_.h"
+namespace OrxGui
+{
 
-using namespace std;
+  /**
+   * standard constructor
+  */
+  GLGuiTextfield::GLGuiTextfield ()
+  {
+    this->init();
 
-/**
- * standard constructor
-*/
-GLGuiTextfield::GLGuiTextfield ()
-{
-  this->init();
-
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiTextfield::~GLGuiTextfield()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiTextfield::~GLGuiTextfield()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiTextfield::init()
+  {
+    this->setClassID(CL_GLGUI_, "GLGuiTextfield");
+
+  }
+
+  /**
+   * draws the GLGuiTextfield
+   */
+  void GLGuiTextfield::draw()
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiTextfield::init()
-{
-  this->setClassID(CL_GLGUI_, "GLGuiTextfield");
-
-}
-
-/**
- * draws the GLGuiTextfield
- */
-void GLGuiTextfield::draw()
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_textfield.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_textfield.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_textfield.h	(revision 7779)
@@ -12,24 +12,26 @@
 // FORWARD DECLARATION
 class Text;
-template<class T> class tList;
+namespace OrxGui
+{
 
-//! This is part of the openglGUI class
-/**
- *
- */
-class GLGuiTextfield : public GLGuiWidget {
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiTextfield : public GLGuiWidget
+  {
 
- public:
-  GLGuiTextfield();
-  virtual ~GLGuiTextfield();
+  public:
+    GLGuiTextfield();
+    virtual ~GLGuiTextfield();
 
-  void init();
+    void init();
 
-  virtual void draw();
+    virtual void draw();
 
- private:
-  tList<Text>*      textLines;
+  private:
+    std::list<Text*>      textLines;
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/glgui_widget.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_widget.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_widget.cc	(revision 7779)
@@ -22,104 +22,104 @@
 #include "debug.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiWidget::GLGuiWidget ( )
-{
-  this->init();
-}
+  /**
+   * standard constructor
+  */
+  GLGuiWidget::GLGuiWidget ( )
+  {
+    this->init();
+  }
 
 
-/**
- * standard deconstructor
- */
-GLGuiWidget::~GLGuiWidget()
-{
+  /**
+   * standard deconstructor
+   */
+  GLGuiWidget::~GLGuiWidget()
+  {
+  }
+
+
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiWidget::init()
+  {
+    this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget");
+
+    this->focusable = true;
+    this->clickable = true;
+    this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
+    //  this->setParent2D((Element2D*)NULL);
+
+    this->backMat.setDiffuse(1.0, 1.0, 1.0);
+
+    this->frontModel = 0;
+
+    this->widgetSignals.resize(GLGuiSignalCount, NULL);
+  }
+
+
+  bool GLGuiWidget::focusOverWidget(float x, float y)
+  {
+    if (this->getAbsCoor2D().x < x && this->getAbsCoor2D().x+ this->getSizeX2D() > x &&
+        this->getAbsCoor2D().y < y && this->getAbsCoor2D().y+ this->getSizeX2D() > y)
+      return true;
+    else
+      return false;
+  }
+
+  /**
+   * @brief connects a Signal to the Gui-Elements' Event.
+   * @param sinalType the Type of Signal to set. @see GLGuiSignalType
+   * @param signal the name of the Signal
+   */
+  void GLGuiWidget::connectSignal(GLGuiSignalType signalType, BaseObject*, const Executor* signal)
+  {
+    if (signalType >= GLGuiSignalCount)
+      return;
+
+    if (this->widgetSignals[signalType] != NULL)
+      PRINTF(2)("Already connected a Signal to '%s::%s' type %s... overwriting\n", this->getClassName(), this->getName(), "TEST");
+
+    //this->widgetSignals[signalType] = ;
+  }
+
+  /**
+   * @brief removes a Signal from a Gui-ELements' Event
+   * @param signalType the type of Signal to remove.
+   */
+  void GLGuiWidget::disconnectSignal(GLGuiSignalType signalType)
+  {
+    if (signalType > GLGuiSignalCount)
+      return;
+
+    this->widgetSignals[signalType] = NULL;
+  }
+
+
+  void GLGuiWidget::show()
+  {
+    this->setVisibility(true);
+  }
+
+  void GLGuiWidget::hide()
+  {
+    this->setVisibility(false);
+  }
+
+
+  void GLGuiWidget::draw() const
+  {
+    this->backMat.select();
+
+    glBegin(GL_QUADS);
+    glTexCoord2i(0,1); glVertex2d(0, 0);
+    glTexCoord2i(0,0); glVertex2d(0, this->getSizeY2D());
+    glTexCoord2i(1,0); glVertex2d(this->getSizeX2D(), this->getSizeY2D());
+    glTexCoord2i(1,1); glVertex2d(this->getSizeX2D(), 0);
+    glEnd();
+  }
 
 }
-
-
-/**
- * initializes the GUI-element
- */
-void GLGuiWidget::init()
-{
-  this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget");
-
-  this->focusable = true;
-  this->clickable = true;
-  this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
-//  this->setParent2D((Element2D*)NULL);
-
-  this->backMat.setDiffuse(1.0, 1.0, 1.0);
-
-  this->frontModel = 0;
-
-  for (unsigned int i = 0; i < GLGuiSignalCount; i++)
-    this->widgetSignals[i] = NULL;
-}
-
-
-bool GLGuiWidget::focusOverWidget(float x, float y)
-{
-  if (this->getAbsCoor2D().x < x && this->getAbsCoor2D().x+ this->getSizeX2D() > x &&
-      this->getAbsCoor2D().y < y && this->getAbsCoor2D().y+ this->getSizeX2D() > y)
-    return true;
-  else
-    return false;
-}
-
-/**
- * @brief connects a Signal to the Gui-Elements' Event.
- * @param sinalType the Type of Signal to set. @see GLGuiSignalType
- * @param signal the name of the Signal
- */
-void GLGuiWidget::connectSignal(GLGuiSignalType signalType, const Executor& signal)
-{
-  if (signalType >= GLGuiSignalCount)
-    return;
-
-  if (this->widgetSignals[signalType] != NULL)
-    PRINTF(2)("Already connected a Signal to %s (%s) type %s... overwriting\n");
-
-  this->widgetSignals[signalType] = signal.clone();
-}
-
-/**
- * @brief removes a Signal from a Gui-ELements' Event
- * @param signalType the type of Signal to remove.
- */
-void GLGuiWidget::disconnectSignal(GLGuiSignalType signalType)
-{
-  if (signalType > GLGuiSignalCount)
-    return;
-
-  this->widgetSignals[signalType] = NULL;
-}
-
-
-void GLGuiWidget::show()
-{
-  this->setVisibility(true);
-}
-
-void GLGuiWidget::hide()
-{
-  this->setVisibility(false);
-}
-
-
-void GLGuiWidget::draw() const
-{
-  this->backMat.select();
-
-  glBegin(GL_QUADS);
-   glTexCoord2i(0,1); glVertex2d(0, 0);
-   glTexCoord2i(0,0); glVertex2d(0, this->getSizeY2D());
-   glTexCoord2i(1,0); glVertex2d(this->getSizeX2D(), this->getSizeY2D());
-   glTexCoord2i(1,1); glVertex2d(this->getSizeX2D(), 0);
-  glEnd();
-}
-
Index: trunk/src/lib/gui/gl_gui/glgui_widget.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_widget.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_widget.h	(revision 7779)
@@ -9,48 +9,47 @@
 #include "element_2d.h"
 #include "event.h"
-
 #include "material.h"
 
 #include "glincl.h"
-#include "executor/executor.h"
+#include "signal_connector.h"
 
 // FORWARD DECLARATION
 class Material;
 
-typedef enum
+namespace OrxGui
 {
-  GLGuiSignal_click     = 0,
-  GLGuiSignal_release,
-  GLGuiSignal_rollOn,
-  GLGuiSignal_rollOff,
-  GLGuiSignal_open,
-  GLGuiSignal_close,
-  GLGuiSignal_destroy,
 
-  GLGuiSignalCount,
-} GLGuiSignalType;
+  typedef enum
+  {
+    GLGuiSignal_click     = 0,
+    GLGuiSignal_release,
+    GLGuiSignal_rollOn,
+    GLGuiSignal_rollOff,
+    GLGuiSignal_open,
+    GLGuiSignal_close,
+    GLGuiSignal_destroy,
 
-//! if the Element should be visible by default.
+    GLGuiSignalCount,
+  } GLGuiSignalType;
+
+  //! 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 {
+  //! 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
+  {
+  private:
+
   public:
     GLGuiWidget();
     virtual ~GLGuiWidget();
 
-    void init();
-    /** @returns a new char-array containing a string with the options. Delete with delete[]; */
-    virtual char* save() {};
-    /** loads options of the Widget. @param loadString a string containing the Options */
-    virtual void load(const std::string& loadString) {};
-
     void show();
     void hide();
 
-    void connectSignal(GLGuiSignalType signalType, const Executor& signal);
+    void connectSignal(GLGuiSignalType signalType, BaseObject* obj, const Executor* signal);
     void disconnectSignal(GLGuiSignalType signalType);
     bool focusOverWidget(float x, float y);
@@ -73,17 +72,20 @@
     inline void endDraw() const { glPopMatrix(); };
 
+  private:
+    void init();
+
   protected:
-    Material              backMat;
-    GLuint                backModel;
+    Material               backMat;
+    GLuint                 backModel;
 
-    Material              frontMat;
-    GLuint                frontModel;
+    Material               frontMat;
+    GLuint                 frontModel;
 
   private:
-    Executor*             widgetSignals[GLGuiSignalCount];
+    std::vector<SignalConnector*> widgetSignals;
 
-    bool                  focusable;        //!< If this widget can receive focus.
-    bool                  clickable;        //!< if this widget can be clicked upon.
-};
-
+    bool                   focusable;        //!< If this widget can receive focus.
+    bool                   clickable;        //!< if this widget can be clicked upon.
+  };
+}
 #endif /* _GLGUI_WIDGET_H */
Index: trunk/src/lib/gui/gl_gui/glgui_window.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_window.cc	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_window.cc	(revision 7779)
@@ -18,38 +18,38 @@
 #include "glgui_window.h"
 
-using namespace std;
+namespace OrxGui
+{
 
-/**
- * standard constructor
-*/
-GLGuiWindow::GLGuiWindow ()
-{
-  this->init();
+  /**
+   * standard constructor
+  */
+  GLGuiWindow::GLGuiWindow ()
+  {
+    this->init();
 
-}
+  }
 
 
-/**
- * standard deconstructor
-*/
-GLGuiWindow::~GLGuiWindow()
-{
+  /**
+   * standard deconstructor
+  */
+  GLGuiWindow::~GLGuiWindow()
+  {
+  }
 
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiWindow::init()
+  {
+    this->setClassID(CL_GLGUI_WINDOW, "GLGuiWindow");
+
+  }
+
+  /**
+   * draws the GLGuiWindow
+   */
+  void GLGuiWindow::draw() const
+  {
+  }
 }
-
-/**
- * initializes the GUI-element
- */
-void GLGuiWindow::init()
-{
-  this->setClassID(CL_GLGUI_WINDOW, "GLGuiWindow");
-
-}
-
-/**
- * draws the GLGuiWindow
- */
-void GLGuiWindow::draw() const
-{
-
-}
Index: trunk/src/lib/gui/gl_gui/glgui_window.h
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_window.h	(revision 7729)
+++ trunk/src/lib/gui/gl_gui/glgui_window.h	(revision 7779)
@@ -11,22 +11,25 @@
 
 // FORWARD DECLARATION
+namespace OrxGui
+{
 
-//! This is window part of the openglGUI class
-/**
- *
- */
-class GLGuiWindow : public GLGuiContainer {
+  //! This is window part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiWindow : public GLGuiContainer
+  {
 
- public:
-  GLGuiWindow();
-  virtual ~GLGuiWindow();
+  public:
+    GLGuiWindow();
+    virtual ~GLGuiWindow();
 
-  void init();
+    void init();
 
-  virtual void draw() const;
+    virtual void draw() const;
 
- private:
+  private:
 
-};
-
+  };
+}
 #endif /* _GLGUI__H */
Index: trunk/src/lib/gui/gl_gui/signal_connector.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/signal_connector.cc	(revision 7779)
+++ trunk/src/lib/gui/gl_gui/signal_connector.cc	(revision 7779)
@@ -0,0 +1,26 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "signal_connector.h"
+
+namespace OrxGui
+{
+
+  SignalConnector::SignalConnector(BaseObject* object, const Executor* executor)
+      : object(object), exec(exec)
+  {};
+}
Index: trunk/src/lib/gui/gl_gui/signal_connector.h
===================================================================
--- trunk/src/lib/gui/gl_gui/signal_connector.h	(revision 7779)
+++ trunk/src/lib/gui/gl_gui/signal_connector.h	(revision 7779)
@@ -0,0 +1,28 @@
+/*!
+ * @file signal_connector.h
+ * @brief Definition of ...
+*/
+
+#ifndef _SIGNAL_CONNECTOR_H
+#define _SIGNAL_CONNECTOR_H
+
+#include "executor/executor.h"
+
+namespace OrxGui
+{
+  //! A class for ...
+  class SignalConnector
+  {
+  public:
+    SignalConnector(BaseObject* object, const Executor* exec);
+    SignalConnector(const SignalConnector& signalConnector);
+    ~SignalConnector() { delete exec; }
+
+    SignalConnector& operator=(const SignalConnector& signalConnector);
+
+  private:
+    const Executor*     exec;
+    BaseObject*         object;
+  };
+}
+#endif /* _SIGNAL_CONNECTOR_H */
