stuff-from-scratch/apps/notes_tk/canvas/CanvasView.h

30 lines
544 B
C
Raw Normal View History

2022-11-18 15:11:54 +00:00
#pragma once
#include "Widget.h"
2022-12-05 10:59:45 +00:00
#include "CanvasElements.h"
2022-11-18 15:11:54 +00:00
class CanvasController;
2022-12-05 10:59:45 +00:00
class CanvasDrawingArea;
2022-11-18 15:11:54 +00:00
class CanvasView : public Widget
{
public:
CanvasView();
~CanvasView();
static std::unique_ptr<CanvasView> Create();
private:
2022-12-05 10:59:45 +00:00
void onDrawCommandChanged(CanvasDrawCommand command);
2022-11-18 15:11:54 +00:00
void initialize();
std::unique_ptr<Widget> initializeCacheButtons();
std::unique_ptr<CanvasController> mController;
2022-12-05 10:59:45 +00:00
CanvasDrawingArea* mDrawingArea{nullptr};
2022-11-18 15:11:54 +00:00
};
using CanvasViewPtr = std::unique_ptr<CanvasView>;