stuff-from-scratch/apps/notes_tk/canvas/CanvasView.h
2022-12-05 10:59:45 +00:00

29 lines
544 B
C++

#pragma once
#include "Widget.h"
#include "CanvasElements.h"
class CanvasController;
class CanvasDrawingArea;
class CanvasView : public Widget
{
public:
CanvasView();
~CanvasView();
static std::unique_ptr<CanvasView> Create();
private:
void onDrawCommandChanged(CanvasDrawCommand command);
void initialize();
std::unique_ptr<Widget> initializeCacheButtons();
std::unique_ptr<CanvasController> mController;
CanvasDrawingArea* mDrawingArea{nullptr};
};
using CanvasViewPtr = std::unique_ptr<CanvasView>;