Ember
Loading...
Searching...
No Matches
EmberUI::PropertiesTabBase Class Referenceabstract

Shared base class for property editors (wxPanel, ITab). More...

#include <PropertiesTabBase.h>

Inheritance diagram for EmberUI::PropertiesTabBase:
ITab Ember::Monitor::PropertiesTab PropertiesTab

Public Member Functions

 PropertiesTabBase (wxWindow *parent)
virtual ~PropertiesTabBase ()=default
wxWindow * GetWidget () override
 Returns the wxWidgets window used as the tab content.
wxString GetTitle () const override
 Returns the display title of the tab.
void SetSelectedNode (EmberCore::ITreeNode *node)
 Sets the node whose properties are displayed.
void ClearSelection ()
 Clears the current selection.
void SetSelectionHighlightColor (const wxColour &color)
 Sets the highlight color for the selected node.
Public Member Functions inherited from ITab
virtual ~ITab ()=default
virtual wxString GetTabType () const =0
 Returns the tab type identifier.
virtual wxBitmap GetIcon () const
 Returns the tab icon bitmap; defaults to null.
virtual void Initialize ()
 Called once when the tab is first created.
virtual void Refresh ()
 Refreshes the tab content.
virtual void OnActivated ()
 Called when the tab becomes active.
virtual void OnDeactivated ()
 Called when the tab becomes inactive.
virtual void OnClosed ()
 Called when the tab is closed.
virtual bool IsValid () const
 Returns true if the tab is in a valid state.
virtual bool CanClose () const
 Returns true if the tab can be closed.
virtual bool CanMove () const
 Returns true if the tab can be moved/reordered.
virtual wxString SerializeState () const
 Serializes tab state to a string for persistence.
virtual void DeserializeState (const wxString &state)
 Restores tab state from a serialized string.
virtual bool HasUnsavedChanges () const
 Returns true if the tab has unsaved changes.
virtual bool Save ()
 Saves the tab content; returns true on success.
virtual bool SupportsOperation (const wxString &operation) const
 Returns true if the tab supports the given operation.
virtual bool ExecuteOperation (const wxString &operation, const wxString &parameter="")
 Executes an operation with optional parameter; returns true on success.

Protected Member Functions

void InitLayout ()
 Initializes the tab layout (stack, placeholder, content panels).
void SetupPropertyGrid (wxPanel *parent)
 Creates and configures the property grid in the given parent.
void AddBasicNodeInfo ()
 Adds basic node info (name, type) to the property grid.
virtual void CreateContentLayout (wxPanel *contentPanel)=0
 Pure virtual: subclasses create their content layout in contentPanel.
virtual void PopulateProperties ()=0
 Pure virtual: subclasses populate the property grid from m_selectedNode.
virtual wxString GetPlaceholderText () const
 Returns placeholder text when no node is selected.
virtual void OnNodeCleared ()
 Called when selection is cleared; subclasses may override.

Protected Attributes

wxSimplebook * m_stack
wxPanel * m_placeholderPanel
wxPanel * m_contentPanel
wxPropertyGrid * m_propertyGrid
EmberCore::ITreeNodem_selectedNode
wxColour m_selectionHighlight

Static Protected Attributes

static const wxColour kBgColor
static const wxColour kCaptionBgColor
static const wxColour kTextColor
static const wxColour kLineColor
static const wxColour kCellBgColor

Detailed Description

Shared base class for property editors (wxPanel, ITab).

Definition at line 12 of file PropertiesTabBase.h.

Constructor & Destructor Documentation

◆ PropertiesTabBase()

EmberUI::PropertiesTabBase::PropertiesTabBase ( wxWindow * parent)
explicit

Definition at line 11 of file PropertiesTabBase.cpp.

◆ ~PropertiesTabBase()

virtual EmberUI::PropertiesTabBase::~PropertiesTabBase ( )
virtualdefault

Member Function Documentation

◆ AddBasicNodeInfo()

void EmberUI::PropertiesTabBase::AddBasicNodeInfo ( )
protected

Adds basic node info (name, type) to the property grid.

Definition at line 62 of file PropertiesTabBase.cpp.

◆ ClearSelection()

void EmberUI::PropertiesTabBase::ClearSelection ( )

Clears the current selection.

Definition at line 87 of file PropertiesTabBase.cpp.

◆ CreateContentLayout()

virtual void EmberUI::PropertiesTabBase::CreateContentLayout ( wxPanel * contentPanel)
protectedpure virtual

Pure virtual: subclasses create their content layout in contentPanel.

Implemented in Ember::Monitor::PropertiesTab, and PropertiesTab.

◆ GetPlaceholderText()

wxString EmberUI::PropertiesTabBase::GetPlaceholderText ( ) const
protectedvirtual

Returns placeholder text when no node is selected.

Definition at line 104 of file PropertiesTabBase.cpp.

◆ GetTitle()

wxString EmberUI::PropertiesTabBase::GetTitle ( ) const
inlineoverridevirtual

Returns the display title of the tab.

Implements ITab.

Definition at line 19 of file PropertiesTabBase.h.

◆ GetWidget()

wxWindow * EmberUI::PropertiesTabBase::GetWidget ( )
inlineoverridevirtual

Returns the wxWidgets window used as the tab content.

Implements ITab.

Definition at line 18 of file PropertiesTabBase.h.

◆ InitLayout()

void EmberUI::PropertiesTabBase::InitLayout ( )
protected

Initializes the tab layout (stack, placeholder, content panels).

Definition at line 15 of file PropertiesTabBase.cpp.

◆ OnNodeCleared()

void EmberUI::PropertiesTabBase::OnNodeCleared ( )
protectedvirtual

Called when selection is cleared; subclasses may override.

Reimplemented in PropertiesTab.

Definition at line 106 of file PropertiesTabBase.cpp.

◆ PopulateProperties()

virtual void EmberUI::PropertiesTabBase::PopulateProperties ( )
protectedpure virtual

Pure virtual: subclasses populate the property grid from m_selectedNode.

Implemented in Ember::Monitor::PropertiesTab, and PropertiesTab.

◆ SetSelectedNode()

void EmberUI::PropertiesTabBase::SetSelectedNode ( EmberCore::ITreeNode * node)

Sets the node whose properties are displayed.

Definition at line 74 of file PropertiesTabBase.cpp.

◆ SetSelectionHighlightColor()

void EmberUI::PropertiesTabBase::SetSelectionHighlightColor ( const wxColour & color)

Sets the highlight color for the selected node.

Definition at line 97 of file PropertiesTabBase.cpp.

◆ SetupPropertyGrid()

void EmberUI::PropertiesTabBase::SetupPropertyGrid ( wxPanel * parent)
protected

Creates and configures the property grid in the given parent.

Definition at line 47 of file PropertiesTabBase.cpp.

Member Data Documentation

◆ kBgColor

const wxColour EmberUI::PropertiesTabBase::kBgColor
staticprotected

Definition at line 54 of file PropertiesTabBase.h.

◆ kCaptionBgColor

const wxColour EmberUI::PropertiesTabBase::kCaptionBgColor
staticprotected

Definition at line 55 of file PropertiesTabBase.h.

◆ kCellBgColor

const wxColour EmberUI::PropertiesTabBase::kCellBgColor
staticprotected

Definition at line 58 of file PropertiesTabBase.h.

◆ kLineColor

const wxColour EmberUI::PropertiesTabBase::kLineColor
staticprotected

Definition at line 57 of file PropertiesTabBase.h.

◆ kTextColor

const wxColour EmberUI::PropertiesTabBase::kTextColor
staticprotected

Definition at line 56 of file PropertiesTabBase.h.

◆ m_contentPanel

wxPanel* EmberUI::PropertiesTabBase::m_contentPanel
protected

Definition at line 48 of file PropertiesTabBase.h.

◆ m_placeholderPanel

wxPanel* EmberUI::PropertiesTabBase::m_placeholderPanel
protected

Definition at line 47 of file PropertiesTabBase.h.

◆ m_propertyGrid

wxPropertyGrid* EmberUI::PropertiesTabBase::m_propertyGrid
protected

Definition at line 49 of file PropertiesTabBase.h.

◆ m_selectedNode

EmberCore::ITreeNode* EmberUI::PropertiesTabBase::m_selectedNode
protected

Definition at line 50 of file PropertiesTabBase.h.

◆ m_selectionHighlight

wxColour EmberUI::PropertiesTabBase::m_selectionHighlight
protected

Definition at line 52 of file PropertiesTabBase.h.

◆ m_stack

wxSimplebook* EmberUI::PropertiesTabBase::m_stack
protected

Definition at line 46 of file PropertiesTabBase.h.


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