Changeset 4071 in orxonox.OLD for orxonox/trunk/src/lib/gui/gui/gui_gtk.cc
- Timestamp:
- May 5, 2005, 11:30:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/gui_gtk.cc
r4069 r4071 222 222 return this; 223 223 224 if (this-> isOption < 0&& static_cast<Packer*>(this)->down)224 if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down) 225 225 { 226 226 Widget* tmp = static_cast<Packer*>(this)->down->findWidgetByName(name, depth+1); … … 243 243 { 244 244 function(this); 245 if (this-> isOption < 0)245 if (this->optionType < GUI_NOTHING) 246 246 { 247 247 static_cast<Packer*>(this)->down->walkThrough(function, depth+1); … … 261 261 { 262 262 function(this, data); 263 if (this-> isOption < 0)263 if (this->optionType < GUI_NOTHING) 264 264 { 265 265 static_cast<Packer*>(this)->down->walkThrough(function, data, depth+1); … … 275 275 void Widget::listOptionsAndGroups(Widget* widget) 276 276 { 277 if (widget-> isOption < 0&& static_cast<Packer*>(widget)->groupName)277 if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName) 278 278 PRINT(0)("[%s]\n", static_cast<Packer*>(widget)->groupName); 279 if (widget-> isOption >= 1)279 if (widget->optionType > GUI_NOTHING) 280 280 { 281 281 Widget::listOptions(widget); … … 289 289 void Widget::listOptions(Widget* widget) 290 290 { 291 if(widget-> isOption >= 1)291 if(widget->optionType > GUI_NOTHING) 292 292 PRINT(0)(" %s is %s\n", static_cast<Option*>(widget)->title, static_cast<Option*>(widget)->save()); 293 293 } … … 301 301 { 302 302 303 if (widget-> isOption >= 1)303 if (widget->optionType > GUI_NOTHING) 304 304 { 305 305 int* count =(int*)data; … … 320 320 Widget* Widget::findOptionByNumber(int* number, unsigned int depth) 321 321 { 322 if ( isOption > 0)322 if (optionType > GUI_NOTHING) 323 323 { 324 324 --*number; … … 328 328 } 329 329 } 330 if (this-> isOption < 0&& static_cast<Packer*>(this)->down)330 if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down) 331 331 { 332 332 Widget* tmp = static_cast<Packer*>(this)->down->findOptionByNumber(number, depth+1); … … 346 346 void Widget::listGroups(Widget* widget) 347 347 { 348 if (widget-> isOption < 0&& static_cast<Packer*>(widget)->groupName)348 if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName) 349 349 PRINT(0)("[%s]\n", static_cast<Packer*>(widget)->groupName); 350 350 } … … 358 358 { 359 359 int* count = (int*)data; 360 if (widget-> isOption < 0&& static_cast<Packer*>(widget)->groupName)360 if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName) 361 361 PRINT(0)("%d: [%s]\n", ++*count, static_cast<Packer*>(widget)->groupName); 362 362 } … … 369 369 Widget* Widget::findGroupByNumber(int* number, unsigned int depth) 370 370 { 371 if ( isOption < 0&& static_cast<Packer*>(this)->groupName)371 if (optionType < GUI_NOTHING && static_cast<Packer*>(this)->groupName) 372 372 { 373 373 --*number; … … 377 377 } 378 378 } 379 if (this-> isOption < 0&& static_cast<Packer*>(this)->down)379 if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down) 380 380 { 381 381 Widget* tmp = static_cast<Packer*>(this)->down->findGroupByNumber(number, depth+1); … … 395 395 void Widget::setOptions(Widget* widget) 396 396 { 397 if (widget-> isOption >= 1)397 if (widget->optionType > GUI_NOTHING) 398 398 static_cast<Option*>(widget)->redraw(); 399 399 } … … 406 406 void Widget::redrawOptions(Widget* widget) 407 407 { 408 if (widget-> isOption >= 1)408 if (widget->optionType > GUI_NOTHING) 409 409 static_cast<Option*>(widget)->redraw(); 410 410 } … … 415 415 void Widget::flagCheck(Widget* widget, void* flagName) 416 416 { 417 if (widget-> isOption>=1)417 if (widget->optionType > GUI_NOTHING) 418 418 { 419 419 Option* option =(Option*)widget; … … 567 567 Container::Container(void) 568 568 { 569 this-> isOption = -1;569 this->optionType = GUI_CONTAINER; 570 570 } 571 571 … … 814 814 EventBox::EventBox(const char* eventBoxName) 815 815 { 816 this->isOption = -1;817 818 816 #ifdef HAVE_GTK2 819 817 this->widget = gtk_event_box_new(); … … 842 840 Box::Box(char boxtype) 843 841 { 844 this-> isOption = -2;842 this->optionType = GUI_BOX; 845 843 846 844 #ifdef HAVE_GTK2 … … 1055 1053 Button::Button(char* buttonName) 1056 1054 { 1057 isOption = 0;1055 this->optionType = GUI_NOTHING; 1058 1056 1059 1057 #ifdef HAVE_GTK2 … … 1115 1113 CheckButton::CheckButton(const char* buttonName) 1116 1114 { 1117 this-> isOption = 1;1115 this->optionType = GUI_BOOL; 1118 1116 1119 1117 #ifdef HAVE_GTK2 … … 1205 1203 Slider::Slider(const char* slidername, int start, int end) 1206 1204 { 1207 this-> isOption = 2;1205 this->optionType = GUI_INT; 1208 1206 1209 1207 this->start = start; … … 1329 1327 void Menu::init(void) 1330 1328 { 1331 this-> isOption = 2;1329 this->optionType = GUI_INT; 1332 1330 this->firstItem = NULL; 1333 1331 … … 1443 1441 OptionLabel::OptionLabel(const char* label, const char* value) 1444 1442 { 1445 this-> isOption = 5;1443 this->optionType = GUI_CHAR_ARRAY; 1446 1444 cValue = NULL; 1447 1445 … … 1533 1531 Label:: Label(const char* text) 1534 1532 { 1535 this-> isOption = 0;1533 this->optionType = GUI_NOTHING; 1536 1534 1537 1535 #ifdef HAVE_GTK2 … … 1629 1627 ProgressBar::ProgressBar(const char* label) 1630 1628 { 1631 this-> isOption = 0;1629 this->optionType = GUI_NOTHING; 1632 1630 this->progress = 0.0; 1633 1631 this->totalSize = 0.0; … … 1728 1726 void Image::init(const char* name) 1729 1727 { 1730 isOption = 0;1728 optionType = GUI_NOTHING; 1731 1729 1732 1730 if (this->title) … … 1746 1744 FileDialog::FileDialog(const char* fileDialogName) 1747 1745 { 1748 this-> isOption = 0;1746 this->optionType = GUI_NOTHING; 1749 1747 this->isOpen = false; 1750 1748 this->changeOption = NULL;
Note: See TracChangeset
for help on using the changeset viewer.