Index: /branches/gui/src/lib/event/event_handler.cc
===================================================================
--- /branches/gui/src/lib/event/event_handler.cc	(revision 8114)
+++ /branches/gui/src/lib/event/event_handler.cc	(revision 8115)
@@ -337,5 +337,5 @@
   else
   {
-    SDL_WM_GrabInput(SDL_GRAB_ON);
+//    SDL_WM_GrabInput(SDL_GRAB_ON);
     SDL_ShowCursor(SDL_DISABLE);
   }
Index: /branches/gui/src/lib/gui/gl_gui/glgui_box.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_box.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_box.cc	(revision 8115)
@@ -109,5 +109,5 @@
     if (orientation() == OrxGui::Vertical)
     {
-      float height = this->borderSize();
+      float height = this->borderTop();
       float width = 0.0f;
       std::vector<GLGuiWidget*>::iterator widget;
@@ -116,11 +116,11 @@
       for (widget = this->children.begin(); widget != this->children.end(); ++widget)
       {
-        (*widget)->setRelCoor2D(this->borderSize(), height);
+        (*widget)->setRelCoor2D(this->borderLeft(), height);
         height += (*widget)->getSizeY2D();
         width = fmax(width, (*widget)->getSizeX2D());
       }
 
-      width += this->borderSize() * 2.0;
-      height += this->borderSize(); /* *2 done further up */
+      width += this->borderLeft() + this->borderRight();
+      height += this->borderBottom(); /* *2 done further up */
 
       printf("%f %f\n", width, height);
@@ -129,6 +129,6 @@
     else
     {
-      float height = this->borderSize();
-      float width = this->borderSize();
+      float height = this->borderTop();
+      float width = this->borderLeft();
       std::vector<GLGuiWidget*>::iterator widget;
 
@@ -136,11 +136,11 @@
       for (widget = this->children.begin(); widget != this->children.end(); ++widget)
       {
-        (*widget)->setRelCoor2D(width, this->borderSize());
+        (*widget)->setRelCoor2D(width, this->borderTop());
         height = fmax(height, (*widget)->getSizeY2D());
         width += (*widget)->getSizeX2D();
       }
 
-      width += this->borderSize() ;
-      height += this->borderSize(); /* *2 done further up */
+      width += this->borderRight() ;
+      height += this->borderBottom(); /* *2 done further up */
 
       printf("%f %f\n", width, height);
Index: /branches/gui/src/lib/gui/gl_gui/glgui_button.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_button.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_button.cc	(revision 8115)
@@ -30,5 +30,5 @@
     this->init();
 
-    this->label.setText( label );
+    this->_label.setText( label );
   }
 
@@ -54,8 +54,9 @@
     this->setClickable(true);
 
-    this->label.setFont("fonts/final_frontier.ttf", 20);
+    this->_label.setFont("fonts/final_frontier.ttf", 20);
     this->frontMaterial().setDiffuse(1, 0, 0);
 
-    this->label.setParent2D(this);
+    this->_label.setParent2D(this);
+    this->_label.setVisibility(false);
   }
 
@@ -63,5 +64,5 @@
   void GLGuiButton::setLabel(const std::string& label)
   {
-    this->label.setText(label);
+    this->_label.setText(label);
     this->resize();
   }
@@ -78,4 +79,15 @@
   }
 
+  void GLGuiButton::hiding()
+  {
+    this->_label.setVisibility(false);
+  }
+
+  void GLGuiButton::showing()
+  {
+    this->_label.setVisibility(true);
+  }
+
+
   /**
    * @brief draws the GLGuiButton
Index: /branches/gui/src/lib/gui/gl_gui/glgui_button.h
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_button.h	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_button.h	(revision 8115)
@@ -36,5 +36,5 @@
       virtual ~GLGuiButton();
 
-      const std::string& getLabel() const { return this->label.getText(); };
+      const std::string& label() const { return this->_label.getText(); };
       void setLabel(const std::string& label);
 
@@ -47,4 +47,11 @@
       virtual void clicking(const Vector2D& pos);
       virtual void releasing(const Vector2D& pos);
+      virtual void hiding();
+      virtual void showing();
+
+      /** @returns the Text. (the physical Text) */
+      Text& labelText() { return this->_label; }
+      /** @returns the constant Text. (the physical Text) */
+      const Text& labelText() const { return this->_label; }
 
     private:
@@ -52,10 +59,6 @@
 
 
-
-    protected:
-
-      Text                 label;
-
     private:
+      Text                 _label;
       ButtonState          state;
   };
Index: /branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc	(revision 8115)
@@ -65,9 +65,9 @@
   void GLGuiCheckButton::resize()
   {
-    this->label.setRelCoor2D(25, 5);
-    this->setSize2D(this->label.getSizeX2D() + 30, this->label.getSizeY2D() + 10);
+    this->labelText().setRelCoor2D(25, 5);
+    this->setSize2D(this->labelText().getSizeX2D() + 30, this->labelText().getSizeY2D() + 10);
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderSize(), borderSize());
-    this->frontRect().setSize(this->getSizeX2D() -2.0*borderSize(), this->getSizeY2D() -2.0*borderSize());
+    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()) , this->getSizeY2D() - (borderTop() + borderBottom()));
   }
 
Index: /branches/gui/src/lib/gui/gl_gui/glgui_image.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_image.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_image.cc	(revision 8115)
@@ -75,6 +75,6 @@
   void GLGuiImage::resize()
   {
-    this->frontRect().setTopLeft(this->borderSize(), this->borderSize());
-    this->frontRect().setSize(this->getSizeX2D() -2.0*this->borderSize(), this->getSizeY2D() - 2.0* this->borderSize() );
+    this->frontRect().setTopLeft(this->borderLeft(), this->borderRight());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );
     GLGuiWidget::resize();
   }
Index: /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc	(revision 8115)
@@ -164,6 +164,6 @@
     this->setSize2D( this->text.getSize2D() + Vector2D(8, 8));
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderSize(), borderSize());
-    this->frontRect().setSize(this->getSize2D() - Vector2D(borderSize(), borderSize()));
+    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSize2D() - Vector2D(borderRight(), borderBottom()));
   }
 
Index: /branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 8115)
@@ -45,6 +45,6 @@
   void GLGuiPushButton::resize()
   {
-    this->label.setRelCoor2D(5, 5);
-    this->setSize2D(this->label.getSizeX2D() + 10, this->label.getSizeY2D() + 10);
+    this->labelText().setRelCoor2D(5, 5);
+    this->setSize2D(this->labelText().getSizeX2D() + 10, this->labelText().getSizeY2D() + 10);
 
     GLGuiWidget::resize();
@@ -63,5 +63,5 @@
   void GLGuiPushButton::receivedFocus()
   {
-    printf("%s received focus\n", this->getLabel().c_str());
+    printf("%s received focus\n", this->label().c_str());
     GLGuiWidget::receivedFocus();
   }
@@ -69,5 +69,5 @@
   void GLGuiPushButton::removedFocus()
   {
-    printf("%s removed focus\n", this->getLabel().c_str());
+    printf("%s removed focus\n", this->label().c_str());
     GLGuiWidget::removedFocus();
 
@@ -76,5 +76,5 @@
   void GLGuiPushButton::clicking(const Vector2D& pos)
   {
-    printf("%s clicked\n", this->getLabel().c_str());
+    printf("%s clicked\n", this->label().c_str());
     GLGuiButton::clicking(pos);
   }
@@ -83,5 +83,5 @@
   void GLGuiPushButton::releasing(const Vector2D& pos)
   {
-    printf("%s released\n", this->getLabel().c_str());
+    printf("%s released\n", this->label().c_str());
     GLGuiButton::releasing(pos);
   }
Index: /branches/gui/src/lib/gui/gl_gui/glgui_slider.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_slider.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_slider.cc	(revision 8115)
@@ -201,6 +201,6 @@
   {
     return (this->_value - this->_minValue)/( this->_maxValue - this->_minValue) *
-           (this->getSizeX2D() - 2.0*(borderSize() + _sliderWidth)) +
-           (borderSize() +_sliderWidth);
+           (this->getSizeX2D() - (borderLeft() + borderRight() + 2.0*_sliderWidth)) +
+           (borderLeft() +_sliderWidth);
   }
 
@@ -211,5 +211,5 @@
   float GLGuiSlider::sliderValue(float position) const
   {
-    return (position - (borderSize()+_sliderWidth)) / (this->getSizeX2D() - 2.0*(borderSize() + _sliderWidth))
+    return (position - (borderLeft()+_sliderWidth)) / (this->getSizeX2D() - (borderLeft() + borderRight() + 2.0*_sliderWidth))
            *( this->_maxValue - this->_minValue) +
            this->_minValue ;
@@ -231,5 +231,5 @@
     this->drawRect(this->frontRect());
 
-    this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, borderSize(), _sliderWidth, this->getSizeY2D() - 2 * borderSize()));
+    this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, borderLeft(), _sliderWidth, this->getSizeY2D() - (borderLeft() + borderRight())));
 
     this->endDraw();
Index: /branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_widget.cc	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_widget.cc	(revision 8115)
@@ -68,5 +68,9 @@
     this->_backMat.setDiffuse(1.0, 1.0, 1.0);
     this->_frontMat.setDiffuse(1.0, 0.0, 0.0);
-    this->_borderSize = 1.0;
+
+    this->_borderLeft = 1.0;
+    this->_borderRight = 1.0;
+    this->_borderTop = 1.0;
+    this->_borderBottom = 1.0;
   }
 
@@ -114,7 +118,32 @@
   void GLGuiWidget::setBorderSize(float borderSize)
   {
-    this->_borderSize = borderSize;
-    this->resize();
-  }
+    this->_borderLeft = borderSize;
+    this->_borderRight = borderSize;
+    this->_borderTop = borderSize;
+    this->_borderBottom = borderSize;
+    this->resize();
+  }
+
+  void GLGuiWidget::setBorderLeft(float borderLeft)
+  {
+    this->_borderLeft = borderLeft;
+    this->resize();
+  }
+  void GLGuiWidget::setBorderRight(float borderRight)
+  {
+    this->_borderRight = borderRight;
+    this->resize();
+  }
+  void GLGuiWidget::setBorderTop(float borderTop)
+  {
+    this->_borderTop = borderTop;
+    this->resize();
+  }
+  void GLGuiWidget::setBorderBottom(float borderBottom)
+  {
+    this->_borderBottom = borderBottom;
+    this->resize();
+  }
+
 
 
@@ -201,4 +230,5 @@
   {
     this->setVisibility(true);
+    this->showing();
   }
 
@@ -207,4 +237,5 @@
   {
     this->setVisibility(false);
+    this->hiding();
   }
 
Index: /branches/gui/src/lib/gui/gl_gui/glgui_widget.h
===================================================================
--- /branches/gui/src/lib/gui/gl_gui/glgui_widget.h	(revision 8114)
+++ /branches/gui/src/lib/gui/gl_gui/glgui_widget.h	(revision 8115)
@@ -87,6 +87,16 @@
     const Rect2D& frontRect() const { return this->_frontRect; };
 
-    float borderSize() const { return this->_borderSize; };
+    /** @brief sets all borders to the same value. */
     void setBorderSize(float borderSize);
+    void setBorderLeft(float borderLeft);
+    void setBorderRight(float borderRight);
+    void setBorderTop(float borderTop);
+    void setBorderBottom(float borderBottom);
+
+    float borderLeft() const { return this->_borderLeft; };
+    float borderRight() const { return this->_borderRight; };
+    float borderTop() const { return this->_borderTop; };
+    float borderBottom() const { return this->_borderBottom; };
+
 
     void setWidgetSize(const Vector2D& size);
@@ -117,4 +127,6 @@
     virtual void resize();
 
+    virtual void hiding() {};
+    virtual void showing() {};
     // if something was clickt on the GUI-widget.
     virtual void clicking(const Vector2D& pos);
@@ -143,5 +155,8 @@
     Rect2D                         _frontRect;
 
-    float                          _borderSize;
+    float                          _borderLeft;
+    float                          _borderRight;
+    float                          _borderTop;
+    float                          _borderBottom;
 
     /// EVENTS
