Index: /trunk/src/lib/gui/gl_gui/glgui_box.cc
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_box.cc	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_box.cc	(revision 5393)
@@ -18,4 +18,6 @@
 #include "glgui_box.h"
 
+#include "list.h"
+
 using namespace std;
 
@@ -36,5 +38,5 @@
 GLGuiBox::~GLGuiBox()
 {
-
+  delete this->children;
 }
 
@@ -45,6 +47,64 @@
 {
   this->setClassID(CL_GLGUI_BOX, "GLGuiBox");
+  this->children = new tList<GLGuiWidget>;
+}
+
+void GLGuiBox::pack(GLGuiWidget* widget)
+{
+  if (widget == NULL)
+    return;
+
+  this->children->add(widget);
+}
+
+
+void GLGuiBox::unpack(GLGuiWidget* widget)
+{
+  if (widget == NULL)
+  {
+    delete this->children;
+    this->children = new tList<GLGuiWidget>;
+  }
+  else
+  {
+    this->children->remove(widget);
+  }
+}
+
+void GLGuiBox::showAll()
+{
+  tIterator<GLGuiWidget>* itC = this->children->getIterator();
+  GLGuiWidget* enumC = itC->firstElement();
+  while (enumC != NULL)
+  {
+    if (enumC->isA(CL_GLGUI_CONTAINER))
+      static_cast<GLGuiContainer*>(enumC)->showAll();
+    else
+      enumC->show();
+    enumC = itC->nextElement();
+  }
+  delete itC;
+
+  this->show();
 
 }
+
+void GLGuiBox::hideAll()
+{
+  tIterator<GLGuiWidget>* itC = this->children->getIterator();
+  GLGuiWidget* enumC = itC->firstElement();
+  while (enumC != NULL)
+  {
+    if (enumC->isA(CL_GLGUI_CONTAINER))
+      static_cast<GLGuiContainer*>(enumC)->showAll();
+    else
+      enumC->hide();
+    enumC = itC->nextElement();
+  }
+  delete itC;
+
+  this->hide();
+}
+
 
 /**
Index: /trunk/src/lib/gui/gl_gui/glgui_box.h
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_box.h	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_box.h	(revision 5393)
@@ -11,4 +11,5 @@
 
 // FORWARD DECLARATION
+template<class T> class tList;
 
 typedef enum
@@ -31,8 +32,14 @@
   void setType(GLGuiBoxType type) { this->type = type; };
 
+  virtual void pack(GLGuiWidget* widget);
+  virtual void unpack(GLGuiWidget* widget);
+  virtual void showAll();
+  virtual void hideAll();
+
   virtual void draw();
 
  private:
-   GLGuiBoxType         type;
+   GLGuiBoxType             type;
+   tList<GLGuiWidget>*      children;
 
 };
Index: /trunk/src/lib/gui/gl_gui/glgui_container.cc
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_container.cc	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_container.cc	(revision 5393)
@@ -18,7 +18,4 @@
 #include "glgui_container.h"
 
-#include "list.h"
-
-
 using namespace std;
 
@@ -29,5 +26,4 @@
 {
   this->init();
-  this->children = new tList<GLGuiWidget>;
 }
 
@@ -38,5 +34,4 @@
 GLGuiContainer::~GLGuiContainer()
 {
-  delete this->children;
 }
 
@@ -50,39 +45,4 @@
 }
 
-void GLGuiContainer::showAll()
-{
-  tIterator<GLGuiWidget>* itC = this->children->getIterator();
-  GLGuiWidget* enumC = itC->firstElement();
-  while (enumC != NULL)
-  {
-    if (enumC->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(enumC)->showAll();
-    else
-      enumC->show();
-    enumC = itC->nextElement();
-  }
-  delete itC;
-
-  this->show();
-
-}
-
-void GLGuiContainer::hideAll()
-{
-  tIterator<GLGuiWidget>* itC = this->children->getIterator();
-  GLGuiWidget* enumC = itC->firstElement();
-  while (enumC != NULL)
-  {
-    if (enumC->isA(CL_GLGUI_CONTAINER))
-      static_cast<GLGuiContainer*>(enumC)->showAll();
-    else
-      enumC->hide();
-    enumC = itC->nextElement();
-  }
-  delete itC;
-
-  this->hide();
-}
-
 
 /**
Index: /trunk/src/lib/gui/gl_gui/glgui_container.h
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_container.h	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_container.h	(revision 5393)
@@ -11,5 +11,4 @@
 
 // FORWARD DECLARATION
-template<class T> class tList;
 
 //! This is part of the openglGUI class
@@ -25,10 +24,13 @@
   void init();
 
-  void add(GLGuiWidget* widget);
 
   void setBorderWidth(float borderwidth);
 
-  void hideAll();
-  void showAll();
+
+  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;
 
 
@@ -36,5 +38,4 @@
 
  private:
-  tList<GLGuiWidget>*           children;
 
 };
Index: /trunk/src/lib/gui/gl_gui/glgui_frame.cc
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_frame.cc	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_frame.cc	(revision 5393)
@@ -17,4 +17,6 @@
 
 #include "glgui_frame.h"
+
+#include "debug.h"
 
 using namespace std;
@@ -44,6 +46,50 @@
 {
   this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
+  this->child = NULL;
+}
 
+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());
+  }
 }
+
+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();
+}
+
 
 /**
Index: /trunk/src/lib/gui/gl_gui/glgui_frame.h
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_frame.h	(revision 5392)
+++ /trunk/src/lib/gui/gl_gui/glgui_frame.h	(revision 5393)
@@ -24,7 +24,13 @@
   void init();
 
+  virtual void pack(GLGuiWidget* widget);
+  virtual void unpack(GLGuiWidget* widget);
+  virtual void showAll();
+  virtual void hideAll();
+
   virtual void draw();
 
  private:
+   GLGuiWidget*           child;
 
 };
