![]() |
Ember
|
Main navigator tab with tree list, hierarchy view, search, and breadcrumb navigation. More...
#include <NavigatorTab.h>
Classes | |
| struct | FlatEntry |
| Flattened tree list entry for display in NavigatorTreeListBox. More... | |
| struct | SearchResult |
| Search result (tree or node) for display in SearchResultsListBox. More... | |
| struct | TreeInfo |
Public Types | |
| enum class | SectionType { None , MainTree , OtherTrees , Blackboards } |
| using | TreeSelectionCallback = std::function<void(const std::string &treeId)> |
Public Member Functions | |
| NavigatorTab (wxWindow *parent) | |
| void | SetCallbacks (NavigatorCallbacks cb) |
| void | SetEditingEnabled (bool enabled) |
| bool | IsEditingEnabled () const |
| wxWindow * | GetWidget () override |
| Returns the wxWidgets window used as the tab content. | |
| wxString | GetTitle () const override |
| Returns the display title of the tab. | |
| wxString | GetTabType () const override |
| Returns the tab type identifier. | |
| void | OnClosed () override |
| Called when the tab is closed. | |
| void | OnActivated () override |
| Called when the tab becomes active. | |
| void | UpdateTreeList (const std::map< std::string, std::shared_ptr< EmberCore::BehaviorTree > > &trees, const std::string ¤tTreeId) |
| Updates tree list from project trees and sets current tree. | |
| void | SetCurrentTree (const std::string &treeId) |
| Sets the currently selected tree in the list. | |
| void | ClearTreeList () |
| void | SetTreeSelectionCallback (TreeSelectionCallback callback) |
| void | SetMainTreeId (const std::string &id) |
| void | SetBlackboards (const std::map< std::string, std::shared_ptr< EmberCore::Blackboard > > &bbs) |
| void | SetBlackboardSelectionCallback (std::function< void(const std::string &)> cb) |
| void | OnBlackboardClicked (const std::string &bbId) |
| void | SetActiveTree (std::shared_ptr< EmberCore::ITreeStructure > tree, const std::string &treeId) |
| Sets the active tree for hierarchy view and drills into it. | |
| void | SelectNodeById (size_t nodeId) |
| Selects the node with the given ID in the hierarchy. | |
| void | RefreshHierarchy () |
| void | SetLayoutInvalidationCallback (std::function< void()> cb) |
| void | SetNodeSelectionCallback (std::function< void(EmberCore::ITreeNode *)> cb) |
| void | DrillIntoTree (const std::string &treeId) |
| Drills into a subtree (updates breadcrumb and hierarchy). | |
| void | NavigateBack () |
| Navigates back in breadcrumb history. | |
| const std::vector< FlatEntry > & | GetFlatList () const |
| const std::vector< SearchResult > & | GetSearchResults () const |
| const std::string & | GetCurrentTreeId () const |
| const std::string & | GetBrowsedTreeId () const |
| void | ToggleCollapse (const std::string &treeId) |
| void | ToggleSectionCollapse (SectionType section) |
| bool | IsCollapsed (const std::string &treeId) const |
| bool | IsSectionCollapsed (SectionType section) const |
| int | GetToggleHitX (int depth, bool isCurrent) const |
| void | ShowTreeContextMenu (int itemIndex, const wxPoint &pos) |
| void | ShowSearchContextMenu (int resultIndex, const wxPoint &pos) |
| bool | IsActiveTree (const std::string &treeId) const |
| void | ClearSearch () |
| Public Member Functions inherited from ITab | |
| virtual | ~ITab ()=default |
| virtual wxBitmap | GetIcon () const |
| Returns the tab icon bitmap; defaults to null. | |
| virtual void | Initialize () |
| Called once when the tab is first created. | |
| virtual void | Refresh () |
| Refreshes the tab content. | |
| virtual void | OnDeactivated () |
| Called when the tab becomes inactive. | |
| virtual bool | IsValid () const |
| Returns true if the tab is in a valid state. | |
| virtual bool | CanClose () const |
| Returns true if the tab can be closed. | |
| virtual bool | CanMove () const |
| Returns true if the tab can be moved/reordered. | |
| virtual wxString | SerializeState () const |
| Serializes tab state to a string for persistence. | |
| virtual void | DeserializeState (const wxString &state) |
| Restores tab state from a serialized string. | |
| virtual bool | HasUnsavedChanges () const |
| Returns true if the tab has unsaved changes. | |
| virtual bool | Save () |
| Saves the tab content; returns true on success. | |
| virtual bool | SupportsOperation (const wxString &operation) const |
| Returns true if the tab supports the given operation. | |
| virtual bool | ExecuteOperation (const wxString &operation, const wxString ¶meter="") |
| Executes an operation with optional parameter; returns true on success. | |
Protected Member Functions | |
| NavigatorTab (wxWindow *parent, bool deferLayout) | |
| void | InitLayout () |
| virtual NavigatorHierarchyView * | CreateHierarchyView (wxWindow *parent, const TreeHierarchyConfig &cfg) |
| NavigatorHierarchyView * | GetHierarchyView () const |
Private Types | |
| enum class | ViewPage { TreeList = 0 , Hierarchy = 1 , Search = 2 } |
| enum | { ID_SEARCH_CTRL = wxID_HIGHEST + 300 , ID_BACK_BTN , ID_TREE_LIST , ID_SEARCH_LIST , ID_CTX_VIEW_CURRENT , ID_CTX_OPEN_NEW_SCENE , ID_CTX_BROWSE , ID_CTX_EXPAND , ID_CTX_COLLAPSE , ID_CTX_ADD_CHILD = wxID_HIGHEST + 350 , ID_CTX_DELETE_NODE , ID_CTX_RENAME_NODE , ID_CTX_DUPLICATE_NODE , ID_CTX_OPEN_TREE } |
Private Member Functions | |
| void | UpdateBreadcrumb () |
| void | UpdateStatusLabel () |
| void | CollectSubTreeRefs (EmberCore::Node *node, std::set< std::string > &refs) const |
| void | CollectAllReachableSubtrees (const std::string &treeId, std::set< std::string > &reachable) const |
| void | BuildFlatList () |
| void | FlattenTree (const std::string &treeId, int depth, std::set< std::string > &visited, bool isLastChild, std::vector< bool > parentHasMore) |
| int | FindItemByTreeId (const std::string &treeId) const |
| void | PerformGlobalSearch (const wxString &query) |
| void | OnHierarchyContextMenu (EmberCore::ITreeNode *node, wxMenu &menu) |
| void | OnHierarchyContextCommand (int id, EmberCore::ITreeNode *node) |
| void | OnHierarchyNodeActivated (EmberCore::ITreeNode *node) |
| void | OnHierarchySelectionChanged (EmberCore::ITreeNode *node) |
| EmberCore::Node * | GetMutableNode (EmberCore::ITreeNode *inode) const |
| void | OnTreeListContextViewInCurrent (wxCommandEvent &event) |
| void | OnTreeListContextOpenNewScene (wxCommandEvent &event) |
| void | OnTreeListContextBrowse (wxCommandEvent &event) |
| void | OnTreeListContextExpand (wxCommandEvent &event) |
| void | OnTreeListContextCollapse (wxCommandEvent &event) |
| void | OnSearchTextChanged (wxCommandEvent &event) |
| void | OnSearchEnter (wxCommandEvent &event) |
| void | OnBackClicked (wxCommandEvent &event) |
| void | CollapseAllTrees () |
| void | ExpandAllTrees () |
| wxDECLARE_EVENT_TABLE () | |
Main navigator tab with tree list, hierarchy view, search, and breadcrumb navigation.
Definition at line 95 of file NavigatorTab.h.
| using EmberUI::NavigatorTab::TreeSelectionCallback = std::function<void(const std::string &treeId)> |
Definition at line 97 of file NavigatorTab.h.
|
private |
Definition at line 271 of file NavigatorTab.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| MainTree | |
| OtherTrees | |
| Blackboards | |
Definition at line 147 of file NavigatorTab.h.
|
strongprivate |
| Enumerator | |
|---|---|
| TreeList | |
| Hierarchy | |
| Search | |
Definition at line 241 of file NavigatorTab.h.
| EmberUI::NavigatorTab::NavigatorTab | ( | wxWindow * | parent | ) |
|
protected |
Definition at line 442 of file NavigatorTab.cpp.
|
private |
Definition at line 754 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::ClearSearch | ( | ) |
Definition at line 1015 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::ClearTreeList | ( | ) |
Definition at line 641 of file NavigatorTab.cpp.
|
private |
Definition at line 1000 of file NavigatorTab.cpp.
|
private |
Definition at line 742 of file NavigatorTab.cpp.
|
private |
Definition at line 728 of file NavigatorTab.cpp.
|
protectedvirtual |
Reimplemented in Ember::Monitor::MonitorNavigatorTab.
Definition at line 448 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::DrillIntoTree | ( | const std::string & | treeId | ) |
Drills into a subtree (updates breadcrumb and hierarchy).
Definition at line 527 of file NavigatorTab.cpp.
|
private |
Definition at line 1010 of file NavigatorTab.cpp.
|
private |
Definition at line 943 of file NavigatorTab.cpp.
|
private |
Definition at line 895 of file NavigatorTab.cpp.
|
inline |
Definition at line 177 of file NavigatorTab.h.
|
inline |
Definition at line 176 of file NavigatorTab.h.
|
inline |
Definition at line 174 of file NavigatorTab.h.
|
inlineprotected |
Definition at line 109 of file NavigatorTab.h.
|
private |
Definition at line 1177 of file NavigatorTab.cpp.
|
inline |
Definition at line 175 of file NavigatorTab.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the display title of the tab.
Implements ITab.
Definition at line 114 of file NavigatorTab.h.
| int EmberUI::NavigatorTab::GetToggleHitX | ( | int | depth, |
| bool | isCurrent ) const |
Definition at line 995 of file NavigatorTab.cpp.
|
inlineoverridevirtual |
Returns the wxWidgets window used as the tab content.
Implements ITab.
Definition at line 113 of file NavigatorTab.h.
|
protected |
Definition at line 452 of file NavigatorTab.cpp.
|
inline |
Definition at line 187 of file NavigatorTab.h.
| bool EmberUI::NavigatorTab::IsCollapsed | ( | const std::string & | treeId | ) | const |
Definition at line 966 of file NavigatorTab.cpp.
|
inline |
Definition at line 103 of file NavigatorTab.h.
| bool EmberUI::NavigatorTab::IsSectionCollapsed | ( | SectionType | section | ) | const |
Definition at line 985 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::NavigateBack | ( | ) |
Navigates back in breadcrumb history.
Definition at line 557 of file NavigatorTab.cpp.
|
overridevirtual |
Called when the tab becomes active.
Reimplemented from ITab.
Definition at line 1331 of file NavigatorTab.cpp.
|
private |
Definition at line 1311 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::OnBlackboardClicked | ( | const std::string & | bbId | ) |
Definition at line 720 of file NavigatorTab.cpp.
|
overridevirtual |
Called when the tab is closed.
Reimplemented from ITab.
Definition at line 1326 of file NavigatorTab.cpp.
|
private |
Definition at line 1100 of file NavigatorTab.cpp.
|
private |
Definition at line 1080 of file NavigatorTab.cpp.
|
private |
Definition at line 1168 of file NavigatorTab.cpp.
|
private |
Definition at line 1074 of file NavigatorTab.cpp.
|
private |
Definition at line 1295 of file NavigatorTab.cpp.
|
private |
Definition at line 1269 of file NavigatorTab.cpp.
|
private |
Definition at line 1250 of file NavigatorTab.cpp.
|
private |
Definition at line 1262 of file NavigatorTab.cpp.
|
private |
Definition at line 1257 of file NavigatorTab.cpp.
|
private |
Definition at line 1242 of file NavigatorTab.cpp.
|
private |
Definition at line 1233 of file NavigatorTab.cpp.
|
private |
Definition at line 1027 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::RefreshHierarchy | ( | ) |
Definition at line 692 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SelectNodeById | ( | size_t | nodeId | ) |
Selects the node with the given ID in the hierarchy.
Definition at line 686 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SetActiveTree | ( | std::shared_ptr< EmberCore::ITreeStructure > | tree, |
| const std::string & | treeId ) |
Sets the active tree for hierarchy view and drills into it.
Definition at line 671 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SetBlackboards | ( | const std::map< std::string, std::shared_ptr< EmberCore::Blackboard > > & | bbs | ) |
Definition at line 711 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SetBlackboardSelectionCallback | ( | std::function< void(const std::string &)> | cb | ) |
Definition at line 716 of file NavigatorTab.cpp.
|
inline |
Definition at line 101 of file NavigatorTab.h.
| void EmberUI::NavigatorTab::SetCurrentTree | ( | const std::string & | treeId | ) |
Sets the currently selected tree in the list.
Definition at line 635 of file NavigatorTab.cpp.
|
inline |
Definition at line 102 of file NavigatorTab.h.
| void EmberUI::NavigatorTab::SetLayoutInvalidationCallback | ( | std::function< void()> | cb | ) |
Definition at line 698 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SetMainTreeId | ( | const std::string & | id | ) |
Definition at line 706 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::SetNodeSelectionCallback | ( | std::function< void(EmberCore::ITreeNode *)> | cb | ) |
Definition at line 702 of file NavigatorTab.cpp.
|
inline |
Definition at line 125 of file NavigatorTab.h.
| void EmberUI::NavigatorTab::ShowSearchContextMenu | ( | int | resultIndex, |
| const wxPoint & | pos ) |
Definition at line 1214 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::ShowTreeContextMenu | ( | int | itemIndex, |
| const wxPoint & | pos ) |
Definition at line 1188 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::ToggleCollapse | ( | const std::string & | treeId | ) |
Definition at line 952 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::ToggleSectionCollapse | ( | SectionType | section | ) |
Definition at line 970 of file NavigatorTab.cpp.
|
private |
Definition at line 566 of file NavigatorTab.cpp.
|
private |
Definition at line 584 of file NavigatorTab.cpp.
| void EmberUI::NavigatorTab::UpdateTreeList | ( | const std::map< std::string, std::shared_ptr< EmberCore::BehaviorTree > > & | trees, |
| const std::string & | currentTreeId ) |
Updates tree list from project trees and sets current tree.
Definition at line 605 of file NavigatorTab.cpp.
|
private |
|
private |
Definition at line 261 of file NavigatorTab.h.
|
private |
Definition at line 233 of file NavigatorTab.h.
|
private |
Definition at line 263 of file NavigatorTab.h.
|
private |
Definition at line 264 of file NavigatorTab.h.
|
private |
Definition at line 250 of file NavigatorTab.h.
|
private |
Definition at line 235 of file NavigatorTab.h.
|
private |
Definition at line 234 of file NavigatorTab.h.
|
private |
Definition at line 232 of file NavigatorTab.h.
|
private |
Definition at line 258 of file NavigatorTab.h.
|
private |
Definition at line 266 of file NavigatorTab.h.
|
private |
Definition at line 247 of file NavigatorTab.h.
|
private |
Definition at line 259 of file NavigatorTab.h.
|
private |
Definition at line 242 of file NavigatorTab.h.
|
private |
Definition at line 256 of file NavigatorTab.h.
|
private |
Definition at line 267 of file NavigatorTab.h.
|
private |
Definition at line 246 of file NavigatorTab.h.
|
private |
Definition at line 237 of file NavigatorTab.h.
|
private |
Definition at line 257 of file NavigatorTab.h.
|
private |
Definition at line 248 of file NavigatorTab.h.
|
private |
Definition at line 269 of file NavigatorTab.h.
|
private |
Definition at line 249 of file NavigatorTab.h.
|
private |
Definition at line 243 of file NavigatorTab.h.
|
private |
Definition at line 255 of file NavigatorTab.h.
|
private |
Definition at line 231 of file NavigatorTab.h.
|
private |
Definition at line 253 of file NavigatorTab.h.
|
private |
Definition at line 238 of file NavigatorTab.h.
|
private |
Definition at line 252 of file NavigatorTab.h.
|
private |
Definition at line 239 of file NavigatorTab.h.
|
private |
Definition at line 245 of file NavigatorTab.h.
|
private |
Definition at line 236 of file NavigatorTab.h.
|
private |
Definition at line 268 of file NavigatorTab.h.