Index: /orxonox/branches/gui/guicc/orxonox_gui.cc
===================================================================
--- /orxonox/branches/gui/guicc/orxonox_gui.cc	(revision 1975)
+++ /orxonox/branches/gui/guicc/orxonox_gui.cc	(revision 1976)
@@ -15,13 +15,17 @@
   Frametest->fill(box);
   
-  CheckButton* button = new CheckButton("test");
+  CheckButton* button = new CheckButton("button");
   button->connectSignal ("clicked", orxonoxGUI->orxonox_gui_quit);
   box->fill(button);
-  Slider* slider = new Slider("testslider", 0, 100);
+  Slider* slider = new Slider("slider", 0, 100);
   slider->connectSignal ("value_changed", slider->OptionChange);
   box->fill(slider);
-  Menu* menu = new Menu("test1", "no output", "verbose", "debug", "lastItem");
+  Menu* menu = new Menu("menu1", "no output", "verbose", "debug", "lastItem");
   menu->connectSignal ("changed", menu->OptionChange);
   box->fill(menu);
+  Menu* menu2 = new Menu("menu2", "no output", "verbose", "debug", "lastItem");
+  menu2->connectSignal ("changed", menu->OptionChange);
+  box->fill(menu2);
+  orxonoxGUI->listOptions();
   orxonoxGUI->showall ();
   
@@ -32,4 +36,21 @@
 
 /* WIDGET */
+
+void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
+{
+  /** 
+   * Connect any signal to any given Sub-widget
+   */
+  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL);
+}
+
+void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
+{
+  /**
+   * Connect a signal with additionally passing the whole Object
+   */
+  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
+}
+
 void Widget::show()
 {
@@ -40,18 +61,24 @@
 }
 
-void Widget::connectSignal (char* event, gint ( *signal)( GtkWidget*, GdkEvent*, void *))
-{
-  /** 
-   * Connect any signal to any given Sub-widget
-   */
-  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL);
-}
-
-void Widget::connectSignal (char* event, gint ( *signal)( GtkWidget*, Widget *))
-{
-  /**
-   * Connect a signal with additionally passing the whole Object
-   */
-  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
+void Widget::listOptions ()
+{
+  /** 
+   * This is For listing all the Options witch are located beneath this Widget.
+   */
+  if (this->is_option >= 1)
+    cout << static_cast<Option*>(this)->option_name <<" is : " << static_cast<Option*>(this)->value <<endl;
+
+  if (this->next != NULL)
+    this->next->listOptions ();
+
+  switch (this->is_option)
+    {
+    case -1:
+      static_cast<Container*>(this)->down->listOptions ();
+      break;
+    case -2:
+      static_cast<Box*>(this)->down->listOptions ();
+      break;
+    } 
 }
 
@@ -63,6 +90,11 @@
    * fill any given Container with a lowerwidet
    */
-  gtk_container_add (GTK_CONTAINER(this->widget), lowerWidget->widget);
-  this->down = lowerWidget;
+  if (this->down == NULL)
+    {
+      gtk_container_add (GTK_CONTAINER (this->widget), lowerWidget->widget);
+      this->down = lowerWidget;
+    }
+  else
+    cout << "!!error!! You try to put more than one Widget into a container.\nnot including this item."<<endl;
 }
 
@@ -76,6 +108,9 @@
    * Creating a Window
    */
+  is_option = -1;
   widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_policy(GTK_WINDOW(widget), TRUE, TRUE, TRUE);
+  gtk_window_set_policy (GTK_WINDOW(widget), TRUE, TRUE, TRUE);
+  next = NULL;
+  down = NULL;
 }
 
@@ -85,7 +120,8 @@
    * Creating a Window with passing a name
    */
+  is_option = -1;
   widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_policy(GTK_WINDOW(widget), TRUE, TRUE, TRUE);
-  this->setTitle(windowName);
+  gtk_window_set_policy (GTK_WINDOW (widget), TRUE, TRUE, TRUE);
+  this->setTitle (windowName);
 }
 
@@ -114,5 +150,5 @@
 
 
-gint Window::orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data)
+gint Window::orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
   /**
@@ -131,4 +167,7 @@
    * Creates a new Frame without a name
    */
+  is_option = -1;
+  next = NULL;
+  down = NULL;
   widget = gtk_frame_new ("");
 }
@@ -138,4 +177,7 @@
    * Creates a new Frame with name title
    */
+  is_option = -1;
+  next = NULL;
+  down = NULL;
   widget = gtk_frame_new (title);
 }
@@ -164,4 +206,7 @@
    * Creates a new horizontal Box
    */
+  is_option = -2;
+  next = NULL;
+  down = NULL;
   widget = gtk_hbox_new(FALSE, 0);
 }
@@ -171,11 +216,14 @@
    * Creates a new Box if boxtype is 'v' it will be vertically, if 'h' it will be horizontally
    */
+  is_option = -2;
+  next = NULL;
+  down = NULL;
   if (boxtype == 'v')
     {
-      widget = gtk_vbox_new(FALSE, 0);
+      widget = gtk_vbox_new (FALSE, 0);
     }
   else
     {
-      widget = gtk_hbox_new(FALSE, 0);
+      widget = gtk_hbox_new (FALSE, 0);
     }
 }
@@ -193,5 +241,17 @@
    * Fill a Box with its lowerwidgets
    */
-  gtk_box_pack_start (GTK_BOX(this->widget), lowerWidget->widget, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
+  if (this->down == NULL)
+    this->down = lowerWidget;
+  else
+    {
+      Widget* tmp;
+      tmp = this->down;
+      while (tmp->next != NULL)
+	{
+	  tmp = tmp->next;
+	}
+      tmp->next = lowerWidget;
+    }
 }
 
@@ -205,16 +265,20 @@
    * Creates a new Button with name buttonname
    */
-  widget = gtk_button_new_with_label(buttonname);
+  is_option = 0;
+  next = NULL;
   option_name = buttonname;
+  widget = gtk_button_new_with_label (buttonname);
 }
 
 /* CHECKBUTTON */
-CheckButton::CheckButton(char* buttonname)
+CheckButton::CheckButton (char* buttonname)
 {
   /**
    * Creates a new CheckButton with name buttonname
    */
-  widget = gtk_check_button_new_with_label(buttonname);
+  is_option = 1;
+  next = NULL;
   option_name = buttonname;
+  widget = gtk_check_button_new_with_label (buttonname);
 }
 
@@ -225,7 +289,9 @@
    * Creates a new Slider with name slidername a beginning value of start and an end value of end.
    */
+  is_option = 1;
+  next = NULL;
+  option_name = slidername;
   widget = gtk_hscale_new_with_range (start, end, 5);
   value = start;
-  option_name = slidername;
 }
 
@@ -235,22 +301,25 @@
    * Writes value, if changed on the slider, to the object.
    */
-  static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE((Slider*)slider->widget));
+  static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget));
   cout << static_cast<Slider*>(slider)->value << endl;
 }
 
 
-Menu::Menu(char* menuname, ...)
+Menu::Menu (char* menuname, ...)
 {
   /** 
    * Creates an Menu-Item-list out of multiple input. Consider, that the last input argument has to be "lastItem" for this to work.
    */
+  is_option = 1;
+  next = NULL;
+  option_name = menuname;
   char *tmp;
   va_list itemlist;
-  widget = gtk_option_menu_new();
+  widget = gtk_option_menu_new ();
   GtkWidget* menu = gtk_menu_new ();
   GtkWidget* item;
 
-  va_start(itemlist, menuname);
-  while (strcmp(tmp = va_arg(itemlist, char*), "lastItem"))
+  va_start (itemlist, menuname);
+  while (strcmp (tmp = va_arg (itemlist, char*), "lastItem"))
     {
       item = gtk_menu_item_new_with_label (tmp);
@@ -267,5 +336,5 @@
    * Writes value, if changed on the Menu, to the object.
    */
-  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU(menu->widget));
-  cout << static_cast<Menu*>(menu)->value << endl;
-}
+  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
+  cout << static_cast<Menu*>(menu)->option_name << " changed to : " << static_cast<Menu*>(menu)->value << endl;
+}
Index: /orxonox/branches/gui/guicc/orxonox_gui.h
===================================================================
--- /orxonox/branches/gui/guicc/orxonox_gui.h	(revision 1975)
+++ /orxonox/branches/gui/guicc/orxonox_gui.h	(revision 1976)
@@ -22,11 +22,14 @@
  public:
   Widget* next;
-  GtkWidget* widget;  
+  GtkWidget* widget;
+  int is_option;
 
   //virtual void create ();
   //  void addWidget ();
-  void connectSignal (char* event, gint (*signal)( GtkWidget*, GdkEvent*, void *));
-  void connectSignal (char* event, gint (*signal)(GtkWidget*,  Widget *));
+  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
+  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
   void show ();
+  void listOptions ();
+
 };
 
@@ -56,5 +59,5 @@
   void setTitle (char* title);
   void showall ();
-  static gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
+  static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
 };
 
@@ -76,4 +79,5 @@
   ~Box (void);
 
+  Widget* down;
   void fill (Widget *lowerWidget);
 
@@ -107,5 +111,5 @@
  public:
   Slider (char* slidername,int start, int end);
-  ~Slider();
+  ~Slider ();
   int i;
   static gint OptionChange (GtkWidget *widget, Widget* slider);
@@ -115,11 +119,11 @@
 {
  public:
-  Menu(char* menuname, ...);
-  ~Menu();
+  Menu (char* menuname, ...);
+  ~Menu ();
 
   static gint OptionChange (GtkWidget *widget, Widget* menu);
 };
     
-//gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
+//gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
 
 #endif /* _ORXONOX_GUI_H */
