pub trait ReferenceRenderer {
// Required method
fn render_reference(
&mut self,
ui: &mut Ui,
field: &FormField,
filter: &[String],
multiple: bool,
current: &mut Value,
probe: Option<&mut HashMap<String, Rect>>,
) -> (bool, Rect);
}Expand description
The engine-agnostic seam for a REAL reference-selection widget. field_input
stays free of any engine dependency (a later brep-ui crate reuses it
verbatim); a caller that CAN pick — the feature dialog, which holds
&mut EngineState — passes a &mut dyn ReferenceRenderer and field_input
delegates each FieldKind::Reference field to it. When no renderer is
supplied (the settings panel, which has no reference fields) it falls back to
the inert placeholder.
Required Methods§
Sourcefn render_reference(
&mut self,
ui: &mut Ui,
field: &FormField,
filter: &[String],
multiple: bool,
current: &mut Value,
probe: Option<&mut HashMap<String, Rect>>,
) -> (bool, Rect)
fn render_reference( &mut self, ui: &mut Ui, field: &FormField, filter: &[String], multiple: bool, current: &mut Value, probe: Option<&mut HashMap<String, Rect>>, ) -> (bool, Rect)
Draw the COLLAPSED reference field — an activation button plus the current
selection listed one-per-line, each line with an X to remove it. Returns
(changed, activation_button_rect): changed is true when a name was
removed (so the caller commits the edited current back to the engine).
probe, when present, receives the activation + per-line-X widget rects
(keyed "<path>#activate", "<path>#x<index>") for the headed verifier.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".