Ember
Loading...
Searching...
No Matches
PropertiesTab.h
Go to the documentation of this file.
1#pragma once
2
3#include "Core/Node.h"
5#include <wx/propgrid/advprops.h>
6#include <wx/wx.h>
7
8namespace EmberCore {
9class Node;
10} // namespace EmberCore
11
12class MainFrame;
13
15 public:
16 PropertiesTab(wxWindow *parent, MainFrame *mainFrame = nullptr);
17
18 // ITab interface
19 wxString GetTabType() const override { return "Properties"; }
20 void OnClosed() override;
21
23 using PropertiesTabBase::ClearSelection;
24
25 protected:
26 void CreateContentLayout(wxPanel *contentPanel) override;
27 void PopulateProperties() override;
28 void OnNodeCleared() override;
29
30 private:
35
36 void OnPropertyChanged(wxPropertyGridEvent &event);
37 void OnPropertyChanging(wxPropertyGridEvent &event);
38
39 static bool IsPortValue(const std::string &value);
40
43
51
52 DECLARE_EVENT_TABLE()
53};
Represents a node in a behavior tree structure.
Definition Node.h:20
Type
Node types for behavior tree classification.
Definition Node.h:25
Shared base class for property editors (wxPanel, ITab).
Main application window for EmberForge.
Definition MainFrame.h:67
MainFrame * m_mainFrame
void OnClosed() override
Called when the tab is closed.
void SetSelectedNode(EmberCore::Node *node)
void CreateContentLayout(wxPanel *contentPanel) override
Pure virtual: subclasses create their content layout in contentPanel.
void OnPropertyChanged(wxPropertyGridEvent &event)
void AddVisualProperties()
wxString GetNodeTypeDisplayName(EmberCore::Node::Type type) const
static bool IsPortValue(const std::string &value)
wxString GetTabType() const override
Returns the tab type identifier.
void PopulateProperties() override
Pure virtual: subclasses populate the property grid from m_selectedNode.
PropertiesTab(wxWindow *parent, MainFrame *mainFrame=nullptr)
void OnPropertyChanging(wxPropertyGridEvent &event)
void AddNodeCustomAttributes()
void AddNodePortAttributes()
@ PROP_CUSTOM_ATTRIBUTES_START
void OnNodeCleared() override
Called when selection is cleared; subclasses may override.
EmberCore::Node * m_node
Main types header for EmberCore.