Ember
Loading...
Searching...
No Matches
ITab Class Referenceabstract

Abstract interface for individual tabs that can be moved between panels. More...

#include <ITab.h>

Inheritance diagram for ITab:
EmberForge::LogTab EmberForge::PerformancePanel FileExplorerTab PropertiesTab SceneHierarchyTab TreeSelectorTab

Public Member Functions

virtual ~ITab ()=default
virtual wxWindow * GetWidget ()=0
 Get the main widget for this tab.
virtual wxString GetTitle () const =0
 Get the display title for this tab.
virtual wxString GetTabType () const =0
 Get a unique identifier for this tab type.
virtual wxBitmap GetIcon () const
 Get an optional icon for this tab.
virtual void Initialize ()
 Initialize the tab after construction Called once after the tab is created and configured.
virtual void Refresh ()
 Called when the tab should refresh its display This should update the tab's content to reflect current state.
virtual void OnActivated ()
 Called when the tab becomes the active/visible tab.
virtual void OnDeactivated ()
 Called when the tab becomes inactive/hidden.
virtual void OnClosed ()
 Called when the tab is about to be closed/removed Use this for cleanup operations.
virtual bool IsValid () const
 Check if the tab is in a valid state.
virtual bool CanClose () const
 Check if this tab can be closed by the user.
virtual bool CanMove () const
 Check if this tab can be moved to other panels.
virtual wxString SerializeState () const
 Serialize the tab's current state to a string.
virtual void DeserializeState (const wxString &state)
 Restore the tab's state from serialized data.
virtual bool HasUnsavedChanges () const
 Check if this tab has unsaved changes.
virtual bool Save ()
 Save the tab's data (if applicable)
virtual bool SupportsOperation (const wxString &operation) const
 Check if this tab supports the given operation.
virtual bool ExecuteOperation (const wxString &operation, const wxString &parameter="")
 Execute a named operation on this tab.

Detailed Description

Abstract interface for individual tabs that can be moved between panels.

This interface represents individual tabs (like Properties, Logger, etc.) that can be displayed in different panel containers and potentially moved between them in the future.

Definition at line 28 of file ITab.h.

Constructor & Destructor Documentation

◆ ~ITab()

virtual ITab::~ITab ( )
virtualdefault

Member Function Documentation

◆ CanClose()

virtual bool ITab::CanClose ( ) const
inlinevirtual

Check if this tab can be closed by the user.

Returns
bool True if the tab can be closed

Reimplemented in FileExplorerTab.

Definition at line 94 of file ITab.h.

◆ CanMove()

virtual bool ITab::CanMove ( ) const
inlinevirtual

Check if this tab can be moved to other panels.

Returns
bool True if the tab supports being moved

Reimplemented in FileExplorerTab.

Definition at line 100 of file ITab.h.

◆ DeserializeState()

virtual void ITab::DeserializeState ( const wxString & state)
inlinevirtual

Restore the tab's state from serialized data.

Parameters
stateThe serialized state data

Definition at line 112 of file ITab.h.

◆ ExecuteOperation()

virtual bool ITab::ExecuteOperation ( const wxString & operation,
const wxString & parameter = "" )
inlinevirtual

Execute a named operation on this tab.

Parameters
operationThe operation to execute
parameterOptional parameter for the operation
Returns
bool True if the operation was successful

Definition at line 139 of file ITab.h.

◆ GetIcon()

virtual wxBitmap ITab::GetIcon ( ) const
inlinevirtual

Get an optional icon for this tab.

Returns
wxBitmap Icon to display in the tab (can be invalid/null)

Reimplemented in FileExplorerTab.

Definition at line 54 of file ITab.h.

◆ GetTabType()

virtual wxString ITab::GetTabType ( ) const
pure virtual

Get a unique identifier for this tab type.

Returns
wxString Identifier like "Properties", "Logger", etc.

Implemented in EmberForge::LogTab, EmberForge::PerformancePanel, FileExplorerTab, PropertiesTab, SceneHierarchyTab, and TreeSelectorTab.

◆ GetTitle()

virtual wxString ITab::GetTitle ( ) const
pure virtual

Get the display title for this tab.

Returns
wxString The title to show in the tab header

Implemented in EmberForge::LogTab, EmberForge::PerformancePanel, FileExplorerTab, PropertiesTab, SceneHierarchyTab, and TreeSelectorTab.

◆ GetWidget()

virtual wxWindow * ITab::GetWidget ( )
pure virtual

Get the main widget for this tab.

Returns
wxWindow* The widget that can be added to notebook pages

Implemented in EmberForge::LogTab, EmberForge::PerformancePanel, FileExplorerTab, PropertiesTab, SceneHierarchyTab, and TreeSelectorTab.

◆ HasUnsavedChanges()

virtual bool ITab::HasUnsavedChanges ( ) const
inlinevirtual

Check if this tab has unsaved changes.

Returns
bool True if the tab has been modified

Definition at line 118 of file ITab.h.

◆ Initialize()

virtual void ITab::Initialize ( )
inlinevirtual

Initialize the tab after construction Called once after the tab is created and configured.

Reimplemented in EmberForge::LogTab, and FileExplorerTab.

Definition at line 60 of file ITab.h.

◆ IsValid()

virtual bool ITab::IsValid ( ) const
inlinevirtual

Check if the tab is in a valid state.

Returns
bool True if the tab is properly initialized and functional

Reimplemented in FileExplorerTab.

Definition at line 88 of file ITab.h.

◆ OnActivated()

virtual void ITab::OnActivated ( )
inlinevirtual

Called when the tab becomes the active/visible tab.

Reimplemented in EmberForge::LogTab, FileExplorerTab, and TreeSelectorTab.

Definition at line 71 of file ITab.h.

◆ OnClosed()

virtual void ITab::OnClosed ( )
inlinevirtual

Called when the tab is about to be closed/removed Use this for cleanup operations.

Reimplemented in EmberForge::LogTab, FileExplorerTab, PropertiesTab, SceneHierarchyTab, and TreeSelectorTab.

Definition at line 82 of file ITab.h.

◆ OnDeactivated()

virtual void ITab::OnDeactivated ( )
inlinevirtual

Called when the tab becomes inactive/hidden.

Reimplemented in EmberForge::LogTab, and FileExplorerTab.

Definition at line 76 of file ITab.h.

◆ Refresh()

virtual void ITab::Refresh ( )
inlinevirtual

Called when the tab should refresh its display This should update the tab's content to reflect current state.

Reimplemented in EmberForge::LogTab, and FileExplorerTab.

Definition at line 66 of file ITab.h.

◆ Save()

virtual bool ITab::Save ( )
inlinevirtual

Save the tab's data (if applicable)

Returns
bool True if save was successful

Definition at line 124 of file ITab.h.

◆ SerializeState()

virtual wxString ITab::SerializeState ( ) const
inlinevirtual

Serialize the tab's current state to a string.

Returns
wxString Serialized state data

Definition at line 106 of file ITab.h.

◆ SupportsOperation()

virtual bool ITab::SupportsOperation ( const wxString & operation) const
inlinevirtual

Check if this tab supports the given operation.

Parameters
operationThe operation to check (e.g., "save", "export", "search")
Returns
bool True if the operation is supported

Definition at line 131 of file ITab.h.


The documentation for this class was generated from the following file:
  • EmberForge/include/Tabs/ITab.h