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

Bottom dockable panel for logs and output. More...

#include <BottomPanel.h>

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

Public Member Functions

 BottomPanel (wxWindow *parent, MainFrame *mainFrame)
virtual ~BottomPanel ()
wxString GetTitle () const override
 Returns the panel title.
wxString GetPanelType () const override
 Returns the panel type identifier.
wxTextCtrl * GetLogOutput () const
EmberForge::LogPanel * GetLogPanel () const
EmberForge::PerformancePanelGetPerformancePanel () const
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_BOTTOM_PANEL_BASE = ID_BASE_LAST + 300 , ID_ADD_LOG_TAB , ID_ADD_PERFORMANCE_TAB , ID_ADD_FILE_EXPLORER_TAB }

Private Member Functions

void OnAddLogTab (wxCommandEvent &event)
void OnAddPerformanceTab (wxCommandEvent &event)
void OnAddFileExplorerTab (wxCommandEvent &event)
 wxDECLARE_EVENT_TABLE ()

Private Attributes

wxTextCtrl * m_logOutput
EmberForge::LogPanel * m_logPanel
EmberForge::PerformancePanelm_performancePanel

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

Bottom dockable panel for logs and output.

BottomPanel is the bottom dock area containing:

  • Log output tab for application messages
  • Performance monitoring panel
  • File explorer (optional)

The panel provides a central location for viewing application output and monitoring system performance.

Default Tabs

  • Logs: Application log messages with filtering
  • Performance: CPU, memory, and frame rate monitoring

State Persistence

The panel saves and restores:

  • Active tab selection
  • Log filter settings
  • Performance chart visibility

Definition at line 45 of file BottomPanel.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_BOTTOM_PANEL_BASE 
ID_ADD_LOG_TAB 
ID_ADD_PERFORMANCE_TAB 
ID_ADD_FILE_EXPLORER_TAB 

Definition at line 93 of file BottomPanel.h.

Constructor & Destructor Documentation

◆ BottomPanel()

BottomPanel::BottomPanel ( wxWindow * parent,
MainFrame * mainFrame )

◆ ~BottomPanel()

BottomPanel::~BottomPanel ( )
virtual

Definition at line 20 of file BottomPanel.cpp.

Member Function Documentation

◆ ApplyPreferences()

void BottomPanel::ApplyPreferences ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 64 of file BottomPanel.cpp.

◆ GetDefaultActiveTab()

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

Implements SidePanel.

Definition at line 40 of file BottomPanel.cpp.

◆ GetLastActiveTab()

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

Implements SidePanel.

Definition at line 35 of file BottomPanel.cpp.

◆ GetLastOpenTabs()

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

Implements SidePanel.

Definition at line 30 of file BottomPanel.cpp.

◆ GetLogOutput()

wxTextCtrl * BottomPanel::GetLogOutput ( ) const
inline

Definition at line 55 of file BottomPanel.h.

◆ GetLogPanel()

EmberForge::LogPanel * BottomPanel::GetLogPanel ( ) const
inline

Definition at line 56 of file BottomPanel.h.

◆ GetPanelType()

wxString BottomPanel::GetPanelType ( ) const
inlineoverridevirtual

Returns the panel type identifier.

Implements SidePanel.

Definition at line 52 of file BottomPanel.h.

◆ GetPerformancePanel()

EmberForge::PerformancePanel * BottomPanel::GetPerformancePanel ( ) const
inline

Definition at line 57 of file BottomPanel.h.

◆ GetRememberLastTab()

bool BottomPanel::GetRememberLastTab ( ) const
overrideprotectedvirtual

Implements SidePanel.

Definition at line 25 of file BottomPanel.cpp.

◆ GetSupportedTabTypes()

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

Reimplemented from SidePanel.

Definition at line 53 of file BottomPanel.cpp.

◆ GetTitle()

wxString BottomPanel::GetTitle ( ) const
inlineoverridevirtual

Returns the panel title.

Implements SidePanel.

Definition at line 51 of file BottomPanel.h.

◆ OnAddFileExplorerTab()

void BottomPanel::OnAddFileExplorerTab ( wxCommandEvent & event)
private

Definition at line 62 of file BottomPanel.cpp.

◆ OnAddLogTab()

void BottomPanel::OnAddLogTab ( wxCommandEvent & event)
private

Definition at line 58 of file BottomPanel.cpp.

◆ OnAddPerformanceTab()

void BottomPanel::OnAddPerformanceTab ( wxCommandEvent & event)
private

Definition at line 60 of file BottomPanel.cpp.

◆ OnAddTabButtonClicked()

void BottomPanel::OnAddTabButtonClicked ( wxCommandEvent & event)
overrideprotectedvirtual

Reimplemented from SidePanel.

Definition at line 48 of file BottomPanel.cpp.

◆ OnPanelSpecificSetup()

void BottomPanel::OnPanelSpecificSetup ( )
overrideprotectedvirtual

Reimplemented from SidePanel.

Definition at line 42 of file BottomPanel.cpp.

◆ RestoreState()

void BottomPanel::RestoreState ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 140 of file BottomPanel.cpp.

◆ SaveState()

void BottomPanel::SaveState ( )
overridevirtual

Reimplemented from SidePanel.

Definition at line 94 of file BottomPanel.cpp.

◆ wxDECLARE_EVENT_TABLE()

BottomPanel::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ m_logOutput

wxTextCtrl* BottomPanel::m_logOutput
private

Definition at line 83 of file BottomPanel.h.

◆ m_logPanel

EmberForge::LogPanel* BottomPanel::m_logPanel
private

Definition at line 84 of file BottomPanel.h.

◆ m_performancePanel

EmberForge::PerformancePanel* BottomPanel::m_performancePanel
private

Definition at line 85 of file BottomPanel.h.


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