![]() |
Ember
|
Central panel containing the MonitorTreeCanvas and search bar. More...
#include <MainPanel.h>
Public Types | |
| using | NodeSelectionCallback = std::function<void(EmberCore::ITreeNode *)> |
Public Member Functions | |
| MainPanel (wxWindow *parent) | |
| ~MainPanel () override=default | |
| void | SetTree (std::shared_ptr< Ember::Network::TCPTreeAdapter > adapter, std::shared_ptr< Network::StateManager > stateManager) |
| Loads the tree from the given adapter and state manager. | |
| void | ClearTree () |
| Clears the displayed tree. | |
| MonitorTreeCanvas * | GetTreeCanvas () const |
| Returns the tree canvas widget. | |
| int | GetNodeStatus (int64_t nodeId) const override |
| Returns the status code for the given node. | |
| bool | IsNodeInExecutionPath (int64_t nodeId) const override |
| Returns true if the node is in the current execution path. | |
| void | GetExecutionPathIds (std::set< int64_t > &outIds) const override |
| Fills outIds with node IDs in the execution path. | |
| void | SetNodeSelectionCallback (NodeSelectionCallback callback) |
| Registers a callback invoked when a node is selected in the tree. | |
| Public Member Functions inherited from EmberUI::Panel | |
| Panel (wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL) | |
| Constructs the panel with optional name and style. | |
| virtual | ~Panel () |
| wxPanel * | GetPanel () override |
| Returns this panel as wxPanel pointer. | |
| wxString | GetTitle () const override |
| Returns the panel title. | |
| wxString | GetPanelType () const override |
| Returns the panel type identifier. | |
| void | Initialize () override |
| Initializes the panel layout and appearance. | |
| void | Refresh () override |
| Refreshes panel content. | |
| void | OnActivated () override |
| Called when the panel is activated. | |
| void | OnDeactivated () override |
| Called when the panel is deactivated. | |
| void | Cleanup () override |
| Cleans up panel resources. | |
| bool | IsValid () const override |
| Returns true if the panel has been initialized. | |
| wxString | SerializeState () const override |
| Serializes panel state to a string. | |
| void | DeserializeState (const wxString &state) override |
| Restores panel state from a serialized string. | |
| bool | HasUnsavedChanges () const override |
| Returns true if there are unsaved changes. | |
| bool | Save () override |
| Saves panel state; returns true on success. | |
| bool | SupportsOperation (const wxString &operation) const override |
| Returns true if the panel supports the given operation. | |
| bool | ExecuteOperation (const wxString &operation, const wxString ¶meter="") override |
| Executes a named operation with optional parameter. | |
| wxString | GetName () const override |
| Returns the panel name. | |
| void | SetName (const wxString &name) override |
| Sets the panel name. | |
| void | SetTitle (const wxString &title) |
| Sets the panel title. | |
| void | SetPanelType (const wxString &type) |
| Sets the panel type identifier. | |
| Public Member Functions inherited from IPanel | |
| virtual | ~IPanel ()=default |
| Public Member Functions inherited from EmberUI::IStatusProvider | |
| virtual | ~IStatusProvider ()=default |
Private Member Functions | |
| void | CreateLayout () override |
| Hook: creates the panel layout. Override to customize. | |
| void | OnSearchText (wxCommandEvent &event) |
| void | OnSearchEnter (wxCommandEvent &event) |
| void | OnSearchCancel (wxCommandEvent &event) |
| void | NavigateToResult (size_t index) |
| void | CollectSearchResults (const wxString &query) |
Private Attributes | |
| MonitorTreeCanvas * | m_treeCanvas = nullptr |
| wxSearchCtrl * | m_searchCtrl = nullptr |
| wxStaticText * | m_searchStatus = nullptr |
| std::vector< EmberCore::ITreeNode * > | m_searchResults |
| size_t | m_searchIndex = 0 |
| std::shared_ptr< Ember::Network::TCPTreeAdapter > | m_adapter |
| std::shared_ptr< Network::StateManager > | m_stateManager |
Additional Inherited Members | |
| Protected Member Functions inherited from EmberUI::Panel | |
| virtual void | ApplyTheme () |
| Hook: applies theme colors and fonts. Override to customize. | |
| virtual void | UpdateContent () |
| Hook: updates displayed content. Override to refresh data. | |
| virtual void | HandleActivation () |
| Hook: handles panel activation. Override to customize. | |
| virtual void | HandleDeactivation () |
| Hook: handles panel deactivation. Override to customize. | |
| virtual bool | ValidateState () const |
| Hook: validates panel state; returns true if valid. | |
| void | MarkChanged () |
| Marks the panel as having unsaved changes. | |
| void | MarkSaved () |
| Clears the unsaved-changes flag. | |
| wxSizer * | GetMainSizer () const |
| Returns the main sizer for layout. | |
| void | SetMainSizer (wxSizer *sizer) |
| Sets the main sizer. | |
| virtual void | OnPanelSize (wxSizeEvent &event) |
| Hook: handles panel resize events. | |
| virtual void | OnPanelPaint (wxPaintEvent &event) |
| Hook: handles panel paint events. | |
Central panel containing the MonitorTreeCanvas and search bar.
Implements IStatusProvider for status coloring.
Definition at line 19 of file MainPanel.h.
| using Ember::Monitor::MainPanel::NodeSelectionCallback = std::function<void(EmberCore::ITreeNode *)> |
Definition at line 41 of file MainPanel.h.
|
explicit |
Definition at line 6 of file MainPanel.cpp.
|
overridedefault |
| void MainPanel::ClearTree | ( | ) |
Clears the displayed tree.
Definition at line 122 of file MainPanel.cpp.
|
private |
Definition at line 93 of file MainPanel.cpp.
|
overrideprivatevirtual |
Hook: creates the panel layout. Override to customize.
Reimplemented from EmberUI::Panel.
Definition at line 8 of file MainPanel.cpp.
|
overridevirtual |
Fills outIds with node IDs in the execution path.
Implements EmberUI::IStatusProvider.
Definition at line 150 of file MainPanel.cpp.
|
overridevirtual |
Returns the status code for the given node.
Implements EmberUI::IStatusProvider.
Definition at line 132 of file MainPanel.cpp.
|
inline |
Returns the tree canvas widget.
Definition at line 31 of file MainPanel.h.
|
overridevirtual |
Returns true if the node is in the current execution path.
Implements EmberUI::IStatusProvider.
Definition at line 138 of file MainPanel.cpp.
|
private |
Definition at line 72 of file MainPanel.cpp.
|
private |
Definition at line 64 of file MainPanel.cpp.
|
private |
Definition at line 57 of file MainPanel.cpp.
|
private |
Definition at line 40 of file MainPanel.cpp.
| void MainPanel::SetNodeSelectionCallback | ( | NodeSelectionCallback | callback | ) |
Registers a callback invoked when a node is selected in the tree.
Definition at line 158 of file MainPanel.cpp.
| void MainPanel::SetTree | ( | std::shared_ptr< Ember::Network::TCPTreeAdapter > | adapter, |
| std::shared_ptr< Network::StateManager > | stateManager ) |
Loads the tree from the given adapter and state manager.
Definition at line 108 of file MainPanel.cpp.
|
private |
Definition at line 60 of file MainPanel.h.
|
private |
Definition at line 54 of file MainPanel.h.
|
private |
Definition at line 58 of file MainPanel.h.
|
private |
Definition at line 57 of file MainPanel.h.
|
private |
Definition at line 55 of file MainPanel.h.
|
private |
Definition at line 61 of file MainPanel.h.
|
private |
Definition at line 53 of file MainPanel.h.