use crate::screenshot::action::{ActionContext, ActionResult, ScreenAction, ToolCategory};
pub struct UndoAction;
impl UndoAction {
pub fn new() -> Self {
Self
}
}
impl Default for UndoAction {
fn default() -> Self {
Self::new()
}
}
impl ScreenAction for UndoAction {
fn id(&self) -> &str {
"undo"
}
fn name(&self) -> &str {
"Undo"
}
fn icon_id(&self) -> Option<&str> {
Some("undo")
}
fn category(&self) -> ToolCategory {
ToolCategory::Action
}
fn on_click(&mut self, _ctx: &ActionContext) -> ActionResult {
ActionResult::Undo
}
}