pub struct CellMeta {
pub label: String,
pub is_bool: bool,
pub is_numeric: bool,
pub is_integer: bool,
pub display: Box<dyn Fn(&Sheet) -> String>,
pub write_str: WriteStrFn,
pub range: Option<Box<dyn Fn(&Sheet) -> (f64, f64)>>,
}Expand description
Display and write metadata for a single cell.
Fields§
§label: StringHuman-readable cell name shown in the inspector.
is_bool: booltrue if the cell holds a bool, so crate::SheetInspector can render it as a
checkbox instead of a text field.
is_numeric: booltrue if the cell holds one of the 14 numeric primitive types, so
crate::SheetInspector can render it with crate::spectrum::SpNumberfield
instead of a plain text field.
is_integer: booltrue if the cell holds one of the 12 integer primitive types (as opposed to
f32/f64), so crate::SheetInspector can set its numeric widget’s step to 1 —
crate::spectrum::SpNumberfield’s, or, for a range-filtered cell,
crate::spectrum::SpSlider’s — since an integer cell has no fractional steps to land
on.
display: Box<dyn Fn(&Sheet) -> String>Returns the current cell value as a display string.
write_str: WriteStrFnParses s and writes the result to the cell; returns Err on parse failure or type
mismatch. May also always return Err for a cell type with no write support yet (e.g.
compound values — see Labels::add_compound_cell).
range: Option<Box<dyn Fn(&Sheet) -> (f64, f64)>>Live slider bounds, present only for a numeric cell whose filter is a
adam_rs::FilterKind::Range — recomputed from the filter’s current argument values on
every call, so a range driven by other cells or relationships stays live. Cast to f64
for display, matching format_rounded’s existing all-numeric-types-as-f64 convention.