#include <canvas_private.hpp>
Public Member Functions | |
| text_shape (const config &cfg, wfl::action_function_symbol_table &functions) | |
| Constructor. More... | |
| void | draw (wfl::map_formula_callable &variables) override |
| Draws the canvas. More... | |
Public Member Functions inherited from gui2::canvas::shape | |
| shape (const config &cfg) | |
| virtual | ~shape () |
| bool | immutable () const |
Private Attributes | |
| font::family_class | font_family_ |
| The text font family. More... | |
| typed_formula< 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_t > | color_ |
| The color of the text. More... | |
| config::attribute_value | text_ |
| The text to draw. More... | |
| bool | parse_text_as_formula_ |
| Whether to parse text_ as WFL formula. 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_t > | link_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... | |
| typed_formula< int > | highlight_start_ |
| Start offset for highlight. More... | |
| typed_formula< int > | highlight_end_ |
| End offset for highlight. More... | |
| typed_formula< color_t > | highlight_color_ |
| The color to be used for highlighting. More... | |
| float | line_spacing_ |
| Spacing between lines. More... | |
| typed_formula< bool > | outline_ |
| Whether to apply a text outline. More... | |
| wfl::formula | actions_formula_ |
| Any extra WFL actions to execute. More... | |
| font::attribute_list | text_attributes_ |
| Any custom Pango text attributes. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gui2::rect_bounded_shape | |
| rect_bounded_shape (const config &cfg) | |
| Constructor. More... | |
Protected Attributes inherited from gui2::rect_bounded_shape | |
| typed_formula< int > | x_ |
| The x coordinate of the rectangle. More... | |
| typed_formula< int > | y_ |
| The y coordinate of the rectangle. More... | |
| typed_formula< int > | w_ |
| The width of the rectangle. More... | |
| typed_formula< int > | h_ |
| The height of the rectangle. More... | |
Definition at line 236 of file canvas_private.hpp.
|
explicit |
Constructor.
| cfg | The config object to define the text. |
| functions | WFL functions to execute. |
Definition at line 456 of file canvas.cpp.
|
overridevirtual |
Draws the canvas.
| variables | The canvas can have formulas in it's definition, this parameter contains the values for these formulas. |
Implements gui2::canvas::shape.
Definition at line 485 of file canvas.cpp.
References actions_formula_, wfl::map_formula_callable::add(), font::add_attribute_bg_color(), font::pango_text::apply_attributes(), wfl::variant::as_bool(), wfl::variant::as_int(), draw::blit(), characters_per_line_, font::pango_text::clear_attributes(), color_, DBG_GUI_D, wfl::formula::evaluate(), wfl::variant::execute_variant(), wfl::formula_callable::fake_ptr(), font_family_, font_size_, font_style_, font::pango_text::get_size(), font::get_text_renderer(), texture::h(), h, gui2::rect_bounded_shape::h_, wfl::formula_callable::has_key(), highlight_color_, highlight_end_, highlight_start_, line_spacing_, link_aware_, link_color_, maximum_height_, maximum_width_, outline_, parse_text_as_formula_, wfl::formula_callable::query_value(), font::pango_text::render_and_get_texture(), font::pango_text::set_add_outline(), font::pango_text::set_alignment(), font::pango_text::set_characters_per_line(), font::pango_text::set_ellipse_mode(), font::pango_text::set_family_class(), font::pango_text::set_font_size(), font::pango_text::set_font_style(), font::pango_text::set_foreground_color(), font::pango_text::set_line_spacing(), font::pango_text::set_link_aware(), font::pango_text::set_link_color(), font::pango_text::set_maximum_height(), font::pango_text::set_maximum_width(), font::pango_text::set_text(), config_attribute_value::t_str(), text_, text_alignment_, text_attributes_, text_markup_, w, texture::w(), gui2::rect_bounded_shape::w_, gui2::rect_bounded_shape::x_, and gui2::rect_bounded_shape::y_.
|
private |
Any extra WFL actions to execute.
Definition at line 305 of file canvas_private.hpp.
Referenced by draw().
|
private |
The number of characters per line.
Definition at line 284 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
|
private |
|
private |
The color to be used for highlighting.
Definition at line 296 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
Start offset for highlight.
Definition at line 290 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
The link aware switch of the text.
Definition at line 275 of file canvas_private.hpp.
Referenced by draw().
|
private |
The link color of the text.
Definition at line 278 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum height for the text.
Definition at line 287 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum width for the text.
Definition at line 281 of file canvas_private.hpp.
Referenced by draw().
|
private |
Whether to apply a text outline.
Definition at line 302 of file canvas_private.hpp.
Referenced by draw().
|
private |
Whether to parse text_ as WFL formula.
Definition at line 269 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
Any custom Pango text attributes.
Definition at line 308 of file canvas_private.hpp.
Referenced by draw().
|
private |
The text markup switch of the text.
Definition at line 272 of file canvas_private.hpp.
Referenced by draw().