31 #include "../View/view.h" 32 #include "../../Display/Font/font.h" 33 #include "../../Display/2D/color.h" 34 #include "label_view.h" 38 class SpanLayoutViewImpl;
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<SpanLayoutViewImpl> impl;
View for an area of the user interface.
Definition: view.h:65
float calculate_first_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the first baseline.
2D Graphics Canvas
Definition: canvas.h:71
float calculate_last_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the last baseline.
float calculate_preferred_width(Canvas &canvas) override
Calculates the preferred width of this view.
void set_text_alignment(TextAlignment alignment)
float calculate_preferred_height(Canvas &canvas, float width) override
Calculates the preferred height of this view.
void child_removed(const std::shared_ptr< View > &view) override
Child view was removed from this view.
std::shared_ptr< View > add_child()
Definition: view.h:106
TextAlignment
Definition: label_view.h:38
void child_added(const std::shared_ptr< View > &view) override
Child view was added to this view.
void layout_children(Canvas &canvas) override
Sets the view geometry for all children of this view.
void add_text(const std::string &text, const std::string &text_class=std::string())
const std::shared_ptr< Style > & text_style(const std::string &text_class=std::string()) const
void render_content(Canvas &canvas) override
Renders the content of a view.
Definition: span_layout_view.h:40