7#include "../aarect.hpp"
18 _alignment(alignment), _data_is_modified(
true), _size_is_modified(
true), _position_is_modified(
true)
43 _size_is_modified =
true;
45 if (_rectangle.
offset() != rectangle.
offset() || _base_line_position != base_line_position) {
46 _position_is_modified =
true;
49 _rectangle = rectangle;
64 make_unique(alignment alignment,
std::u8string const &text,
text_style const &style);
72 float _base_line_position;
76 bool _data_is_modified;
77 bool _size_is_modified;
78 bool _position_is_modified;
numeric_array< T, 4 > offset() const noexcept
Get vector from origin to the bottom-left corner.
Definition aarect.hpp:216
T middle() const noexcept
The middle on the y-axis between bottom and top.
Definition aarect.hpp:272
numeric_array< T, 4 > extent() const noexcept
Get size of the rectangle.
Definition aarect.hpp:225
Draw context for drawing using the TTauri shaders.
Definition draw_context.hpp:33
An image, in different formats.
Definition icon.hpp:19
A localized text + icon label.
Definition label.hpp:76
Definition image_stencil.hpp:11
Definition label_stencil.hpp:17
Definition stencil.hpp:15
virtual void draw(draw_context context, bool use_context_color=false) noexcept=0
Draw the cell.
virtual f32x4 preferred_extent() noexcept
Return the extent that this cell wants to be drawn as.
Definition stencil.hpp:30
virtual void set_layout_parameters(aarect const &rectangle, float base_line_position=std::numeric_limits< float >::infinity()) noexcept
Pass layout parameters in local coordinates.
Definition stencil.hpp:40
Definition text_stencil.hpp:14
Definition text_style.hpp:16