From a359219e33fdf3afb5ddfbb084563054a947b106 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 12 Feb 2022 19:13:34 +0100 Subject: Create project --- src/CGEditor.hpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/CGEditor.hpp (limited to 'src/CGEditor.hpp') diff --git a/src/CGEditor.hpp b/src/CGEditor.hpp new file mode 100644 index 0000000..d30d05e --- /dev/null +++ b/src/CGEditor.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include "Types.hpp" +#include "components/Margin.hpp" +#include "components/Menu.hpp" +#include "components/MoveTable.hpp" +#include "components/Scrollbar.hpp" + +#include + +namespace cgeditor { + +class CGEditor { + /// @brief Prepare element for drawing and draw + void CallDrawElement(Element); + /// @brief Draw all elements of a component + void DrawComponent(Component *); + + Scrollbar *SBV, *SBH; + MoveTable *MT; + Margin *MA; + Menu *ME; + +protected: + Status status; + ///@brief Draw the Chess Game Editor on the canvas using current status + void Draw(); + /// @brief Draw an element on the canvas + virtual void DrawElement(const Element &) = 0; + /// @brief Handle event that occured during editor drawing + virtual void HandleEvent(const Event &) = 0; + +public: + CGEditor(); + ~CGEditor(); +}; +} // namespace cgeditor \ No newline at end of file -- cgit v1.2.3