#pragma once

#include <memory>
#include "IFontEngine.h"
#include "FontsManager.h"
#include "FontGlyph.h"

namespace mt
{
    class Window;
}

class DesktopManager;
class FontsManager;

class AbstractUIInterface
{
public:

    AbstractUIInterface(DesktopManager* desktopManager, std::unique_ptr<FontsManager> fontsManager, bool useHardware = false)
        : mDesktopManager(desktopManager),
          mUseHardwareRendering(useHardware),
          mFontsManager(std::move(fontsManager))
    {
    }

    virtual ~AbstractUIInterface() = default;

    virtual void loop() = 0;

    virtual void showWindow(mt::Window* window) = 0;

    virtual void addWindow(mt::Window* window) = 0;

protected:
    virtual void initialize() = 0;
    virtual void shutDown() = 0;

    virtual void initializeHardwareRendering() {};

    DesktopManager* mDesktopManager{nullptr};
    std::unique_ptr<FontsManager> mFontsManager;

    bool mUseHardwareRendering{false};
};
