/*! \file gui_exec.h \brief File that holds the class that creates the execute-Options. */ #ifndef _GUI_EXEC_H #define _GUI_EXEC_H #include "gui.h" #include "gui_element.h" #include "gui_gtk.h" class Widget; class CheckButton; using namespace std; //! Class that creates the execute-Options. class GuiExec : public GuiElement { private: CheckButton* saveSettings; //!< A CheckBox for if the Options should be saved. char* confDir; //!< The directory of the orxonox-configuration-files. char* confFile; //!< The name of the .orxonox.conf(ig)-file. FILE* CONFIG_FILE; //!< Filehandler for reading and writing. //! A struct that holds informations about variables. struct VarInfo { char* variableName; //!< The Name of this variable; char* variableValue; //!< The Value this variable gets. }; public: GuiExec(void); ~GuiExec(void); void setConfDir(const char* confDir); void setConfFile(const char* confFile); const char* getConfigFile(void) const; int shouldsave(void); void writeToFile(Widget* widget); void writeFileText(Widget* widget, int depth); void readFromFile(Widget* widget); static void readFileText(Widget* widget, void* varInfo); Widget* locateGroup(Widget* widget, char* groupName, int depth); #ifdef HAVE_GTK2 static int startOrxonox(GtkWidget *widget, void* data); static int quitGui(GtkWidget *widget, void* data); #else /* HAVE_GTK2 */ static int startOrxonox(void* widget, void* data); static int quitGui(void* widget, void* data); #endif /* HAVE_GTK2 */ }; //! A simple hashtable struct HashTable { char* name; //!< name of the entry char* value; //!< value of the entry HashTable* next; //!< pointer to the next entry }; #endif /* _GUI_EXEC_H */