16 #define GETTEXT_DOMAIN "wesnoth-lib"
25 #define LOG_SCOPE_HEADER "viewport [" + id() + "] " + __func__
26 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
72 find(W
viewport,
const std::string_view
id,
const bool must_be_active)
74 if(
viewport->widget::find(
id, must_be_active)) {
85 , widget_(builder.widget_->build(replacements))
106 widget_->layout_initialize(full_initialization);
129 const bool must_be_active)
const
146 return widget_->get_best_size();
180 return std::make_unique<viewport>(*
this, replacements);
A config object defines a single node in a WML file, with access to child nodes.
widget * find(const std::string_view id, const bool must_be_active) override
See widget::find.
virtual void layout_initialize(const bool full_initialization) override
See widget::layout_initialize.
virtual point calculate_best_size() const override
See widget::calculate_best_size.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
std::unique_ptr< widget > widget_
virtual void request_reduce_width(const unsigned maximum_width) override
See widget::request_reduce_width.
virtual iteration::walker_ptr create_walker() override
See widget::create_walker.
virtual void impl_draw_children() override
See widget::impl_draw_children.
viewport(const implementation::builder_viewport &builder, const builder_widget::replacements_map &replacements)
virtual void place(const point &origin, const point &size) override
See widget::place.
virtual widget * find_at(const point &coordinate, const bool must_be_active) override
See widget::find_at.
void point(int x, int y)
Draw a single point.
std::unique_ptr< class walker_base > walker_ptr
builder_widget_ptr create_widget_builder(const config &cfg)
Create a widget builder.
Contains the implementation details for lexical_cast and shouldn't be used directly.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
typename const_clone< D, S >::pointer const_clone_ptr
virtual std::unique_ptr< widget > build() const override
builder_viewport(const config &cfg)
Helper to implement private functions without modifying the header.
static utils::const_clone_ptr< widget, W > find_at(W viewport, point coordinate, const bool must_be_active)
Implementation for the wrappers for [const] widget* pane::find_at(const point&, const bool) [const].
static utils::const_clone_ptr< widget, W > find(W viewport, const std::string_view id, const bool must_be_active)
std::string missing_mandatory_wml_tag(const std::string §ion, const std::string &tag)
Returns a standard message for a missing wml child (tag).
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)