pub trait EditorTool: Send + Sync {
// Required methods
fn new() -> Self
where Self: Sized;
fn id(&self) -> TheId;
fn info(&self) -> String;
fn icon_name(&self) -> String;
// Provided methods
fn rgba_view_mode(&self) -> Option<TheRGBAViewMode> { ... }
fn accel(&self) -> Option<char> { ... }
fn help_url(&self) -> Option<String> { ... }
fn activate(&mut self) { ... }
fn deactivate(&mut self) { ... }
fn handle_event(
&mut self,
event: &TheEvent,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
server_ctx: &mut ServerContext,
) -> bool { ... }
fn get_undo_atom(&mut self, project: &Project) -> Option<Box<dyn Any>> { ... }
}Expand description
Tool trait for dock editors (like tile editor, tilemap editor, etc.)