Changeset 1996 in orxonox.OLD for orxonox/branches/gui/guicc/orxonox_gui.cc
- Timestamp:
- Jun 21, 2004, 2:11:32 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/orxonox_gui.cc
r1993 r1996 5 5 #include "orxonox_gui_audio.h" 6 6 #include "orxonox_gui_exec.h" 7 #include "orxonox_gui_flags.h" 7 8 8 9 … … 27 28 28 29 Box* windowBox = new Box ('v'); 29 {30 31 { 32 33 34 35 30 31 Box* avBox = new Box ('h'); 32 33 OrxonoxGuiVideo* video = new OrxonoxGuiVideo (); 34 avBox->fill (video->getFrame ()); 35 OrxonoxGuiAudio* audio = new OrxonoxGuiAudio (); 36 avBox->fill (audio->getFrame ()); 36 37 37 } 38 windowBox->fill (avBox); 38 windowBox->fill (avBox); 39 39 40 OrxonoxGuiExec* exec = new OrxonoxGuiExec (orxonoxGUI); 41 windowBox->fill (exec->getFrame ()); 42 } 40 OrxonoxGuiExec* exec = new OrxonoxGuiExec (orxonoxGUI); 41 windowBox->fill (exec->getFrame ()); 42 43 OrxonoxGuiFlags* flags = new OrxonoxGuiFlags (orxonoxGUI); 44 windowBox->fill (flags->getFrame ()); 45 43 46 orxonoxGUI->fill (windowBox); 44 47 orxonoxGUI->listOptions(); 48 flags->setTextFromFlags (orxonoxGUI); 45 49 46 50 /* TEST ENVIRONMENT … … 298 302 /* OPTION */ 299 303 300 void Option::setFlagName (char *flagname) 304 void Option::setFlagName (char* flagname, int defaultvalue) 305 { 306 flag_name = flagname; 307 default_value = defaultvalue; 308 cout << "Set Flagname of " << option_name << " to " << flagname << endl; 309 } 310 311 void Option::setFlagName (char* flagname, char* flagnameshort, int defaultvalue) 301 312 { 302 313 /** … … 304 315 */ 305 316 flag_name = flagname; 317 flag_name_short = flagnameshort; 318 default_value = defaultvalue; 306 319 cout << "Set Flagname of " << option_name << " to " << flagname << endl; 307 320 } … … 319 332 option_name = buttonname; 320 333 flag_name = ""; 334 flag_name_short = ""; 335 default_value = 0; 321 336 widget = gtk_button_new_with_label (buttonname); 322 337 } … … 333 348 option_name = buttonname; 334 349 flag_name = ""; 350 flag_name_short = ""; 351 default_value = 0; 335 352 widget = gtk_check_button_new_with_label (buttonname); 336 353 337 354 this->connectSignal ("clicked", this->OptionChange); 338 355 } 356 339 357 gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton) 340 358 { … … 352 370 * Creates a new Slider with name slidername a beginning value of start and an end value of end. 353 371 */ 354 is_option = 1;372 is_option = 2; 355 373 value = 0; 356 374 next = NULL; 357 375 option_name = slidername; 358 376 flag_name = ""; 377 flag_name_short = ""; 378 default_value = 0; 359 379 widget = gtk_hscale_new_with_range (start, end, 5); 360 380 value = start; … … 372 392 } 373 393 374 375 394 Menu::Menu (char* menuname, ...) 376 395 { … … 378 397 * Creates an Menu-Item-list out of multiple input. Consider, that the last input argument has to be "lastItem" for this to work. 379 398 */ 380 is_option = 1;399 is_option = 2; 381 400 value = 0; 382 401 next = NULL; 383 402 option_name = menuname; 384 403 flag_name = ""; 404 flag_name_short = ""; 405 default_value = 0; 385 406 char *tmp; 386 407 va_list itemlist; … … 409 430 cout << static_cast<Menu*>(menu)->option_name << " changed to : " << static_cast<Menu*>(menu)->value << endl; 410 431 } 432 433 Label:: Label () 434 { 435 is_option = 0; 436 next = NULL; 437 widget = gtk_label_new (""); 438 } 439 Label::~Label () 440 {} 441 442 void Label::setText (char * text) 443 { 444 gtk_label_set_text (GTK_LABEL (this->widget), text); 445 } 446 447 char* Label::getText () 448 { 449 return ((char*)gtk_label_get_text (GTK_LABEL (this->widget))); 450 }
Note: See TracChangeset
for help on using the changeset viewer.