Skip to main content

Presentation

Struct Presentation 

Source
pub struct Presentation {
Show 13 fields pub dialog: Dialog, pub layout: Layout, pub visuals: Vec<Visual>, pub highlights: Vec<PickedElement>, pub pickable: Vec<String>, pub focus: Option<CoordinateSystem>, pub sheet: Option<Extent>, pub grab: bool, pub select_box: bool, pub prompt: Option<Prompt>, pub gizmo: Option<GizmoView>, pub hidden: Vec<String>, pub cycle: Option<Cycle>,
}
Expand description

What an editor shows for a step being edited: the operation’s super::Form, and what the editor adds to it — what is picked, selected and hovered, what a click would pick, and the handles of number fields.

Fields§

§dialog: Dialog§layout: Layout

Where the dialog is shown (see Layout).

§visuals: Vec<Visual>§highlights: Vec<PickedElement>

Elements of the part to draw lit: what is picked, what a click would pick. Not sent: the editor sends what they light (crate::editor::Update::lit).

§pickable: Vec<String>

What a click in the viewport picks right now: elements of these kinds.

§focus: Option<CoordinateSystem>

A plane to work in, its u/v plane: the viewer faces it head on, stops orbiting, and draws a grid on it.

§sheet: Option<Extent>

A sheet of its own the step is edited on, in focus, and how far it reaches: the viewer shows the visuals alone, framed to it, and is sent no part to draw (see super::Form::sheet).

§grab: bool

Whether a press where the pointer last hovered starts a drag (sent as super::StepEditEvent::Drag) rather than moving the camera.

§select_box: bool

Whether a press where the pointer last hovered, offering no grab, draws a selection box when dragged (sent as super::StepEditEvent::SelectBox) rather than doing nothing.

§prompt: Option<Prompt>

A value asked for in place.

§gizmo: Option<GizmoView>

The gizmo to move, turn or scale by, as drawn.

§hidden: Vec<String>

Solids and faces of the part, by name, the step asks not to draw while it is edited (see super::Form::hidden).

§cycle: Option<Cycle>

Which of what lies under the pointer is lit, and of how many: what a front end says while its user steps through them (see super::Pointer::cycle). None where the pointer is over nothing a click takes.

Implementations§

Source§

impl Presentation

Source

pub fn placed(self, instance: &str, motion: &Motion) -> GeopResult<Self>

The presentation of a step of the part placed as instance in the part drawn, motion where it is placed: what it draws, its gizmo, its prompt and its plane moved there, and what it lights the same elements of that instance. What it asks to hide is of its own part, which is drawn as an instance: it is drawn.

Trait Implementations§

Source§

impl Clone for Presentation

Source§

fn clone(&self) -> Presentation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Presentation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Presentation

Source§

fn eq(&self, other: &Presentation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Presentation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Presentation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.