Restructure how tool data is stored
This commit is contained in:
parent
d07eaf4207
commit
90374da228
37 changed files with 790 additions and 801 deletions
19
src/DrawingProgram/DrawingProgramEditToolBase.hpp
Normal file
19
src/DrawingProgram/DrawingProgramEditToolBase.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#include <include/core/SkCanvas.h>
|
||||
#include "../DrawData.hpp"
|
||||
#include "../DrawComponents/DrawComponent.hpp"
|
||||
|
||||
class DrawingProgram;
|
||||
class EditTool;
|
||||
|
||||
class DrawingProgramEditToolBase {
|
||||
public:
|
||||
DrawingProgramEditToolBase(DrawingProgram& initDrawP);
|
||||
virtual void edit_start(EditTool& editTool, const std::shared_ptr<DrawComponent>& a, std::any& prevData) = 0;
|
||||
virtual void commit_edit_updates(const std::shared_ptr<DrawComponent>& a, std::any& prevData) = 0;
|
||||
virtual bool edit_update(const std::shared_ptr<DrawComponent>& a) = 0;
|
||||
virtual bool edit_gui(const std::shared_ptr<DrawComponent>& a) = 0;
|
||||
virtual ~DrawingProgramEditToolBase();
|
||||
protected:
|
||||
DrawingProgram& drawP;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue