pub enum EditorKind {
}Expand description
Editor hint for a property — how the property panel should render an editor for the current value.
The variants describe intent, not pixels — the row factory at
widgets/property_row picks the concrete widget. Keeping the hint
in the schema lets headless callers (tests, serialization, future
inspector ports) reason about the editor shape without depending
on the rendered widget tree.
Variants§
NumberDrag(NumberAttrs)
Click-and-drag horizontally to edit a number. Default for
Number properties.
Slider(NumberAttrs)
Horizontal slider between min and max. NodeDesigner’s
“slider” widget and MatterCAD’s [Slider(...)] map here.
Toggle
Boolean checkbox toggle.
ColorPicker
Color swatch + picker.
Matrix
4×4 matrix — typically rendered as a compact button that opens a translation/rotation/scale sub-panel.
Display
Read-only text display. Used when a property’s value isn’t directly editable on the node row (e.g. a derived value).
StringSingleLine
Editable single-line string. MatterCAD’s default string
editor.
StringMultiLine
Editable multi-line string. MatterCAD’s [MultiLineEdit].
StringReadOnly
Word-wrapped read-only text. MatterCAD’s [ReadOnly(true)].
EnumDropdown
Enum rendered as a dropdown combo box. The variants list is
the ordered set of allowed values (also the canonical display
labels). Current value is matched against one of these entries.
EnumButtons
Enum rendered as a row of mutually-exclusive buttons.
EnumTabs
Enum rendered as a full-width tab strip — MatterCAD’s
EnumDisplay.Tabs. Best for 2–5 variants the user switches
between at the top of a panel.
Image
Image picker / preview. MatterCAD’s ImageBufferPropertyEditor.
Implementations§
Source§impl EditorKind
impl EditorKind
Sourcepub fn drag_range(min: f64, max: f64) -> Self
pub fn drag_range(min: f64, max: f64) -> Self
NumberDrag editor with [min, max] range.
Sourcepub fn slider_range(min: f64, max: f64) -> Self
pub fn slider_range(min: f64, max: f64) -> Self
Slider editor with [min, max] range.
Sourcepub fn numeric_range(&self) -> (Option<f64>, Option<f64>)
pub fn numeric_range(&self) -> (Option<f64>, Option<f64>)
Inclusive numeric range when this editor is numeric, else None.
Sourcepub fn number_attrs(&self) -> Option<&NumberAttrs>
pub fn number_attrs(&self) -> Option<&NumberAttrs>
Numeric editor attributes when this editor is numeric.
Trait Implementations§
Source§impl Clone for EditorKind
impl Clone for EditorKind
Source§fn clone(&self) -> EditorKind
fn clone(&self) -> EditorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditorKind
impl Debug for EditorKind
Source§impl Default for EditorKind
impl Default for EditorKind
Source§impl PartialEq for EditorKind
impl PartialEq for EditorKind
Source§fn eq(&self, other: &EditorKind) -> bool
fn eq(&self, other: &EditorKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EditorKind
Auto Trait Implementations§
impl Freeze for EditorKind
impl RefUnwindSafe for EditorKind
impl Send for EditorKind
impl Sync for EditorKind
impl Unpin for EditorKind
impl UnsafeUnpin for EditorKind
impl UnwindSafe for EditorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().