Span layout class. More...
#include <span_layout.h>
Classes | |
| struct | HitTestResult |
Public Member Functions | |
Construction | |
| SpanLayout () | |
| ~SpanLayout () | |
Operations | |
| void | clear () |
| Clear. More... | |
| void | add_text (const std::string &text, const Font &font, const Colorf &color=Colorf::white, int id=-1) |
| Add text. More... | |
| void | add_image (const Image &image, int baseline_offset=0, int id=-1) |
| Add image. More... | |
| template<typename T > | |
| void | add_component (T *component, int baseline_offset=0, int id=-1) |
| Add component. More... | |
| void | layout (Canvas &canvas, int max_width) |
| Layout. More... | |
| void | set_position (const Point &pos) |
| Set position. More... | |
| Size | get_size () const |
| Get Size. More... | |
| Rect | get_rect () const |
| Get Rect. More... | |
| std::vector< Rect > | get_rect_by_id (int id) const |
| Get Rect By Id. More... | |
| HitTestResult | hit_test (Canvas &canvas, const Point &pos) |
| Hit test. More... | |
| void | draw_layout (Canvas &canvas) |
| Draw layout. More... | |
| void | draw_layout_ellipsis (Canvas &canvas, const Rect &content_rect) |
| Draw layout generating ellipsis for clipped text. More... | |
| void | set_component_geometry () |
| Set component geometry. More... | |
| Size | find_preferred_size (Canvas &canvas) |
| Find preferred size. More... | |
| void | set_selection_range (std::string::size_type start, std::string::size_type end) |
| Set selection range. More... | |
| void | set_selection_colors (const Colorf &foreground, const Colorf &background) |
| Set selection colors. More... | |
| void | show_cursor () |
| Shows the cursor caret. More... | |
| void | hide_cursor () |
| Hides the cursor caret. More... | |
| void | set_cursor_pos (std::string::size_type pos) |
| Sets the cursor position. More... | |
| void | set_cursor_overwrite_mode (bool enable) |
| Toggles whether the cursor caret is shown as a solid box or a line. More... | |
| void | set_cursor_color (const Colorf &color) |
| Sets the cursor color. More... | |
| std::string | get_combined_text () const |
| Get Combined text. More... | |
| void | set_align (SpanAlign align) |
| Sets the text alignment. More... | |
| int | get_first_baseline_offset () |
| Returns the baseline offset for the first baseline. More... | |
| int | get_last_baseline_offset () |
| Returns the baseline offset for the last baseline. More... | |
Span layout class.