RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_layout_snapshot_node_t Struct Reference

One published node. More...

#include <layout.h>

Data Fields

uint64_t id
const rmgui_mask_t * shape
rmgui_rect_t rect
rmgui_rect_t clip
rmgui_rect_t visual_bounds
rmgui_rect_t image_rect
rmgui_rect_t image_clip
int text_x
int text_y
int content_w
int content_h
int viewport_w
int viewport_h
int image_scale
int flow_w
const rmgui_text_line_t * text_lines
size_t text_line_count
int text_w
int text_h
struct rmgui_font_metrics * text_metrics
size_t text_bytes
uint8_t text_ellipsis
uint8_t text_truncated
uint8_t visible
uint8_t clipped
uint8_t corner_radius
uint8_t overflow
rmgui_layout_visual_t visual
int32_t parent
const rmgui_a11y_record_t * a11y

Detailed Description

One published node.

Every field describes the latest successful arrangement. A node that was not arranged (a hidden child, under a hidden ancestor, or outside the arranged root) publishes only its id, with visible 0 and every other field zero. An explicitly arranged hidden root retains its geometry but has visible 0; its descendants are not arranged.

rmgui_layout_snapshot_node_t.shape

Borrowed additional hit shape, stretched over rect; NULL means none.

rmgui_layout_snapshot_node_t.visual_bounds

Bounds that painting through visual may cover; no extra clipping to the node's arranged rect. Zero for nodes not arranged or hidden.

rmgui_layout_snapshot_node_t.image_rect, rmgui_layout_snapshot_node_t.image_clip

IMAGE/GRAPHIC only: where the artwork lands and its clip.

rmgui_layout_snapshot_node_t.text_x, rmgui_layout_snapshot_node_t.text_y

Text origin: the content box's left edge (offset by text_align) and top.

rmgui_layout_snapshot_node_t.flow_w

Wrap-mode text leaves: the width the kernel wrapped the text at; 0 otherwise.

rmgui_layout_snapshot_node_t.text_lines

Retained lines, or NULL without storage or a positive wrapping width; valid for this snapshot's lifetime. When non-NULL, text_w/text_h are the wrapped content extent, excluding padding and independent of clipping/preferred node size.

rmgui_layout_snapshot_node_t.text_metrics

Optional single-owner shaping cache supplied by the text binding, or selected by rmgui_layout_set_font_metrics from the effective userdata. Paragraph painting mutates the cache. A published node keeps its cache pointer even if the binding changes or a subsequent arrangement fails; keep the cache alive through painting every snapshot that borrows it.

rmgui_layout_snapshot_node_t.text_bytes

Ellipsis text leaves: the fitted UTF-8 prefix length and whether U+2026 follows it. Painters never re-fit.

rmgui_layout_snapshot_node_t.visible

1 when the node is not hidden and rect meets clip.

rmgui_layout_snapshot_node_t.clipped

1 when rect extends outside clip.

rmgui_layout_snapshot_node_t.overflow

rmgui_layout_overflow_t

rmgui_layout_snapshot_node_t.parent

Published tree parent index, or -1 for the arranged root.

rmgui_layout_snapshot_node_t.a11y

NULL for unannotated/hidden nodes; immutable for snapshot lifetime.

Field Documentation

◆ id

uint64_t rmgui_layout_snapshot_node_t::id

◆ shape

const rmgui_mask_t* rmgui_layout_snapshot_node_t::shape

◆ rect

rmgui_rect_t rmgui_layout_snapshot_node_t::rect

◆ clip

rmgui_rect_t rmgui_layout_snapshot_node_t::clip

◆ visual_bounds

rmgui_rect_t rmgui_layout_snapshot_node_t::visual_bounds

◆ image_rect

rmgui_rect_t rmgui_layout_snapshot_node_t::image_rect

◆ image_clip

rmgui_rect_t rmgui_layout_snapshot_node_t::image_clip

◆ text_x

int rmgui_layout_snapshot_node_t::text_x

◆ text_y

int rmgui_layout_snapshot_node_t::text_y

◆ content_w

int rmgui_layout_snapshot_node_t::content_w

◆ content_h

int rmgui_layout_snapshot_node_t::content_h

◆ viewport_w

int rmgui_layout_snapshot_node_t::viewport_w

◆ viewport_h

int rmgui_layout_snapshot_node_t::viewport_h

◆ image_scale

int rmgui_layout_snapshot_node_t::image_scale

◆ flow_w

int rmgui_layout_snapshot_node_t::flow_w

◆ text_lines

const rmgui_text_line_t* rmgui_layout_snapshot_node_t::text_lines

◆ text_line_count

size_t rmgui_layout_snapshot_node_t::text_line_count

◆ text_w

int rmgui_layout_snapshot_node_t::text_w

◆ text_h

int rmgui_layout_snapshot_node_t::text_h

◆ text_metrics

struct rmgui_font_metrics* rmgui_layout_snapshot_node_t::text_metrics

◆ text_bytes

size_t rmgui_layout_snapshot_node_t::text_bytes

◆ text_ellipsis

uint8_t rmgui_layout_snapshot_node_t::text_ellipsis

◆ text_truncated

uint8_t rmgui_layout_snapshot_node_t::text_truncated

◆ visible

uint8_t rmgui_layout_snapshot_node_t::visible

◆ clipped

uint8_t rmgui_layout_snapshot_node_t::clipped

◆ corner_radius

uint8_t rmgui_layout_snapshot_node_t::corner_radius

◆ overflow

uint8_t rmgui_layout_snapshot_node_t::overflow

◆ visual

rmgui_layout_visual_t rmgui_layout_snapshot_node_t::visual

◆ parent

int32_t rmgui_layout_snapshot_node_t::parent

◆ a11y

const rmgui_a11y_record_t* rmgui_layout_snapshot_node_t::a11y

The documentation for this struct was generated from the following file: