pub struct Editors { /* private fields */ }Expand description
The operations an editor offers, by name, in the order they were added:
the order an editor offers them in within a group and tier. The runner
its programs run on is given the same operations by the
crate::registry::Registry that holds them.
Implementations§
Source§impl Editors
impl Editors
Sourcepub fn with<O: Editable>(self, operation: O) -> GeopResult<Self>
pub fn with<O: Editable>(self, operation: O) -> GeopResult<Self>
Adds operation. Fails if an operation of its name is already there.
Sourcepub fn operations(&self) -> GeopResult<OperationRegistry>
pub fn operations(&self) -> GeopResult<OperationRegistry>
The operations, as a program runner runs them.
Sourcepub fn new_step<'a>(
&self,
runner: &Runner,
part: impl Into<Against<'a>>,
program: &Program,
kind: &str,
id: &str,
before: Option<&str>,
) -> GeopResult<ProgramStep>
pub fn new_step<'a>( &self, runner: &Runner, part: impl Into<Against<'a>>, program: &Program, kind: &str, id: &str, before: Option<&str>, ) -> GeopResult<ProgramStep>
A new step of the operation kind, id, to insert into program
before its step before, or after its last.
Sourcepub fn initial_editing(
&self,
program: &Program,
step: &str,
) -> GeopResult<Box<dyn Any>>
pub fn initial_editing( &self, program: &Program, step: &str, ) -> GeopResult<Box<dyn Any>>
The editing state the step step starts with.
Sourcepub fn presentation<'a>(
&self,
runner: &Runner,
part: impl Into<Against<'a>>,
program: &Program,
step: &str,
editing: &dyn Any,
) -> GeopResult<Form>
pub fn presentation<'a>( &self, runner: &Runner, part: impl Into<Against<'a>>, program: &Program, step: &str, editing: &dyn Any, ) -> GeopResult<Form>
What the editor shows while the step step is edited.
Sourcepub fn listed<'a>(
&self,
runner: &Runner,
part: impl Into<Against<'a>>,
program: &Program,
step: &str,
) -> GeopResult<Form>
pub fn listed<'a>( &self, runner: &Runner, part: impl Into<Against<'a>>, program: &Program, step: &str, ) -> GeopResult<Form>
What a list of steps shows of the step step: its form, as a step
just opened shows it, against the part before it — and never what
it built, so that a list of every step asks nothing of what each
built. Counted (forms_listed).
Sourcepub fn process_user_event<'a>(
&self,
runner: &Runner,
part: impl Into<Against<'a>>,
program: &Program,
step: &str,
editing: &dyn Any,
event: Event,
scene: Option<&dyn Scene>,
) -> GeopResult<Edited>
pub fn process_user_event<'a>( &self, runner: &Runner, part: impl Into<Against<'a>>, program: &Program, step: &str, editing: &dyn Any, event: Event, scene: Option<&dyn Scene>, ) -> GeopResult<Edited>
The arguments and editing state of the step step after event,
with what the pointer is over found in scene, if one is given.