10#include <wx/aui/auibook.h>
11#include <wx/aui/framemanager.h>
22 SidePanel(wxWindow *parent,
MainFrame *mainFrame =
nullptr,
const wxString &panelName =
"Side Panel",
std::unique_ptr< ITab > ITabPtr
Custom wxAuiNotebook that integrates Add Tab and Menu buttons into the tab bar.
Descriptor that tracks panel metadata.
wxString GetDisplayName() const
Get a display name for this panel type.
Tabbed side panel using wxAuiNotebook.
wxAuiNotebook * m_notebook
Main application window for EmberForge.
wxString GetPanelType() const override=0
Returns the panel type identifier.
void SetTabBarButtonsEnabled(bool enabled)
@ ID_BASE_PREFERENCES_MENU_ITEM
@ ID_BASE_HIDE_PANEL_MENU_ITEM
virtual void ApplyPreferences()
bool SetActiveTab(int index) override
Sets the active tab by index; returns true on success.
void OnTabChanged(wxAuiNotebookEvent &event)
virtual const std::vector< std::string > & GetLastOpenTabs() const =0
void OnHidePanelClicked(wxCommandEvent &event)
wxString GetTitle() const override=0
Returns the panel title.
void ResetToDefaultTab(EmberForge::TabType defaultTabType)
void RestoreAndEnsureTabs()
bool m_tabBarButtonsEnabled
void ClearAllTabs() override
Removes all tabs.
virtual void SetupEventHandlers()
void OnPanelPreferencesClicked(wxCommandEvent &event)
void SetPanelName(const wxString &name)
EmberForge::CustomAuiNotebook * GetCustomNotebook() const
virtual void OnMenuButtonClicked(wxCommandEvent &event)
virtual void OnPanelSpecificSetup()
void DoSetupEventHandlers()
void OnAddTabButtonClickedInternal(wxCommandEvent &event)
SidePanel(wxWindow *parent, MainFrame *mainFrame=nullptr, const wxString &panelName="Side Panel", EmberForge::PanelType panelType=EmberForge::PanelType::LeftPanel, EmberForge::PanelDescriptor *parentDescriptor=nullptr)
void OnTabClosed(wxAuiNotebookEvent &event)
virtual std::string GetLastActiveTab() const =0
void SetPanelDescriptor(const EmberForge::PanelDescriptor &descriptor)
void ShowTabCreationMenu()
const EmberForge::PanelDescriptor & GetPanelDescriptor() const
void ToggleTabBarButtons()
bool AreTabBarButtonsEnabled() const
virtual void OnAddTabButtonClicked(wxCommandEvent &event)
virtual void RestoreState()
void OnTabBarMenuButtonClicked(wxCommandEvent &event)
virtual bool GetRememberLastTab() const =0
void CreateAndAddTab(EmberForge::TabType tabType)
EmberForge::PanelDescriptor m_descriptor
void ResetToDefaultTabs(const std::vector< EmberForge::TabType > &defaultTabTypes)
void CreateNotebook() override
Hook: creates the notebook control. Override to customize.
virtual std::vector< EmberForge::TabType > GetSupportedTabTypes() const
void OnTabBarAddButtonClicked(wxCommandEvent &event)
void CreateLayout() override
Creates the side panel layout with the notebook.
int AddTab(ITabPtr tab) override
Adds a tab and returns its index.
virtual std::string GetDefaultActiveTab() const =0
ITabPtr RemoveTab(int index) override
Removes the tab at the given index; returns the removed tab.
PanelType
Defines the type of panel in the UI hierarchy.
TabType
Enumeration of available tab types.