Module: reefvision.widgets.formgrid
Source: ./reefvision/widgets/formgrid.reef
Overview
reefvision.widgets.formgrid — label|field row geometry for settings dialogs
Pure layout helper (not a View). Callers assign widget.bounds from the returned rects so Project Settings and other app settings screens do not hand-place.
One form row is a horizontal pair: label (fixed width) + field (remainder), with consistent gutters. full_rect covers the whole inner width (checkboxes). Row index is 0-based; y advances by row_h + gap_y each step.
Objects
FormGrid
Fields:
| Name | Type |
|---|---|
content |
cell.Rect |
label_w |
int |
gap_x |
int |
gap_y |
int |
row_h |
int |
pad_x |
int |
pad_y |
int |
proc init(content: cell.Rect, label_w: int, gap_x: int, gap_y: int, row_h: int, pad_x: int, pad_y: int)
exclusive proc set_content(content: cell.Rect)
exclusive proc set_label_w(w: int)
exclusive proc set_gaps(gap_x: int, gap_y: int)
exclusive proc set_row_h(h: int)
exclusive proc set_pad(pad_x: int, pad_y: int)
exclusive fn inner_x(): int
exclusive fn inner_y(): int
exclusive fn inner_w(): int
exclusive fn row_y(row: int): int
exclusive fn label_rect(row: int): cell.Rect
exclusive fn field_w(): int
exclusive fn field_x(): int
exclusive fn field_rect(row: int): cell.Rect
exclusive fn field_rect_h(row: int, h: int): cell.Rect
exclusive fn full_rect(row: int): cell.Rect
exclusive fn full_rect_h(row: int, h: int): cell.Rect
exclusive fn preferred_h(rows: int): int
Functions
fn form_grid(content: cell.Rect, label_w: int): FormGrid
Defaults: gap_x=1, gap_y=1, row_h=1, pad_x=0, pad_y=0.
fn form_grid_full(content: cell.Rect, label_w: int, gap_x: int, gap_y: int, row_h: int, pad_x: int, pad_y: int): FormGrid
Generated by reefc doc