32#include "../../Core/Math/rect.h"
33#include "../../Core/Math/size.h"
45 class SpanLayout_Impl;
218 void add_component_helper(SpanComponent *component,
int baseline_offset,
int id);
220 std::shared_ptr<SpanLayout_Impl> impl;
2D Graphics Canvas
Definition canvas.h:72
Floating point color description class (for float).
Definition color.h:799
Font class.
Definition font.h:60
Image class.
Definition image.h:59
2D (x,y) point structure - Integer
Definition point.h:62
2D (left,top,right,bottom) rectangle structure - Integer
Definition rect.h:489
2D (width,height) size structure - Integer
Definition size.h:171
Span layout class.
Definition span_layout.h:61
Size find_preferred_size(Canvas &canvas)
Find preferred size.
HitTestResult hit_test(Canvas &canvas, const Point &pos)
Hit test.
int get_last_baseline_offset()
Returns the baseline offset for the last baseline.
void set_selection_colors(const Colorf &foreground, const Colorf &background)
Set selection colors.
void set_cursor_color(const Colorf &color)
Sets the cursor color.
void layout(Canvas &canvas, int max_width)
Layout.
std::vector< Rect > get_rect_by_id(int id) const
Get Rect By Id.
void set_selection_range(std::string::size_type start, std::string::size_type end)
Set selection range.
Size get_size() const
Get Size.
void set_cursor_overwrite_mode(bool enable)
Toggles whether the cursor caret is shown as a solid box or a line.
void hide_cursor()
Hides the cursor caret.
int get_first_baseline_offset()
Returns the baseline offset for the first baseline.
void show_cursor()
Shows the cursor caret.
void set_component_geometry()
Set component geometry.
void add_text(const std::string &text, const Font &font, const Colorf &color=StandardColorf::white(), int id=-1)
Add text.
Rect get_rect() const
Get Rect.
void set_align(SpanAlign align)
Sets the text alignment.
void set_cursor_pos(std::string::size_type pos)
Sets the cursor position.
void set_position(const Point &pos)
Set position.
std::string get_combined_text() const
Get Combined text.
void draw_layout_ellipsis(Canvas &canvas, const Rect &content_rect)
Draw layout generating ellipsis for clipped text.
void add_image(const Image &image, int baseline_offset=0, int id=-1)
Add image.
void add_component(T *component, int baseline_offset=0, int id=-1)
Add component.
void draw_layout(Canvas &canvas)
Draw layout.
static Colorf white()
Definition color.h:1884
SpanAlign
Span Align.
Definition span_layout.h:52
@ span_right
Definition span_layout.h:54
@ span_justify
Definition span_layout.h:56
@ span_center
Definition span_layout.h:55
@ span_left
Definition span_layout.h:53
Definition span_layout.h:67
int object_id
Definition span_layout.h:80
enum clan::SpanLayout::HitTestResult::Type type
Type
Definition span_layout.h:71
int offset
Definition span_layout.h:81
HitTestResult()
Definition span_layout.h:68