Ember
Loading...
Searching...
No Matches
PanelDescriptor.h
Go to the documentation of this file.
1#pragma once
2
3#include <wx/wx.h>
4
5// Forward declaration
6class SidePanel;
7
8namespace EmberForge {
9
13enum class PanelType {
14 LeftPanel, // Main left sidebar
15 RightPanel, // Main right sidebar
16 BottomPanel // Main bottom panel
17};
18
26 public:
27 explicit PanelDescriptor(PanelType type, int hierarchyLevel = 0, PanelDescriptor *parent = nullptr)
28 : m_type(type), m_hierarchyLevel(hierarchyLevel), m_parent(parent) {}
29
33 PanelType GetType() const { return m_type; }
34
38 int GetHierarchyLevel() const { return m_hierarchyLevel; }
39
43 PanelDescriptor *GetParent() const { return m_parent; }
44
48 wxString GetDisplayName() const {
49 switch (m_type) {
51 return "Left Panel";
53 return "Right Panel";
55 return "Bottom Panel";
56 default:
57 return "Unknown Panel";
58 }
59 }
60
64 wxString GetPaneName() const {
65 switch (m_type) {
67 return "left_panel";
69 return "right_panel";
71 return "bottom_panel";
72 default:
73 return "unknown_panel";
74 }
75 }
76
77 private:
81};
82
83} // namespace EmberForge
PanelDescriptor(PanelType type, int hierarchyLevel=0, PanelDescriptor *parent=nullptr)
PanelType GetType() const
Get the panel type.
PanelDescriptor * GetParent() const
Get the parent panel descriptor (nullptr for main panels)
wxString GetDisplayName() const
Get a display name for this panel type.
wxString GetPaneName() const
Get the AUI pane name for this panel (used by wxAUI)
int GetHierarchyLevel() const
Get the hierarchy level (0 = main panel)
PanelType
Defines the type of panel in the UI hierarchy.