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;
45 const std::shared_ptr<Style> &
text_style(
const std::string &text_class = std::string())
const;
50 void add_text(
const std::string &text,
const std::string &text_class = std::string());
51 void add_child(
const std::shared_ptr<View> &view,
float baseline_offset = 0.0f);
65 std::shared_ptr<SpanLayoutViewImpl> impl;
2D Graphics Canvas
Definition: canvas.h:72
Definition: span_layout_view.h:41
float calculate_preferred_width(Canvas &canvas) override
Calculates the preferred width of this view.
void add_text(const std::string &text, const std::string &text_class=std::string())
void render_content(Canvas &canvas) override
Renders the content of a view.
float calculate_last_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the last baseline.
float calculate_first_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the first baseline.
void layout_children(Canvas &canvas) override
Sets the view geometry for all children of this view.
void add_child(const std::shared_ptr< View > &view, float baseline_offset=0.0f)
const std::shared_ptr< Style > & text_style(const std::string &text_class=std::string()) const
float calculate_preferred_height(Canvas &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.
void child_removed(const std::shared_ptr< View > &view) override
Child view was removed from this view.
void set_text_alignment(TextAlignment alignment)
View for an area of the user interface.
Definition: view.h:66
TextAlignment
Definition: label_view.h:39