![]() |
Ember
|
Tab displaying the behavior tree hierarchy. More...
#include <SceneHierarchyTab.h>
Public Member Functions | |
| SceneHierarchyTab (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 | SetRootNode (std::shared_ptr< EmberCore::Node > root) |
| void | RefreshTree () |
| void | ExpandAll () |
| void | CollapseAll () |
| EmberCore::Node * | GetSelectedNode () const |
| void | SelectNode (EmberCore::Node *node) |
| 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 ¶meter="") |
| Execute a named operation on this tab. | |
Private Types | |
| enum | { ID_TREE_CTRL = wxID_HIGHEST + 1 , ID_SEARCH_CTRL , ID_ADD_CHILD , ID_DELETE_NODE , ID_RENAME_NODE , ID_DUPLICATE_NODE } |
Private Member Functions | |
| void | LoadPreferences () |
| void | CreateLayout () |
| void | PopulateTree () |
| void | AddNodeToTree (const wxTreeItemId &parentItem, EmberCore::Node *node, int depth=0) |
| void | OnTreeItemExpanding (wxTreeEvent &event) |
| void | OnTreeItemCollapsing (wxTreeEvent &event) |
| void | OnTreeSelectionChanged (wxTreeEvent &event) |
| void | OnTreeItemRightClick (wxTreeEvent &event) |
| void | OnTreeItemActivated (wxTreeEvent &event) |
| void | OnSearchTextChanged (wxCommandEvent &event) |
| void | OnSearchEnter (wxCommandEvent &event) |
| void | OnTreeLeftDown (wxMouseEvent &event) |
| void | PerformClickAction (int action, EmberCore::Node *node, const wxTreeItemId &item) |
| void | SelectRange (const wxTreeItemId &from, const wxTreeItemId &to) |
| void | OnAddChildNode (wxCommandEvent &event) |
| void | OnDeleteNode (wxCommandEvent &event) |
| void | OnRenameNode (wxCommandEvent &event) |
| void | OnDuplicateNode (wxCommandEvent &event) |
| wxTreeItemId | FindTreeItem (EmberCore::Node *node, const wxTreeItemId &start=wxTreeItemId()) |
| EmberCore::Node * | GetNodeFromTreeItem (const wxTreeItemId &item) const |
| wxString | GetNodeDisplayText (EmberCore::Node *node) const |
| int | GetNodeIcon (EmberCore::Node *node) const |
| wxDECLARE_EVENT_TABLE () | |
Private Attributes | |
| wxSearchCtrl * | m_searchCtrl |
| wxTreeCtrl * | m_treeCtrl |
| wxBoxSizer * | m_mainSizer |
| std::shared_ptr< EmberCore::Node > | m_rootNode |
| wxString | m_searchFilter |
| MainFrame * | m_mainFrame |
| std::unique_ptr< EmberCore::NodeAdapter > | m_currentSelectionAdapter |
| bool | m_showSearchBar |
| bool | m_showNodeIcons |
| bool | m_showTreeLines |
| int | m_treeIndentationSize |
| int | m_fontSize |
| bool | m_autoExpandOnLoad |
| bool | m_syncSelectionWithCanvas |
| bool | m_liveSearch |
| int | m_doubleClickAction |
| int | m_ctrlClickAction |
| wxTreeItemId | m_lastSelectedItem |
| bool | m_showAddChildOption |
| bool | m_showDeleteOption |
| bool | m_showRenameOption |
| bool | m_showDuplicateOption |
| bool | m_rememberExpandedNodes |
Tab displaying the behavior tree hierarchy.
SceneHierarchyTab provides a tree view of the behavior tree structure:
When a node is selected in this tab, the selection is synchronized with the canvas and properties panel.
Definition at line 60 of file SceneHierarchyTab.h.
|
private |
| Enumerator | |
|---|---|
| ID_TREE_CTRL | |
| ID_SEARCH_CTRL | |
| ID_ADD_CHILD | |
| ID_DELETE_NODE | |
| ID_RENAME_NODE | |
| ID_DUPLICATE_NODE | |
Definition at line 142 of file SceneHierarchyTab.h.
| SceneHierarchyTab::SceneHierarchyTab | ( | wxWindow * | parent, |
| MainFrame * | mainFrame = nullptr ) |
|
private |
Definition at line 238 of file SceneHierarchyTab.cpp.
| void SceneHierarchyTab::CollapseAll | ( | ) |
Definition at line 296 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 78 of file SceneHierarchyTab.cpp.
| void SceneHierarchyTab::ExpandAll | ( | ) |
Definition at line 294 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 341 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 285 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 330 of file SceneHierarchyTab.cpp.
|
private |
| EmberCore::Node * SceneHierarchyTab::GetSelectedNode | ( | ) | const |
Definition at line 298 of file SceneHierarchyTab.cpp.
|
inlineoverridevirtual |
Get a unique identifier for this tab type.
Implements ITab.
Definition at line 67 of file SceneHierarchyTab.h.
|
inlineoverridevirtual |
Get the display title for this tab.
Implements ITab.
Definition at line 66 of file SceneHierarchyTab.h.
|
inlineoverridevirtual |
Get the main widget for this tab.
Implements ITab.
Definition at line 65 of file SceneHierarchyTab.h.
|
private |
Definition at line 43 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 525 of file SceneHierarchyTab.cpp.
|
overridevirtual |
Called when the tab is about to be closed/removed Use this for cleanup operations.
Reimplemented from ITab.
Definition at line 71 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 537 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 587 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 570 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 517 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 508 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 465 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 380 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 371 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 422 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 623 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 389 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 666 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 197 of file SceneHierarchyTab.cpp.
| void SceneHierarchyTab::RefreshTree | ( | ) |
Definition at line 181 of file SceneHierarchyTab.cpp.
| void SceneHierarchyTab::SelectNode | ( | EmberCore::Node * | node | ) |
Definition at line 308 of file SceneHierarchyTab.cpp.
|
private |
Definition at line 706 of file SceneHierarchyTab.cpp.
| void SceneHierarchyTab::SetRootNode | ( | std::shared_ptr< EmberCore::Node > | root | ) |
Definition at line 176 of file SceneHierarchyTab.cpp.
|
private |
|
private |
Definition at line 129 of file SceneHierarchyTab.h.
|
private |
Definition at line 133 of file SceneHierarchyTab.h.
|
private |
Definition at line 121 of file SceneHierarchyTab.h.
|
private |
Definition at line 132 of file SceneHierarchyTab.h.
|
private |
Definition at line 128 of file SceneHierarchyTab.h.
|
private |
Definition at line 134 of file SceneHierarchyTab.h.
|
private |
Definition at line 131 of file SceneHierarchyTab.h.
|
private |
Definition at line 118 of file SceneHierarchyTab.h.
|
private |
Definition at line 114 of file SceneHierarchyTab.h.
|
private |
Definition at line 139 of file SceneHierarchyTab.h.
|
private |
Definition at line 116 of file SceneHierarchyTab.h.
|
private |
Definition at line 112 of file SceneHierarchyTab.h.
|
private |
Definition at line 117 of file SceneHierarchyTab.h.
|
private |
Definition at line 135 of file SceneHierarchyTab.h.
|
private |
Definition at line 136 of file SceneHierarchyTab.h.
|
private |
Definition at line 138 of file SceneHierarchyTab.h.
|
private |
Definition at line 125 of file SceneHierarchyTab.h.
|
private |
Definition at line 137 of file SceneHierarchyTab.h.
|
private |
Definition at line 124 of file SceneHierarchyTab.h.
|
private |
Definition at line 126 of file SceneHierarchyTab.h.
|
private |
Definition at line 130 of file SceneHierarchyTab.h.
|
private |
Definition at line 113 of file SceneHierarchyTab.h.
|
private |
Definition at line 127 of file SceneHierarchyTab.h.