#include "DrawingProgramToolBase.hpp" #include "BrushTool.hpp" #include "EraserTool.hpp" #include "RectSelectTool.hpp" #include "LassoSelectTool.hpp" #include "RectDrawTool.hpp" #include "EllipseDrawTool.hpp" #include "TextBoxTool.hpp" #include "InkDropperTool.hpp" #include "ScreenshotTool.hpp" #include "EditTool.hpp" DrawingProgramToolBase::DrawingProgramToolBase(DrawingProgram& initDrawP): drawP(initDrawP) {} DrawingProgramToolBase::~DrawingProgramToolBase() {} std::unique_ptr DrawingProgramToolBase::allocate_tool_type(DrawingProgram& drawP, DrawingProgramToolType t) { switch(t) { case DrawingProgramToolType::BRUSH: return std::make_unique(drawP); case DrawingProgramToolType::ERASER: return std::make_unique(drawP); case DrawingProgramToolType::LASSOSELECT: return std::make_unique(drawP); case DrawingProgramToolType::RECTSELECT: return std::make_unique(drawP); case DrawingProgramToolType::RECTANGLE: return std::make_unique(drawP); case DrawingProgramToolType::ELLIPSE: return std::make_unique(drawP); case DrawingProgramToolType::TEXTBOX: return std::make_unique(drawP); case DrawingProgramToolType::INKDROPPER: return std::make_unique(drawP); case DrawingProgramToolType::SCREENSHOT: return std::make_unique(drawP); case DrawingProgramToolType::EDIT: return std::make_unique(drawP); } return nullptr; }