Ember
Loading...
Searching...
No Matches
EmberForge::ForgeTreeCanvas Class Reference

#include <ForgeTreeCanvas.h>

Inheritance diagram for EmberForge::ForgeTreeCanvas:
EmberUI::TreeCanvas

Public Member Functions

 ForgeTreeCanvas (wxWindow *parent, wxWindowID id=wxID_ANY)
void LoadPreferences ()
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

void OnBeforePaintOverlays (wxDC &dc) override
 Called before painting overlays; override to draw custom overlays.
void OnKeyDown (wxKeyEvent &event) override
 Key down handler; override for custom key handling.
wxColour GetNodeFillColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns the fill color for a node; override for custom coloring.
wxColour GetNodeBorderColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns the border color for a node; override for custom coloring.
wxColour GetNodeTextColor (EmberCore::ITreeNode *node, bool selected, bool hovered) override
 Returns the text color for a node; override for custom coloring.
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 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

bool MatchesHotkey (int keyCode, const EmberCore::String &hotkeyStr) const

Static Private Member Functions

static wxColour ApplyTint (const wxColour &color, float tint)

Additional Inherited Members

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

Detailed Description

Definition at line 7 of file ForgeTreeCanvas.h.

Constructor & Destructor Documentation

◆ ForgeTreeCanvas()

EmberForge::ForgeTreeCanvas::ForgeTreeCanvas ( wxWindow * parent,
wxWindowID id = wxID_ANY )

Definition at line 10 of file ForgeTreeCanvas.cpp.

Member Function Documentation

◆ ApplyTint()

wxColour EmberForge::ForgeTreeCanvas::ApplyTint ( const wxColour & color,
float tint )
staticprivate

Definition at line 277 of file ForgeTreeCanvas.cpp.

◆ GetNodeBorderColor()

wxColour EmberForge::ForgeTreeCanvas::GetNodeBorderColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

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

Reimplemented from EmberUI::TreeCanvas.

Definition at line 250 of file ForgeTreeCanvas.cpp.

◆ GetNodeFillColor()

wxColour EmberForge::ForgeTreeCanvas::GetNodeFillColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

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

Reimplemented from EmberUI::TreeCanvas.

Definition at line 232 of file ForgeTreeCanvas.cpp.

◆ GetNodeTextColor()

wxColour EmberForge::ForgeTreeCanvas::GetNodeTextColor ( EmberCore::ITreeNode * node,
bool selected,
bool hovered )
overrideprotectedvirtual

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

Reimplemented from EmberUI::TreeCanvas.

Definition at line 265 of file ForgeTreeCanvas.cpp.

◆ LoadPreferences()

void EmberForge::ForgeTreeCanvas::LoadPreferences ( )

Definition at line 18 of file ForgeTreeCanvas.cpp.

◆ MatchesHotkey()

bool EmberForge::ForgeTreeCanvas::MatchesHotkey ( int keyCode,
const EmberCore::String & hotkeyStr ) const
private

Definition at line 156 of file ForgeTreeCanvas.cpp.

◆ OnBeforePaintOverlays()

void EmberForge::ForgeTreeCanvas::OnBeforePaintOverlays ( wxDC & dc)
overrideprotectedvirtual

Called before painting overlays; override to draw custom overlays.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 68 of file ForgeTreeCanvas.cpp.

◆ OnKeyDown()

void EmberForge::ForgeTreeCanvas::OnKeyDown ( wxKeyEvent & event)
overrideprotectedvirtual

Key down handler; override for custom key handling.

Reimplemented from EmberUI::TreeCanvas.

Definition at line 187 of file ForgeTreeCanvas.cpp.


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