Trait Manipulate

Source
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§

Source

fn new() -> Self
where Self: Sized,

Source

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§

Source

fn on_activate(&mut self, world: World) -> World

Source

fn on_deactivate(&mut self, world: World) -> World

Source

fn on_filechange(&mut self, world: World, history: History) -> (World, History)

Source

fn on_always_active_zoom( &mut self, world: World, history: History, ) -> (World, History)

Source

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

Source

fn get_visibility(&self, _world: &World) -> Visibility

Implementors§