7#include <wx/aui/auibook.h>
15 SidePanel(wxWindow *parent,
const wxString &panelName =
"Side Panel",
bool autoLayout =
true);
std::unique_ptr< ITab > ITabPtr
Panel(wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
Constructs the panel with optional name and style.
size_t GetTabCount() const
Returns the number of tabs.
virtual ITabPtr RemoveTab(int index)
Removes the tab at the given index; returns the removed tab.
bool HasTabWithName(const wxString &name) const
Returns true if a tab with the given name exists.
void OnTabChanged(wxAuiNotebookEvent &event)
std::vector< ITabPtr > m_tabs
virtual void ClearAllTabs()
Removes all tabs.
virtual int AddTab(ITabPtr tab)
Adds a tab and returns its index.
wxAuiNotebook * GetNotebook() const
Returns the underlying wxAuiNotebook.
virtual void CreateNotebook()
Hook: creates the notebook control. Override to customize.
ITab * GetActiveTab() const
Returns the currently active tab, or nullptr.
SidePanel(const SidePanel &)=delete
SidePanel(wxWindow *parent, const wxString &panelName="Side Panel", bool autoLayout=true)
Constructs the side panel with optional name and auto-layout flag.
virtual void OnTabRemoved(ITab *tab, int index)
Hook: called when a tab is removed.
void OnTabClosed(wxAuiNotebookEvent &event)
virtual void OnTabAdded(ITab *tab, int index)
Hook: called when a tab is added.
virtual bool SetActiveTab(int index)
Sets the active tab by index; returns true on success.
virtual void OnActiveTabChanged(ITab *tab, int index)
Hook: called when the active tab changes.
SidePanel & operator=(const SidePanel &)=delete
void CreateLayout() override
Creates the side panel layout with the notebook.
wxAuiNotebook * m_notebook
ITab * GetTab(int index) const
Returns the tab at the given index, or nullptr.
Interface for tab-based UI components in the application.