Ember
Loading...
Searching...
No Matches
EmberUI::TreeCanvas Class Reference

Shared tree rendering canvas usable by both EmberForge and EmberMonitor. More...

#include <TreeCanvas.h>

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

Classes

struct  CollapseArrowInfo
struct  LineSegment

Public Types

using NodeSelectionCallback = std::function<void(EmberCore::ITreeNode *)>
using VisibilityChangeCallback = std::function<void()>

Public Member Functions

 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

virtual void OnNodeSelected (EmberCore::ITreeNode *node)
 Called when a node is selected; override for app-specific behavior.
virtual void OnBeforePaintOverlays (wxDC &dc)
 Called before painting overlays; override to draw custom overlays.
virtual wxColour GetNodeFillColor (EmberCore::ITreeNode *node, bool selected, bool hovered)
 Returns the fill color for a node; override for custom coloring.
virtual wxColour GetNodeBorderColor (EmberCore::ITreeNode *node, bool selected, bool hovered)
 Returns the border color for a node; override for custom coloring.
virtual wxColour GetNodeTextColor (EmberCore::ITreeNode *node, bool selected, bool hovered)
 Returns the text color for a node; override for custom coloring.
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 Member Functions

void OnPaint (wxPaintEvent &event)
void OnSize (wxSizeEvent &event)
void OnMouseLeftDown (wxMouseEvent &event)
void OnMouseLeftDClick (wxMouseEvent &event)
void OnMouseMotion (wxMouseEvent &event)
void OnMouseWheel (wxMouseEvent &event)
void OnMouseMiddleDown (wxMouseEvent &event)
void OnMouseMiddleUp (wxMouseEvent &event)
void OnMouseLeftUp (wxMouseEvent &event)
void OnMouseRightUp (wxMouseEvent &event)
void DrawGrid (wxDC &dc, const wxRect &viewport)
void DrawNode (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y, int level, const wxRect &viewport)
void DrawNodeBox (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y)
void DrawNodeText (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y)
void DrawTypeHeader (wxDC &dc, EmberCore::ITreeNode *node, const wxRect &nodeRect)
void DrawNodeConnections (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y)
void DrawCollapseArrow (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y)
void DrawOverlayInfo (wxDC &dc)
void DrawMinimap (wxDC &dc)
void DrawMinimapNode (wxDC &dc, EmberCore::ITreeNode *node, wxCoord x, wxCoord y, float scaleX, float scaleY, int offsetX, int offsetY, const wxRect &minimapArea)
void DrawBreadcrumb (wxDC &dc)
void AutoCollapseTree (EmberCore::ITreeNode *node, int depth)
void ExpandAllChildren (EmberCore::ITreeNode *node)
void CollapseAllChildren (EmberCore::ITreeNode *node)
void ExpandToDepth (EmberCore::ITreeNode *node, int relativeDepth)
wxColour GetNodeTypeColor (EmberCore::ITreeNode::NodeType type) const
EmberCore::ITreeNodeGetEffectiveRoot () const
void ComputeTreeExtent (EmberCore::ITreeNode *node, wxCoord x, wxCoord y, int &minX, int &maxX, int &maxY)
int CalculateSubtreeWidth (EmberCore::ITreeNode *node)
wxPoint CalculateRootPosition ()
EmberCore::ITreeNodeFindNodeAtPosition (EmberCore::ITreeNode *node, wxPoint node_pos, wxPoint target_pos)
EmberCore::ITreeNodeFindArrowAtPosition (const wxPoint &world_pos) const
wxPoint FindNodeWorldPosition (EmberCore::ITreeNode *target_node)
wxPoint ScreenToWorld (const wxPoint &screen_pos) const
wxPoint WorldToScreen (const wxPoint &world_pos) const
wxRect GetViewportBounds () const
void UpdateScaledConfig ()
void BuildPathToSelected ()
 wxDECLARE_EVENT_TABLE ()

Private Attributes

TreeCanvasConfig m_config
TreeCanvasConfig m_scaled
std::shared_ptr< EmberCore::ITreeStructurem_tree
IStatusProviderm_statusProvider = nullptr
EmberCore::ITreeNodem_selectedNode = nullptr
EmberCore::ITreeNodem_hoveredNode = nullptr
EmberCore::ITreeNodem_hoveredArrowNode = nullptr
EmberCore::ITreeNodem_pressedArrowNode = nullptr
EmberCore::ITreeNodem_focusRoot = nullptr
wxPoint m_viewOffset = {0, 0}
wxPoint m_targetOffset = {0, 0}
float m_zoomFactor = 1.0f
float m_minZoom = 0.05f
float m_maxZoom = 3.0f
bool m_isPanning = false
bool m_panKeyHeld = false
wxPoint m_lastMousePos
wxLongLong m_lastFrameTime
bool m_dirty = true
bool m_showGrid = true
bool m_showOverlayInfo = true
bool m_showMinimap = true
bool m_showBreadcrumb = true
wxFont m_titleFont
wxFont m_typeFont
wxFont m_headerFont
std::set< int64_t > m_executionPathIds
std::set< int > m_pathToSelectedIds
std::vector< LineSegmentm_highlightedSegments
std::vector< LineSegmentm_selectedPathSegments
std::vector< CollapseArrowInfom_collapseArrows
NodeSelectionCallback m_selectionCallback
VisibilityChangeCallback m_visibilityChangeCallback
wxRect m_minimapRect
wxBitmap m_minimapCache
bool m_minimapDirty = true
int m_minimapCacheTreeMinX = 0
int m_minimapCacheRootY = 0
float m_minimapCacheScale = 0
int m_minimapCacheOfsX = 0
int m_minimapCacheOfsY = 0
std::vector< std::pair< wxRect, EmberCore::ITreeNode * > > m_breadcrumbHitTargets
std::unordered_map< EmberCore::ITreeNode *, int > m_widthCache
std::map< EmberCore::ITreeNode::NodeType, wxBitmap > m_typeIcons
wxTimer * m_refreshTimer

Detailed Description

Shared tree rendering canvas usable by both EmberForge and EmberMonitor.

Supports zoom, pan, node selection, and optional status overlay. Subclass and override virtual hooks for app-specific behavior.

Definition at line 76 of file TreeCanvas.h.

Member Typedef Documentation

◆ NodeSelectionCallback

Definition at line 78 of file TreeCanvas.h.

◆ VisibilityChangeCallback

using EmberUI::TreeCanvas::VisibilityChangeCallback = std::function<void()>

Definition at line 79 of file TreeCanvas.h.

Constructor & Destructor Documentation

◆ TreeCanvas()

EmberUI::TreeCanvas::TreeCanvas ( wxWindow * parent,
wxWindowID id = wxID_ANY )

Constructor.

◆ ~TreeCanvas()

EmberUI::TreeCanvas::~TreeCanvas ( )
virtual

Destructor.

Definition at line 69 of file TreeCanvas.cpp.

Member Function Documentation

◆ AutoCollapseTree()

void EmberUI::TreeCanvas::AutoCollapseTree ( EmberCore::ITreeNode * node,
int depth )
private

Definition at line 114 of file TreeCanvas.cpp.

◆ BuildPathToSelected()

void EmberUI::TreeCanvas::BuildPathToSelected ( )
private

Definition at line 314 of file TreeCanvas.cpp.

◆ CalculateRootPosition()

wxPoint EmberUI::TreeCanvas::CalculateRootPosition ( )
private

Definition at line 1485 of file TreeCanvas.cpp.

◆ CalculateSubtreeWidth()

int EmberUI::TreeCanvas::CalculateSubtreeWidth ( EmberCore::ITreeNode * node)
private

Definition at line 1458 of file TreeCanvas.cpp.

◆ CenterOnNode()

void EmberUI::TreeCanvas::CenterOnNode ( EmberCore::ITreeNode * node)

Centers the view on the given node.

Definition at line 275 of file TreeCanvas.cpp.

◆ ClearWidthCache()

void EmberUI::TreeCanvas::ClearWidthCache ( )
inlineprotected

Clears the subtree width cache.

Definition at line 179 of file TreeCanvas.h.

◆ CollapseAllChildren()

void EmberUI::TreeCanvas::CollapseAllChildren ( EmberCore::ITreeNode * node)
private

Definition at line 141 of file TreeCanvas.cpp.

◆ ComputeTreeExtent()

void EmberUI::TreeCanvas::ComputeTreeExtent ( EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y,
int & minX,
int & maxX,
int & maxY )
private

Definition at line 1231 of file TreeCanvas.cpp.

◆ DrawBreadcrumb()

void EmberUI::TreeCanvas::DrawBreadcrumb ( wxDC & dc)
private

Definition at line 1368 of file TreeCanvas.cpp.

◆ DrawCollapseArrow()

void EmberUI::TreeCanvas::DrawCollapseArrow ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y )
private

Definition at line 1088 of file TreeCanvas.cpp.

◆ DrawGrid()

void EmberUI::TreeCanvas::DrawGrid ( wxDC & dc,
const wxRect & viewport )
private

Definition at line 828 of file TreeCanvas.cpp.

◆ DrawMinimap()

void EmberUI::TreeCanvas::DrawMinimap ( wxDC & dc)
private

Definition at line 1258 of file TreeCanvas.cpp.

◆ DrawMinimapNode()

void EmberUI::TreeCanvas::DrawMinimapNode ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y,
float scaleX,
float scaleY,
int offsetX,
int offsetY,
const wxRect & minimapArea )
private

Definition at line 1331 of file TreeCanvas.cpp.

◆ DrawNode()

void EmberUI::TreeCanvas::DrawNode ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y,
int level,
const wxRect & viewport )
private

Definition at line 855 of file TreeCanvas.cpp.

◆ DrawNodeBox()

void EmberUI::TreeCanvas::DrawNodeBox ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y )
private

Definition at line 907 of file TreeCanvas.cpp.

◆ DrawNodeConnections()

void EmberUI::TreeCanvas::DrawNodeConnections ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y )
private

Definition at line 1039 of file TreeCanvas.cpp.

◆ DrawNodeText()

void EmberUI::TreeCanvas::DrawNodeText ( wxDC & dc,
EmberCore::ITreeNode * node,
wxCoord x,
wxCoord y )
private

Definition at line 1004 of file TreeCanvas.cpp.

◆ DrawOverlayInfo()

void EmberUI::TreeCanvas::DrawOverlayInfo ( wxDC & dc)
private

Definition at line 1134 of file TreeCanvas.cpp.

◆ DrawTypeHeader()

void EmberUI::TreeCanvas::DrawTypeHeader ( wxDC & dc,
EmberCore::ITreeNode * node,
const wxRect & nodeRect )
private

Definition at line 939 of file TreeCanvas.cpp.

◆ EnterFocusMode()

void EmberUI::TreeCanvas::EnterFocusMode ( EmberCore::ITreeNode * node)

Enters focus mode, showing only the subtree rooted at the given node.

Definition at line 1184 of file TreeCanvas.cpp.

◆ ExitFocusMode()

void EmberUI::TreeCanvas::ExitFocusMode ( )

Exits focus mode.

Definition at line 1195 of file TreeCanvas.cpp.

◆ ExpandAllChildren()

void EmberUI::TreeCanvas::ExpandAllChildren ( EmberCore::ITreeNode * node)
private

Definition at line 131 of file TreeCanvas.cpp.

◆ ExpandToDepth()

void EmberUI::TreeCanvas::ExpandToDepth ( EmberCore::ITreeNode * node,
int relativeDepth )
private

Definition at line 151 of file TreeCanvas.cpp.

◆ FindArrowAtPosition()

EmberCore::ITreeNode * EmberUI::TreeCanvas::FindArrowAtPosition ( const wxPoint & world_pos) const
private

Definition at line 1521 of file TreeCanvas.cpp.

◆ FindNodeAtPosition()

EmberCore::ITreeNode * EmberUI::TreeCanvas::FindNodeAtPosition ( EmberCore::ITreeNode * node,
wxPoint node_pos,
wxPoint target_pos )
private

Definition at line 1487 of file TreeCanvas.cpp.

◆ FindNodeWorldPosition()

wxPoint EmberUI::TreeCanvas::FindNodeWorldPosition ( EmberCore::ITreeNode * target_node)
private

Definition at line 1534 of file TreeCanvas.cpp.

◆ FitTreeInView()

void EmberUI::TreeCanvas::FitTreeInView ( )

Adjusts view to fit the entire tree.

Definition at line 252 of file TreeCanvas.cpp.

◆ GetConfig() [1/2]

TreeCanvasConfig & EmberUI::TreeCanvas::GetConfig ( )
inline

Returns mutable configuration.

Definition at line 92 of file TreeCanvas.h.

◆ GetConfig() [2/2]

const TreeCanvasConfig & EmberUI::TreeCanvas::GetConfig ( ) const
inline

Returns const configuration.

Definition at line 94 of file TreeCanvas.h.

◆ GetEffectiveRoot()

EmberCore::ITreeNode * EmberUI::TreeCanvas::GetEffectiveRoot ( ) const
private

Definition at line 1206 of file TreeCanvas.cpp.

◆ GetFocusRoot()

EmberCore::ITreeNode * EmberUI::TreeCanvas::GetFocusRoot ( ) const
inline

Returns the focus mode root node, or nullptr if not in focus mode.

Definition at line 151 of file TreeCanvas.h.

◆ GetNodeBorderColor()

wxColour EmberUI::TreeCanvas::GetNodeBorderColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
protectedvirtual

Returns the border color for a node; override for custom coloring.

Reimplemented in Ember::Monitor::MonitorTreeCanvas, and EmberForge::ForgeTreeCanvas.

Definition at line 214 of file TreeCanvas.cpp.

◆ GetNodeFillColor()

wxColour EmberUI::TreeCanvas::GetNodeFillColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
protectedvirtual

Returns the fill color for a node; override for custom coloring.

Reimplemented in Ember::Monitor::MonitorTreeCanvas, and EmberForge::ForgeTreeCanvas.

Definition at line 204 of file TreeCanvas.cpp.

◆ GetNodeTextColor()

wxColour EmberUI::TreeCanvas::GetNodeTextColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
protectedvirtual

Returns the text color for a node; override for custom coloring.

Reimplemented in Ember::Monitor::MonitorTreeCanvas, and EmberForge::ForgeTreeCanvas.

Definition at line 234 of file TreeCanvas.cpp.

◆ GetNodeTypeColor()

wxColour EmberUI::TreeCanvas::GetNodeTypeColor ( EmberCore::ITreeNode::NodeType type) const
private

Definition at line 1214 of file TreeCanvas.cpp.

◆ GetSelectedNode()

EmberCore::ITreeNode * EmberUI::TreeCanvas::GetSelectedNode ( ) const
inline

Returns the currently selected node.

Definition at line 102 of file TreeCanvas.h.

◆ GetShowMinimap()

bool EmberUI::TreeCanvas::GetShowMinimap ( ) const
inlineprotected

Returns whether the minimap is shown.

Definition at line 181 of file TreeCanvas.h.

◆ GetStatusProvider()

IStatusProvider * EmberUI::TreeCanvas::GetStatusProvider ( ) const
inline

Returns the status overlay provider.

Definition at line 99 of file TreeCanvas.h.

◆ GetTargetOffset()

wxPoint EmberUI::TreeCanvas::GetTargetOffset ( ) const
inlineprotected

Returns the target offset for smooth panning.

Definition at line 175 of file TreeCanvas.h.

◆ GetTree()

std::shared_ptr< EmberCore::ITreeStructure > EmberUI::TreeCanvas::GetTree ( ) const
inline

Returns the current tree structure.

Definition at line 89 of file TreeCanvas.h.

◆ GetViewOffset()

wxPoint EmberUI::TreeCanvas::GetViewOffset ( ) const
inlineprotected

Returns the current view offset.

Definition at line 173 of file TreeCanvas.h.

◆ GetViewportBounds()

wxRect EmberUI::TreeCanvas::GetViewportBounds ( ) const
private

Definition at line 1585 of file TreeCanvas.cpp.

◆ GetZoom()

float EmberUI::TreeCanvas::GetZoom ( ) const
inline

Returns the current zoom factor.

Definition at line 120 of file TreeCanvas.h.

◆ InvalidateLayout()

void EmberUI::TreeCanvas::InvalidateLayout ( )
inline

Invalidates layout cache and triggers refresh.

Definition at line 128 of file TreeCanvas.h.

◆ IsInFocusMode()

bool EmberUI::TreeCanvas::IsInFocusMode ( ) const
inline

Returns whether focus mode is active.

Definition at line 149 of file TreeCanvas.h.

◆ LoadTypeIcons()

void EmberUI::TreeCanvas::LoadTypeIcons ( )

Loads type icons from the configured icon directory.

Definition at line 77 of file TreeCanvas.cpp.

◆ MarkDirty()

void EmberUI::TreeCanvas::MarkDirty ( )
inline

Marks the canvas for repaint.

Definition at line 123 of file TreeCanvas.h.

◆ OnBeforePaintOverlays()

void EmberUI::TreeCanvas::OnBeforePaintOverlays ( wxDC & dc)
protectedvirtual

Called before painting overlays; override to draw custom overlays.

Reimplemented in Ember::Monitor::MonitorTreeCanvas, and EmberForge::ForgeTreeCanvas.

Definition at line 202 of file TreeCanvas.cpp.

◆ OnKeyDown()

void EmberUI::TreeCanvas::OnKeyDown ( wxKeyEvent & event)
protectedvirtual

Key down handler; override for custom key handling.

Reimplemented in EmberForge::ForgeTreeCanvas.

Definition at line 607 of file TreeCanvas.cpp.

◆ OnKeyUp()

void EmberUI::TreeCanvas::OnKeyUp ( wxKeyEvent & event)
protectedvirtual

Key up handler; override for custom key handling.

Definition at line 663 of file TreeCanvas.cpp.

◆ OnMouseLeftDClick()

void EmberUI::TreeCanvas::OnMouseLeftDClick ( wxMouseEvent & event)
private

Definition at line 496 of file TreeCanvas.cpp.

◆ OnMouseLeftDown()

void EmberUI::TreeCanvas::OnMouseLeftDown ( wxMouseEvent & event)
private

Definition at line 404 of file TreeCanvas.cpp.

◆ OnMouseLeftUp()

void EmberUI::TreeCanvas::OnMouseLeftUp ( wxMouseEvent & event)
private

Definition at line 488 of file TreeCanvas.cpp.

◆ OnMouseMiddleDown()

void EmberUI::TreeCanvas::OnMouseMiddleDown ( wxMouseEvent & event)
private

Definition at line 600 of file TreeCanvas.cpp.

◆ OnMouseMiddleUp()

void EmberUI::TreeCanvas::OnMouseMiddleUp ( wxMouseEvent & event)
private

Definition at line 605 of file TreeCanvas.cpp.

◆ OnMouseMotion()

void EmberUI::TreeCanvas::OnMouseMotion ( wxMouseEvent & event)
private

Definition at line 517 of file TreeCanvas.cpp.

◆ OnMouseRightUp()

void EmberUI::TreeCanvas::OnMouseRightUp ( wxMouseEvent & event)
private

Definition at line 673 of file TreeCanvas.cpp.

◆ OnMouseWheel()

void EmberUI::TreeCanvas::OnMouseWheel ( wxMouseEvent & event)
private

Definition at line 578 of file TreeCanvas.cpp.

◆ OnNodeSelected()

void EmberUI::TreeCanvas::OnNodeSelected ( EmberCore::ITreeNode * node)
protectedvirtual

Called when a node is selected; override for app-specific behavior.

Definition at line 196 of file TreeCanvas.cpp.

◆ OnPaint()

void EmberUI::TreeCanvas::OnPaint ( wxPaintEvent & event)
private

Definition at line 327 of file TreeCanvas.cpp.

◆ OnSize()

void EmberUI::TreeCanvas::OnSize ( wxSizeEvent & event)
private

Definition at line 399 of file TreeCanvas.cpp.

◆ RefreshCanvas()

void EmberUI::TreeCanvas::RefreshCanvas ( )
inline

Marks canvas dirty (alias for MarkDirty).

Definition at line 125 of file TreeCanvas.h.

◆ ResetView()

void EmberUI::TreeCanvas::ResetView ( )

Resets zoom and pan to default values.

Definition at line 244 of file TreeCanvas.cpp.

◆ ScreenToWorld()

wxPoint EmberUI::TreeCanvas::ScreenToWorld ( const wxPoint & screen_pos) const
private

Definition at line 1575 of file TreeCanvas.cpp.

◆ SetNodeSelectionCallback()

void EmberUI::TreeCanvas::SetNodeSelectionCallback ( NodeSelectionCallback callback)
inline

Sets callback invoked when a node is selected.

Definition at line 107 of file TreeCanvas.h.

◆ SetSelectedNode()

void EmberUI::TreeCanvas::SetSelectedNode ( EmberCore::ITreeNode * node)

Sets the selected node.

Definition at line 190 of file TreeCanvas.cpp.

◆ SetShowBreadcrumb()

void EmberUI::TreeCanvas::SetShowBreadcrumb ( bool show)
inline

Enables or disables breadcrumb display.

Definition at line 142 of file TreeCanvas.h.

◆ SetShowGrid()

void EmberUI::TreeCanvas::SetShowGrid ( bool show)
inline

Enables or disables grid display.

Definition at line 136 of file TreeCanvas.h.

◆ SetShowMinimap()

void EmberUI::TreeCanvas::SetShowMinimap ( bool show)
inline

Enables or disables minimap display.

Definition at line 140 of file TreeCanvas.h.

◆ SetShowOverlayInfo()

void EmberUI::TreeCanvas::SetShowOverlayInfo ( bool show)
inline

Enables or disables overlay info display.

Definition at line 138 of file TreeCanvas.h.

◆ SetStatusProvider()

void EmberUI::TreeCanvas::SetStatusProvider ( IStatusProvider * provider)
inline

Sets the status overlay provider.

Definition at line 97 of file TreeCanvas.h.

◆ SetTargetOffset()

void EmberUI::TreeCanvas::SetTargetOffset ( const wxPoint & offset)
inlineprotected

Sets the target offset for smooth panning.

Definition at line 177 of file TreeCanvas.h.

◆ SetTree()

void EmberUI::TreeCanvas::SetTree ( std::shared_ptr< EmberCore::ITreeStructure > tree)

Sets the tree structure to display.

Definition at line 165 of file TreeCanvas.cpp.

◆ SetVisibilityChangeCallback()

void EmberUI::TreeCanvas::SetVisibilityChangeCallback ( VisibilityChangeCallback callback)
inline

Sets callback invoked when node visibility changes.

Definition at line 109 of file TreeCanvas.h.

◆ SetZoom()

void EmberUI::TreeCanvas::SetZoom ( float zoom)

Sets the zoom factor.

Definition at line 295 of file TreeCanvas.cpp.

◆ UpdateScaledConfig()

void EmberUI::TreeCanvas::UpdateScaledConfig ( )
private

Definition at line 302 of file TreeCanvas.cpp.

◆ WorldToScreen()

wxPoint EmberUI::TreeCanvas::WorldToScreen ( const wxPoint & world_pos) const
private

Definition at line 1580 of file TreeCanvas.cpp.

◆ wxDECLARE_EVENT_TABLE()

EmberUI::TreeCanvas::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ m_breadcrumbHitTargets

std::vector<std::pair<wxRect, EmberCore::ITreeNode *> > EmberUI::TreeCanvas::m_breadcrumbHitTargets
private

Definition at line 287 of file TreeCanvas.h.

◆ m_collapseArrows

std::vector<CollapseArrowInfo> EmberUI::TreeCanvas::m_collapseArrows
private

Definition at line 273 of file TreeCanvas.h.

◆ m_config

TreeCanvasConfig EmberUI::TreeCanvas::m_config
private

Definition at line 228 of file TreeCanvas.h.

◆ m_dirty

bool EmberUI::TreeCanvas::m_dirty = true
private

Definition at line 250 of file TreeCanvas.h.

◆ m_executionPathIds

std::set<int64_t> EmberUI::TreeCanvas::m_executionPathIds
private

Definition at line 260 of file TreeCanvas.h.

◆ m_focusRoot

EmberCore::ITreeNode* EmberUI::TreeCanvas::m_focusRoot = nullptr
private

Definition at line 237 of file TreeCanvas.h.

◆ m_headerFont

wxFont EmberUI::TreeCanvas::m_headerFont
private

Definition at line 258 of file TreeCanvas.h.

◆ m_highlightedSegments

std::vector<LineSegment> EmberUI::TreeCanvas::m_highlightedSegments
private

Definition at line 266 of file TreeCanvas.h.

◆ m_hoveredArrowNode

EmberCore::ITreeNode* EmberUI::TreeCanvas::m_hoveredArrowNode = nullptr
private

Definition at line 235 of file TreeCanvas.h.

◆ m_hoveredNode

EmberCore::ITreeNode* EmberUI::TreeCanvas::m_hoveredNode = nullptr
private

Definition at line 234 of file TreeCanvas.h.

◆ m_isPanning

bool EmberUI::TreeCanvas::m_isPanning = false
private

Definition at line 245 of file TreeCanvas.h.

◆ m_lastFrameTime

wxLongLong EmberUI::TreeCanvas::m_lastFrameTime
private

Definition at line 248 of file TreeCanvas.h.

◆ m_lastMousePos

wxPoint EmberUI::TreeCanvas::m_lastMousePos
private

Definition at line 247 of file TreeCanvas.h.

◆ m_maxZoom

float EmberUI::TreeCanvas::m_maxZoom = 3.0f
private

Definition at line 243 of file TreeCanvas.h.

◆ m_minimapCache

wxBitmap EmberUI::TreeCanvas::m_minimapCache
private

Definition at line 279 of file TreeCanvas.h.

◆ m_minimapCacheOfsX

int EmberUI::TreeCanvas::m_minimapCacheOfsX = 0
private

Definition at line 284 of file TreeCanvas.h.

◆ m_minimapCacheOfsY

int EmberUI::TreeCanvas::m_minimapCacheOfsY = 0
private

Definition at line 285 of file TreeCanvas.h.

◆ m_minimapCacheRootY

int EmberUI::TreeCanvas::m_minimapCacheRootY = 0
private

Definition at line 282 of file TreeCanvas.h.

◆ m_minimapCacheScale

float EmberUI::TreeCanvas::m_minimapCacheScale = 0
private

Definition at line 283 of file TreeCanvas.h.

◆ m_minimapCacheTreeMinX

int EmberUI::TreeCanvas::m_minimapCacheTreeMinX = 0
private

Definition at line 281 of file TreeCanvas.h.

◆ m_minimapDirty

bool EmberUI::TreeCanvas::m_minimapDirty = true
private

Definition at line 280 of file TreeCanvas.h.

◆ m_minimapRect

wxRect EmberUI::TreeCanvas::m_minimapRect
private

Definition at line 278 of file TreeCanvas.h.

◆ m_minZoom

float EmberUI::TreeCanvas::m_minZoom = 0.05f
private

Definition at line 242 of file TreeCanvas.h.

◆ m_panKeyHeld

bool EmberUI::TreeCanvas::m_panKeyHeld = false
private

Definition at line 246 of file TreeCanvas.h.

◆ m_pathToSelectedIds

std::set<int> EmberUI::TreeCanvas::m_pathToSelectedIds
private

Definition at line 261 of file TreeCanvas.h.

◆ m_pressedArrowNode

EmberCore::ITreeNode* EmberUI::TreeCanvas::m_pressedArrowNode = nullptr
private

Definition at line 236 of file TreeCanvas.h.

◆ m_refreshTimer

wxTimer* EmberUI::TreeCanvas::m_refreshTimer
private

Definition at line 293 of file TreeCanvas.h.

◆ m_scaled

TreeCanvasConfig EmberUI::TreeCanvas::m_scaled
private

Definition at line 229 of file TreeCanvas.h.

◆ m_selectedNode

EmberCore::ITreeNode* EmberUI::TreeCanvas::m_selectedNode = nullptr
private

Definition at line 233 of file TreeCanvas.h.

◆ m_selectedPathSegments

std::vector<LineSegment> EmberUI::TreeCanvas::m_selectedPathSegments
private

Definition at line 267 of file TreeCanvas.h.

◆ m_selectionCallback

NodeSelectionCallback EmberUI::TreeCanvas::m_selectionCallback
private

Definition at line 275 of file TreeCanvas.h.

◆ m_showBreadcrumb

bool EmberUI::TreeCanvas::m_showBreadcrumb = true
private

Definition at line 254 of file TreeCanvas.h.

◆ m_showGrid

bool EmberUI::TreeCanvas::m_showGrid = true
private

Definition at line 251 of file TreeCanvas.h.

◆ m_showMinimap

bool EmberUI::TreeCanvas::m_showMinimap = true
private

Definition at line 253 of file TreeCanvas.h.

◆ m_showOverlayInfo

bool EmberUI::TreeCanvas::m_showOverlayInfo = true
private

Definition at line 252 of file TreeCanvas.h.

◆ m_statusProvider

IStatusProvider* EmberUI::TreeCanvas::m_statusProvider = nullptr
private

Definition at line 231 of file TreeCanvas.h.

◆ m_targetOffset

wxPoint EmberUI::TreeCanvas::m_targetOffset = {0, 0}
private

Definition at line 240 of file TreeCanvas.h.

◆ m_titleFont

wxFont EmberUI::TreeCanvas::m_titleFont
private

Definition at line 256 of file TreeCanvas.h.

◆ m_tree

std::shared_ptr<EmberCore::ITreeStructure> EmberUI::TreeCanvas::m_tree
private

Definition at line 230 of file TreeCanvas.h.

◆ m_typeFont

wxFont EmberUI::TreeCanvas::m_typeFont
private

Definition at line 257 of file TreeCanvas.h.

◆ m_typeIcons

std::map<EmberCore::ITreeNode::NodeType, wxBitmap> EmberUI::TreeCanvas::m_typeIcons
private

Definition at line 291 of file TreeCanvas.h.

◆ m_viewOffset

wxPoint EmberUI::TreeCanvas::m_viewOffset = {0, 0}
private

Definition at line 239 of file TreeCanvas.h.

◆ m_visibilityChangeCallback

VisibilityChangeCallback EmberUI::TreeCanvas::m_visibilityChangeCallback
private

Definition at line 276 of file TreeCanvas.h.

◆ m_widthCache

std::unordered_map<EmberCore::ITreeNode *, int> EmberUI::TreeCanvas::m_widthCache
mutableprivate

Definition at line 289 of file TreeCanvas.h.

◆ m_zoomFactor

float EmberUI::TreeCanvas::m_zoomFactor = 1.0f
private

Definition at line 241 of file TreeCanvas.h.


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