#pragma once

#include <functional>

#include "OperatingSystem.h"

namespace Framework
{
    class SelectionBox;
    class SelectionList;
    class ImageView;
    class ProgressBar;
    class Camera2D;
    class Window;
    class Button;
    class CheckBox;
    class LineDiagram;
    class M2DPreview;
    class Model2D;
    class Animation2D;
    class TextField;
    class ObjTable;
    class LiveLineDiagram;
    class UIMLView;
    class Font;
    class Screen;

    struct UIInitParam
    {
        Font* font;
        Screen* bildschirm;
        void* data;
    };

    struct UIInit
    {
        UIInitParam initParam;
        std::function<SelectionBox*(const UIInitParam& p)> createSelectionBox;
        std::function<SelectionList*(const UIInitParam& p)> createSelectionList;
        std::function<ImageView*(const UIInitParam& p)> createImageView;
        std::function<ProgressBar*(const UIInitParam& p)> createProgressBar;
        std::function<Camera2D*(const UIInitParam& p)> createCamera2D;
        std::function<Window*(const UIInitParam& p)> createWindow;
        std::function<Button*(const UIInitParam& p)> createButton;
        std::function<CheckBox*(const UIInitParam& p)> createCheckBox;
        std::function<LiveLineDiagram*(const UIInitParam& p)>
            createLiveLineDiagram;
        std::function<M2DPreview*(const UIInitParam& p)> createM2DPreview;
        std::function<Model2D*(const UIInitParam& p)> createModel2D;
        std::function<Animation2D*(const UIInitParam& p)> createAnimation2D;
        std::function<TextField*(const UIInitParam& p)> createTextField;
        std::function<ObjTable*(const UIInitParam& p)> createObjTable;
        std::function<LineDiagram*(const UIInitParam& p)> createLineDiagram;
        std::function<UIMLView*(const UIInitParam& p)> createUIMLView;
    };

    //! Returns a list of default initialization functions
    //! \param zFont The font to use (without increased reference counter)
    //! \param zScreen The screen to use (without increased reference counter)
    DLLEXPORT UIInit defaultUI(Font* zFont, Screen* zScreen);
} // namespace Framework