19 #ifndef HEADER_ADDONS_LOADING_HPP
20 #define HEADER_ADDONS_LOADING_HPP
22 #include "addons/addon.hpp"
23 #include "addons/addons_manager.hpp"
24 #include "guiengine/modaldialog.hpp"
25 #include "utils/cpp2011.hpp"
26 #include "utils/synchronised.hpp"
28 namespace GUIEngine {
class IconButtonWidget;
class ProgressBarWidget; }
29 namespace Online {
class HTTPRequest; }
57 std::shared_ptr<bool> m_icon_downloaded;
67 virtual GUIEngine::EventPropagation
processEvent(
const std::string& event_source) OVERRIDE;
69 virtual
void init() OVERRIDE;
Definition: addons_loading.hpp:35
void onUpdate(float delta) OVERRIDE
This function is called by the GUI, all the frame (or somthing like that).
Definition: addons_loading.cpp:303
virtual void init() OVERRIDE
Optional callback invoked after widgets have been add()ed.
Definition: addons_loading.cpp:196
virtual GUIEngine::EventPropagation processEvent(const std::string &event_source) OVERRIDE
Returns whether to block event propagation (usually, you will want to block events you processed)
Definition: addons_loading.cpp:236
std::shared_ptr< Online::HTTPRequest > m_download_request
A pointer to the download request, which gives access to the progress of a download.
Definition: addons_loading.hpp:60
void doInstall()
Called when the asynchronous download of the addon finished.
Definition: addons_loading.cpp:381
Addon m_addon
The addon to load.
Definition: addons_loading.hpp:45
void startDownload()
This function is called when the user click on 'Install', 'Uninstall', or 'Update'.
Definition: addons_loading.cpp:350
virtual void beforeAddingWidgets() OVERRIDE
Optional callback invoked very early, before widgets have been added (contrast with init(),...
Definition: addons_loading.cpp:108
bool m_message_shown
True if the error message has shown once.
Definition: addons_loading.hpp:55
void stopDownload()
This function is called when the user click on 'Back', 'Cancel' or press escape.
Definition: addons_loading.cpp:366
~AddonsLoading()
Destructor.
Definition: addons_loading.cpp:93
bool m_icon_shown
True if the icon is being displayed.
Definition: addons_loading.hpp:53
AddonsLoading(const std::string &addon_name)
Creates a modal dialog with given percentage of screen width and height.
Definition: addons_loading.cpp:59
virtual bool onEscapePressed() OVERRIDE
Override to change what happens on escape pressed.
Definition: addons_loading.cpp:206
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33