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/widgets.hpp"
25#include "guiengine/modaldialog.hpp"
26#include "utils/cpp2011.hpp"
27#include "utils/synchronised.hpp"
29namespace Online {
class HTTPRequest; }
55 std::shared_ptr<bool> m_icon_downloaded;
65 virtual GUIEngine::EventPropagation
processEvent(
const std::string& event_source) OVERRIDE;
67 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:286
virtual void init() OVERRIDE
Optional callback invoked after widgets have been add()ed.
Definition: addons_loading.cpp:189
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:229
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:58
void doInstall()
Called when the asynchronous download of the addon finished.
Definition: addons_loading.cpp:364
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:333
virtual void beforeAddingWidgets() OVERRIDE
Optional callback invoked very early, before widgets have been added (contrast with init(),...
Definition: addons_loading.cpp:101
void stopDownload()
This function is called when the user click on 'Back', 'Cancel' or press escape.
Definition: addons_loading.cpp:349
~AddonsLoading()
Destructor.
Definition: addons_loading.cpp:86
bool m_icon_shown
True if the icon is being displayed.
Definition: addons_loading.hpp:53
virtual bool onEscapePressed() OVERRIDE
Override to change what happens on escape pressed.
Definition: addons_loading.cpp:199
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56