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

Tab for editing node properties and blackboard entries. More...

#include <PropertiesTab.h>

Inheritance diagram for PropertiesTab:
ITab

Public Member Functions

 PropertiesTab (wxWindow *parent, MainFrame *mainFrame=nullptr)
wxWindow * GetWidget () override
 Get the main widget for this tab.
wxString GetTitle () const override
 Get the display title for this tab.
wxString GetTabType () const override
 Get a unique identifier for this tab type.
void OnClosed () override
 Called when the tab is about to be closed/removed Use this for cleanup operations.
void SetSelectedNode (EmberCore::Node *node)
void SetSelectedBlackboard (EmberCore::Blackboard *blackboard)
void ClearSelection ()
Public Member Functions inherited from ITab
virtual ~ITab ()=default
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 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.

Private Types

enum  PropertyIds {
  PROP_NODE_NAME = 1000 , PROP_NODE_TYPE , PROP_NODE_STATUS , PROP_NODE_ID ,
  PROP_NODE_CHILDREN_VISIBLE , PROP_CUSTOM_ATTRIBUTES_START = 2000
}

Private Member Functions

void CreateLayout ()
void UpdateNodeProperties ()
void UpdateBlackboardProperties ()
void ClearAllProperties ()
void OnPropertyChanged (wxPropertyGridEvent &event)
void OnPropertyChanging (wxPropertyGridEvent &event)
void AddNodeBasicProperties ()
void AddNodeCustomAttributes ()
void AddBlackboardEntries ()
wxString GetNodeTypeDisplayName (EmberCore::Node::Type type) const
wxString GetNodeStatusDisplayName (EmberCore::Node::Status status) const

Private Attributes

wxAuiNotebook * m_notebook
wxPanel * m_nodePanel
wxPropertyGrid * m_nodePropertyGrid
wxPanel * m_blackboardPanel
wxListCtrl * m_blackboardList
EmberCore::Node * m_selectedNode
EmberCore::Blackboard * m_selectedBlackboard
MainFrame * m_mainFrame

Detailed Description

Tab for editing node properties and blackboard entries.

PropertiesTab displays and allows editing of:

  • Node properties (ID, name, type, attributes)
  • Custom node attributes
  • Blackboard entries (name, type, value)

The tab uses wxPropertyGrid for a professional property editing interface. When a node is selected in the hierarchy or canvas, this tab automatically updates to show that node's properties.

Editing Properties

  • Basic properties (ID, Name) are directly editable
  • Type is shown read-only
  • Custom attributes are shown as expandable categories
  • Blackboard entries show type and current value

Definition at line 39 of file PropertiesTab.h.

Member Enumeration Documentation

◆ PropertyIds

Enumerator
PROP_NODE_NAME 
PROP_NODE_TYPE 
PROP_NODE_STATUS 
PROP_NODE_ID 
PROP_NODE_CHILDREN_VISIBLE 
PROP_CUSTOM_ATTRIBUTES_START 

Definition at line 91 of file PropertiesTab.h.

Constructor & Destructor Documentation

◆ PropertiesTab()

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

Member Function Documentation

◆ AddBlackboardEntries()

void PropertiesTab::AddBlackboardEntries ( )
private

Definition at line 242 of file PropertiesTab.cpp.

◆ AddNodeBasicProperties()

void PropertiesTab::AddNodeBasicProperties ( )
private

Definition at line 174 of file PropertiesTab.cpp.

◆ AddNodeCustomAttributes()

void PropertiesTab::AddNodeCustomAttributes ( )
private

Definition at line 221 of file PropertiesTab.cpp.

◆ ClearAllProperties()

void PropertiesTab::ClearAllProperties ( )
private

Definition at line 164 of file PropertiesTab.cpp.

◆ ClearSelection()

void PropertiesTab::ClearSelection ( )

Definition at line 125 of file PropertiesTab.cpp.

◆ CreateLayout()

void PropertiesTab::CreateLayout ( )
private

Definition at line 27 of file PropertiesTab.cpp.

◆ GetNodeStatusDisplayName()

wxString PropertiesTab::GetNodeStatusDisplayName ( EmberCore::Node::Status status) const
private

Definition at line 281 of file PropertiesTab.cpp.

◆ GetNodeTypeDisplayName()

wxString PropertiesTab::GetNodeTypeDisplayName ( EmberCore::Node::Type type) const
private

Definition at line 262 of file PropertiesTab.cpp.

◆ GetTabType()

wxString PropertiesTab::GetTabType ( ) const
inlineoverridevirtual

Get a unique identifier for this tab type.

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

Implements ITab.

Definition at line 46 of file PropertiesTab.h.

◆ GetTitle()

wxString PropertiesTab::GetTitle ( ) const
inlineoverridevirtual

Get the display title for this tab.

Returns
wxString The title to show in the tab header

Implements ITab.

Definition at line 45 of file PropertiesTab.h.

◆ GetWidget()

wxWindow * PropertiesTab::GetWidget ( )
inlineoverridevirtual

Get the main widget for this tab.

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

Implements ITab.

Definition at line 44 of file PropertiesTab.h.

◆ OnClosed()

void PropertiesTab::OnClosed ( )
overridevirtual

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

Reimplemented from ITab.

Definition at line 20 of file PropertiesTab.cpp.

◆ OnPropertyChanged()

void PropertiesTab::OnPropertyChanged ( wxPropertyGridEvent & event)
private

Definition at line 296 of file PropertiesTab.cpp.

◆ OnPropertyChanging()

void PropertiesTab::OnPropertyChanging ( wxPropertyGridEvent & event)
private

Definition at line 335 of file PropertiesTab.cpp.

◆ SetSelectedBlackboard()

void PropertiesTab::SetSelectedBlackboard ( EmberCore::Blackboard * blackboard)

Definition at line 116 of file PropertiesTab.cpp.

◆ SetSelectedNode()

void PropertiesTab::SetSelectedNode ( EmberCore::Node * node)

Definition at line 103 of file PropertiesTab.cpp.

◆ UpdateBlackboardProperties()

void PropertiesTab::UpdateBlackboardProperties ( )
private

Definition at line 151 of file PropertiesTab.cpp.

◆ UpdateNodeProperties()

void PropertiesTab::UpdateNodeProperties ( )
private

Definition at line 133 of file PropertiesTab.cpp.

Member Data Documentation

◆ m_blackboardList

wxListCtrl* PropertiesTab::m_blackboardList
private

Definition at line 81 of file PropertiesTab.h.

◆ m_blackboardPanel

wxPanel* PropertiesTab::m_blackboardPanel
private

Definition at line 80 of file PropertiesTab.h.

◆ m_mainFrame

MainFrame* PropertiesTab::m_mainFrame
private

Definition at line 88 of file PropertiesTab.h.

◆ m_nodePanel

wxPanel* PropertiesTab::m_nodePanel
private

Definition at line 76 of file PropertiesTab.h.

◆ m_nodePropertyGrid

wxPropertyGrid* PropertiesTab::m_nodePropertyGrid
private

Definition at line 77 of file PropertiesTab.h.

◆ m_notebook

wxAuiNotebook* PropertiesTab::m_notebook
private

Definition at line 73 of file PropertiesTab.h.

◆ m_selectedBlackboard

EmberCore::Blackboard* PropertiesTab::m_selectedBlackboard
private

Definition at line 85 of file PropertiesTab.h.

◆ m_selectedNode

EmberCore::Node* PropertiesTab::m_selectedNode
private

Definition at line 84 of file PropertiesTab.h.


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