/******************************************************************************
*	File		-	iPanel.h
*	Author		-	Joey Pollack
*	Date		-	2021/11/01 (y/m/d)
*	Mod Date	-	2021/11/01 (y/m/d)
*	Description	-	Base class for all editor panels
******************************************************************************/

#ifndef PANEL_H_
#define PANEL_H_

namespace lunarium
{
    enum PanelType
    {
        PT_MAIN,
        PT_ABOUT,
        PT_SCENE_TREE,
        PT_SCENE_VIEW,
        PT_ASSET_BROWSER,
        PT_CONSOLE,
        PT_UNKNOWN,
    };

    class Panel
    {
    public:
        Panel(PanelType type, bool isOpen = false);
        PanelType GetType() const;

        virtual bool DoFrame() = 0;
        void SetOpen(bool isOpen);
        bool IsOpen();
        void GetPosition(int& x, int& y) const;
        void GetSize(int& w, int& h) const;

    protected:
        PanelType mType;
        bool mIsOpen;

        int mX;
        int mY;
        int mWidth;
        int mHeight;

    protected:
        void UpdateMetaInfo();
    };
}

#endif  // PANEL_H_