Change how tools get switched

This commit is contained in:
Yousef Khadadeh 2025-08-02 20:39:21 +03:00
parent 90374da228
commit c2301ae9f5
27 changed files with 68 additions and 96 deletions

View file

@ -24,7 +24,7 @@ class DrawingProgramToolBase {
virtual void gui_toolbox() = 0;
virtual void tool_update() = 0;
virtual void draw(SkCanvas* canvas, const DrawData& drawData) = 0;
virtual void reset_tool() = 0;
virtual void switch_tool(DrawingProgramToolType newTool) = 0;
virtual bool prevent_undo_or_redo() = 0;
virtual ~DrawingProgramToolBase();
static std::unique_ptr<DrawingProgramToolBase> allocate_tool_type(DrawingProgram& drawP, DrawingProgramToolType t);