The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gui2::text_shape Class Reference

Definition of a text shape. More...

#include <canvas_private.hpp>

Inheritance diagram for gui2::text_shape:
Inheritance graph

Public Member Functions

 text_shape (const config &cfg)
 Constructor. More...
 
void draw (surface &canvas, SDL_Renderer *renderer, wfl::map_formula_callable &variables) override
 Implement shape::draw(). More...
 
- Public Member Functions inherited from gui2::canvas::shape
 shape (const config &cfg)
 
virtual ~shape ()
 
bool immutable () const
 

Private Attributes

typed_formula< unsigned > x_
 The x coordinate of the text. More...
 
typed_formula< unsigned > y_
 The y coordinate of the text. More...
 
typed_formula< unsigned > w_
 The width of the text. More...
 
typed_formula< unsigned > h_
 The height of the text. More...
 
font::family_class font_family_
 The text font family. More...
 
unsigned font_size_
 The font size of the text. More...
 
font::pango_text::FONT_STYLE font_style_
 The style of the text. More...
 
typed_formula< PangoAlignment > text_alignment_
 The alignment of the text. More...
 
typed_formula< color_tcolor_
 The color of the text. More...
 
typed_formula< t_stringtext_
 The text to draw. More...
 
typed_formula< bool > text_markup_
 The text markup switch of the text. More...
 
typed_formula< bool > link_aware_
 The link aware switch of the text. More...
 
typed_formula< color_tlink_color_
 The link color of the text. More...
 
typed_formula< int > maximum_width_
 The maximum width for the text. More...
 
unsigned characters_per_line_
 The number of characters per line. More...
 
typed_formula< int > maximum_height_
 The maximum height for the text. More...
 

Detailed Description

Definition of a text shape.

Definition at line 243 of file canvas_private.hpp.

Constructor & Destructor Documentation

gui2::text_shape::text_shape ( const config cfg)
explicit

Constructor.

Parameters
cfgThe config object to define the text see http://www.wesnoth.org/wiki/GUICanvasWML#Text for more information.

Definition at line 1242 of file canvas.cpp.

References _(), DBG_GUI_P, debug, font_size_, and VALIDATE.

Member Function Documentation

void gui2::text_shape::draw ( surface canvas,
SDL_Renderer *  renderer,
wfl::map_formula_callable variables 
)
overridevirtual

Member Data Documentation

unsigned gui2::text_shape::characters_per_line_
private

The number of characters per line.

Definition at line 296 of file canvas_private.hpp.

Referenced by draw().

typed_formula<color_t> gui2::text_shape::color_
private

The color of the text.

Definition at line 278 of file canvas_private.hpp.

Referenced by draw().

font::family_class gui2::text_shape::font_family_
private

The text font family.

Definition at line 266 of file canvas_private.hpp.

Referenced by draw().

unsigned gui2::text_shape::font_size_
private

The font size of the text.

Definition at line 269 of file canvas_private.hpp.

Referenced by draw(), and text_shape().

font::pango_text::FONT_STYLE gui2::text_shape::font_style_
private

The style of the text.

Definition at line 272 of file canvas_private.hpp.

Referenced by draw().

typed_formula<unsigned> gui2::text_shape::h_
private

The height of the text.

Definition at line 260 of file canvas_private.hpp.

Referenced by draw().

typed_formula<bool> gui2::text_shape::link_aware_
private

The link aware switch of the text.

Definition at line 287 of file canvas_private.hpp.

Referenced by draw().

typed_formula<color_t> gui2::text_shape::link_color_
private

The link color of the text.

Definition at line 290 of file canvas_private.hpp.

Referenced by draw().

typed_formula<int> gui2::text_shape::maximum_height_
private

The maximum height for the text.

Definition at line 299 of file canvas_private.hpp.

Referenced by draw().

typed_formula<int> gui2::text_shape::maximum_width_
private

The maximum width for the text.

Definition at line 293 of file canvas_private.hpp.

Referenced by draw().

typed_formula<t_string> gui2::text_shape::text_
private

The text to draw.

Definition at line 281 of file canvas_private.hpp.

Referenced by draw().

typed_formula<PangoAlignment> gui2::text_shape::text_alignment_
private

The alignment of the text.

Definition at line 275 of file canvas_private.hpp.

Referenced by draw().

typed_formula<bool> gui2::text_shape::text_markup_
private

The text markup switch of the text.

Definition at line 284 of file canvas_private.hpp.

Referenced by draw().

typed_formula<unsigned> gui2::text_shape::w_
private

The width of the text.

Definition at line 260 of file canvas_private.hpp.

Referenced by draw().

typed_formula<unsigned> gui2::text_shape::x_
private

The x coordinate of the text.

Definition at line 260 of file canvas_private.hpp.

Referenced by draw().

typed_formula<unsigned> gui2::text_shape::y_
private

The y coordinate of the text.

Definition at line 260 of file canvas_private.hpp.

Referenced by draw().


The documentation for this class was generated from the following files: