pub struct PickTool { /* private fields */ }Expand description
An inspector that picks, in hand: what the pointer is over, what is picked, and the inspector’s answer about it.
Implementations§
Source§impl PickTool
impl PickTool
Sourcepub const PREFIX: &'static str = "pick:"
pub const PREFIX: &'static str = "pick:"
What the key of an inspector’s pick tool starts with:
pick:measure.
Sourcepub fn new(info: &'static InspectorInfo) -> GeopResult<Self>
pub fn new(info: &'static InspectorInfo) -> GeopResult<Self>
The tool of the inspector info. Fails for one that is asked of the
whole part.
Sourcepub fn picked(&self) -> &[PickedElement]
pub fn picked(&self) -> &[PickedElement]
What is picked, the oldest first.
Trait Implementations§
Source§impl Tool for PickTool
impl Tool for PickTool
Source§fn handle(
&mut self,
ctx: &mut EditorContext<'_>,
event: &StepEditEvent,
) -> GeopResult<Changed>
fn handle( &mut self, ctx: &mut EditorContext<'_>, event: &StepEditEvent, ) -> GeopResult<Changed>
An event in the viewport, picking in what is drawn: a hover finds what a click would pick; a click picks it — joining the picks, or replacing the oldest once there are as many as the inspector takes; a click on one picked takes it out, a click on nothing clears them; Escape clears them too. A change of the picks asks again.
Source§fn presentation(&self) -> Presentation
fn presentation(&self) -> Presentation
What it shows: the picks and what a click would pick lit, and what the answer draws.
Source§fn inspection(
&mut self,
ctx: &mut EditorContext<'_>,
) -> GeopResult<Option<Inspection>>
fn inspection( &mut self, ctx: &mut EditorContext<'_>, ) -> GeopResult<Option<Inspection>>
The inspector’s answer about the picks, asked again only if they or the part changed since.