![]() |
Ember
|
Factory class for creating different types of tabs. More...
#include <TabFactory.h>
Static Public Member Functions | |
| static std::unique_ptr< ITab > | CreateTab (TabType type, wxWindow *parent, MainFrame *mainFrame=nullptr) |
| Create a tab of the specified type. | |
| 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 bool | AllowMultipleInstances (TabType type) |
| Check if a tab type can be created multiple times within a single panel. | |
| static int | GetMaxGlobalInstances (TabType type) |
| Get the maximum number of instances allowed globally across all panels. | |
| static bool | IsTabAllowedInPanel (TabType tabType, EmberForge::PanelType panelType) |
| Check if a tab type is allowed in a specific panel type. | |
| static std::vector< TabType > | GetAvailableTabTypes () |
| Get all available tab types. | |
| static std::vector< TabType > | GetBottomPanelTabTypes () |
| Get tab types supported by the bottom panel. | |
| 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 TabType | StringToTabType (const std::string &str) |
| Convert string identifier to tab type. | |
Private Member Functions | |
| TabFactory ()=default | |
Factory class for creating different types of tabs.
This factory centralizes tab creation logic and makes it easy to:
Definition at line 28 of file TabFactory.h.
|
privatedefault |
|
static |
Check if a tab type can be created multiple times within a single panel.
| type | The tab type |
Definition at line 105 of file TabFactory.cpp.
|
static |
Create a tab of the specified type.
| type | The type of tab to create |
| parent | The parent window for the tab |
| mainFrame | Pointer to the main frame (for tabs that need it) |
Definition at line 12 of file TabFactory.cpp.
|
static |
Get all available tab types.
Definition at line 171 of file TabFactory.cpp.
|
static |
Get tab types supported by the bottom panel.
Definition at line 175 of file TabFactory.cpp.
|
static |
Get the maximum number of instances allowed globally across all panels.
| type | The tab type |
Examples:
Definition at line 122 of file TabFactory.cpp.
|
static |
Get tab types supported by the side panels.
Definition at line 179 of file TabFactory.cpp.
|
static |
Get the display name for a tab type.
| type | The tab type |
Definition at line 71 of file TabFactory.cpp.
|
static |
Get the tooltip text for a tab type.
| type | The tab type |
Definition at line 88 of file TabFactory.cpp.
|
static |
Check if a tab type is allowed in a specific panel type.
| tabType | The tab type to check |
| panelType | The panel type to check against |
This provides fine-grained control over which tabs can appear in which panels.
Definition at line 143 of file TabFactory.cpp.
|
static |
Convert string identifier to tab type.
| str | The string identifier |
Definition at line 198 of file TabFactory.cpp.
|
static |
Convert tab type to string identifier (for preferences storage)
| type | The tab type |
Definition at line 181 of file TabFactory.cpp.