Sequine - Scripting API
Calcatz.CookieCutter.NodesContainer Class Reference
Inheritance diagram for Calcatz.CookieCutter.NodesContainer:
Calcatz.CookieCutter.CommandNodesContainer Calcatz.CookieCutter.CommandCreatorWindow.DummyNodesContainer Calcatz.CookieCutter.TimelineCommandNodesContainer Calcatz.Sequine.SequineFlowNodesContainer

Public Member Functions

 NodesContainer ()
 
void CreateGUI (VisualElement _root, System.Func< Rect > _containerAreaGetter)
 
virtual void OnDrawNodesArea ()
 
void GoToNode (CommandNode node)
 
virtual void RepaintIfDirty (bool _dontRepaintOnRemovalAction=false)
 

Public Attributes

System.Func< Rect > containerAreaGetter
 

Protected Member Functions

void Repaint ()
 
Rect GetContainerArea ()
 
virtual Rect GetNodesArea ()
 
virtual Node.Config GetNodeConfig ()
 
virtual void OnCreateGUI (VisualElement _root)
 
void RecreateGUI ()
 
void UpdateNodesAreaSize (bool _repaint=false)
 
virtual void ProcessEvents (Event e)
 
virtual bool OnDragUpdated (UnityEngine.Object[] _draggedObjects)
 When drag is updated inside the empty nodes area. Use this to handle the visual before dropping. More...
 
virtual bool OnDragPerformed (UnityEngine.Object[] _draggedObjects)
 When drag is performed inside the empty nodes area. Use this to handle when the object(s) actually dropped. More...
 
virtual void Save ()
 
void ProcessContextMenu (Vector2 mousePosition)
 
virtual List< string > GetStarredContextMenu ()
 
virtual void HandleContextMenu (Vector2 _mousePosition, GenericMenu _genericMenu)
 
void OnDrag (Vector2 delta)
 
virtual void OnClickRemoveNode (Node node)
 
virtual void HandleRemovedConnections (Node _removedNode, List< Connection > _connectionsToRemove)
 
virtual void OnClickInPoint (ConnectionPoint inPoint)
 
virtual void OnClickOutPoint (ConnectionPoint outPoint)
 
virtual void OnClickRemoveConnection (Connection connection)
 
void ClearConnectionSelection ()
 

Protected Attributes

VisualElement nodesArea
 
List< Nodenodes = new List<Node>()
 
List< Connectionconnections = new List<Connection>()
 
HashSet< NodeselectedNodes = new HashSet<Node>()
 
ConnectionPoint selectedOutPoint
 
Vector2 realPositionOffset = Vector2.zero
 

Properties

static Color backgroundColor [get]
 
Vector2 RealPositionOffset [getset]
 
float ZoomScale [getset]
 
virtual bool enableNodesAreaDragAndDrop [get]
 
bool isPromptingRemoveNode [get]
 

Constructor & Destructor Documentation

◆ NodesContainer()

Calcatz.CookieCutter.NodesContainer.NodesContainer ( )

Member Function Documentation

◆ ClearConnectionSelection()

void Calcatz.CookieCutter.NodesContainer.ClearConnectionSelection ( )
protected

◆ CreateGUI()

void Calcatz.CookieCutter.NodesContainer.CreateGUI ( VisualElement  _root,
System.Func< Rect >  _containerAreaGetter 
)

◆ GetContainerArea()

Rect Calcatz.CookieCutter.NodesContainer.GetContainerArea ( )
protected

◆ GetNodeConfig()

virtual Node.Config Calcatz.CookieCutter.NodesContainer.GetNodeConfig ( )
protectedvirtual

◆ GetNodesArea()

virtual Rect Calcatz.CookieCutter.NodesContainer.GetNodesArea ( )
protectedvirtual

◆ GetStarredContextMenu()

virtual List< string > Calcatz.CookieCutter.NodesContainer.GetStarredContextMenu ( )
protectedvirtual

◆ GoToNode()

void Calcatz.CookieCutter.NodesContainer.GoToNode ( CommandNode  node)

◆ HandleContextMenu()

virtual void Calcatz.CookieCutter.NodesContainer.HandleContextMenu ( Vector2  _mousePosition,
GenericMenu  _genericMenu 
)
protectedvirtual

◆ HandleRemovedConnections()

virtual void Calcatz.CookieCutter.NodesContainer.HandleRemovedConnections ( Node  _removedNode,
List< Connection _connectionsToRemove 
)
protectedvirtual

◆ OnClickInPoint()

virtual void Calcatz.CookieCutter.NodesContainer.OnClickInPoint ( ConnectionPoint  inPoint)
protectedvirtual

◆ OnClickOutPoint()

virtual void Calcatz.CookieCutter.NodesContainer.OnClickOutPoint ( ConnectionPoint  outPoint)
protectedvirtual

◆ OnClickRemoveConnection()

virtual void Calcatz.CookieCutter.NodesContainer.OnClickRemoveConnection ( Connection  connection)
protectedvirtual

◆ OnClickRemoveNode()

virtual void Calcatz.CookieCutter.NodesContainer.OnClickRemoveNode ( Node  node)
protectedvirtual

◆ OnCreateGUI()

virtual void Calcatz.CookieCutter.NodesContainer.OnCreateGUI ( VisualElement  _root)
protectedvirtual

◆ OnDrag()

void Calcatz.CookieCutter.NodesContainer.OnDrag ( Vector2  delta)
protected

◆ OnDragPerformed()

virtual bool Calcatz.CookieCutter.NodesContainer.OnDragPerformed ( UnityEngine.Object[]  _draggedObjects)
protectedvirtual

When drag is performed inside the empty nodes area. Use this to handle when the object(s) actually dropped.

Parameters
_draggedObjects
Returns
If return true, the event will be used.

Reimplemented in Calcatz.CookieCutter.CommandNodesContainer, and Calcatz.Sequine.SequineFlowNodesContainer.

◆ OnDragUpdated()

virtual bool Calcatz.CookieCutter.NodesContainer.OnDragUpdated ( UnityEngine.Object[]  _draggedObjects)
protectedvirtual

When drag is updated inside the empty nodes area. Use this to handle the visual before dropping.

Parameters
_draggedObjects
Returns
If return true, the event will be used.

Reimplemented in Calcatz.CookieCutter.CommandNodesContainer, and Calcatz.Sequine.SequineFlowNodesContainer.

◆ OnDrawNodesArea()

virtual void Calcatz.CookieCutter.NodesContainer.OnDrawNodesArea ( )
virtual

◆ ProcessContextMenu()

void Calcatz.CookieCutter.NodesContainer.ProcessContextMenu ( Vector2  mousePosition)
protected

◆ ProcessEvents()

virtual void Calcatz.CookieCutter.NodesContainer.ProcessEvents ( Event  e)
protectedvirtual

◆ RecreateGUI()

void Calcatz.CookieCutter.NodesContainer.RecreateGUI ( )
protected

◆ Repaint()

void Calcatz.CookieCutter.NodesContainer.Repaint ( )
protected

◆ RepaintIfDirty()

virtual void Calcatz.CookieCutter.NodesContainer.RepaintIfDirty ( bool  _dontRepaintOnRemovalAction = false)
virtual

◆ Save()

virtual void Calcatz.CookieCutter.NodesContainer.Save ( )
protectedvirtual

◆ UpdateNodesAreaSize()

void Calcatz.CookieCutter.NodesContainer.UpdateNodesAreaSize ( bool  _repaint = false)
protected

Member Data Documentation

◆ connections

List<Connection> Calcatz.CookieCutter.NodesContainer.connections = new List<Connection>()
protected

◆ containerAreaGetter

System.Func<Rect> Calcatz.CookieCutter.NodesContainer.containerAreaGetter

◆ nodes

List<Node> Calcatz.CookieCutter.NodesContainer.nodes = new List<Node>()
protected

◆ nodesArea

VisualElement Calcatz.CookieCutter.NodesContainer.nodesArea
protected

◆ realPositionOffset

Vector2 Calcatz.CookieCutter.NodesContainer.realPositionOffset = Vector2.zero
protected

◆ selectedNodes

HashSet<Node> Calcatz.CookieCutter.NodesContainer.selectedNodes = new HashSet<Node>()
protected

◆ selectedOutPoint

ConnectionPoint Calcatz.CookieCutter.NodesContainer.selectedOutPoint
protected

Property Documentation

◆ backgroundColor

Color Calcatz.CookieCutter.NodesContainer.backgroundColor
staticget

◆ enableNodesAreaDragAndDrop

virtual bool Calcatz.CookieCutter.NodesContainer.enableNodesAreaDragAndDrop
getprotected

◆ isPromptingRemoveNode

bool Calcatz.CookieCutter.NodesContainer.isPromptingRemoveNode
getprotected

◆ RealPositionOffset

Vector2 Calcatz.CookieCutter.NodesContainer.RealPositionOffset
getset

◆ ZoomScale

float Calcatz.CookieCutter.NodesContainer.ZoomScale
getset