Changeset 1978 in orxonox.OLD for orxonox/branches/gui/guicc/orxonox_gui.cc
- Timestamp:
- Jun 18, 2004, 11:07:53 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/orxonox_gui.cc
r1977 r1978 1 #include <iostream.h> 2 1 3 #include "orxonox_gui.h" 2 #include <iostream.h> 4 #include "orxonox_gui_video.h" 5 #include "orxonox_gui_audio.h" 3 6 4 7 … … 22 25 orxonoxGUI->connectSignal ("delete_event", orxonoxGUI->orxonox_gui_quit); 23 26 27 Box* windowBox = new Box ('v'); 28 { 29 Box* avBox = new Box ('h'); 30 { 31 OrxonoxGuiVideo * video = new OrxonoxGuiVideo (); 32 avBox->fill (video->getFrame()); 33 OrxonoxGuiAudio * audio = new OrxonoxGuiAudio (); 34 avBox->fill (audio->getFrame()); 35 36 } 37 windowBox->fill (avBox); 38 } 39 orxonoxGUI->fill (windowBox); 40 orxonoxGUI->listOptions(); 41 42 /* TEST ENVIRONMENT 24 43 Frame* Frametest = new Frame ("Test"); 25 44 orxonoxGUI->fill((Frame*) Frametest); … … 40 59 box->fill(menu2); 41 60 orxonoxGUI->listOptions(); 61 */ 42 62 orxonoxGUI->showall (); 43 63 44 64 45 65 gtk_main(); … … 277 297 */ 278 298 is_option = 0; 299 value = 0; 279 300 next = NULL; 280 301 option_name = buttonname; … … 289 310 */ 290 311 is_option = 1; 312 value = 0; 291 313 next = NULL; 292 314 option_name = buttonname; 293 315 widget = gtk_check_button_new_with_label (buttonname); 316 317 this->connectSignal ("clicked", this->OptionChange); 318 } 319 gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton) 320 { 321 /** 322 * Writes value, if changed on the checkbutton, to the object. 323 */ 324 static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget)); 325 cout << static_cast<CheckButton*>(checkbutton)->option_name << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl; 294 326 } 295 327 … … 301 333 */ 302 334 is_option = 1; 335 value = 0; 303 336 next = NULL; 304 337 option_name = slidername; 305 338 widget = gtk_hscale_new_with_range (start, end, 5); 306 339 value = start; 340 341 this->connectSignal ("value_changed", this->OptionChange); 307 342 } 308 343 … … 313 348 */ 314 349 static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget)); 315 cout << static_cast<Slider*>(slider)-> value << endl;350 cout << static_cast<Slider*>(slider)->option_name << " set to: "<< static_cast<Slider*>(slider)->value << endl; 316 351 } 317 352 … … 323 358 */ 324 359 is_option = 1; 360 value = 0; 325 361 next = NULL; 326 362 option_name = menuname;
Note: See TracChangeset
for help on using the changeset viewer.