16 #define GETTEXT_DOMAIN "wesnoth-lib" 26 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 27 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 38 , percentage_(static_cast<
unsigned>(-1))
61 percentage = std::min<unsigned>(percentage, 100);
87 load_resolutions<resolution>(cfg);
94 state.emplace_back(cfg.
child(
"state_enabled"));
102 builder_progress_bar::builder_progress_bar(
const config& cfg)
109 auto widget = std::make_unique<progress_bar>(*this);
111 DBG_GUI_G <<
"Window builder: placed progress bar '" <<
id 112 <<
"' with definition '" <<
definition <<
"'.";
Define the common log macros for the gui toolkit.
Base class of a resolution, contains the common keys for a resolution.
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
std::vector< state_definition > state
void set_percentage(unsigned percentage)
This object shows the progress of a certain action, or the value state of a certain item...
virtual bool get_active() const override
See styled_widget::get_active.
resolution(const config &cfg)
This file contains the settings handling of the widget library.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
virtual unsigned get_state() const override
See styled_widget::get_state.
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual std::unique_ptr< widget > build() const override
unsigned percentage_
The percentage done.
A config object defines a single node in a WML file, with access to child nodes.
Contains the implementation details for lexical_cast and shouldn't be used directly.
progress_bar_definition(const config &cfg)