pub struct Drawing;Expand description
Describes a drawing of the part: see DrawingArgs.
Trait Implementations§
impl Copy for Drawing
Source§impl<'de> Deserialize<'de> for Drawing
impl<'de> Deserialize<'de> for Drawing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Editable for Drawing
impl Editable for Drawing
const INFO: OperationInfo = <Drawing as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Drawing as PartOperation>::Session>
type EditingState = FormState<<Drawing as PartOperation>::Session>
What the editor keeps about a step while it is edited, beyond its
arguments, starting from the default whenever a step is opened.
Source§fn new_args(context: &Context<'_>) -> Self::Args
fn new_args(context: &Context<'_>) -> Self::Args
The arguments of a new step: sensible defaults, taking the part it
is inserted into into account.
Source§fn presentation(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
) -> Form
fn presentation( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, ) -> Form
What the editor shows while the step is edited. Never fails: an
editor needs the form most exactly when the arguments do not build,
so whatever is wrong is said in it.
Source§fn process_user_event(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
event: Event,
) -> (Self::Args, Self::EditingState)
fn process_user_event( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, event: Event, ) -> (Self::Args, Self::EditingState)
The step’s arguments and editing state after
event.Source§impl Operation for Drawing
impl Operation for Drawing
Source§const KIND: &'static str = <Drawing as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Drawing as ::geop_core_editor::part_operation::PartOperation>::KIND
The name programs store its steps under.
Source§type Args = <Drawing as PartOperation>::Args
type Args = <Drawing as PartOperation>::Args
What a step of the operation is given. It is saved with the program,
so it names targets and elements, never holds their internal ids.
Source§fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
Declares what the step produces, through
ctx (see
StepContext::produce): cheap, since it runs in every run. What
takes work is done in the makes, which run only when what they read
changed.Source§impl PartOperation for Drawing
impl PartOperation for Drawing
Source§fn new_args(_: &Context<'_>) -> DrawingArgs
fn new_args(_: &Context<'_>) -> DrawingArgs
Front, top, right and isometric views, third angle, on A3.
Source§fn run(ctx: &mut StepContext<'_>, args: &DrawingArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &DrawingArgs) -> GeopResult<()>
Records the drawing (see drawing), once what it refers to is
checked there in the part before it; it changes nothing else.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &DrawingArgs,
editing: &DrawingEditing,
) -> EditForm<'a, DrawingArgs, DrawingSession>
fn form<'a>( context: &'a Context<'a>, args: &DrawingArgs, editing: &DrawingEditing, ) -> EditForm<'a, DrawingArgs, DrawingSession>
The form of the drawing args of the part context is edited against:
its download, its sheet to annotate, its views and its title block.
Source§fn canvas(
context: &Context<'_>,
edit: Edit<'_, DrawingArgs, DrawingSession>,
event: &CanvasEvent,
)
fn canvas( context: &Context<'_>, edit: Edit<'_, DrawingArgs, DrawingSession>, event: &CanvasEvent, )
The pointer on the sheet of the part context is edited against: a
tool picks what the views show and puts down what it makes; a value is
dragged where it goes; Escape lets go of the picks, then of the tool;
Delete removes the annotations selected.
const INFO: OperationInfo
Source§type Args = DrawingArgs
type Args = DrawingArgs
What a step is given. It is saved with the program, so it names
targets and elements, never holds their internal ids.
Source§type Session = DrawingSession
type Session = DrawingSession
What the editor keeps while a step is edited besides its arguments
and the visuals selected:
() for most.Source§fn begin_event(session: &mut Self::Session)
fn begin_event(session: &mut Self::Session)
What the session forgets at the start of every event, before the
event is handled: nothing, by default.
impl StructuralPartialEq for Drawing
Auto Trait Implementations§
impl Freeze for Drawing
impl RefUnwindSafe for Drawing
impl Send for Drawing
impl Sync for Drawing
impl Unpin for Drawing
impl UnsafeUnpin for Drawing
impl UnwindSafe for Drawing
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
Mutably borrows from an owned value. Read more