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

Tree canvas with status-aware coloring and a connection info overlay. More...

#include <MonitorTreeCanvas.h>

Inheritance diagram for Ember::Monitor::MonitorTreeCanvas:
EmberUI::TreeCanvas

Public Member Functions

 MonitorTreeCanvas (wxWindow *parent, wxWindowID id=wxID_ANY)
void ApplyBaseConfig ()
 Applies base visualization configuration (colors, layout, etc.).
void SetConnectionInfo (bool connected, int tickCount)
 Sets connection state and tick count for the overlay display.
Public Member Functions inherited from EmberUI::TreeCanvas
 TreeCanvas (wxWindow *parent, wxWindowID id=wxID_ANY)
 Constructor.
virtual ~TreeCanvas ()
 Destructor.
void SetTree (std::shared_ptr< EmberCore::ITreeStructure > tree)
 Sets the tree structure to display.
std::shared_ptr< EmberCore::ITreeStructureGetTree () const
 Returns the current tree structure.
TreeCanvasConfigGetConfig ()
 Returns mutable configuration.
const TreeCanvasConfigGetConfig () const
 Returns const configuration.
void SetStatusProvider (IStatusProvider *provider)
 Sets the status overlay provider.
IStatusProviderGetStatusProvider () const
 Returns the status overlay provider.
EmberCore::ITreeNodeGetSelectedNode () const
 Returns the currently selected node.
void SetSelectedNode (EmberCore::ITreeNode *node)
 Sets the selected node.
void SetNodeSelectionCallback (NodeSelectionCallback callback)
 Sets callback invoked when a node is selected.
void SetVisibilityChangeCallback (VisibilityChangeCallback callback)
 Sets callback invoked when node visibility changes.
void ResetView ()
 Resets zoom and pan to default values.
void FitTreeInView ()
 Adjusts view to fit the entire tree.
void CenterOnNode (EmberCore::ITreeNode *node)
 Centers the view on the given node.
void SetZoom (float zoom)
 Sets the zoom factor.
float GetZoom () const
 Returns the current zoom factor.
void MarkDirty ()
 Marks the canvas for repaint.
void RefreshCanvas ()
 Marks canvas dirty (alias for MarkDirty).
void InvalidateLayout ()
 Invalidates layout cache and triggers refresh.
void SetShowGrid (bool show)
 Enables or disables grid display.
void SetShowOverlayInfo (bool show)
 Enables or disables overlay info display.
void SetShowMinimap (bool show)
 Enables or disables minimap display.
void SetShowBreadcrumb (bool show)
 Enables or disables breadcrumb display.
void EnterFocusMode (EmberCore::ITreeNode *node)
 Enters focus mode, showing only the subtree rooted at the given node.
void ExitFocusMode ()
 Exits focus mode.
bool IsInFocusMode () const
 Returns whether focus mode is active.
EmberCore::ITreeNodeGetFocusRoot () const
 Returns the focus mode root node, or nullptr if not in focus mode.
void LoadTypeIcons ()
 Loads type icons from the configured icon directory.

Protected Member Functions

wxColour GetNodeFillColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns fill color based on node status, selection, and hover.
wxColour GetNodeBorderColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns border color based on node status, selection, and hover.
wxColour GetNodeTextColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns text color based on node status, selection, and hover.
void OnBeforePaintOverlays (wxDC &dc) override
 Paints connection info overlay before other overlays.
Protected Member Functions inherited from EmberUI::TreeCanvas
virtual void OnNodeSelected (EmberCore::ITreeNode *node)
 Called when a node is selected; override for app-specific behavior.
virtual void OnKeyDown (wxKeyEvent &event)
 Key down handler; override for custom key handling.
virtual void OnKeyUp (wxKeyEvent &event)
 Key up handler; override for custom key handling.
wxPoint GetViewOffset () const
 Returns the current view offset.
wxPoint GetTargetOffset () const
 Returns the target offset for smooth panning.
void SetTargetOffset (const wxPoint &offset)
 Sets the target offset for smooth panning.
void ClearWidthCache ()
 Clears the subtree width cache.
bool GetShowMinimap () const
 Returns whether the minimap is shown.

Private Attributes

bool m_connected = false
int m_tickCount = 0

Additional Inherited Members

Public Types inherited from EmberUI::TreeCanvas
using NodeSelectionCallback = std::function<void(EmberCore::ITreeNode *)>
using VisibilityChangeCallback = std::function<void()>

Detailed Description

Tree canvas with status-aware coloring and a connection info overlay.

Definition at line 9 of file MonitorTreeCanvas.h.

Constructor & Destructor Documentation

◆ MonitorTreeCanvas()

Ember::Monitor::MonitorTreeCanvas::MonitorTreeCanvas ( wxWindow * parent,
wxWindowID id = wxID_ANY )

Definition at line 7 of file MonitorTreeCanvas.cpp.

Member Function Documentation

◆ ApplyBaseConfig()

void Ember::Monitor::MonitorTreeCanvas::ApplyBaseConfig ( )

Applies base visualization configuration (colors, layout, etc.).

Definition at line 11 of file MonitorTreeCanvas.cpp.

◆ GetNodeBorderColor()

wxColour Ember::Monitor::MonitorTreeCanvas::GetNodeBorderColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

Returns border color based on node status, selection, and hover.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 70 of file MonitorTreeCanvas.cpp.

◆ GetNodeFillColor()

wxColour Ember::Monitor::MonitorTreeCanvas::GetNodeFillColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

Returns fill color based on node status, selection, and hover.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 50 of file MonitorTreeCanvas.cpp.

◆ GetNodeTextColor()

wxColour Ember::Monitor::MonitorTreeCanvas::GetNodeTextColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

Returns text color based on node status, selection, and hover.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 91 of file MonitorTreeCanvas.cpp.

◆ OnBeforePaintOverlays()

void Ember::Monitor::MonitorTreeCanvas::OnBeforePaintOverlays ( wxDC & dc)
overrideprotectedvirtual

Paints connection info overlay before other overlays.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 101 of file MonitorTreeCanvas.cpp.

◆ SetConnectionInfo()

void Ember::Monitor::MonitorTreeCanvas::SetConnectionInfo ( bool connected,
int tickCount )

Sets connection state and tick count for the overlay display.

Definition at line 45 of file MonitorTreeCanvas.cpp.

Member Data Documentation

◆ m_connected

bool Ember::Monitor::MonitorTreeCanvas::m_connected = false
private

Definition at line 30 of file MonitorTreeCanvas.h.

◆ m_tickCount

int Ember::Monitor::MonitorTreeCanvas::m_tickCount = 0
private

Definition at line 31 of file MonitorTreeCanvas.h.


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