Changeset 2058 in orxonox.OLD for orxonox/branches/chris/gui
- Timestamp:
- Jul 2, 2004, 11:36:56 AM (20 years ago)
- Location:
- orxonox/branches/chris/gui
- Files:
-
- 6 deleted
- 6 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/gui/Makefile.am
r1982 r2058 1 AM_C FLAGS=`pkg-config --cflags gtk+-2.0`2 AM_LDFLAGS=`pkg-config --libs gtk+-2.0`1 AM_CXXFLAGS=`pkg-config --cflags gtk+-2.0` $(MSBITFIELDS) 2 #AM_LDFLAGS=`pkg-config --libs gtk+-2.0` 3 3 4 4 bin_PROGRAMS=gui 5 gui_SOURCES=orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c 5 gui_SOURCES=orxonox_gui.cc orxonox_gui.h \ 6 orxonox_gui_video.cc orxonox_gui_video.h \ 7 orxonox_gui_audio.cc orxonox_gui_audio.h \ 8 orxonox_gui_exec.cc orxonox_gui_exec.h \ 9 orxonox_gui_flags.cc orxonox_gui_flags.h 10 #orxonox_gui_file.cc 6 11 7 12 # uncomment the following if bencoder requires the math library … … 13 18 # following and add `chk' to the EXTRA_DIST list 14 19 #TESTS=chk 20 EXTRA_DIST = rc banner.xpm 15 21 16 22 # build and install the .info pages -
orxonox/branches/chris/gui/Makefile.in
r1982 r2058 69 69 LTLIBOBJS = @LTLIBOBJS@ 70 70 MAKEINFO = @MAKEINFO@ 71 MSBITFIELDS = @MSBITFIELDS@ 71 72 OBJEXT = @OBJEXT@ 72 73 PACKAGE = @PACKAGE@ … … 110 111 sysconfdir = @sysconfdir@ 111 112 target_alias = @target_alias@ 112 AM_C FLAGS = `pkg-config --cflags gtk+-2.0`113 AM_LDFLAGS = `pkg-config --libs gtk+-2.0` 114 113 AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS) 114 115 #AM_LDFLAGS=`pkg-config --libs gtk+-2.0` 115 116 bin_PROGRAMS = gui 116 gui_SOURCES = orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c 117 gui_SOURCES = orxonox_gui.cc orxonox_gui.h \ 118 orxonox_gui_video.cc orxonox_gui_video.h \ 119 orxonox_gui_audio.cc orxonox_gui_audio.h \ 120 orxonox_gui_exec.cc orxonox_gui_exec.h \ 121 orxonox_gui_flags.cc orxonox_gui_flags.h 122 123 #orxonox_gui_file.cc 124 125 # uncomment the following if bencoder requires the math library 126 #gui_LDADD=-lm 127 128 #EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo 129 130 # if you write a self-test script named `chk', uncomment the 131 # following and add `chk' to the EXTRA_DIST list 132 #TESTS=chk 133 EXTRA_DIST = rc banner.xpm 117 134 subdir = gui 118 135 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 123 140 PROGRAMS = $(bin_PROGRAMS) 124 141 125 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_ audio.$(OBJEXT) \126 orxonox_gui_ exec.$(OBJEXT) orxonox_gui_file.$(OBJEXT) \127 orxonox_gui_ video.$(OBJEXT)142 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \ 143 orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \ 144 orxonox_gui_flags.$(OBJEXT) 128 145 gui_OBJECTS = $(am_gui_OBJECTS) 129 146 gui_LDADD = $(LDADD) … … 137 154 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_audio.Po \ 138 155 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_exec.Po \ 139 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_f ile.Po \156 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_flags.Po \ 140 157 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_video.Po 158 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 159 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 160 CXXLD = $(CXX) 161 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 162 -o $@ 141 163 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 142 164 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) … … 150 172 151 173 .SUFFIXES: 152 .SUFFIXES: .c .o .obj174 .SUFFIXES: .cc .o .obj 153 175 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) 154 176 cd $(top_srcdir) && \ … … 182 204 gui$(EXEEXT): $(gui_OBJECTS) $(gui_DEPENDENCIES) 183 205 @rm -f gui$(EXEEXT) 184 $( LINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS)206 $(CXXLINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS) 185 207 186 208 mostlyclean-compile: … … 193 215 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@ 194 216 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@ 195 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_f ile.Po@am__quote@217 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@ 196 218 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@ 197 219 198 .c .o:199 @am__fastdepC C_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \200 @am__fastdepC C_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \201 @am__fastdepC C_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \202 @am__fastdepC C_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \203 @am__fastdepC C_TRUE@ fi204 @AMDEP_TRUE@@am__fastdepC C_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@205 @AMDEP_TRUE@@am__fastdepC C_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@206 @AMDEP_TRUE@@am__fastdepC C_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@207 @am__fastdepC C_FALSE@ $(COMPILE) -c`test -f '$<' || echo '$(srcdir)/'`$<208 209 .c .obj:210 @am__fastdepC C_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \211 @am__fastdepC C_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \212 @am__fastdepC C_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \213 @am__fastdepC C_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \214 @am__fastdepC C_TRUE@ fi215 @AMDEP_TRUE@@am__fastdepC C_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@216 @AMDEP_TRUE@@am__fastdepC C_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@217 @AMDEP_TRUE@@am__fastdepC C_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@218 @am__fastdepC C_FALSE@ $(COMPILE) -c`if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`220 .cc.o: 221 @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ 222 @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ 223 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ 224 @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ 225 @am__fastdepCXX_TRUE@ fi 226 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 227 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 228 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 229 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< 230 231 .cc.obj: 232 @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ 233 @am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ 234 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ 235 @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ 236 @am__fastdepCXX_TRUE@ fi 237 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 238 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 239 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 240 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` 219 241 uninstall-info-am: 220 242 … … 393 415 394 416 395 # uncomment the following if bencoder requires the math library396 #gui_LDADD=-lm397 398 #EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo399 400 # if you write a self-test script named `chk', uncomment the401 # following and add `chk' to the EXTRA_DIST list402 #TESTS=chk403 404 417 # build and install the .info pages 405 418 #info_TEXINFOS = orxonox.texinfo -
orxonox/branches/chris/gui/orxonox_gui.h
r1864 r2058 1 2 1 #ifndef _ORXONOX_GUI_H 3 2 #define _ORXONOX_GUI_H 4 3 5 #include <stdio.h>6 4 #include <stdlib.h> 7 5 #include <string.h> 8 #include <gtk/gtk.h> 9 #include "orxonox_gui_exec.h" 6 #include <gtk/gtkmain.h> 7 #include <gtk/gtkwindow.h> 8 #include <gtk/gtkframe.h> 9 #include <gtk/gtkhbox.h> 10 #include <gtk/gtkvbox.h> 11 #include <gtk/gtkbutton.h> 12 #include <gtk/gtkcheckbutton.h> 13 #include <gtk/gtkhscale.h> 14 #include <gtk/gtkoptionmenu.h> 15 #include <gtk/gtkmenu.h> 16 #include <gtk/gtkmenuitem.h> 17 #include <gtk/gtklabel.h> 18 #include <gtk/gtkimage.h> 10 19 11 struct settings 20 class OrxonoxGui 12 21 { 13 int video_fullscreen; 14 int video_wireframe; 22 public: 23 OrxonoxGui (int argc, char *argv[]); 24 ~OrxonoxGui (); 25 26 }; 27 28 class Widget 29 { 30 public: 31 Widget* next; 32 GtkWidget* widget; 33 int is_option; 34 35 //virtual void create (); 36 // void addWidget (); 37 void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)); 38 void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *)); 39 void show (); 40 void listOptions (); 41 void setOptions (); 42 43 }; 44 45 46 47 class Container : public Widget 48 { 49 private: 50 int borderwidth; 51 int policy; 52 char* label; 15 53 16 int audio_enable_sound; 17 int audio_music_volume; 18 int audio_effects_volume; 54 public: 55 Widget* down; 56 void setBorderWidth (int borderwidth); 57 virtual void setTitle (char* title) = 0; 58 void fill (Widget *lowerWidget); 59 }; 60 61 class Window : public Container 62 { 63 public: 64 Window (char* windowName); 65 Window (void); 66 ~Window (); 19 67 20 int exec_save_settings; 21 int exec_show_menu; 68 void setTitle (char* title); 69 void showall (); 70 static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); 22 71 }; 23 extern verbose; 72 73 class Frame :public Container 74 { 75 public: 76 Frame (char* frameName); 77 Frame (void); 78 ~Frame (); 79 80 void setTitle (char* title); 81 }; 82 83 class Box : public Widget 84 { 85 public: 86 Box (void); 87 Box (char boxtype); 88 ~Box (void); 89 90 Widget* down; 91 void fill (Widget* lowerWidget); 92 93 }; 94 95 class Image : public Widget 96 { 97 public: 98 Image (char* imgaename); 99 ~Image (); 100 }; 101 102 class Option : public Widget 103 { 104 public: 105 //virtual gint OptionChange (GtkWidget *widget, GdkEvent *event, gpointer data); 106 107 int value; 108 char* option_name; 109 char* flag_name; 110 char* flag_name_short; 111 int default_value; 112 113 void setFlagName (char* flagname, int defaultvalue); 114 void setFlagName (char* flagname, char* flagnameshort, int defaultvalue); 115 virtual void redraw () = 0; 116 }; 117 118 class Button : public Option 119 { 120 public: 121 Button (char* buttonname); 122 ~Button (void); 123 124 void redraw(); 125 }; 126 127 class CheckButton : public Option 128 { 129 public: 130 CheckButton (char* buttonname); 131 ~CheckButton (void); 132 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 133 void redraw (); 134 }; 135 136 class Slider : public Option 137 { 138 public: 139 Slider (char* slidername,int start, int end); 140 ~Slider (); 141 static gint OptionChange (GtkWidget* widget, Widget* slider); 142 void redraw(); 143 }; 144 145 class Menu : public Option 146 { 147 public: 148 Menu (char* menuname, ...); 149 ~Menu (); 150 151 static gint OptionChange (GtkWidget* widget, Widget* menu); 152 void redraw(); 153 }; 154 155 class Label : public Widget 156 { 157 public: 158 Label (); 159 Label (char* text); 160 ~Label (); 161 162 void setText (char * text); 163 char* getText (); 164 }; 165 166 //gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); 24 167 25 168 #endif /* _ORXONOX_GUI_H */ -
orxonox/branches/chris/gui/orxonox_gui_audio.h
r1864 r2058 2 2 #define _ORXONOX_GUI_AUDIO_H 3 3 4 #include "orxonox_gui.h" 4 5 5 void audio_check_button_change(GtkWidget *widget, int* data); 6 GtkWidget *orxonox_gui_audio_frame (struct settings *orxonox_settings); 7 6 class OrxonoxGuiAudio 7 { 8 private: 9 Frame* audioFrame; 10 Box* audioBox; 11 CheckButton* enableSound; 12 Slider* musicVolume; 13 Slider* effectsVolume; 14 public: 15 OrxonoxGuiAudio (); 16 ~OrxonoxGuiAudio (); 17 18 Frame* getFrame (); 19 }; 8 20 #endif /* _ORXONOX_GUI_AUDIO_H */ -
orxonox/branches/chris/gui/orxonox_gui_exec.h
r1864 r2058 1 1 #ifndef _ORXONOX_GUI_EXEC_H 2 2 #define _ORXONOX_GUI_EXEC_H 3 3 4 #include "orxonox_gui.h" 5 #include <stdio.h> 6 using namespace std; 4 7 5 gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data); 8 class OrxonoxGuiExec 9 { 10 private: 11 Frame* execFrame; 12 Box* execBox; 13 Button* start; 14 CheckButton* saveSettings; 15 Menu* verboseMode; 16 CheckButton* alwaysShow; 17 Button* quit; 18 char* configFile; 19 FILE* CONFIG_FILE; 20 public: 21 OrxonoxGuiExec (Window* orxonoxGUI); 22 ~OrxonoxGuiExec (); 23 24 Frame* getFrame (); 25 26 void setFilename (char* filename); 27 int shouldsave (); 28 void writeToFile (Widget* widget); 29 void writeFileText (Widget* widget); 30 void readFromFile (Widget* widget); 31 void readFileText (Widget* widget, char* variableName, int variableValue); 6 32 7 void exec_check_button_change(GtkWidget *widget, int* data); 8 GtkWidget *orxonox_gui_exec_frame (struct settings *orxonox_settings); 9 char * orxonox_flags_text (struct settings *orxonox_settings, char *exec_flags_text); 10 void orxonox_flags_update (void); 33 }; 34 gint startOrxonox (GtkWidget *widget, Widget* data); 11 35 12 36 #endif /* _ORXONOX_GUI_EXEC_H */ -
orxonox/branches/chris/gui/orxonox_gui_video.h
r1864 r2058 4 4 #include "orxonox_gui.h" 5 5 6 void video_option_change(GtkWidget *widget, int * data); 7 GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings); 8 6 class OrxonoxGuiVideo 7 { 8 private: 9 Frame* videoFrame; 10 Box* videoBox; 11 CheckButton* fullscreen; 12 CheckButton* wireframe; 13 public: 14 OrxonoxGuiVideo (); 15 ~OrxonoxGuiVideo (); 16 17 Frame* getFrame (); 18 }; 9 19 #endif /* _ORXONOX_GUI_VIDEO_H */
Note: See TracChangeset
for help on using the changeset viewer.