/*! \file orxonox_gui_update.h \brief File that holds the class that creates the update-menu. */ #ifndef _ORXONOX_GUI_UPDATE_H #define _ORXONOX_GUI_UPDATE_H #include "orxonox_gui.h" #include using namespace std; //! Class that creates the execute-Options. class OrxonoxGuiUpdate { private: Frame* updateFrame; //!< The Frame that holds the updateOptions. Box* updateBox; //!< The Box that holds the updateOptions. CheckButton* autoUpdate; //!< A Checkbutton to enable the automatic Updating. Button* updateDataWindowButton;//!< A Button to update the Data of orxonox. Window* updateDataWindow; //!< A Window for the data-update. Box* updateDataBox; //!< A Box for the Window for the Data-update. ProgressBar* updateDataBar; //!< A Bar to display the progress of the download. Button* updateDataBegin; //!< A Button to start the process. Button* updateSourceWindowButton;//!< A Button to update the Source of orxonox. \todo tricky Window* updateSourceWindow; //!< A Window for the Source-update. Box* updateSourceBox; //!< A Box for the Window for the Source-update. ProgressBar* updateSourceBar;//!< A Bar to display the progress of the download. Button* test; //!< will be deleted soon. #ifdef HAVE_GTK2 static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* bar); static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* bar); #endif /* HAVE_GTK2 */ #ifdef HAVE_CURL struct FileInfo { char* fileOnNet; char* fileOnDisk; ProgressBar* Bar; }; static size_t curlWriteFunc (void* ptr, size_t size, size_t nmemb, FILE* stream); static size_t curlReadFunc (void* ptr, size_t size, size_t nmemb, FILE* stream); static int curlProgressFunc (ProgressBar* Bar, double totalSize, double progress, double upTotal, double upProgress); static void* downloadThread (void* fileInfo); #endif /* HAVE_CURL */ public: OrxonoxGuiUpdate (); ~OrxonoxGuiUpdate (); Widget* getWidget (); void updateWindowCreate (void); Button* updateWindowGetButton(void); void updateDataWindowCreate (void); Button* updateDataWindowGetButton(void); void updateSourceWindowCreate (void); Button* updateSourceWindowGetButton(void); }; #endif /* _ORXONOX_GUI_UPDATE_H */