Ember
Loading...
Searching...
No Matches
Ember::Monitor::MonitorNavigatorTab Class Reference

Monitor-specific navigator tab with tree list and status refresh. More...

#include <MonitorNavigatorTab.h>

Inheritance diagram for Ember::Monitor::MonitorNavigatorTab:
EmberUI::NavigatorTab ITab

Public Member Functions

 MonitorNavigatorTab (wxWindow *parent)
wxString GetTitle () const override
 Returns the display title of the tab.
wxString GetTabType () const override
 Returns the tab type identifier.
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.
void ClearMonitorTree ()
 Clears the current monitor tree.
void RefreshStatus ()
 Refreshes status display for all visible nodes.
Public Member Functions inherited from EmberUI::NavigatorTab
 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 &currentTreeId)
 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 &parameter="")
 Executes an operation with optional parameter; returns true on success.

Protected Member Functions

EmberUI::NavigatorHierarchyViewCreateHierarchyView (wxWindow *parent, const EmberUI::TreeHierarchyConfig &cfg) override
 Creates and returns a MonitorHierarchyView instance.
Protected Member Functions inherited from EmberUI::NavigatorTab
 NavigatorTab (wxWindow *parent, bool deferLayout)
void InitLayout ()
NavigatorHierarchyViewGetHierarchyView () const

Private Attributes

MonitorHierarchyViewm_monitorHierView = nullptr
std::shared_ptr< Network::StateManagerm_stateManager

Additional Inherited Members

Public Types inherited from EmberUI::NavigatorTab
enum class  SectionType { None , MainTree , OtherTrees , Blackboards }
using TreeSelectionCallback = std::function<void(const std::string &treeId)>

Detailed Description

Monitor-specific navigator tab with tree list and status refresh.

Definition at line 49 of file MonitorNavigatorTab.h.

Constructor & Destructor Documentation

◆ MonitorNavigatorTab()

Ember::Monitor::MonitorNavigatorTab::MonitorNavigatorTab ( wxWindow * parent)
explicit

Definition at line 186 of file MonitorNavigatorTab.cpp.

Member Function Documentation

◆ ClearMonitorTree()

void Ember::Monitor::MonitorNavigatorTab::ClearMonitorTree ( )

Clears the current monitor tree.

Definition at line 221 of file MonitorNavigatorTab.cpp.

◆ CreateHierarchyView()

EmberUI::NavigatorHierarchyView * Ember::Monitor::MonitorNavigatorTab::CreateHierarchyView ( wxWindow * parent,
const EmberUI::TreeHierarchyConfig & cfg )
overrideprotectedvirtual

Creates and returns a MonitorHierarchyView instance.

Reimplemented from EmberUI::NavigatorTab.

Definition at line 192 of file MonitorNavigatorTab.cpp.

◆ GetTabType()

wxString Ember::Monitor::MonitorNavigatorTab::GetTabType ( ) const
inlineoverridevirtual

Returns the tab type identifier.

Implements ITab.

Definition at line 54 of file MonitorNavigatorTab.h.

◆ GetTitle()

wxString Ember::Monitor::MonitorNavigatorTab::GetTitle ( ) const
inlineoverridevirtual

Returns the display title of the tab.

Implements ITab.

Definition at line 53 of file MonitorNavigatorTab.h.

◆ RefreshStatus()

void Ember::Monitor::MonitorNavigatorTab::RefreshStatus ( )

Refreshes status display for all visible nodes.

Definition at line 231 of file MonitorNavigatorTab.cpp.

◆ SetMonitorTree()

void Ember::Monitor::MonitorNavigatorTab::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.

Definition at line 200 of file MonitorNavigatorTab.cpp.

Member Data Documentation

◆ m_monitorHierView

MonitorHierarchyView* Ember::Monitor::MonitorNavigatorTab::m_monitorHierView = nullptr
private

Definition at line 70 of file MonitorNavigatorTab.h.

◆ m_stateManager

std::shared_ptr<Network::StateManager> Ember::Monitor::MonitorNavigatorTab::m_stateManager
private

Definition at line 71 of file MonitorNavigatorTab.h.


The documentation for this class was generated from the following files: