[2588] | 1 | /*! |
---|
| 2 | \file orxonox_gui_exec.h |
---|
| 3 | \brief File that holds the class that creates the execute-Options. |
---|
| 4 | */ |
---|
| 5 | |
---|
[1812] | 6 | #ifndef _ORXONOX_GUI_EXEC_H |
---|
| 7 | #define _ORXONOX_GUI_EXEC_H |
---|
[2018] | 8 | |
---|
[1819] | 9 | #include "orxonox_gui.h" |
---|
[2018] | 10 | #include <stdio.h> |
---|
| 11 | using namespace std; |
---|
[1812] | 12 | |
---|
[2588] | 13 | //! Class that creates the execute-Options. |
---|
[2018] | 14 | class OrxonoxGuiExec |
---|
| 15 | { |
---|
| 16 | private: |
---|
[3187] | 17 | Frame* execFrame; //!< The Frame that holds the ExecutionOptions. |
---|
| 18 | Box* execBox; //!< The Box that holds the ExecutionOptions. |
---|
| 19 | Button* start; //!< The start Button of orxonox. |
---|
| 20 | CheckButton* saveSettings; //!< A CheckBox for if the Options should be saved. |
---|
| 21 | Menu* verboseMode; //!< A Menu for setting the verbose-Mode. \todo setting up a verbose-class. |
---|
| 22 | CheckButton* alwaysShow; //!< A CheckButton, for if orxonox should start with or without gui. |
---|
| 23 | Button* quit; //!< A Button to quit the Gui without starting orxonox. |
---|
| 24 | char* configFile; //!< The name of the .orxonox.conf(ig)-file. |
---|
| 25 | FILE* CONFIG_FILE; //!< Filehandler for reading and writing. |
---|
[3423] | 26 | |
---|
| 27 | //! A struct that holds informations about variables. |
---|
| 28 | struct VarInfo |
---|
| 29 | { |
---|
| 30 | char* variableName; //!< The Name of this variable; |
---|
| 31 | char* variableValue; //!< The Value this variable gets. |
---|
| 32 | }; |
---|
[3187] | 33 | |
---|
[2018] | 34 | public: |
---|
[3423] | 35 | OrxonoxGuiExec(void); |
---|
| 36 | ~OrxonoxGuiExec(void); |
---|
[2018] | 37 | |
---|
[3423] | 38 | Widget* getWidget(void); |
---|
[2018] | 39 | |
---|
[3423] | 40 | void setFilename(char* filename); |
---|
| 41 | char* getConfigFile(void); |
---|
| 42 | int shouldsave(void); |
---|
| 43 | void writeToFile(Widget* widget); |
---|
| 44 | void writeFileText(Widget* widget, int depth); |
---|
| 45 | void readFromFile(Widget* widget); |
---|
| 46 | static void readFileText(Widget* widget, void* varInfo); |
---|
[2634] | 47 | Widget* locateGroup(Widget* widget, char* groupName, int depth); |
---|
[1829] | 48 | |
---|
[3165] | 49 | #ifdef HAVE_GTK2 |
---|
[3423] | 50 | static int startOrxonox(GtkWidget *widget, void* data); |
---|
| 51 | static int quitOrxonox(GtkWidget *widget, void* data); |
---|
| 52 | #else /* HAVE_GTK2 */ |
---|
| 53 | static int startOrxonox(void* widget, void* data); |
---|
| 54 | static int quitOrxonox(void* widget, void* data); |
---|
[3165] | 55 | #endif /* HAVE_GTK2 */ |
---|
[3423] | 56 | }; |
---|
| 57 | |
---|
[3452] | 58 | //! A simple hashtable |
---|
[3423] | 59 | struct HashTable |
---|
| 60 | { |
---|
[3452] | 61 | char* name; //!< name of the entry |
---|
| 62 | char* value; //!< value of the entry |
---|
| 63 | HashTable* next; //!< pointer to the next entry |
---|
[3423] | 64 | }; |
---|
| 65 | |
---|
| 66 | |
---|
[1812] | 67 | #endif /* _ORXONOX_GUI_EXEC_H */ |
---|