Trait vst2::editor::Editor
[−]
[src]
pub trait Editor { fn size(&self) -> (i32, i32); fn position(&self) -> (i32, i32); fn open(&mut self, window: *mut c_void); fn is_open(&mut self) -> bool; fn idle(&mut self) { ... } fn close(&mut self) { ... } fn set_knob_mode(&mut self, mode: KnobMode) -> bool { ... } fn key_up(&mut self, keycode: KeyCode) -> bool { ... } fn key_down(&mut self, keycode: KeyCode) -> bool { ... } }
Implemented by plugin editors.
Required Methods
fn size(&self) -> (i32, i32)
Get the size of the editor window.
fn position(&self) -> (i32, i32)
Get the coordinates of the editor window.
fn open(&mut self, window: *mut c_void)
Called when the editor window is opened. window
is a platform dependent window pointer
(e.g. HWND
on Windows, WindowRef
on OSX, Window
on X11/Linux).
fn is_open(&mut self) -> bool
Return whether the window is currently open.
Provided Methods
fn idle(&mut self)
Editor idle call. Called by host.
fn close(&mut self)
Called when the editor window is closed.
fn set_knob_mode(&mut self, mode: KnobMode) -> bool
Set the knob mode for this editor (if supported by host).
Return true if the knob mode was set.
fn key_up(&mut self, keycode: KeyCode) -> bool
Recieve key up event. Return true if the key was used.
fn key_down(&mut self, keycode: KeyCode) -> bool
Receive key down event. Return true if the key was used.