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