31 #include "../View/view.h"
32 #include "../../Display/Font/font.h"
33 #include "../../Core/Math/color.h"
34 #include "label_view.h"
38 class TextBlockBaseViewImpl;
51 void add_child(
const std::shared_ptr<View> &view,
float baseline_offset = 0.0
f);
61 void child_added(
const std::shared_ptr<View> &view)
override;
62 void child_removed(
const std::shared_ptr<View> &view)
override;
65 std::shared_ptr<TextBlockBaseViewImpl> impl;
void render_content(const CanvasPtr &canvas) override
Renders the content of a view.
std::shared_ptr< View > add_child()
Definition: view.h:106
void set_text_alignment(TextAlignment alignment)
const std::shared_ptr< Style > & text_style(const std::string &text_class=std::string()) const
float calculate_preferred_height(const CanvasPtr &canvas, float width) override
Calculates the preferred height of this view.
void child_added(const std::shared_ptr< View > &view) override
Child view was added to this view.
float calculate_preferred_width(const CanvasPtr &canvas) override
Calculates the preferred width of this view.
TextAlignment
Definition: label_view.h:37
void child_removed(const std::shared_ptr< View > &view) override
Child view was removed from this view.
float calculate_first_baseline_offset(const CanvasPtr &canvas, float width) override
Calculates the offset to the first baseline.
Definition: text_block_view.h:40
View for an area of the user interface.
Definition: view.h:68
void add_text(const std::string &text, const std::string &text_class=std::string())
std::shared_ptr< Canvas > CanvasPtr
Definition: canvas.h:126
float calculate_last_baseline_offset(const CanvasPtr &canvas, float width) override
Calculates the offset to the last baseline.
void layout_children(const CanvasPtr &canvas) override
Sets the view geometry for all children of this view.
Definition: Application/application.h:35