pub trait Manipulate {
// Required methods
fn new() -> Self
where Self: Sized;
fn events_tf(
&mut self,
world: World,
history: History,
events: &Events,
) -> (World, History);
// Provided methods
fn on_activate(&mut self, world: World) -> World { ... }
fn on_deactivate(&mut self, world: World) -> World { ... }
fn on_filechange(
&mut self,
world: World,
history: History,
) -> (World, History) { ... }
fn on_always_active_zoom(
&mut self,
world: World,
history: History,
) -> (World, History) { ... }
fn has_been_used(&self, _: &Events) -> Option<bool> { ... }
fn get_visibility(&self, _world: &World) -> Visibility { ... }
}
Required Methods§
fn new() -> Selfwhere
Self: Sized,
Sourcefn events_tf(
&mut self,
world: World,
history: History,
events: &Events,
) -> (World, History)
fn events_tf( &mut self, world: World, history: History, events: &Events, ) -> (World, History)
All events that are used by a tool are implemented in here. Use the macro make_tool_transform
. See, e.g.,
Zoom::events_tf
.
Provided Methods§
fn on_activate(&mut self, world: World) -> World
fn on_deactivate(&mut self, world: World) -> World
fn on_filechange(&mut self, world: World, history: History) -> (World, History)
fn on_always_active_zoom( &mut self, world: World, history: History, ) -> (World, History)
Sourcefn has_been_used(&self, _: &Events) -> Option<bool>
fn has_been_used(&self, _: &Events) -> Option<bool>
None -> the tool does not tell you if it has been used Some(true) -> the tool has been used Some(false) -> the tool has not been used