Skip to main content

Module selectable

Module selectable 

Source
Expand description

Selectable: what a reference field of a dialog holds — an element of a kind the user picks (SelectableElement), or one of several (one_of!) — and how a click on what the editor draws selects one, with selected, the values a reference field’s picks come to.

An editor hit-tests what it draws: vertices, edges, faces, sketch curves. What an operation asks for may be something else drawn as those — the tangent chain of edges an edge is part of, the solid a face bounds, the line a straight edge runs along. The crate defining the element says how a click on what is drawn selects it, and what of it to light while it is selected; the editor stays the same for all of them.

Traits§

Selectable
What a reference field holds, one value per pick.
SelectableElement
A kind of element of the target T a reference field picks.

Functions§

pick
What a click with pointer on what the editor draws, scene, selects as a P in the part reader reads — for a step that picks on the canvas itself rather than through a reference field — and where it hit what is drawn.
previewed
What a click on hit would pick as a P in the part reader reads, lit and drawn as it is once held (see Selectable::drawn, Selectable::visuals): so what the pointer lights is what a click holds. None, for a hit that selects none.
selected
The values a reference field holds after an event sent it picks: what it held, as it held it, and the clicks an editor added to it, each the value it selects (see Selectable::select). A click that selects a value held already takes it out again; one that selects none is dropped.