Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
PanelManager Class Reference

#include <PanelManager.h>

Classes

struct  Panel
 

Public Member Functions

 PanelManager ()
 
virtual ~PanelManager ()
 
void Initialize ()
 
void Shutdown ()
 
void CreateLogWindow ()
 
void CreateObjectInspectorWindow ()
 
void CreateTreeViewWindow ()
 
void CreateInputsInspectorWindow ()
 
void CreateMainMenuWindow ()
 
void ShowPanel (const std::string &id)
 
void HidePanel (const std::string &id)
 
bool IsPanelVisible (const std::string &id) const
 
void AppendLog (const std::string &text)
 
void AttachToSDLWindow (SDL_Window *sdlWindow)
 
void HandleEvent (const SDL_Event *ev)
 
virtual void OnEvent (const Message &msg)
 

Static Public Member Functions

static PanelManagerGetInstance ()
 
static PanelManagerGet ()
 

Static Public Attributes

static int LogPanelWidth = 400
 
static int LogPanelHeight = 200
 
static int LogPanelPosX = 50
 
static int LogPanelPosY = 50
 
static int InspectorPanelWidth = 300
 
static int InspectorPanelHeight = 400
 
static int InspectorPanelPosX = 100
 
static int InspectorPanelPosY = 100
 
static int TreeViewPanelWidth = 300
 
static int TreeViewPanelHeight = 400
 
static int TreeViewPanelPosX = 150
 
static int TreeViewPanelPosY = 150
 

Private Member Functions

void CreatePanel (const std::string &id, const std::string &title)
 
void UpdateInputsInspectorList ()
 

Private Attributes

std::string name
 
std::unordered_map< std::string, Panelm_panels_
 
std::vector< std::string > m_pendingLogs_
 
std::mutex m_mutex_
 

Detailed Description

Definition at line 34 of file PanelManager.h.

Constructor & Destructor Documentation

◆ PanelManager()

PanelManager::PanelManager ( )

Definition at line 48 of file PanelManager.cpp.

References name.

◆ ~PanelManager()

PanelManager::~PanelManager ( )
virtual

Definition at line 53 of file PanelManager.cpp.

References Shutdown(), and SYSTEM_LOG.

+ Here is the call graph for this function:

Member Function Documentation

◆ AppendLog()

void PanelManager::AppendLog ( const std::string &  text)

Definition at line 271 of file PanelManager.cpp.

References GetComponentTypeID_Static(), and m_panels_.

Referenced by SystemLogSink::AppendToLogWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AttachToSDLWindow()

void PanelManager::AttachToSDLWindow ( SDL_Window sdlWindow)

Referenced by SDL_AppInit().

+ Here is the caller graph for this function:

◆ CreateInputsInspectorWindow()

void PanelManager::CreateInputsInspectorWindow ( )

◆ CreateLogWindow()

void PanelManager::CreateLogWindow ( )

Definition at line 174 of file PanelManager.cpp.

References CreatePanel(), GetComponentTypeID_Static(), LogPanelHeight, LogPanelPosX, LogPanelPosY, LogPanelWidth, and m_panels_.

+ Here is the call graph for this function:

◆ CreateMainMenuWindow()

void PanelManager::CreateMainMenuWindow ( )

Definition at line 203 of file PanelManager.cpp.

References CreatePanel(), GetComponentTypeID_Static(), IsPanelVisible(), and m_panels_.

+ Here is the call graph for this function:

◆ CreateObjectInspectorWindow()

void PanelManager::CreateObjectInspectorWindow ( )

Definition at line 193 of file PanelManager.cpp.

References CreatePanel().

+ Here is the call graph for this function:

◆ CreatePanel()

void PanelManager::CreatePanel ( const std::string &  id,
const std::string &  title 
)
private

Definition at line 116 of file PanelManager.cpp.

References GetComponentTypeID_Static(), PanelManager::Panel::id, and m_panels_.

Referenced by CreateInputsInspectorWindow(), CreateLogWindow(), CreateMainMenuWindow(), CreateObjectInspectorWindow(), and CreateTreeViewWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateTreeViewWindow()

void PanelManager::CreateTreeViewWindow ( )

Definition at line 198 of file PanelManager.cpp.

References CreatePanel().

+ Here is the call graph for this function:

◆ Get()

static PanelManager & PanelManager::Get ( )
inlinestatic

Definition at line 41 of file PanelManager.h.

References GetInstance().

Referenced by SDL_AppInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstance()

PanelManager & PanelManager::GetInstance ( )
static

Definition at line 59 of file PanelManager.cpp.

References GetComponentTypeID_Static().

Referenced by SystemLogSink::AppendToLogWindow(), and Get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleEvent()

void PanelManager::HandleEvent ( const SDL_Event ev)

Definition at line 286 of file PanelManager.cpp.

References GetComponentTypeID_Static(), HidePanel(), IsPanelVisible(), m_panels_, ShowPanel(), SYSTEM_LOG, and UpdateInputsInspectorList().

+ Here is the call graph for this function:

◆ HidePanel()

void PanelManager::HidePanel ( const std::string &  id)

Definition at line 253 of file PanelManager.cpp.

References GetComponentTypeID_Static(), and m_panels_.

Referenced by HandleEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize()

void PanelManager::Initialize ( )

◆ IsPanelVisible()

bool PanelManager::IsPanelVisible ( const std::string &  id) const

Definition at line 264 of file PanelManager.cpp.

References GetComponentTypeID_Static(), and m_panels_.

Referenced by CreateMainMenuWindow(), HandleEvent(), and OnEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnEvent()

void PanelManager::OnEvent ( const Message msg)
virtual

◆ ShowPanel()

void PanelManager::ShowPanel ( const std::string &  id)

Definition at line 242 of file PanelManager.cpp.

References GetComponentTypeID_Static(), and m_panels_.

Referenced by HandleEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Shutdown()

void PanelManager::Shutdown ( )

Definition at line 91 of file PanelManager.cpp.

References GetComponentTypeID_Static(), and m_panels_.

Referenced by ~PanelManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateInputsInspectorList()

void PanelManager::UpdateInputsInspectorList ( )
private

Definition at line 483 of file PanelManager.cpp.

References InputsManager::Get(), GetComponentTypeID_Static(), InputsManager::GetDevicesStatusUpdate(), and m_panels_.

Referenced by CreateInputsInspectorWindow(), HandleEvent(), and OnEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ InspectorPanelHeight

int PanelManager::InspectorPanelHeight = 400
static

Definition at line 77 of file PanelManager.h.

Referenced by CreateInputsInspectorWindow(), and LoadOlympeConfig().

◆ InspectorPanelPosX

int PanelManager::InspectorPanelPosX = 100
static

Definition at line 78 of file PanelManager.h.

Referenced by CreateInputsInspectorWindow(), and LoadOlympeConfig().

◆ InspectorPanelPosY

int PanelManager::InspectorPanelPosY = 100
static

Definition at line 79 of file PanelManager.h.

Referenced by CreateInputsInspectorWindow(), and LoadOlympeConfig().

◆ InspectorPanelWidth

int PanelManager::InspectorPanelWidth = 300
static

Definition at line 76 of file PanelManager.h.

Referenced by CreateInputsInspectorWindow(), and LoadOlympeConfig().

◆ LogPanelHeight

int PanelManager::LogPanelHeight = 200
static

Definition at line 72 of file PanelManager.h.

Referenced by CreateLogWindow(), and LoadOlympeConfig().

◆ LogPanelPosX

int PanelManager::LogPanelPosX = 50
static

Definition at line 73 of file PanelManager.h.

Referenced by CreateLogWindow(), and LoadOlympeConfig().

◆ LogPanelPosY

int PanelManager::LogPanelPosY = 50
static

Definition at line 74 of file PanelManager.h.

Referenced by CreateLogWindow(), and LoadOlympeConfig().

◆ LogPanelWidth

int PanelManager::LogPanelWidth = 400
static

Definition at line 71 of file PanelManager.h.

Referenced by CreateLogWindow(), and LoadOlympeConfig().

◆ m_mutex_

std::mutex PanelManager::m_mutex_
mutableprivate

Definition at line 108 of file PanelManager.h.

◆ m_panels_

std::unordered_map<std::string, Panel> PanelManager::m_panels_
private

◆ m_pendingLogs_

std::vector<std::string> PanelManager::m_pendingLogs_
private

Definition at line 107 of file PanelManager.h.

◆ name

std::string PanelManager::name
private

Definition at line 87 of file PanelManager.h.

Referenced by PanelManager().

◆ TreeViewPanelHeight

int PanelManager::TreeViewPanelHeight = 400
static

Definition at line 82 of file PanelManager.h.

Referenced by LoadOlympeConfig().

◆ TreeViewPanelPosX

int PanelManager::TreeViewPanelPosX = 150
static

Definition at line 83 of file PanelManager.h.

Referenced by LoadOlympeConfig().

◆ TreeViewPanelPosY

int PanelManager::TreeViewPanelPosY = 150
static

Definition at line 84 of file PanelManager.h.

Referenced by LoadOlympeConfig().

◆ TreeViewPanelWidth

int PanelManager::TreeViewPanelWidth = 300
static

Definition at line 81 of file PanelManager.h.

Referenced by LoadOlympeConfig().


The documentation for this class was generated from the following files: