#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>;
