- Timestamp:
- Jun 22, 2004, 12:05:57 PM (20 years ago)
- Location:
- orxonox/branches/gui/guicc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/orxonox_gui.cc
r2008 r2009 109 109 if (this->next != NULL) 110 110 this->next->listOptions (); 111 112 111 } 112 113 void Widget::setOptions () 114 { 115 /** 116 * This is For listing all the Options witch are located beneath this Widget. 117 */ 118 if (this->is_option >= 1) 119 static_cast<Option*>(this)->redraw();// <<" is : " << static_cast<Option*>(this)->value <<endl; 120 121 switch (this->is_option) 122 { 123 case -1: 124 static_cast<Container*>(this)->down->setOptions (); 125 break; 126 case -2: 127 static_cast<Box*>(this)->down->setOptions (); 128 break; 129 } 130 131 if (this->next != NULL) 132 this->next->setOptions (); 113 133 } 114 134 … … 332 352 } 333 353 354 void Button::redraw () 355 { 356 } 357 334 358 /* CHECKBUTTON */ 335 359 CheckButton::CheckButton (char* buttonname) … … 358 382 flags->setTextFromFlags(orxonoxGUI); 359 383 cout << static_cast<CheckButton*>(checkbutton)->option_name << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl; 384 } 385 386 void CheckButton::redraw () 387 { 388 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value); 360 389 } 361 390 … … 387 416 flags->setTextFromFlags(orxonoxGUI); 388 417 cout << static_cast<Slider*>(slider)->option_name << " set to: "<< static_cast<Slider*>(slider)->value << endl; 418 } 419 420 void Slider::redraw () 421 { 422 gtk_range_set_value (GTK_RANGE (widget), value); 389 423 } 390 424 … … 429 463 } 430 464 465 void Menu::redraw () 466 { 467 gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value); 468 } 469 431 470 Label:: Label () 432 471 { -
orxonox/branches/gui/guicc/orxonox_gui.h
r1998 r2009 38 38 void show (); 39 39 void listOptions (); 40 void setOptions (); 40 41 41 42 }; … … 104 105 void setFlagName (char* flagname, int defaultvalue); 105 106 void setFlagName (char* flagname, char* flagnameshort, int defaultvalue); 107 virtual void redraw () = 0; 106 108 }; 107 109 … … 111 113 Button (char* buttonname); 112 114 ~Button (void); 115 116 void redraw(); 113 117 }; 114 118 … … 119 123 ~CheckButton (void); 120 124 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 125 void redraw (); 121 126 }; 122 127 … … 127 132 ~Slider (); 128 133 static gint OptionChange (GtkWidget* widget, Widget* slider); 134 void redraw(); 129 135 }; 130 136 … … 136 142 137 143 static gint OptionChange (GtkWidget* widget, Widget* menu); 144 void redraw(); 138 145 }; 139 146 -
orxonox/branches/gui/guicc/orxonox_gui_exec.cc
r2008 r2009 114 114 sprintf (Variable, "%s", Buffer); 115 115 } 116 116 widget->setOptions(); 117 117 } 118 119 118 } 120 119
Note: See TracChangeset
for help on using the changeset viewer.