Ember
Loading...
Searching...
No Matches
PropertiesTab.h
Go to the documentation of this file.
1#pragma once
2
4#include "Core/Node.h"
5#include "Tabs/ITab.h"
6#include <wx/aui/auibook.h>
7#include <wx/listctrl.h>
8#include <wx/propgrid/advprops.h>
9#include <wx/propgrid/propgrid.h>
10#include <wx/wx.h>
11
12namespace EmberCore {
13class Node;
14class Blackboard;
15} // namespace EmberCore
16
17// Forward declaration
18class MainFrame;
19
39class PropertiesTab : public wxPanel, public ITab {
40 public:
41 PropertiesTab(wxWindow *parent, MainFrame *mainFrame = nullptr);
42
43 // ITab interface implementation
44 wxWindow *GetWidget() override { return this; }
45 wxString GetTitle() const override { return "Properties"; }
46 wxString GetTabType() const override { return "Properties"; }
47 void OnClosed() override;
48
49 // Node selection interface
52 void ClearSelection();
53
54 private:
55 void CreateLayout();
58 void ClearAllProperties();
59
60 // Event handlers
61 void OnPropertyChanged(wxPropertyGridEvent &event);
62 void OnPropertyChanging(wxPropertyGridEvent &event);
63
64 // Helper methods
70
71 private:
72 // UI Components
73 wxAuiNotebook *m_notebook;
74
75 // Node Properties Tab
76 wxPanel *m_nodePanel;
77 wxPropertyGrid *m_nodePropertyGrid;
78
79 // Blackboard Tab
81 wxListCtrl *m_blackboardList;
82
83 // Current selection
86
87 // MainFrame reference (for lifecycle notifications)
89
90 // Property IDs for tracking
99
100 DECLARE_EVENT_TABLE()
101};
Represents a blackboard containing multiple entries.
Represents a node in a behavior tree structure.
Definition Node.h:20
Status
Node status for runtime execution tracking.
Definition Node.h:37
Type
Node types for behavior tree classification.
Definition Node.h:25
Abstract interface for individual tabs that can be moved between panels.
Definition ITab.h:28
Main application window for EmberForge.
Definition MainFrame.h:65
MainFrame * m_mainFrame
wxPanel * m_blackboardPanel
void OnClosed() override
Called when the tab is about to be closed/removed Use this for cleanup operations.
wxWindow * GetWidget() override
Get the main widget for this tab.
wxString GetTitle() const override
Get the display title for this tab.
void ClearAllProperties()
void SetSelectedNode(EmberCore::Node *node)
void OnPropertyChanged(wxPropertyGridEvent &event)
void SetSelectedBlackboard(EmberCore::Blackboard *blackboard)
wxString GetNodeTypeDisplayName(EmberCore::Node::Type type) const
wxString GetNodeStatusDisplayName(EmberCore::Node::Status status) const
void UpdateNodeProperties()
wxString GetTabType() const override
Get a unique identifier for this tab type.
void AddNodeBasicProperties()
wxListCtrl * m_blackboardList
PropertiesTab(wxWindow *parent, MainFrame *mainFrame=nullptr)
void OnPropertyChanging(wxPropertyGridEvent &event)
void AddNodeCustomAttributes()
EmberCore::Blackboard * m_selectedBlackboard
void AddBlackboardEntries()
wxPanel * m_nodePanel
@ PROP_CUSTOM_ATTRIBUTES_START
wxAuiNotebook * m_notebook
void UpdateBlackboardProperties()
EmberCore::Node * m_selectedNode
wxPropertyGrid * m_nodePropertyGrid
Main types header for EmberCore.