Ember
Loading...
Searching...
No Matches
TabFactory.h
Go to the documentation of this file.
1#pragma once
2
4#include "Interfaces/ITab.h"
5#include <memory>
6#include <string>
7#include <wx/wx.h>
8
9// Forward declarations
10class MainFrame;
11
12namespace EmberForge {
13
18
29 public:
37 static std::unique_ptr<ITab> CreateTab(TabType type, wxWindow *parent, MainFrame *mainFrame = nullptr);
38
44 static wxString GetTabDisplayName(TabType type);
45
51 static wxString GetTabTooltip(TabType type);
52
58 static bool AllowMultipleInstances(TabType type);
59
70 static int GetMaxGlobalInstances(TabType type);
71
80 static bool IsTabAllowedInPanel(TabType tabType, EmberForge::PanelType panelType);
81
86 static std::vector<TabType> GetAvailableTabTypes();
87
92 static std::vector<TabType> GetBottomPanelTabTypes();
93
98 static std::vector<TabType> GetSidePanelTabTypes();
99
105 static std::string TabTypeToString(TabType type);
106
112 static TabType StringToTabType(const std::string &str);
113
114 private:
115 // Private constructor to prevent instantiation (static-only class)
116 TabFactory() = default;
117};
118
119} // namespace EmberForge
static wxString GetTabDisplayName(TabType type)
Get the display name for a tab type.
static wxString GetTabTooltip(TabType type)
Get the tooltip text for a tab type.
static std::unique_ptr< ITab > CreateTab(TabType type, wxWindow *parent, MainFrame *mainFrame=nullptr)
Create a tab of the specified type.
static std::vector< TabType > GetSidePanelTabTypes()
Get tab types supported by the side panels.
static std::string TabTypeToString(TabType type)
Convert tab type to string identifier (for preferences storage)
static int GetMaxGlobalInstances(TabType type)
Get the maximum number of instances allowed globally across all panels.
static std::vector< TabType > GetAvailableTabTypes()
Get all available tab types.
static bool IsTabAllowedInPanel(TabType tabType, EmberForge::PanelType panelType)
Check if a tab type is allowed in a specific panel type.
static bool AllowMultipleInstances(TabType type)
Check if a tab type can be created multiple times within a single panel.
static TabType StringToTabType(const std::string &str)
Convert string identifier to tab type.
static std::vector< TabType > GetBottomPanelTabTypes()
Get tab types supported by the bottom panel.
Main application window for EmberForge.
Definition MainFrame.h:67
PanelType
Defines the type of panel in the UI hierarchy.
TabType
Enumeration of available tab types.
Definition TabFactory.h:17