Changeset 2018 in orxonox.OLD for orxonox/trunk/gui
- Timestamp:
- Jun 23, 2004, 12:04:06 AM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 7 added
- 5 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/Makefile.am
r1956 r2018 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 15 21 16 22 # build and install the .info pages -
orxonox/trunk/gui/Makefile.in
r1956 r2018 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 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/trunk/gui/orxonox_gui.h
r1864 r2018 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> 10 18 11 struct settings 19 class OrxonoxGui 12 20 { 13 int video_fullscreen; 14 int video_wireframe; 21 public: 22 OrxonoxGui (int argc, char *argv[]); 23 ~OrxonoxGui (); 24 25 }; 26 27 class Widget 28 { 29 public: 30 Widget* next; 31 GtkWidget* widget; 32 int is_option; 33 34 //virtual void create (); 35 // void addWidget (); 36 void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)); 37 void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *)); 38 void show (); 39 void listOptions (); 40 void setOptions (); 41 42 }; 43 44 45 46 class Container : public Widget 47 { 48 private: 49 int borderwidth; 50 int policy; 51 char* label; 15 52 16 int audio_enable_sound; 17 int audio_music_volume; 18 int audio_effects_volume; 53 public: 54 Widget* down; 55 void setBorderWidth (int borderwidth); 56 virtual void setTitle (char* title) = 0; 57 void fill (Widget *lowerWidget); 58 }; 59 60 class Window : public Container 61 { 62 public: 63 Window (char* windowName); 64 Window (void); 65 ~Window (); 19 66 20 int exec_save_settings; 21 int exec_show_menu; 67 void setTitle (char* title); 68 void showall (); 69 static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); 22 70 }; 23 extern verbose; 71 72 class Frame :public Container 73 { 74 public: 75 Frame (char* frameName); 76 Frame (void); 77 ~Frame (); 78 79 void setTitle (char* title); 80 }; 81 82 class Box : public Widget 83 { 84 public: 85 Box (void); 86 Box (char boxtype); 87 ~Box (void); 88 89 Widget* down; 90 void fill (Widget* lowerWidget); 91 92 }; 93 94 class Option : public Widget 95 { 96 public: 97 //virtual gint OptionChange (GtkWidget *widget, GdkEvent *event, gpointer data); 98 99 int value; 100 char* option_name; 101 char* flag_name; 102 char* flag_name_short; 103 int default_value; 104 105 void setFlagName (char* flagname, int defaultvalue); 106 void setFlagName (char* flagname, char* flagnameshort, int defaultvalue); 107 virtual void redraw () = 0; 108 }; 109 110 class Button : public Option 111 { 112 public: 113 Button (char* buttonname); 114 ~Button (void); 115 116 void redraw(); 117 }; 118 119 class CheckButton : public Option 120 { 121 public: 122 CheckButton (char* buttonname); 123 ~CheckButton (void); 124 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 125 void redraw (); 126 }; 127 128 class Slider : public Option 129 { 130 public: 131 Slider (char* slidername,int start, int end); 132 ~Slider (); 133 static gint OptionChange (GtkWidget* widget, Widget* slider); 134 void redraw(); 135 }; 136 137 class Menu : public Option 138 { 139 public: 140 Menu (char* menuname, ...); 141 ~Menu (); 142 143 static gint OptionChange (GtkWidget* widget, Widget* menu); 144 void redraw(); 145 }; 146 147 class Label : public Widget 148 { 149 public: 150 Label (); 151 Label (char* text); 152 ~Label (); 153 154 void setText (char * text); 155 char* getText (); 156 }; 157 158 //gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); 24 159 25 160 #endif /* _ORXONOX_GUI_H */ -
orxonox/trunk/gui/orxonox_gui_audio.h
r1864 r2018 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/trunk/gui/orxonox_gui_exec.h
r1864 r2018 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); 11 33 }; 12 34 #endif /* _ORXONOX_GUI_EXEC_H */ -
orxonox/trunk/gui/orxonox_gui_video.h
r1864 r2018 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.