|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
The retained wrap/scroll layout of one field, produced by rmgui_field_layout and kept current by rmgui_field_input. More...
#include <field.h>
Data Fields | |
| rmgui_field_metrics_t | metrics |
| const char * | text |
| rmgui_rect_t | box |
| rmgui_rect_t | content |
| rmgui_rect_t | action [RMGUI_FIELD_ACTION_MAX] |
| rmgui_scroll_t | bar |
| rmgui_field_row_t | row [RMGUI_FIELD_ROWS_CAP] |
| uint32_t | length |
| uint32_t | caret |
| uint32_t | anchor |
| uint32_t | view_row |
| int | wrap_w |
| int | caret_x |
| int | caret_y |
| int | sel_x0 |
| int | sel_x1 |
| uint16_t | rows |
| uint16_t | first |
| uint16_t | visible |
| uint16_t | base |
| uint16_t | count |
| uint16_t | tail |
| uint16_t | caret_row |
| uint64_t | revision |
| uint8_t | valid |
| uint8_t | view_explicit |
| uint8_t | caret_in_view |
| uint8_t | has_bar |
| uint8_t | has_actions |
| rmgui_text_shaped_t | shaped |
| rmgui_text_shaped_t | shaped_aux |
| const rmgui_text_options_t * | text_options |
| const rmgui_text_options_t * | auxiliary_text_options |
| rmgui_text_affinity_t | affinity |
| rmgui_rect_t * | selection_rects |
| size_t | selection_rect_capacity |
| size_t | selection_rect_count |
| uint16_t | shaped_full_rows |
| rmgui_field_mask_t | mask |
| size_t | mask_length |
| size_t | mask_preedit_length |
| size_t | mask_cursor |
| size_t | mask_start |
| size_t | mask_end |
| uint8_t | mask_bytes |
The retained wrap/scroll layout of one field, produced by rmgui_field_layout and kept current by rmgui_field_input.
Zero-initialise before first use; keep one per field and give the same record to layout, input and paint. Public outputs (read-only for hosts): rows: rows the whole text wraps to (>= 1); visible: rows the box shows; first: first visible row; wrap_w: wrap width after the scrollbar gutter; has_bar: 1 when rows > visible and the gutter carries bar; caret_in_view: 1 when the caret row is painted; caret_x/caret_y: caret offset from content.x/content.y (meaningful only when caret_in_view); content: the text column the rows flow in: the content box the layout was computed for, less the action strips; action[i]: the rect of the field's action i, {0,0,0,0} while that action does not exist (needs_content with an empty text) and for i >= count. Every other member is private bookkeeping.
rmgui_field_layout_t.shaped, rmgui_field_layout_t.shaped_aux
Shaped results borrow the per-instance workspaces above. Selection rectangles are in shaped coordinates (font_px + 2 line spacing); paint maps them to metrics.line_height and the scrolled text origin.
| rmgui_field_metrics_t rmgui_field_layout_t::metrics |
| const char* rmgui_field_layout_t::text |
| rmgui_rect_t rmgui_field_layout_t::box |
| rmgui_rect_t rmgui_field_layout_t::content |
| rmgui_rect_t rmgui_field_layout_t::action[RMGUI_FIELD_ACTION_MAX] |
| rmgui_scroll_t rmgui_field_layout_t::bar |
| rmgui_field_row_t rmgui_field_layout_t::row[RMGUI_FIELD_ROWS_CAP] |
| uint32_t rmgui_field_layout_t::length |
| uint32_t rmgui_field_layout_t::caret |
| uint32_t rmgui_field_layout_t::anchor |
| uint32_t rmgui_field_layout_t::view_row |
| int rmgui_field_layout_t::wrap_w |
| int rmgui_field_layout_t::caret_x |
| int rmgui_field_layout_t::caret_y |
| int rmgui_field_layout_t::sel_x0 |
| int rmgui_field_layout_t::sel_x1 |
| uint16_t rmgui_field_layout_t::rows |
| uint16_t rmgui_field_layout_t::first |
| uint16_t rmgui_field_layout_t::visible |
| uint16_t rmgui_field_layout_t::base |
| uint16_t rmgui_field_layout_t::count |
| uint16_t rmgui_field_layout_t::tail |
| uint16_t rmgui_field_layout_t::caret_row |
| uint64_t rmgui_field_layout_t::revision |
| uint8_t rmgui_field_layout_t::valid |
| uint8_t rmgui_field_layout_t::view_explicit |
| uint8_t rmgui_field_layout_t::caret_in_view |
| uint8_t rmgui_field_layout_t::has_bar |
| uint8_t rmgui_field_layout_t::has_actions |
| rmgui_text_shaped_t rmgui_field_layout_t::shaped |
| rmgui_text_shaped_t rmgui_field_layout_t::shaped_aux |
| const rmgui_text_options_t* rmgui_field_layout_t::text_options |
| const rmgui_text_options_t * rmgui_field_layout_t::auxiliary_text_options |
| rmgui_text_affinity_t rmgui_field_layout_t::affinity |
| rmgui_rect_t* rmgui_field_layout_t::selection_rects |
| size_t rmgui_field_layout_t::selection_rect_capacity |
| size_t rmgui_field_layout_t::selection_rect_count |
| uint16_t rmgui_field_layout_t::shaped_full_rows |
| rmgui_field_mask_t rmgui_field_layout_t::mask |
| size_t rmgui_field_layout_t::mask_length |
| size_t rmgui_field_layout_t::mask_preedit_length |
| size_t rmgui_field_layout_t::mask_cursor |
| size_t rmgui_field_layout_t::mask_start |
| size_t rmgui_field_layout_t::mask_end |
| uint8_t rmgui_field_layout_t::mask_bytes |