Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::PrefabCanvas Class Reference

#include <PrefabCanvas.h>

+ Collaboration diagram for Olympe::PrefabCanvas:

Public Member Functions

 PrefabCanvas ()
 
 ~PrefabCanvas ()
 
void Initialize (EntityPrefabGraphDocument *document)
 
void SetCanvasEditor (ICanvasEditor *canvasEditor)
 
EntityPrefabGraphDocumentGetDocument () const
 
void Render ()
 
void Update (float deltaTime)
 
void OnMouseMove (float x, float y)
 
void OnMouseDown (int button, float x, float y)
 
void OnMouseUp (int button, float x, float y)
 
void OnMouseScroll (float delta)
 
void OnKeyDown (int keyCode)
 
void OnKeyUp (int keyCode)
 
void PanCanvas (float deltaX, float deltaY)
 
void ZoomCanvas (float zoomDelta, float centerX, float centerY)
 
void ResetView ()
 
void FitToContent ()
 
NodeId GetNodeAtPosition (float x, float y)
 
void SelectNodeAt (float x, float y, bool addToSelection=false)
 
void SelectNodesInRectangle (const Vector &rectStart, const Vector &rectEnd, bool addToSelection=false)
 
void ClearSelection ()
 
void SelectAll ()
 
void DeleteSelectedNodes ()
 
void AddComponentNode (const std::string &componentType, const std::string &componentName, float x, float y)
 
void AcceptComponentDropAtScreenPos (const std::string &componentType, const std::string &componentName, float screenX, float screenY)
 
void StartConnectionCreation (NodeId sourceNodeId)
 
void CompleteConnection (NodeId targetNodeId)
 
void CancelConnectionCreation ()
 
bool IsCreatingConnection () const
 
NodeId GetConnectionSourceNode () const
 
void SetGridEnabled (bool enabled)
 
bool IsGridEnabled () const
 
void SetGridSpacing (float spacing)
 
float GetGridSpacing () const
 
void SetShowDebugInfo (bool show)
 
bool GetShowDebugInfo () const
 
void SetSnapToGrid (bool snap)
 
bool IsSnapToGridEnabled () const
 
Vector GetCanvasOffset () const
 
void SetCanvasOffset (const Vector &offset)
 
float GetCanvasZoom () const
 
void SetCanvasZoom (float zoom)
 
Vector ScreenToCanvas (float screenX, float screenY) const
 
Vector CanvasToScreen (float canvasX, float canvasY) const
 
ImVec2 GetCanvasScreenPos () const
 
CanvasInteractionMode GetInteractionMode () const
 
bool IsNodeDragging () const
 
bool IsPanning () const
 

Private Member Functions

void UpdateNodePositions ()
 
void HandleNodeDragStart (NodeId nodeId, float x, float y)
 
void HandleNodeDrag (float x, float y)
 
void HandleNodeDragEnd ()
 
void HandleConnectionCreation (float x, float y)
 
void HandleConnectionEnd (float x, float y)
 
void HandlePanStart (float x, float y)
 
void HandlePan (float x, float y)
 
void SnapNodePositionToGrid (Vector &position)
 
void RenderGrid ()
 
void RenderNodes ()
 
void RenderConnections ()
 
void RenderConnectionPreview ()
 
void RenderConnectionContextMenu ()
 
void RenderDebugInfo ()
 
void RenderSelectionBox ()
 
void RenderSelectionRectangle ()
 
void RenderContextMenu ()
 

Private Attributes

EntityPrefabGraphDocumentm_document = nullptr
 
std::unique_ptr< ComponentNodeRendererm_renderer
 
ICanvasEditorm_canvasEditor = nullptr
 
float m_gridSpacing = 50.0f
 
bool m_showGrid = true
 
bool m_showDebugInfo = false
 
bool m_snapToGrid = true
 
ImVec2 m_canvasScreenPos = ImVec2(0, 0)
 
Vector m_lastMousePos
 
Vector m_currentMousePos
 
NodeId m_draggedNodeId = InvalidNodeId
 
Vector m_dragStartPos
 
Vector m_nodeDragOffset
 
bool m_ctrlPressed = false
 
bool m_shiftPressed = false
 
CanvasInteractionMode m_interactionMode = CanvasInteractionMode::Normal
 
NodeId m_connectionSourceNodeId = InvalidNodeId
 
Vector m_connectionPreviewEnd
 
bool m_isCreatingConnection = false
 
bool m_isPanning = false
 
Vector m_panStartOffset
 
NodeId m_contextMenuNodeId = InvalidNodeId
 
Vector m_contextMenuMousePos
 
int m_hoveredConnectionIndex = -1
 
int m_contextMenuConnectionIndex = -1
 
Vector m_contextMenuConnectionMousePos
 
bool m_showConnectionContextMenu = false
 
bool m_isSelectingRectangle = false
 
Vector m_selectionRectStart
 
Vector m_selectionRectEnd
 

Detailed Description

Definition at line 25 of file PrefabCanvas.h.

Constructor & Destructor Documentation

◆ PrefabCanvas()

Olympe::PrefabCanvas::PrefabCanvas ( )

Definition at line 13 of file PrefabCanvas.cpp.

References m_renderer.

◆ ~PrefabCanvas()

Olympe::PrefabCanvas::~PrefabCanvas ( )

Definition at line 16 of file PrefabCanvas.cpp.

Member Function Documentation

◆ AcceptComponentDropAtScreenPos()

void Olympe::PrefabCanvas::AcceptComponentDropAtScreenPos ( const std::string &  componentType,
const std::string &  componentName,
float  screenX,
float  screenY 
)

◆ AddComponentNode()

void Olympe::PrefabCanvas::AddComponentNode ( const std::string &  componentType,
const std::string &  componentName,
float  x,
float  y 
)

◆ CancelConnectionCreation()

void Olympe::PrefabCanvas::CancelConnectionCreation ( )

Definition at line 589 of file PrefabCanvas.cpp.

References Olympe::InvalidNodeId, m_connectionSourceNodeId, m_interactionMode, m_isCreatingConnection, and Olympe::Normal.

Referenced by CompleteConnection(), and OnMouseUp().

+ Here is the caller graph for this function:

◆ CanvasToScreen()

Vector Olympe::PrefabCanvas::CanvasToScreen ( float  canvasX,
float  canvasY 
) const

Definition at line 666 of file PrefabCanvas.cpp.

References Olympe::ICanvasEditor::CanvasToScreen(), GetComponentTypeID_Static(), m_canvasEditor, and Olympe::Vector.

Referenced by RenderConnectionPreview(), and RenderSelectionRectangle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearSelection()

void Olympe::PrefabCanvas::ClearSelection ( )

Definition at line 495 of file PrefabCanvas.cpp.

References Olympe::EntityPrefabGraphDocument::DeselectAll(), and m_document.

+ Here is the call graph for this function:

◆ CompleteConnection()

void Olympe::PrefabCanvas::CompleteConnection ( NodeId  targetNodeId)

Definition at line 580 of file PrefabCanvas.cpp.

References CancelConnectionCreation(), Olympe::EntityPrefabGraphDocument::ConnectNodes(), GetComponentTypeID_Static(), Olympe::InvalidNodeId, m_connectionSourceNodeId, and m_document.

Referenced by OnMouseUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteSelectedNodes()

void Olympe::PrefabCanvas::DeleteSelectedNodes ( )

Definition at line 508 of file PrefabCanvas.cpp.

References Olympe::EntityPrefabGraphDocument::DeselectAll(), GetComponentTypeID_Static(), Olympe::EntityPrefabGraphDocument::GetSelectedNodes(), m_document, and Olympe::EntityPrefabGraphDocument::RemoveNode().

Referenced by OnKeyDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FitToContent()

void Olympe::PrefabCanvas::FitToContent ( )

Definition at line 430 of file PrefabCanvas.cpp.

References ResetView().

+ Here is the call graph for this function:

◆ GetCanvasOffset()

Vector Olympe::PrefabCanvas::GetCanvasOffset ( ) const

Definition at line 609 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::ICanvasEditor::GetPan(), m_canvasEditor, and Olympe::Vector.

+ Here is the call graph for this function:

◆ GetCanvasScreenPos()

ImVec2 Olympe::PrefabCanvas::GetCanvasScreenPos ( ) const

Definition at line 683 of file PrefabCanvas.cpp.

References m_canvasScreenPos.

◆ GetCanvasZoom()

float Olympe::PrefabCanvas::GetCanvasZoom ( ) const

Definition at line 629 of file PrefabCanvas.cpp.

References Olympe::ICanvasEditor::GetZoom(), and m_canvasEditor.

+ Here is the call graph for this function:

◆ GetConnectionSourceNode()

NodeId Olympe::PrefabCanvas::GetConnectionSourceNode ( ) const

Definition at line 597 of file PrefabCanvas.cpp.

References m_connectionSourceNodeId.

◆ GetDocument()

EntityPrefabGraphDocument * Olympe::PrefabCanvas::GetDocument ( ) const

◆ GetGridSpacing()

float Olympe::PrefabCanvas::GetGridSpacing ( ) const

Definition at line 602 of file PrefabCanvas.cpp.

References m_gridSpacing.

◆ GetInteractionMode()

CanvasInteractionMode Olympe::PrefabCanvas::GetInteractionMode ( ) const

Definition at line 688 of file PrefabCanvas.cpp.

References m_interactionMode.

◆ GetNodeAtPosition()

NodeId Olympe::PrefabCanvas::GetNodeAtPosition ( float  x,
float  y 
)

Definition at line 432 of file PrefabCanvas.cpp.

References Olympe::EntityPrefabGraphDocument::GetAllNodes(), GetComponentTypeID_Static(), Olympe::InvalidNodeId, m_document, m_renderer, and ScreenToCanvas().

Referenced by OnMouseDown(), RenderContextMenu(), and SelectNodeAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetShowDebugInfo()

bool Olympe::PrefabCanvas::GetShowDebugInfo ( ) const

Definition at line 604 of file PrefabCanvas.cpp.

References m_showDebugInfo.

◆ HandleConnectionCreation()

void Olympe::PrefabCanvas::HandleConnectionCreation ( float  x,
float  y 
)
private

Definition at line 1016 of file PrefabCanvas.cpp.

◆ HandleConnectionEnd()

void Olympe::PrefabCanvas::HandleConnectionEnd ( float  x,
float  y 
)
private

Definition at line 1021 of file PrefabCanvas.cpp.

◆ HandleNodeDrag()

void Olympe::PrefabCanvas::HandleNodeDrag ( float  x,
float  y 
)
private

Definition at line 971 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::EntityPrefabGraphDocument::GetNode(), Olympe::EntityPrefabGraphDocument::GetSelectedNodes(), Olympe::InvalidNodeId, m_document, m_draggedNodeId, m_dragStartPos, ScreenToCanvas(), and Olympe::Vector.

Referenced by OnMouseMove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNodeDragEnd()

void Olympe::PrefabCanvas::HandleNodeDragEnd ( )
private

Definition at line 1010 of file PrefabCanvas.cpp.

References Olympe::InvalidNodeId, m_draggedNodeId, m_interactionMode, and Olympe::Normal.

Referenced by OnMouseUp().

+ Here is the caller graph for this function:

◆ HandleNodeDragStart()

void Olympe::PrefabCanvas::HandleNodeDragStart ( NodeId  nodeId,
float  x,
float  y 
)
private

◆ HandlePan()

void Olympe::PrefabCanvas::HandlePan ( float  x,
float  y 
)
private

Definition at line 1047 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_canvasEditor, m_dragStartPos, m_isPanning, m_panStartOffset, Olympe::ICanvasEditor::SetPan(), and Olympe::Vector.

Referenced by OnMouseMove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandlePanStart()

void Olympe::PrefabCanvas::HandlePanStart ( float  x,
float  y 
)
private

Definition at line 1026 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::ICanvasEditor::GetPan(), m_canvasEditor, m_dragStartPos, m_interactionMode, m_isPanning, m_panStartOffset, Olympe::Normal, Olympe::PanningCamera, and Olympe::Vector.

Referenced by OnMouseDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize()

void Olympe::PrefabCanvas::Initialize ( EntityPrefabGraphDocument document)

Definition at line 18 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_document, and m_renderer.

Referenced by Olympe::TabManager::CreateNewTab(), and Olympe::TabManager::OpenFileInTab().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsCreatingConnection()

bool Olympe::PrefabCanvas::IsCreatingConnection ( ) const

Definition at line 596 of file PrefabCanvas.cpp.

References m_isCreatingConnection.

◆ IsGridEnabled()

bool Olympe::PrefabCanvas::IsGridEnabled ( ) const

Definition at line 600 of file PrefabCanvas.cpp.

References m_showGrid.

◆ IsNodeDragging()

bool Olympe::PrefabCanvas::IsNodeDragging ( ) const

Definition at line 689 of file PrefabCanvas.cpp.

References Olympe::DraggingNode, and m_interactionMode.

Referenced by RenderDebugInfo().

+ Here is the caller graph for this function:

◆ IsPanning()

bool Olympe::PrefabCanvas::IsPanning ( ) const

Definition at line 690 of file PrefabCanvas.cpp.

References m_interactionMode, and Olympe::PanningCamera.

◆ IsSnapToGridEnabled()

bool Olympe::PrefabCanvas::IsSnapToGridEnabled ( ) const

Definition at line 607 of file PrefabCanvas.cpp.

References m_snapToGrid.

◆ OnKeyDown()

void Olympe::PrefabCanvas::OnKeyDown ( int  keyCode)

Definition at line 388 of file PrefabCanvas.cpp.

References DeleteSelectedNodes(), GetComponentTypeID_Static(), m_ctrlPressed, m_shiftPressed, and SelectAll().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnKeyUp()

void Olympe::PrefabCanvas::OnKeyUp ( int  keyCode)

Definition at line 397 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_ctrlPressed, and m_shiftPressed.

+ Here is the call graph for this function:

◆ OnMouseDown()

void Olympe::PrefabCanvas::OnMouseDown ( int  button,
float  x,
float  y 
)

◆ OnMouseMove()

void Olympe::PrefabCanvas::OnMouseMove ( float  x,
float  y 
)

◆ OnMouseScroll()

void Olympe::PrefabCanvas::OnMouseScroll ( float  delta)

Definition at line 383 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_currentMousePos, Vector::x, Vector::y, and ZoomCanvas().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnMouseUp()

void Olympe::PrefabCanvas::OnMouseUp ( int  button,
float  x,
float  y 
)

◆ PanCanvas()

void Olympe::PrefabCanvas::PanCanvas ( float  deltaX,
float  deltaY 
)

Definition at line 403 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_canvasEditor, and Olympe::ICanvasEditor::PanBy().

+ Here is the call graph for this function:

◆ Render()

void Olympe::PrefabCanvas::Render ( )

◆ RenderConnectionContextMenu()

void Olympe::PrefabCanvas::RenderConnectionContextMenu ( )
private

◆ RenderConnectionPreview()

void Olympe::PrefabCanvas::RenderConnectionPreview ( )
private

Definition at line 802 of file PrefabCanvas.cpp.

References CanvasToScreen(), GetComponentTypeID_Static(), Olympe::EntityPrefabGraphDocument::GetNode(), Olympe::ICanvasEditor::GetZoom(), m_canvasEditor, m_connectionPreviewEnd, m_connectionSourceNodeId, m_document, m_renderer, Vector::x, and Vector::y.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderConnections()

void Olympe::PrefabCanvas::RenderConnections ( )
private

Definition at line 752 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::ICanvasEditor::GetPan(), Olympe::ICanvasEditor::GetZoom(), m_canvasEditor, m_document, m_hoveredConnectionIndex, m_renderer, and Olympe::Vector.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderContextMenu()

void Olympe::PrefabCanvas::RenderContextMenu ( )
private

◆ RenderDebugInfo()

void Olympe::PrefabCanvas::RenderDebugInfo ( )
private

Definition at line 780 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::EntityPrefabGraphDocument::GetNodeCount(), Olympe::ICanvasEditor::GetPan(), Olympe::ICanvasEditor::GetZoom(), IsNodeDragging(), m_canvasEditor, m_document, and m_interactionMode.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderGrid()

void Olympe::PrefabCanvas::RenderGrid ( )
private

◆ RenderNodes()

void Olympe::PrefabCanvas::RenderNodes ( )
private

Definition at line 724 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::ICanvasEditor::GetPan(), Olympe::ICanvasEditor::GetZoom(), m_canvasEditor, m_document, m_renderer, and Olympe::Vector.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderSelectionBox()

void Olympe::PrefabCanvas::RenderSelectionBox ( )
private

Definition at line 888 of file PrefabCanvas.cpp.

◆ RenderSelectionRectangle()

void Olympe::PrefabCanvas::RenderSelectionRectangle ( )
private

Definition at line 893 of file PrefabCanvas.cpp.

References CanvasToScreen(), GetComponentTypeID_Static(), m_isSelectingRectangle, m_selectionRectEnd, m_selectionRectStart, Vector::x, and Vector::y.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetView()

void Olympe::PrefabCanvas::ResetView ( )

Definition at line 422 of file PrefabCanvas.cpp.

References m_canvasEditor, and Olympe::ICanvasEditor::ResetView().

Referenced by FitToContent(), and RenderContextMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScreenToCanvas()

Vector Olympe::PrefabCanvas::ScreenToCanvas ( float  screenX,
float  screenY 
) const

Definition at line 648 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_canvasEditor, Olympe::ICanvasEditor::ScreenToCanvas(), and Olympe::Vector.

Referenced by AddComponentNode(), GetNodeAtPosition(), HandleNodeDrag(), HandleNodeDragStart(), OnMouseDown(), OnMouseMove(), OnMouseUp(), and RenderContextMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SelectAll()

void Olympe::PrefabCanvas::SelectAll ( )

Definition at line 497 of file PrefabCanvas.cpp.

References Olympe::EntityPrefabGraphDocument::DeselectAll(), Olympe::EntityPrefabGraphDocument::GetAllNodes(), GetComponentTypeID_Static(), m_document, and Olympe::EntityPrefabGraphDocument::SelectNode().

Referenced by OnKeyDown(), and RenderContextMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SelectNodeAt()

void Olympe::PrefabCanvas::SelectNodeAt ( float  x,
float  y,
bool  addToSelection = false 
)

◆ SelectNodesInRectangle()

void Olympe::PrefabCanvas::SelectNodesInRectangle ( const Vector rectStart,
const Vector rectEnd,
bool  addToSelection = false 
)

◆ SetCanvasEditor()

void Olympe::PrefabCanvas::SetCanvasEditor ( ICanvasEditor canvasEditor)

Definition at line 20 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), and m_canvasEditor.

Referenced by Olympe::EntityPrefabRenderer::RenderLayoutWithTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCanvasOffset()

void Olympe::PrefabCanvas::SetCanvasOffset ( const Vector offset)

Definition at line 621 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_canvasEditor, and Olympe::ICanvasEditor::SetPan().

+ Here is the call graph for this function:

◆ SetCanvasZoom()

void Olympe::PrefabCanvas::SetCanvasZoom ( float  zoom)

◆ SetGridEnabled()

void Olympe::PrefabCanvas::SetGridEnabled ( bool  enabled)

Definition at line 599 of file PrefabCanvas.cpp.

References m_showGrid.

◆ SetGridSpacing()

void Olympe::PrefabCanvas::SetGridSpacing ( float  spacing)

Definition at line 601 of file PrefabCanvas.cpp.

References m_gridSpacing.

◆ SetShowDebugInfo()

void Olympe::PrefabCanvas::SetShowDebugInfo ( bool  show)

Definition at line 603 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), and m_showDebugInfo.

+ Here is the call graph for this function:

◆ SetSnapToGrid()

void Olympe::PrefabCanvas::SetSnapToGrid ( bool  snap)

Definition at line 606 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), and m_snapToGrid.

+ Here is the call graph for this function:

◆ SnapNodePositionToGrid()

void Olympe::PrefabCanvas::SnapNodePositionToGrid ( Vector position)
private

Definition at line 1059 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), m_gridSpacing, Vector::x, and Vector::y.

+ Here is the call graph for this function:

◆ StartConnectionCreation()

void Olympe::PrefabCanvas::StartConnectionCreation ( NodeId  sourceNodeId)

Definition at line 570 of file PrefabCanvas.cpp.

References Olympe::CreatingConnection, GetComponentTypeID_Static(), Olympe::InvalidNodeId, m_connectionPreviewEnd, m_connectionSourceNodeId, m_document, m_interactionMode, m_isCreatingConnection, and Olympe::Vector.

Referenced by OnMouseDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void Olympe::PrefabCanvas::Update ( float  deltaTime)

Definition at line 178 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ UpdateNodePositions()

void Olympe::PrefabCanvas::UpdateNodePositions ( )
private

Definition at line 923 of file PrefabCanvas.cpp.

◆ ZoomCanvas()

void Olympe::PrefabCanvas::ZoomCanvas ( float  zoomDelta,
float  centerX,
float  centerY 
)

Definition at line 411 of file PrefabCanvas.cpp.

References GetComponentTypeID_Static(), Olympe::ICanvasEditor::GetZoom(), m_canvasEditor, and Olympe::ICanvasEditor::SetZoom().

Referenced by OnMouseScroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_canvasEditor

ICanvasEditor* Olympe::PrefabCanvas::m_canvasEditor = nullptr
private

◆ m_canvasScreenPos

ImVec2 Olympe::PrefabCanvas::m_canvasScreenPos = ImVec2(0, 0)
private

Definition at line 113 of file PrefabCanvas.h.

Referenced by AcceptComponentDropAtScreenPos(), GetCanvasScreenPos(), and Render().

◆ m_connectionPreviewEnd

Vector Olympe::PrefabCanvas::m_connectionPreviewEnd
private

Definition at line 127 of file PrefabCanvas.h.

Referenced by OnMouseMove(), RenderConnectionPreview(), and StartConnectionCreation().

◆ m_connectionSourceNodeId

NodeId Olympe::PrefabCanvas::m_connectionSourceNodeId = InvalidNodeId
private

◆ m_contextMenuConnectionIndex

int Olympe::PrefabCanvas::m_contextMenuConnectionIndex = -1
private

Definition at line 140 of file PrefabCanvas.h.

Referenced by RenderConnectionContextMenu(), and RenderContextMenu().

◆ m_contextMenuConnectionMousePos

Vector Olympe::PrefabCanvas::m_contextMenuConnectionMousePos
private

Definition at line 141 of file PrefabCanvas.h.

Referenced by RenderContextMenu().

◆ m_contextMenuMousePos

Vector Olympe::PrefabCanvas::m_contextMenuMousePos
private

Definition at line 136 of file PrefabCanvas.h.

Referenced by RenderContextMenu().

◆ m_contextMenuNodeId

NodeId Olympe::PrefabCanvas::m_contextMenuNodeId = InvalidNodeId
private

Definition at line 135 of file PrefabCanvas.h.

Referenced by RenderContextMenu().

◆ m_ctrlPressed

bool Olympe::PrefabCanvas::m_ctrlPressed = false
private

Definition at line 121 of file PrefabCanvas.h.

Referenced by OnKeyDown(), OnKeyUp(), OnMouseDown(), OnMouseUp(), Render(), and RenderContextMenu().

◆ m_currentMousePos

Vector Olympe::PrefabCanvas::m_currentMousePos
private

Definition at line 117 of file PrefabCanvas.h.

Referenced by OnMouseDown(), OnMouseMove(), OnMouseScroll(), and OnMouseUp().

◆ m_document

EntityPrefabGraphDocument* Olympe::PrefabCanvas::m_document = nullptr
private

◆ m_draggedNodeId

NodeId Olympe::PrefabCanvas::m_draggedNodeId = InvalidNodeId
private

Definition at line 118 of file PrefabCanvas.h.

Referenced by HandleNodeDrag(), HandleNodeDragEnd(), and HandleNodeDragStart().

◆ m_dragStartPos

Vector Olympe::PrefabCanvas::m_dragStartPos
private

Definition at line 119 of file PrefabCanvas.h.

Referenced by HandleNodeDrag(), HandleNodeDragStart(), HandlePan(), and HandlePanStart().

◆ m_gridSpacing

float Olympe::PrefabCanvas::m_gridSpacing = 50.0f
private

Definition at line 107 of file PrefabCanvas.h.

Referenced by GetGridSpacing(), SetGridSpacing(), and SnapNodePositionToGrid().

◆ m_hoveredConnectionIndex

int Olympe::PrefabCanvas::m_hoveredConnectionIndex = -1
private

Definition at line 139 of file PrefabCanvas.h.

Referenced by OnMouseMove(), and RenderConnections().

◆ m_interactionMode

CanvasInteractionMode Olympe::PrefabCanvas::m_interactionMode = CanvasInteractionMode::Normal
private

◆ m_isCreatingConnection

bool Olympe::PrefabCanvas::m_isCreatingConnection = false
private

◆ m_isPanning

bool Olympe::PrefabCanvas::m_isPanning = false
private

Definition at line 131 of file PrefabCanvas.h.

Referenced by HandlePan(), HandlePanStart(), and OnMouseUp().

◆ m_isSelectingRectangle

bool Olympe::PrefabCanvas::m_isSelectingRectangle = false
private

Definition at line 145 of file PrefabCanvas.h.

Referenced by OnMouseDown(), OnMouseMove(), OnMouseUp(), Render(), and RenderSelectionRectangle().

◆ m_lastMousePos

Vector Olympe::PrefabCanvas::m_lastMousePos
private

Definition at line 116 of file PrefabCanvas.h.

Referenced by OnMouseDown(), and OnMouseMove().

◆ m_nodeDragOffset

Vector Olympe::PrefabCanvas::m_nodeDragOffset
private

Definition at line 120 of file PrefabCanvas.h.

Referenced by HandleNodeDragStart().

◆ m_panStartOffset

Vector Olympe::PrefabCanvas::m_panStartOffset
private

Definition at line 132 of file PrefabCanvas.h.

Referenced by HandlePan(), and HandlePanStart().

◆ m_renderer

std::unique_ptr<ComponentNodeRenderer> Olympe::PrefabCanvas::m_renderer
private

◆ m_selectionRectEnd

Vector Olympe::PrefabCanvas::m_selectionRectEnd
private

Definition at line 147 of file PrefabCanvas.h.

Referenced by OnMouseDown(), OnMouseMove(), OnMouseUp(), and RenderSelectionRectangle().

◆ m_selectionRectStart

Vector Olympe::PrefabCanvas::m_selectionRectStart
private

Definition at line 146 of file PrefabCanvas.h.

Referenced by OnMouseDown(), OnMouseUp(), and RenderSelectionRectangle().

◆ m_shiftPressed

bool Olympe::PrefabCanvas::m_shiftPressed = false
private

Definition at line 122 of file PrefabCanvas.h.

Referenced by OnKeyDown(), OnKeyUp(), and Render().

◆ m_showConnectionContextMenu

bool Olympe::PrefabCanvas::m_showConnectionContextMenu = false
private

Definition at line 142 of file PrefabCanvas.h.

Referenced by RenderConnectionContextMenu(), and RenderContextMenu().

◆ m_showDebugInfo

bool Olympe::PrefabCanvas::m_showDebugInfo = false
private

Definition at line 109 of file PrefabCanvas.h.

Referenced by GetShowDebugInfo(), Render(), and SetShowDebugInfo().

◆ m_showGrid

bool Olympe::PrefabCanvas::m_showGrid = true
private

Definition at line 108 of file PrefabCanvas.h.

Referenced by IsGridEnabled(), Render(), and SetGridEnabled().

◆ m_snapToGrid

bool Olympe::PrefabCanvas::m_snapToGrid = true
private

Definition at line 110 of file PrefabCanvas.h.

Referenced by IsSnapToGridEnabled(), and SetSnapToGrid().


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