30 namespace wfl {
class variant; }
A config object defines a single node in a WML file, with access to child nodes.
Abstract base class for all other shapes.
bool immutable_
If this is true, this shape will not be removed from the canvas even if the canvas's content is reset...
virtual void draw(wfl::map_formula_callable &variables)=0
Draws the canvas.
A simple canvas which can be drawn upon.
texture blur_texture_
Blurred background texture.
bool deferred_
Whether we have deferred rendering so we can capture for blur.
wfl::action_function_symbol_table functions_
Action function definitions for the canvas.
void clear_shapes(const bool force)
void set_variable(const std::string &key, wfl::variant &&value)
unsigned blur_depth_
The depth of the blur to use in the pre committing.
wfl::map_formula_callable variables_
The variables of the canvas.
canvas(const canvas &)=delete
bool update_blur(const rect &screen_region, const bool force=false)
Update the background blur texture, if relevant and necessary.
rect blur_region_
The region of the screen we have blurred (if any).
void parse_cfg(const config &cfg)
Parses a config object.
void queue_reblur()
Clear the cached blur texture, forcing it to regenerate.
void append_cfg(const config &cfg)
Appends data to the config.
unsigned get_height() const
canvas & operator=(const canvas &)=delete
std::vector< std::unique_ptr< shape > > shapes_
Vector with the shapes to draw.
wfl::variant get_variable(const std::string &key)
unsigned w_
The full width of the canvas.
void update_size_variables()
Update WFL size variables.
unsigned h_
The full height of the canvas.
void draw()
Draw the canvas' shapes onto the screen.
unsigned get_width() const
void set_size(const point &size)
void set_cfg(const config &cfg, const bool force=false)
Sets the config.
Wrapper class to encapsulate creation and management of an SDL_Texture.
Definitions for the interface to Wesnoth Markup Language (WML).
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
Contains the SDL_Rect helper code.
An abstract description of a rectangle with integer coordinates.