15 #define GETTEXT_DOMAIN "wesnoth-lib" 23 #define LOG_SCOPE_HEADER "viewport [" + id() + "] " + __func__ 24 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 54 if(viewport->widget::find_at(coordinate, must_be_active) != viewport) {
62 coordinate.
x -= viewport->get_x();
63 coordinate.
y -= viewport->get_y();
65 return viewport->widget_.find_at(coordinate, must_be_active);
72 if(viewport->widget::find(
id, must_be_active)) {
75 return viewport->widget_.find(
id, must_be_active);
83 , widget_(*builder.widget_->
build(replacements))
99 return new viewport(builder, replacements);
136 std::vector<widget*> child_call_stack =
call_stack;
150 const bool must_be_active)
const 189 builder_viewport::builder_viewport(
const config& cfg)
Define the common log macros for the gui toolkit.
Helper to implement private functions without modifying the header.
Definitions for the interface to Wesnoth Markup Language (WML).
virtual void request_reduce_width(const unsigned maximum_width) override
See widget::request_reduce_width.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
widget * find(const std::string &id, const bool must_be_active) override
See widget::find.
virtual void place(const point &origin, const point &size) override
See widget::place.
static viewport * build(const implementation::builder_viewport &builder, const builder_widget::replacements_map &replacements)
The walker abstract base class.
virtual widget * find_at(const point &coordinate, const bool must_be_active) override
See widget::find_at.
typename const_clone< D, S >::pointer const_clone_ptr
virtual void impl_draw_children(surface &frame_buffer, int x_offset, int y_offset) override
See widget::impl_draw_children.
A viewport is an special widget used to view only a part of the widget it 'holds'.
virtual iteration::walker_base * create_walker() override
See widget::create_walker.
viewport(const implementation::builder_viewport &builder, const builder_widget::replacements_map &replacements)
static utils::const_clone_ptr< widget, W > find(W viewport, const std::string &id, const bool must_be_active)
virtual void layout_initialize(const bool full_initialization) override
See widget::layout_initialize.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
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]...
virtual void child_populate_dirty_list(window &caller, const std::vector< widget *> &call_stack) override
See widget::child_populate_dirty_list.
std::unique_ptr< window > build(const builder_window::window_resolution &definition)
Builds a window.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
A config object defines a single node in a WML file, with access to child nodes.
base class of top level items, the only item which needs to store the final canvases to draw on...
static std::deque< std::string > call_stack
virtual point calculate_best_size() const override
See widget::calculate_best_size.
virtual widget * build() const override
Contains the implementation details for lexical_cast and shouldn't be used directly.
builder_widget_ptr create_widget_builder(const config &cfg)
Create a widget builder.