Ember
Loading...
Searching...
No Matches
PropertiesTab.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Core/Node.h
"
4
#include "
Tabs/PropertiesTabBase.h
"
5
#include <wx/propgrid/advprops.h>
6
#include <wx/wx.h>
7
8
namespace
EmberCore
{
9
class
Node
;
10
}
// namespace EmberCore
11
12
class
MainFrame
;
13
14
class
PropertiesTab
:
public
EmberUI::PropertiesTabBase
{
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
22
void
SetSelectedNode
(
EmberCore::Node
*node);
23
using
PropertiesTabBase::ClearSelection;
24
25
protected
:
26
void
CreateContentLayout
(wxPanel *contentPanel)
override
;
27
void
PopulateProperties
()
override
;
28
void
OnNodeCleared
()
override
;
29
30
private
:
31
void
AddVisualProperties
();
32
void
AddNodePortAttributes
();
33
void
AddNodeCustomAttributes
();
34
wxString
GetNodeTypeDisplayName
(
EmberCore::Node::Type
type)
const
;
35
36
void
OnPropertyChanged
(wxPropertyGridEvent &event);
37
void
OnPropertyChanging
(wxPropertyGridEvent &event);
38
39
static
bool
IsPortValue
(
const
std::string &value);
40
41
EmberCore::Node
*
m_node
;
42
MainFrame
*
m_mainFrame
;
43
44
enum
PropertyIds
{
45
PROP_NODE_NAME
= 1000,
46
PROP_NODE_TYPE
,
47
PROP_NODE_ID
,
48
PROP_NODE_CHILDREN_VISIBLE
,
49
PROP_CUSTOM_ATTRIBUTES_START
= 2000
50
};
51
52
DECLARE_EVENT_TABLE()
53
};
Node.h
PropertiesTabBase.h
EmberCore::Node
Represents a node in a behavior tree structure.
Definition
Node.h:20
EmberCore::Node::Type
Type
Node types for behavior tree classification.
Definition
Node.h:25
EmberUI::PropertiesTabBase
Shared base class for property editors (wxPanel, ITab).
Definition
PropertiesTabBase.h:12
MainFrame
Main application window for EmberForge.
Definition
MainFrame.h:67
PropertiesTab::m_mainFrame
MainFrame * m_mainFrame
Definition
PropertiesTab.h:42
PropertiesTab::OnClosed
void OnClosed() override
Called when the tab is closed.
Definition
PropertiesTab.cpp:16
PropertiesTab::SetSelectedNode
void SetSelectedNode(EmberCore::Node *node)
Definition
PropertiesTab.cpp:32
PropertiesTab::CreateContentLayout
void CreateContentLayout(wxPanel *contentPanel) override
Pure virtual: subclasses create their content layout in contentPanel.
Definition
PropertiesTab.cpp:24
PropertiesTab::OnPropertyChanged
void OnPropertyChanged(wxPropertyGridEvent &event)
Definition
PropertiesTab.cpp:160
PropertiesTab::AddVisualProperties
void AddVisualProperties()
Definition
PropertiesTab.cpp:74
PropertiesTab::GetNodeTypeDisplayName
wxString GetNodeTypeDisplayName(EmberCore::Node::Type type) const
Definition
PropertiesTab.cpp:141
PropertiesTab::IsPortValue
static bool IsPortValue(const std::string &value)
Definition
PropertiesTab.cpp:85
PropertiesTab::GetTabType
wxString GetTabType() const override
Returns the tab type identifier.
Definition
PropertiesTab.h:19
PropertiesTab::PopulateProperties
void PopulateProperties() override
Pure virtual: subclasses populate the property grid from m_selectedNode.
Definition
PropertiesTab.cpp:48
PropertiesTab::PropertiesTab
PropertiesTab(wxWindow *parent, MainFrame *mainFrame=nullptr)
PropertiesTab::OnPropertyChanging
void OnPropertyChanging(wxPropertyGridEvent &event)
Definition
PropertiesTab.cpp:192
PropertiesTab::AddNodeCustomAttributes
void AddNodeCustomAttributes()
Definition
PropertiesTab.cpp:118
PropertiesTab::AddNodePortAttributes
void AddNodePortAttributes()
Definition
PropertiesTab.cpp:95
PropertiesTab::PropertyIds
PropertyIds
Definition
PropertiesTab.h:44
PropertiesTab::PROP_NODE_NAME
@ PROP_NODE_NAME
Definition
PropertiesTab.h:45
PropertiesTab::PROP_NODE_ID
@ PROP_NODE_ID
Definition
PropertiesTab.h:47
PropertiesTab::PROP_NODE_TYPE
@ PROP_NODE_TYPE
Definition
PropertiesTab.h:46
PropertiesTab::PROP_NODE_CHILDREN_VISIBLE
@ PROP_NODE_CHILDREN_VISIBLE
Definition
PropertiesTab.h:48
PropertiesTab::PROP_CUSTOM_ATTRIBUTES_START
@ PROP_CUSTOM_ATTRIBUTES_START
Definition
PropertiesTab.h:49
PropertiesTab::OnNodeCleared
void OnNodeCleared() override
Called when selection is cleared; subclasses may override.
Definition
PropertiesTab.cpp:22
PropertiesTab::m_node
EmberCore::Node * m_node
Definition
PropertiesTab.h:41
EmberCore
Main types header for EmberCore.
Definition
DefaultTreeFactory.h:9
EmberForge
include
Tabs
PropertiesTab.h
Generated by
Release_1_14_0