29 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.
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
void parse_cfg(const config &cfg)
Parses a config object.
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.
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.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.