#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 | |
config | cfg_ |
the source config More... | |
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... | |
std::string | highlight_start_ |
Start and end offsets for highlight. More... | |
std::string | highlight_end_ |
typed_formula< color_t > | highlight_color_ |
The color to be used for highlighting. More... | |
std::string | attr_start_ |
Generic start and end offsets for various attributes. More... | |
std::string | attr_end_ |
std::string | attr_name_ |
The attribute type Possible values : color/foreground, bgcolor/background, font_size/size, bold, italic, underline The first three require extra data the color for the first two, and font size for the last. More... | |
std::string | attr_data_ |
extra data for the attribute, if any More... | |
typed_formula< bool > | outline_ |
Whether to apply a text outline. More... | |
wfl::formula | actions_formula_ |
Any extra WFL actions to execute. 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 235 of file canvas_private.hpp.
|
explicit |
Constructor.
cfg | The config object to define the text. |
functions | WFL functions to execute. |
Definition at line 396 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 427 of file canvas.cpp.
References actions_formula_, wfl::map_formula_callable::add(), font::pango_text::add_attribute_bg_color(), font::pango_text::add_attribute_fg_color(), font::pango_text::add_attribute_font_family(), font::pango_text::add_attribute_size(), font::pango_text::add_attribute_style(), font::pango_text::add_attribute_underline(), font::pango_text::add_attribute_weight(), wfl::variant::as_bool(), wfl::variant::as_int(), draw::blit(), cfg_, characters_per_line_, config::child_range(), font::pango_text::clear_attribute_list(), color_, DBG_GUI_D, gui2::decode_text_style(), gui2::decode_text_weight(), t_string::empty(), wfl::formula::evaluate(), wfl::variant::execute_variant(), wfl::formula_callable::fake_ptr(), font_family_, font::FONT_SANS_SERIF, font_size_, font_style_, font::get_font_families(), font::pango_text::get_size(), font::get_text_renderer(), font::GOOD_COLOR, texture::h(), h, gui2::rect_bounded_shape::h_, wfl::formula_callable::has_key(), highlight_color_, highlight_end_, highlight_start_, i, link_aware_, link_color_, maximum_height_, maximum_width_, font::NORMAL_COLOR, 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(), t_string::size(), font::SIZE_NORMAL, utils::split(), editor::start(), font::string_to_color(), text_, text_alignment_, 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 316 of file canvas_private.hpp.
Referenced by draw().
|
private |
extra data for the attribute, if any
Definition at line 310 of file canvas_private.hpp.
|
private |
Definition at line 297 of file canvas_private.hpp.
|
private |
The attribute type Possible values : color/foreground, bgcolor/background, font_size/size, bold, italic, underline The first three require extra data the color for the first two, and font size for the last.
Definition at line 307 of file canvas_private.hpp.
|
private |
Generic start and end offsets for various attributes.
Definition at line 296 of file canvas_private.hpp.
|
private |
|
private |
The number of characters per line.
Definition at line 283 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
|
private |
|
private |
The color to be used for highlighting.
Definition at line 293 of file canvas_private.hpp.
Referenced by draw().
|
private |
Definition at line 290 of file canvas_private.hpp.
Referenced by draw().
|
private |
Start and end offsets for highlight.
Definition at line 289 of file canvas_private.hpp.
Referenced by draw().
|
private |
The link aware switch of the text.
Definition at line 274 of file canvas_private.hpp.
Referenced by draw().
|
private |
The link color of the text.
Definition at line 277 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum height for the text.
Definition at line 286 of file canvas_private.hpp.
Referenced by draw().
|
private |
The maximum width for the text.
Definition at line 280 of file canvas_private.hpp.
Referenced by draw().
|
private |
Whether to apply a text outline.
Definition at line 313 of file canvas_private.hpp.
Referenced by draw().
|
private |
|
private |
|
private |
The text markup switch of the text.
Definition at line 271 of file canvas_private.hpp.
Referenced by draw().