- Timestamp:
- Jun 18, 2004, 11:07:53 AM (20 years ago)
- Location:
- orxonox/branches/gui/guicc
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/Makefile.am
r1977 r1978 3 3 4 4 bin_PROGRAMS=gui 5 gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc 6 #orxonox_gui_ audio.cc orxonox_gui_exec.cc orxonox_gui_file.cc5 gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc orxonox_gui_audio.cc 6 #orxonox_gui_exec.cc orxonox_gui_file.cc 7 7 8 8 # uncomment the following if bencoder requires the math library -
orxonox/branches/gui/guicc/Makefile.in
r1977 r1978 114 114 115 115 bin_PROGRAMS = gui 116 gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc 116 gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc orxonox_gui_audio.cc 117 117 subdir = guicc 118 118 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 123 123 PROGRAMS = $(bin_PROGRAMS) 124 124 125 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) 125 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \ 126 orxonox_gui_audio.$(OBJEXT) 126 127 gui_OBJECTS = $(am_gui_OBJECTS) 127 128 gui_LDADD = $(LDADD) … … 133 134 am__depfiles_maybe = depfiles 134 135 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \ 136 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_audio.Po \ 135 137 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_video.Po 136 138 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ … … 187 189 188 190 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui.Po@am__quote@ 191 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@ 189 192 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@ 190 193 … … 385 388 uninstall-am uninstall-binPROGRAMS uninstall-info-am 386 389 387 #orxonox_gui_ audio.cc orxonox_gui_exec.cc orxonox_gui_file.cc390 #orxonox_gui_exec.cc orxonox_gui_file.cc 388 391 389 392 # uncomment the following if bencoder requires the math library -
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; -
orxonox/branches/gui/guicc/orxonox_gui.h
r1977 r1978 15 15 #include <gtk/gtkmenu.h> 16 16 #include <gtk/gtkmenuitem.h> 17 17 18 18 19 class OrxonoxGui … … 110 111 CheckButton (char* buttonname); 111 112 ~CheckButton (void); 113 static gint OptionChange (GtkWidget *widget, Widget* checkbutton); 112 114 }; 113 115
Note: See TracChangeset
for help on using the changeset viewer.