Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2058 in orxonox.OLD for orxonox/branches/chris/gui


Ignore:
Timestamp:
Jul 2, 2004, 11:36:56 AM (20 years ago)
Author:
chris
Message:

orxonox/branches/chris: Trunk remerged into my branch started on SDL reconfiguration

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_CFLAGS=`pkg-config --cflags gtk+-2.0`
    2 AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
     1AM_CXXFLAGS=`pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     2#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    33
    44bin_PROGRAMS=gui
    5 gui_SOURCES=orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c
     5gui_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
    611
    712#  uncomment the following if bencoder requires the math library
     
    1318#  following and add `chk' to the EXTRA_DIST list
    1419#TESTS=chk
     20EXTRA_DIST = rc banner.xpm
    1521
    1622#  build and install the .info pages
  • orxonox/branches/chris/gui/Makefile.in

    r1982 r2058  
    6969LTLIBOBJS = @LTLIBOBJS@
    7070MAKEINFO = @MAKEINFO@
     71MSBITFIELDS = @MSBITFIELDS@
    7172OBJEXT = @OBJEXT@
    7273PACKAGE = @PACKAGE@
     
    110111sysconfdir = @sysconfdir@
    111112target_alias = @target_alias@
    112 AM_CFLAGS = `pkg-config --cflags gtk+-2.0`
    113 AM_LDFLAGS = `pkg-config --libs  gtk+-2.0`
    114 
     113AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     114
     115#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    115116bin_PROGRAMS = gui
    116 gui_SOURCES = orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c
     117gui_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
     133EXTRA_DIST = rc banner.xpm
    117134subdir = gui
    118135ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    123140PROGRAMS = $(bin_PROGRAMS)
    124141
    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)
     142am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
     143        orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
     144        orxonox_gui_flags.$(OBJEXT)
    128145gui_OBJECTS = $(am_gui_OBJECTS)
    129146gui_LDADD = $(LDADD)
     
    137154@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    138155@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    139 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_file.Po \
     156@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
    140157@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     158CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     159        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     160CXXLD = $(CXX)
     161CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     162        -o $@
    141163COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    142164        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     
    150172
    151173.SUFFIXES:
    152 .SUFFIXES: .c .o .obj
     174.SUFFIXES: .cc .o .obj
    153175$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
    154176        cd $(top_srcdir) && \
     
    182204gui$(EXEEXT): $(gui_OBJECTS) $(gui_DEPENDENCIES)
    183205        @rm -f gui$(EXEEXT)
    184         $(LINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS)
     206        $(CXXLINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS)
    185207
    186208mostlyclean-compile:
     
    193215@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@
    194216@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    195 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_file.Po@am__quote@
     217@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
    196218@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
    197219
    198 .c.o:
    199 @am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    200 @am__fastdepCC_TRUE@      -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
    201 @am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    202 @am__fastdepCC_TRUE@    else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    203 @am__fastdepCC_TRUE@    fi
    204 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    205 @AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    206 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    207 @am__fastdepCC_FALSE@   $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
    208 
    209 .c.obj:
    210 @am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    211 @am__fastdepCC_TRUE@      -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
    212 @am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    213 @am__fastdepCC_TRUE@    else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    214 @am__fastdepCC_TRUE@    fi
    215 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    216 @AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    217 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    218 @am__fastdepCC_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`
    219241uninstall-info-am:
    220242
     
    393415
    394416
    395 #  uncomment the following if bencoder requires the math library
    396 #gui_LDADD=-lm
    397 
    398 #EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
    399 
    400 #  if you write a self-test script named `chk', uncomment the
    401 #  following and add `chk' to the EXTRA_DIST list
    402 #TESTS=chk
    403 
    404417#  build and install the .info pages
    405418#info_TEXINFOS = orxonox.texinfo
  • orxonox/branches/chris/gui/orxonox_gui.h

    r1864 r2058  
    1 
    21#ifndef _ORXONOX_GUI_H
    32#define _ORXONOX_GUI_H
    43
    5 #include <stdio.h>
    64#include <stdlib.h>
    75#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>
    1019
    11 struct settings
     20class OrxonoxGui
    1221{
    13   int video_fullscreen;
    14   int video_wireframe;
     22 public:
     23  OrxonoxGui (int argc, char *argv[]);
     24  ~OrxonoxGui ();
     25
     26};
     27
     28class 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
     47class Container : public Widget
     48{
     49 private:
     50  int borderwidth;
     51  int policy;
     52  char* label;
    1553 
    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
     61class Window : public Container
     62{
     63 public:
     64  Window (char* windowName);
     65  Window (void);
     66  ~Window ();
    1967 
    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);
    2271};
    23 extern verbose;
     72
     73class Frame :public Container
     74{
     75 public:
     76  Frame (char* frameName);
     77  Frame (void);
     78  ~Frame ();
     79 
     80  void setTitle (char* title);
     81};
     82
     83class 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
     95class Image : public Widget
     96{
     97 public:
     98  Image (char* imgaename);
     99  ~Image ();
     100};
     101
     102class 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
     118class Button : public Option
     119{
     120 public:
     121  Button (char* buttonname);
     122  ~Button (void);
     123 
     124  void redraw();
     125};
     126
     127class 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
     136class 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
     145class 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
     155class 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);
    24167
    25168#endif /* _ORXONOX_GUI_H */
  • orxonox/branches/chris/gui/orxonox_gui_audio.h

    r1864 r2058  
    22#define _ORXONOX_GUI_AUDIO_H
    33
     4#include "orxonox_gui.h"
    45
    5 void audio_check_button_change(GtkWidget *widget, int* data);
    6 GtkWidget *orxonox_gui_audio_frame (struct settings *orxonox_settings);
    7 
     6class 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};
    820#endif /* _ORXONOX_GUI_AUDIO_H */
  • orxonox/branches/chris/gui/orxonox_gui_exec.h

    r1864 r2058  
    11#ifndef _ORXONOX_GUI_EXEC_H
    22#define _ORXONOX_GUI_EXEC_H
     3
    34#include "orxonox_gui.h"
     5#include <stdio.h>
     6using namespace std;
    47
    5 gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
     8class 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);
    632
    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);
    1135
    1236#endif /* _ORXONOX_GUI_EXEC_H */
  • orxonox/branches/chris/gui/orxonox_gui_video.h

    r1864 r2058  
    44#include "orxonox_gui.h"
    55
    6 void video_option_change(GtkWidget *widget, int * data);
    7 GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings);
    8 
     6class 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};
    919#endif /* _ORXONOX_GUI_VIDEO_H */
Note: See TracChangeset for help on using the changeset viewer.