Ember
Loading...
Searching...
No Matches
LeftSidePanel Class Reference

Left sidebar panel specialized for left-side functionality. More...

#include <LeftSidePanel.h>

Inheritance diagram for LeftSidePanel:
SidePanel EmberUI::SidePanel EmberUI::Panel IPanel

Public Member Functions

 LeftSidePanel (wxWindow *parent, MainFrame *mainFrame=nullptr)
virtual ~LeftSidePanel ()
wxString GetTitle () const override
 Returns the panel title.
wxString GetPanelType () const override
 Returns the panel type identifier.
void ApplyPreferences () override
void SaveState () override
void RestoreState () override
Public Member Functions inherited from SidePanel
 SidePanel (wxWindow *parent, MainFrame *mainFrame=nullptr, const wxString &panelName="Side Panel", EmberForge::PanelType panelType=EmberForge::PanelType::LeftPanel, EmberForge::PanelDescriptor *parentDescriptor=nullptr)
virtual ~SidePanel ()
void FinishSetup ()
int AddTab (ITabPtr tab) override
 Adds a tab and returns its index.
ITabPtr RemoveTab (int index) override
 Removes the tab at the given index; returns the removed tab.
bool SetActiveTab (int index) override
 Sets the active tab by index; returns true on success.
void ClearAllTabs () override
 Removes all tabs.
EmberForge::CustomAuiNotebookGetCustomNotebook () const
void ResetToDefaultTab (EmberForge::TabType defaultTabType)
void ResetToDefaultTabs (const std::vector< EmberForge::TabType > &defaultTabTypes)
void SetTabBarButtonsEnabled (bool enabled)
bool AreTabBarButtonsEnabled () const
void ToggleTabBarButtons ()
void SetPanelName (const wxString &name)
const EmberForge::PanelDescriptorGetPanelDescriptor () const
void SetPanelDescriptor (const EmberForge::PanelDescriptor &descriptor)
Public Member Functions inherited from EmberUI::SidePanel
 SidePanel (wxWindow *parent, const wxString &panelName="Side Panel", bool autoLayout=true)
 Constructs the side panel with optional name and auto-layout flag.
ITabGetTab (int index) const
 Returns the tab at the given index, or nullptr.
ITabGetActiveTab () const
 Returns the currently active tab, or nullptr.
size_t GetTabCount () const
 Returns the number of tabs.
bool HasTabWithName (const wxString &name) const
 Returns true if a tab with the given name exists.
wxAuiNotebook * GetNotebook () const
 Returns the underlying wxAuiNotebook.
Public Member Functions inherited from EmberUI::Panel
 Panel (wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
 Constructs the panel with optional name and style.
virtual ~Panel ()
wxPanel * GetPanel () override
 Returns this panel as wxPanel pointer.
void Initialize () override
 Initializes the panel layout and appearance.
void Refresh () override
 Refreshes panel content.
void OnActivated () override
 Called when the panel is activated.
void OnDeactivated () override
 Called when the panel is deactivated.
void Cleanup () override
 Cleans up panel resources.
bool IsValid () const override
 Returns true if the panel has been initialized.
wxString SerializeState () const override
 Serializes panel state to a string.
void DeserializeState (const wxString &state) override
 Restores panel state from a serialized string.
bool HasUnsavedChanges () const override
 Returns true if there are unsaved changes.
bool Save () override
 Saves panel state; returns true on success.
bool SupportsOperation (const wxString &operation) const override
 Returns true if the panel supports the given operation.
bool ExecuteOperation (const wxString &operation, const wxString &parameter="") override
 Executes a named operation with optional parameter.
wxString GetName () const override
 Returns the panel name.
void SetName (const wxString &name) override
 Sets the panel name.
void SetTitle (const wxString &title)
 Sets the panel title.
void SetPanelType (const wxString &type)
 Sets the panel type identifier.
Public Member Functions inherited from IPanel
virtual ~IPanel ()=default

Protected Member Functions

bool GetRememberLastTab () const override
const std::vector< std::string > & GetLastOpenTabs () const override
std::string GetLastActiveTab () const override
std::string GetDefaultActiveTab () const override
void OnPanelSpecificSetup () override
void OnAddTabButtonClicked (wxCommandEvent &event) override
std::vector< EmberForge::TabTypeGetSupportedTabTypes () const override
Protected Member Functions inherited from SidePanel
void CreateLayout () override
 Creates the side panel layout with the notebook.
void CreateNotebook () override
 Hook: creates the notebook control. Override to customize.
virtual void SetupEventHandlers ()
void RestoreAndEnsureTabs ()
void DoCreateLayout ()
void DoCreateNotebook ()
void DoSetupEventHandlers ()
void OnTabChanged (wxAuiNotebookEvent &event)
void OnTabClosed (wxAuiNotebookEvent &event)
void OnAddTabButtonClickedInternal (wxCommandEvent &event)
virtual void OnMenuButtonClicked (wxCommandEvent &event)
void OnHidePanelClicked (wxCommandEvent &event)
void OnPanelPreferencesClicked (wxCommandEvent &event)
void OnTabBarAddButtonClicked (wxCommandEvent &event)
void OnTabBarMenuButtonClicked (wxCommandEvent &event)
void CreateAndAddTab (EmberForge::TabType tabType)
void ShowTabCreationMenu ()
Protected Member Functions inherited from EmberUI::SidePanel
virtual void OnTabAdded (ITab *tab, int index)
 Hook: called when a tab is added.
virtual void OnTabRemoved (ITab *tab, int index)
 Hook: called when a tab is removed.
virtual void OnActiveTabChanged (ITab *tab, int index)
 Hook: called when the active tab changes.
Protected Member Functions inherited from EmberUI::Panel
virtual void ApplyTheme ()
 Hook: applies theme colors and fonts. Override to customize.
virtual void UpdateContent ()
 Hook: updates displayed content. Override to refresh data.
virtual void HandleActivation ()
 Hook: handles panel activation. Override to customize.
virtual void HandleDeactivation ()
 Hook: handles panel deactivation. Override to customize.
virtual bool ValidateState () const
 Hook: validates panel state; returns true if valid.
void MarkChanged ()
 Marks the panel as having unsaved changes.
void MarkSaved ()
 Clears the unsaved-changes flag.
wxSizer * GetMainSizer () const
 Returns the main sizer for layout.
void SetMainSizer (wxSizer *sizer)
 Sets the main sizer.
virtual void OnPanelSize (wxSizeEvent &event)
 Hook: handles panel resize events.
virtual void OnPanelPaint (wxPaintEvent &event)
 Hook: handles panel paint events.

Private Types

enum  { ID_LEFT_PANEL_BASE = ID_BASE_LAST + 100 , ID_ADD_PROPERTIES_TAB }

Private Member Functions

void OnAddPropertiesTab (wxCommandEvent &event)
 wxDECLARE_EVENT_TABLE ()

Additional Inherited Members

Protected Types inherited from SidePanel
enum  BaseEventIDs {
  ID_BASE_NOTEBOOK = wxID_HIGHEST + 1000 , ID_BASE_HIDE_PANEL_MENU_ITEM , ID_BASE_PREFERENCES_MENU_ITEM , ID_BASE_ADD_TAB_BUTTON ,
  ID_BASE_MENU_BUTTON , ID_BASE_LAST
}
Protected Attributes inherited from SidePanel
MainFramem_mainFrame
wxString m_panelName
bool m_tabBarButtonsEnabled
bool m_isInitializing
EmberForge::PanelDescriptor m_descriptor
Protected Attributes inherited from EmberUI::SidePanel
wxAuiNotebook * m_notebook
std::vector< ITabPtrm_tabs
int m_activeTabIndex

Detailed Description

Left sidebar panel specialized for left-side functionality.

This panel contains tabs like Scene Hierarchy and potentially other tabs that can be moved between different panel containers. Now inherits from SidePanel for shared backend functionality while maintaining the ability to specialize left-side specific behavior.

Definition at line 25 of file LeftSidePanel.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_LEFT_PANEL_BASE 
ID_ADD_PROPERTIES_TAB 

Definition at line 58 of file LeftSidePanel.h.

Constructor & Destructor Documentation

◆ LeftSidePanel()

LeftSidePanel::LeftSidePanel ( wxWindow * parent,
MainFrame * mainFrame = nullptr )

◆ ~LeftSidePanel()

LeftSidePanel::~LeftSidePanel ( )
virtual

Definition at line 17 of file LeftSidePanel.cpp.

Member Function Documentation

◆ ApplyPreferences()

void LeftSidePanel::ApplyPreferences ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 61 of file LeftSidePanel.cpp.

◆ GetDefaultActiveTab()

std::string LeftSidePanel::GetDefaultActiveTab ( ) const
overrideprotectedvirtual

Implements SidePanel.

Definition at line 35 of file LeftSidePanel.cpp.

◆ GetLastActiveTab()

std::string LeftSidePanel::GetLastActiveTab ( ) const
overrideprotectedvirtual

Implements SidePanel.

Definition at line 30 of file LeftSidePanel.cpp.

◆ GetLastOpenTabs()

const std::vector< std::string > & LeftSidePanel::GetLastOpenTabs ( ) const
overrideprotectedvirtual

Implements SidePanel.

Definition at line 25 of file LeftSidePanel.cpp.

◆ GetPanelType()

wxString LeftSidePanel::GetPanelType ( ) const
inlineoverridevirtual

Returns the panel type identifier.

Implements SidePanel.

Definition at line 32 of file LeftSidePanel.h.

◆ GetRememberLastTab()

bool LeftSidePanel::GetRememberLastTab ( ) const
overrideprotectedvirtual

Implements SidePanel.

Definition at line 20 of file LeftSidePanel.cpp.

◆ GetSupportedTabTypes()

std::vector< EmberForge::TabType > LeftSidePanel::GetSupportedTabTypes ( ) const
overrideprotectedvirtual

Reimplemented from SidePanel.

Definition at line 52 of file LeftSidePanel.cpp.

◆ GetTitle()

wxString LeftSidePanel::GetTitle ( ) const
inlineoverridevirtual

Returns the panel title.

Implements SidePanel.

Definition at line 31 of file LeftSidePanel.h.

◆ OnAddPropertiesTab()

void LeftSidePanel::OnAddPropertiesTab ( wxCommandEvent & event)
private

Definition at line 56 of file LeftSidePanel.cpp.

◆ OnAddTabButtonClicked()

void LeftSidePanel::OnAddTabButtonClicked ( wxCommandEvent & event)
overrideprotectedvirtual

Reimplemented from SidePanel.

Definition at line 47 of file LeftSidePanel.cpp.

◆ OnPanelSpecificSetup()

void LeftSidePanel::OnPanelSpecificSetup ( )
overrideprotectedvirtual

Reimplemented from SidePanel.

Definition at line 41 of file LeftSidePanel.cpp.

◆ RestoreState()

void LeftSidePanel::RestoreState ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 129 of file LeftSidePanel.cpp.

◆ SaveState()

void LeftSidePanel::SaveState ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 83 of file LeftSidePanel.cpp.

◆ wxDECLARE_EVENT_TABLE()

LeftSidePanel::wxDECLARE_EVENT_TABLE ( )
private

The documentation for this class was generated from the following files: