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

#include <PropertiesTab.h>

Inheritance diagram for PropertiesTab:
EmberUI::PropertiesTabBase ITab

Public Member Functions

 PropertiesTab (wxWindow *parent, MainFrame *mainFrame=nullptr)
wxString GetTabType () const override
 Returns the tab type identifier.
void OnClosed () override
 Called when the tab is closed.
void SetSelectedNode (EmberCore::Node *node)
Public Member Functions inherited from EmberUI::PropertiesTabBase
 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 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 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 CreateContentLayout (wxPanel *contentPanel) override
 Pure virtual: subclasses create their content layout in contentPanel.
void PopulateProperties () override
 Pure virtual: subclasses populate the property grid from m_selectedNode.
void OnNodeCleared () override
 Called when selection is cleared; subclasses may override.
Protected Member Functions inherited from EmberUI::PropertiesTabBase
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 wxString GetPlaceholderText () const
 Returns placeholder text when no node is selected.

Private Types

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

Private Member Functions

void AddVisualProperties ()
void AddNodePortAttributes ()
void AddNodeCustomAttributes ()
wxString GetNodeTypeDisplayName (EmberCore::Node::Type type) const
void OnPropertyChanged (wxPropertyGridEvent &event)
void OnPropertyChanging (wxPropertyGridEvent &event)

Static Private Member Functions

static bool IsPortValue (const std::string &value)

Private Attributes

EmberCore::Nodem_node
MainFramem_mainFrame

Additional Inherited Members

Protected Attributes inherited from EmberUI::PropertiesTabBase
wxSimplebook * m_stack
wxPanel * m_placeholderPanel
wxPanel * m_contentPanel
wxPropertyGrid * m_propertyGrid
EmberCore::ITreeNodem_selectedNode
wxColour m_selectionHighlight
Static Protected Attributes inherited from EmberUI::PropertiesTabBase
static const wxColour kBgColor
static const wxColour kCaptionBgColor
static const wxColour kTextColor
static const wxColour kLineColor
static const wxColour kCellBgColor

Detailed Description

Definition at line 14 of file PropertiesTab.h.

Member Enumeration Documentation

◆ PropertyIds

Enumerator
PROP_NODE_NAME 
PROP_NODE_TYPE 
PROP_NODE_ID 
PROP_NODE_CHILDREN_VISIBLE 
PROP_CUSTOM_ATTRIBUTES_START 

Definition at line 44 of file PropertiesTab.h.

Constructor & Destructor Documentation

◆ PropertiesTab()

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

Member Function Documentation

◆ AddNodeCustomAttributes()

void PropertiesTab::AddNodeCustomAttributes ( )
private

Definition at line 118 of file PropertiesTab.cpp.

◆ AddNodePortAttributes()

void PropertiesTab::AddNodePortAttributes ( )
private

Definition at line 95 of file PropertiesTab.cpp.

◆ AddVisualProperties()

void PropertiesTab::AddVisualProperties ( )
private

Definition at line 74 of file PropertiesTab.cpp.

◆ CreateContentLayout()

void PropertiesTab::CreateContentLayout ( wxPanel * contentPanel)
overrideprotectedvirtual

Pure virtual: subclasses create their content layout in contentPanel.

Implements EmberUI::PropertiesTabBase.

Definition at line 24 of file PropertiesTab.cpp.

◆ GetNodeTypeDisplayName()

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

Definition at line 141 of file PropertiesTab.cpp.

◆ GetTabType()

wxString PropertiesTab::GetTabType ( ) const
inlineoverridevirtual

Returns the tab type identifier.

Implements ITab.

Definition at line 19 of file PropertiesTab.h.

◆ IsPortValue()

bool PropertiesTab::IsPortValue ( const std::string & value)
staticprivate

Definition at line 85 of file PropertiesTab.cpp.

◆ OnClosed()

void PropertiesTab::OnClosed ( )
overridevirtual

Called when the tab is closed.

Reimplemented from ITab.

Definition at line 16 of file PropertiesTab.cpp.

◆ OnNodeCleared()

void PropertiesTab::OnNodeCleared ( )
overrideprotectedvirtual

Called when selection is cleared; subclasses may override.

Reimplemented from EmberUI::PropertiesTabBase.

Definition at line 22 of file PropertiesTab.cpp.

◆ OnPropertyChanged()

void PropertiesTab::OnPropertyChanged ( wxPropertyGridEvent & event)
private

Definition at line 160 of file PropertiesTab.cpp.

◆ OnPropertyChanging()

void PropertiesTab::OnPropertyChanging ( wxPropertyGridEvent & event)
private

Definition at line 192 of file PropertiesTab.cpp.

◆ PopulateProperties()

void PropertiesTab::PopulateProperties ( )
overrideprotectedvirtual

Pure virtual: subclasses populate the property grid from m_selectedNode.

Implements EmberUI::PropertiesTabBase.

Definition at line 48 of file PropertiesTab.cpp.

◆ SetSelectedNode()

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

Definition at line 32 of file PropertiesTab.cpp.

Member Data Documentation

◆ m_mainFrame

MainFrame* PropertiesTab::m_mainFrame
private

Definition at line 42 of file PropertiesTab.h.

◆ m_node

EmberCore::Node* PropertiesTab::m_node
private

Definition at line 41 of file PropertiesTab.h.


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