[][src]Trait orasis_plugin::ImageEditorPlugin

pub trait ImageEditorPlugin: Send {
    fn setup(&mut self, emitter: Sender<&Event>);
fn id(&self) -> String;
fn activate(&mut self, canvas: &VirtualCanvas);
fn draw(&self, canvas: &mut VirtualCanvas);
fn act(&mut self, ev: &Event, canvas: &mut VirtualCanvas) -> bool;
fn deactivate(&mut self); }

Required methods

fn setup(&mut self, emitter: Sender<&Event>)

Store emitter to be able to send events later.

fn id(&self) -> String

Plugin-unique identifier. May be used in EventData.target_id.

fn activate(&mut self, canvas: &VirtualCanvas)

Plugin is starting to be used.

fn draw(&self, canvas: &mut VirtualCanvas)

Plugin may draw some additional overlay there.

fn act(&mut self, ev: &Event, canvas: &mut VirtualCanvas) -> bool

Return value: whether this plugin consumes the event.

fn deactivate(&mut self)

Plugin is deactivated. It may be activated again later.

Loading content...

Implementors

Loading content...