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

30 lines
496 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();
2023-12-21 09:18:44 +00:00
static Ptr<CanvasView> Create();
2022-11-18 15:11:54 +00:00
private:
2022-12-05 10:59:45 +00:00
void onDrawCommandChanged(CanvasDrawCommand command);
2022-11-18 15:11:54 +00:00
void initialize();
2023-12-21 09:18:44 +00:00
Ptr<Widget> initializeCacheButtons();
2022-11-18 15:11:54 +00:00
2023-12-21 09:18:44 +00:00
Ptr<CanvasController> mController;
2022-12-05 10:59:45 +00:00
CanvasDrawingArea* mDrawingArea{nullptr};
2022-11-18 15:11:54 +00:00
};
2023-12-21 09:18:44 +00:00
using CanvasViewPtr = Ptr<CanvasView>;