7#include <unordered_map>
53 wxString
GetTitle()
const override {
return "Navigator"; }
54 wxString
GetTabType()
const override {
return "MonitorNavigator"; }
57 void SetMonitorTree(std::shared_ptr<EmberCore::ITreeStructure> tree,
58 std::shared_ptr<Network::StateManager> stateManager,
const std::string &treeId =
"");
Abstract interface for tree nodes that can be visualized.
TreeHierarchyTab subclass with context menu and node activation hooks.
Main navigator tab with tree list, hierarchy view, search, and breadcrumb navigation.
Hierarchy view with live status updates.
std::unordered_map< int64_t, wxTreeItemId > m_nodeIdToItem
wxString GetNodeDisplayText(EmberCore::ITreeNode *node) const override
Returns display text including status for the given node.
std::shared_ptr< Network::StateManager > m_stateManager
void UpdateSingleItem(const wxTreeItemId &item, EmberCore::ITreeNode *node)
void OnNodeExpanding(EmberCore::ITreeNode *) override
Called when a node is expanded (no-op).
std::chrono::steady_clock::time_point m_lastRefreshTime
void SetStateManager(std::shared_ptr< Network::StateManager > sm)
Assigns the state manager used for live status lookups.
wxString GetStatusLabel(int status) const
void InvalidateNodeIdMap()
Clears the node ID map; call when tree structure changes.
void UpdateChangedNodes(const std::vector< int64_t > &changedIds)
void OnNodeCollapsing(EmberCore::ITreeNode *) override
Called when a node is collapsed (no-op).
void RefreshStatus()
Refreshes status icons and labels for visible tree nodes.
void RebuildNodeIdMapRecursive(const wxTreeItemId &item)
MonitorHierarchyView(wxWindow *parent, const EmberUI::TreeHierarchyConfig &config)
static constexpr int64_t REFRESH_INTERVAL_MS
void RebuildNodeIdMap()
Rebuilds the node ID to tree item mapping.
MonitorNavigatorTab(wxWindow *parent)
wxString GetTabType() const override
Returns the tab type identifier.
void ClearMonitorTree()
Clears the current monitor tree.
EmberUI::NavigatorHierarchyView * CreateHierarchyView(wxWindow *parent, const EmberUI::TreeHierarchyConfig &cfg) override
Creates and returns a MonitorHierarchyView instance.
void RefreshStatus()
Refreshes status display for all visible nodes.
void SetMonitorTree(std::shared_ptr< EmberCore::ITreeStructure > tree, std::shared_ptr< Network::StateManager > stateManager, const std::string &treeId="")
Sets the monitor tree and state manager; optionally associates a tree ID.
MonitorHierarchyView * m_monitorHierView
std::shared_ptr< Network::StateManager > m_stateManager
wxString GetTitle() const override
Returns the display title of the tab.
Configuration for TreeHierarchyTab appearance and behavior.