Trait rvlib::tools::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,
        history: History
    ) -> (World, History) { ... }
    fn on_deactivate(
        &mut self,
        world: World,
        history: History
    ) -> (World, History) { ... }
}

Required Methods§

source

fn new() -> Selfwhere 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, history: History) -> (World, History)

source

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

Implementors§