Changeset 2584 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui.cc
- Timestamp:
- Oct 16, 2004, 1:30:26 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.cc
r2583 r2584 90 90 exec->setFilename ("~/.orxonox.conf"); 91 91 exec->readFromFile (orxonoxGUI); 92 orxonoxGUI-> listOptions();92 orxonoxGUI->walkThrough(orxonoxGUI->listOptions); 93 93 94 94 orxonoxGUI->showall (); … … 131 131 } 132 132 133 void Widget::listOptions () 134 { 135 /** 136 * This is For listing all the Options witch are located beneath this Widget. 137 */ 138 if (this->is_option >= 1) 139 cout << static_cast<Option*>(this)->option_name <<" is : " << static_cast<Option*>(this)->value <<endl; 140 133 void Widget::walkThrough (void (*function)(Widget*)) 134 { 135 function(this); 141 136 switch (this->is_option) 142 137 { 143 138 case -1: 144 static_cast<Container*>(this)->down-> listOptions ();139 static_cast<Container*>(this)->down->walkThrough (function); 145 140 break; 146 141 case -2: 147 static_cast<Box*>(this)->down-> listOptions ();142 static_cast<Box*>(this)->down->walkThrough (function); 148 143 break; 149 144 } 150 145 151 146 if (this->next != NULL) 152 this->next->listOptions (); 153 } 154 155 void Widget::setOptions () 147 this->next->walkThrough(function); 148 } 149 150 151 void Widget::listOptions (Widget* widget) 156 152 { 157 153 /** 158 154 * This is For listing all the Options witch are located beneath this Widget. 159 155 */ 160 if (this->is_option >= 1) 161 static_cast<Option*>(this)->redraw();// <<" is : " << static_cast<Option*>(this)->value <<endl; 162 163 switch (this->is_option) 164 { 165 case -1: 166 static_cast<Container*>(this)->down->setOptions (); 167 break; 168 case -2: 169 static_cast<Box*>(this)->down->setOptions (); 170 break; 171 } 172 173 if (this->next != NULL) 174 this->next->setOptions (); 156 if (widget->is_option >= 1) 157 cout << static_cast<Option*>(widget)->option_name <<" is : " << static_cast<Option*>(widget)->value <<endl; 158 } 159 160 void Widget::setOptions (Widget* widget) 161 { 162 /** 163 * This is For listing all the Options witch are located beneath this Widget. 164 */ 165 if (widget->is_option >= 1) 166 static_cast<Option*>(widget)->redraw();// <<" is : " << static_cast<Option*>(this)->value <<endl; 175 167 } 176 168
Note: See TracChangeset
for help on using the changeset viewer.