#include <span_layout.h>
Public Member Functions | |
Construction | |
| CL_SpanLayout () | |
| ~CL_SpanLayout () | |
Operations | |
| void | clear () |
| Clear. | |
| void | add_text (const CL_String &text, const CL_Font &font, const CL_Colorf &color=CL_Colorf::white, int id=-1) |
| Add text. | |
| void | add_image (const CL_Image &image, int baseline_offset=0, int id=-1) |
| Add image. | |
| template<typename T> | |
| void | add_component (T *component, int baseline_offset=0, int id=-1) |
| Add component. | |
| void | layout (CL_GraphicContext &gc, int max_width) |
| Layout. | |
| void | set_position (const CL_Point &pos) |
| Set position. | |
| CL_Size | get_size () const |
| Get Size. | |
| std::vector< CL_Rect > | get_rect_by_id (int id) const |
| Get Rect By Id. | |
| HitTestResult | hit_test (CL_GraphicContext &gc, const CL_Point &pos) |
| Hit test. | |
| void | draw_layout (CL_GraphicContext &gc) |
| Draw layout. | |
| void | set_component_geometry () |
| Set component geometry. | |
| CL_Size | find_preferred_size (CL_GraphicContext &gc) |
| Find preferred size. | |
| void | set_selection_range (CL_String::size_type start, CL_String::size_type end) |
| Set selection range. | |
| void | set_selection_colors (const CL_Colorf &foreground, const CL_Colorf &background) |
| Set selection colors. | |
| CL_String | get_combined_text () const |
| Get Combined text. | |
| void | set_align (CL_SpanAlign align) |
| Sets the text alignment. | |
Classes | |
| struct | HitTestResult |
|
|
|
|
|
|
|
||||||||||||||||||||
|
Add component.
|
|
||||||||||||||||
|
Add image.
|
|
||||||||||||||||||||
|
Add text.
|
|
|
Clear.
|
|
|
Draw layout.
|
|
|
Find preferred size.
|
|
|
Get Combined text.
|
|
|
Get Rect By Id.
|
|
|
Get Size.
|
|
||||||||||||
|
Hit test.
|
|
||||||||||||
|
Layout.
|
|
|
Sets the text alignment. Alignment is applied when layout() is called
|
|
|
Set component geometry.
|
|
|
Set position.
|
|
||||||||||||
|
Set selection colors.
|
|
||||||||||||
|
Set selection range.
|
1.4.6