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;
48 void add_text(
const std::string &text,
const std::shared_ptr<Style> &
style);
49 void add_subview(
const std::shared_ptr<View> &view,
float baseline_offset = 0.0f);
63 std::shared_ptr<SpanLayoutViewImpl> impl;
void render_content(Canvas &canvas) override
Renders the content of a view.
void add_subview(const std::shared_ptr< View > &view, float baseline_offset=0.0f)
float get_first_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the first baseline.
float get_preferred_height(Canvas &canvas, float width) override
Calculates the preferred height of this view.
Definition: span_layout_view.h:41
2D Graphics Canvas
Definition: canvas.h:73
void subview_removed(const std::shared_ptr< View > &view) override
Child view was removed from this view.
void layout_subviews(Canvas &canvas) override
Sets the view geometry for all subviews of this view.
TextAlignment
Definition: label_view.h:38
View for an area of the user interface.
Definition: view.h:62
void set_text_alignment(TextAlignment alignment)
void add_text(const std::string &text, const std::shared_ptr< Style > &style)
float get_last_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the last baseline.
float get_preferred_width(Canvas &canvas) override
Calculates the preferred width of this view.
void subview_added(const std::shared_ptr< View > &view) override
Child view was added to this view.
const std::shared_ptr< Style > & style(const std::string &state=std::string()) const
Style properties for the specified state.