Index: trunk/src/lib/gui/gl_gui/glgui_widget.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_widget.cc	(revision 7062)
+++ 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();
-}
-
