16 #define GETTEXT_DOMAIN "wesnoth-lib"
28 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
29 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
40 , percentage_(static_cast<
unsigned>(-1))
63 percentage = std::min<unsigned>(percentage, 100);
89 load_resolutions<resolution>(cfg);
104 builder_progress_bar::builder_progress_bar(
const config& cfg)
111 auto widget = std::make_unique<progress_bar>(*
this);
113 DBG_GUI_G <<
"Window builder: placed progress bar '" <<
id
114 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
This object shows the progress of a certain action, or the value state of a certain item.
unsigned percentage_
The percentage done.
virtual unsigned get_state() const override
See styled_widget::get_state.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
void set_percentage(unsigned percentage)
virtual bool get_active() const override
See styled_widget::get_active.
virtual void set_active(const bool active) override
See styled_widget::set_active.
static std::string _(const char *str)
Define the common log macros for the gui toolkit.
Contains the implementation details for lexical_cast and shouldn't be used directly.
This file contains the settings handling of the widget library.
virtual std::unique_ptr< widget > build() const override
resolution(const config &cfg)
progress_bar_definition(const config &cfg)
Base class of a resolution, contains the common keys for a resolution.
std::vector< state_definition > state
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE_WML_CHILD(cfg, key, message)