#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... | |
![]() | |
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... | |
typed_formula< t_string > | text_ |
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_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... | |
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 | |
![]() | |
rect_bounded_shape (const config &cfg) | |
Constructor. More... | |
![]() | |
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 237 of file canvas_private.hpp.
|
explicit |
Constructor.
cfg | The config object to define the text. |
functions | WFL functions to execute. |
Definition at line 452 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 479 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, t_string::empty(), 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_, link_aware_, link_color_, maximum_height_, maximum_width_, outline_, 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_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(), 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 300 of file canvas_private.hpp.
Referenced by draw().
|
private |
The number of characters per line.
Definition at line 282 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
|
private |
|
private |
The color to be used for highlighting.
Definition at line 294 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
Start offset for highlight.
Definition at line 288 of file canvas_private.hpp.
Referenced by draw().
|
private |
The link aware switch of the text.
Definition at line 273 of file canvas_private.hpp.
Referenced by draw().
|
private |
The link color of the text.
Definition at line 276 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum height for the text.
Definition at line 285 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum width for the text.
Definition at line 279 of file canvas_private.hpp.
Referenced by draw().
|
private |
Whether to apply a text outline.
Definition at line 297 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
Any custom Pango text attributes.
Definition at line 303 of file canvas_private.hpp.
Referenced by draw().
|
private |
The text markup switch of the text.
Definition at line 270 of file canvas_private.hpp.
Referenced by draw().