You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
|
4 years ago
|
/******************************************************************************
|
||
|
|
* File - panel_manager.h
|
||
|
|
* Author - Joey Pollack
|
||
|
|
* Date - 2022/02/07 (y/m/d)
|
||
|
|
* Mod Date - 2022/02/07 (y/m/d)
|
||
|
|
* Description - Manage the editor panels
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
#ifndef PANEL_MANAGER_H_
|
||
|
|
#define PANEL_MANAGER_H_
|
||
|
|
|
||
|
|
#include <utils/opRes.h>
|
||
|
|
#include "panels/mainPanel.h"
|
||
|
|
#include "panels/iPanel.h"
|
||
|
|
#include <map>
|
||
|
|
|
||
|
|
namespace lunarium{
|
||
|
|
class IGraphics;
|
||
|
|
namespace editor
|
||
|
|
{
|
||
|
|
class Editor;
|
||
|
|
class PanelManager
|
||
|
|
{
|
||
|
|
|
||
|
|
public:
|
||
|
|
static PanelManager& GetInstance();
|
||
|
|
static void FreeInstance();
|
||
|
|
OpRes Initialize(Editor* editor);
|
||
|
|
void Shutdown();
|
||
|
|
|
||
|
|
void OpenPanel(PanelType type);
|
||
|
|
void ClosePanel(PanelType type);
|
||
|
|
bool IsOpen(PanelType type);
|
||
|
|
Panel* GetPanel(PanelType type);
|
||
|
|
|
||
|
|
const MainPanel::DockSpaces& GetDockSpaces() const;
|
||
|
|
|
||
|
|
void OnTick(double delta);
|
||
|
|
void OnRender(lunarium::IGraphics* g);
|
||
|
|
|
||
|
|
private:
|
||
|
|
Editor* mpEditor;
|
||
|
|
MainPanel* mpMainPanel;
|
||
|
|
std::map<PanelType, Panel*> mPanels;
|
||
|
|
|
||
|
|
private:
|
||
|
|
static PanelManager* mpInstance;
|
||
|
|
PanelManager();
|
||
|
|
|
||
|
|
void CreatePanels();
|
||
|
|
void DestoryPanels();
|
||
|
|
|
||
|
|
};
|
||
|
|
}}
|
||
|
|
|
||
|
|
#endif // PANEL_MANAGER_H_
|