Ember
Loading...
Searching...
No Matches
ForgeNavigatorTab.cpp
Go to the documentation of this file.
1
#include "
Tabs/ForgeNavigatorTab.h
"
2
#include "
App/MainFrame.h
"
3
4
ForgeNavigatorTab::ForgeNavigatorTab
(wxWindow *parent,
MainFrame
*mainFrame)
5
:
EmberUI
::
NavigatorTab
(parent,
/*deferLayout=*/
false),
m_mainFrame
(mainFrame) {
6
if
(!
m_mainFrame
)
7
return
;
8
9
SetTreeSelectionCallback
([
this
](
const
std::string &treeId) {
10
if
(treeId !=
m_mainFrame
->GetCurrentTreeId()) {
11
m_mainFrame
->LoadTreeIntoScene(treeId);
12
m_mainFrame
->UpdateTreeSelector();
13
}
14
});
15
16
SetNodeSelectionCallback
([
this
](
EmberCore::ITreeNode
*node) {
m_mainFrame
->OnHierarchySelectionChanged(node); });
17
18
SetLayoutInvalidationCallback
([
this
]() {
m_mainFrame
->InvalidateCanvasLayout(); });
19
20
SetBlackboardSelectionCallback
([
this
](
const
std::string &bbId) {
m_mainFrame
->NavigateToBlackboard(bbId); });
21
22
SetCallbacks
({[
this
]() {
return
m_mainFrame
->IsActiveSceneBehaviorTree(); },
23
[
this
]() {
m_mainFrame
->RefreshCanvasVisualization(); },
24
[
this
](
EmberCore::ITreeNode
*n) {
m_mainFrame
->CenterOnNode(n); },
25
[
this
](
const
std::string &id) {
m_mainFrame
->OpenTreeInNewScene(
id
); },
26
[
this
]() {
m_mainFrame
->OnNavigatorTabClosed(); }});
27
}
ForgeNavigatorTab.h
MainFrame.h
EmberCore::ITreeNode
Abstract interface for tree nodes that can be visualized.
Definition
ITreeNode.h:31
EmberUI::NavigatorTab::SetNodeSelectionCallback
void SetNodeSelectionCallback(std::function< void(EmberCore::ITreeNode *)> cb)
Definition
NavigatorTab.cpp:702
EmberUI::NavigatorTab::SetTreeSelectionCallback
void SetTreeSelectionCallback(TreeSelectionCallback callback)
Definition
NavigatorTab.h:125
EmberUI::NavigatorTab::SetBlackboardSelectionCallback
void SetBlackboardSelectionCallback(std::function< void(const std::string &)> cb)
Definition
NavigatorTab.cpp:716
EmberUI::NavigatorTab::SetCallbacks
void SetCallbacks(NavigatorCallbacks cb)
Definition
NavigatorTab.h:101
EmberUI::NavigatorTab::NavigatorTab
NavigatorTab(wxWindow *parent)
EmberUI::NavigatorTab::SetLayoutInvalidationCallback
void SetLayoutInvalidationCallback(std::function< void()> cb)
Definition
NavigatorTab.cpp:698
ForgeNavigatorTab::ForgeNavigatorTab
ForgeNavigatorTab(wxWindow *parent, MainFrame *mainFrame)
Definition
ForgeNavigatorTab.cpp:4
ForgeNavigatorTab::m_mainFrame
MainFrame * m_mainFrame
Definition
ForgeNavigatorTab.h:14
MainFrame
Main application window for EmberForge.
Definition
MainFrame.h:67
EmberUI
Definition
Panel.h:8
EmberForge
src
Tabs
ForgeNavigatorTab.cpp
Generated by
Release_1_14_0