#pragma once

#include <memory>
#include <vector>

class AbstractPainter;
class DrawingSurface;
class FontsManager;

enum class DrawingMode
{
    RASTER,
    GRAPH
};

class DrawingContext
{
public:
    DrawingContext(DrawingSurface* surface, FontsManager* fontsManager = nullptr, DrawingMode requestedDrawingMode = DrawingMode::GRAPH);

    static std::unique_ptr<DrawingContext> Create(DrawingSurface* surface, FontsManager* fontsManager, DrawingMode requestedDrawingMode);

    DrawingSurface* getSurface() const;

    FontsManager* getFontsManager() const;

    void paint();

    AbstractPainter* getPainter() const;

private:
    DrawingMode mDrawingMode;
    FontsManager* mFontsManager{nullptr};
    DrawingSurface* mSurface{nullptr};

    std::unique_ptr<AbstractPainter> mPainter;
};

using DrawingContextPtr = std::unique_ptr<DrawingContext>;
