Module property_list
Expand description
PropertyList: labelled values (a contact’s details, a file’s metadata,
a certificate’s fields), as a retained widget and as the
PropertyListFace immediate painter with identical geometry.
Labels sit in one column, measured from the longest label, in secondary
ink; values sit in the column beside it in primary ink (or a status
Tone). Prose wraps, at most a readable measure wide; identifiers,
secrets and figures never break and are elided before the action column.
When the value column would get too narrow the list stacks: each label
above its value. A row may carry up to two trailing actions (copy, open,
reveal). The list sits on its ground separated by space, never inside a
card; dense inspectors may stripe alternate rows with a derived tint and
take the compact density.
One content edge. Labels start on the column’s content edge, like a
section’s title and a list row’s text; a stripe bleeds
row_bleed past it on both sides. A face
paints into the list’s outer rect (the content edge grown by the bleed);
the retained list grows its own layout box by it. Lists in one
Section, and the groups of
PropertyList::sections, share one label column.
Structs§
- Property
- One property of a retained
PropertyList. - Property
Column - A label column shared by several property lists, so their values line
up (the lists of one
Sectionshare one on their own). Clone the handle into each list withPropertyList::shared_column. - Property
List - A retained property list. See the module docs.
- Property
List Face - Immediate-mode property list.
painttakes the list’s outer rect: the content edge grown byrow_bleed. - Property
Row - One label and its value, as the face paints it.
- Property
Value - A read-only value as a control: the value a
Fieldshows where it cannot be edited (an account id, a generated key), in primary ink with its kind’s text treatment and an optional trailing copy action. Unbreakable kinds are elided before the action.
Constants§
- MAX_
PROPERTY_ ACTIONS - The most actions one row carries.
Functions§
- property_
label_ column - The label column
rowsneed: the longest label, at mostmax_shareofwidth. Several lists that must line up share the widest of theirs.