GridPattern
GraphEdit.swift:62enum GridPatternenum GridPatternimport SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
class GraphEditAn editor for graph-like structures, using GraphNodes.
case linesDraw the grid using solid lines.
case dotsDraw the grid using dots.
override class var godotClassName: StringName { get }var beginNodeMove: SimpleSignal { get }Emitted at the beginning of a GraphElement’s movement.
var connectionDragEnded: SimpleSignal { get }Emitted at the end of a connection drag.
var connectionDragStarted: Signal5 { get }Emitted at the beginning of a connection drag.
var connectionFromEmpty: Signal4 { get }Emitted when user drags a connection from an input port into the empty space of the graph.
final var connectionLinesAntialiased: Bool { get set }If true, the lines between nodes will use antialiasing.
final var connectionLinesCurvature: Double { get set }The curvature of the lines between the nodes. 0 results in straight lines.
final var connectionLinesThickness: Double { get set }The thickness of the lines between the nodes.
var connectionRequest: Signal1 { get }Emitted to the GraphEdit when the connection between the fromPort of the fromNode GraphNode and the toPort of the toNode GraphNode is attempted to be created.
var connectionToEmpty: Signal3 { get }Emitted when user drags a connection from an output port into the empty space of the graph.
var copyNodesRequest: SimpleSignal { get }Emitted when this GraphEdit captures a ui_copy action ([kbd]Ctrl + C[/kbd] by default). In general, this signal indicates that the selected GraphElements should be copied.
var deleteNodesRequest: Signal6 { get }Emitted when this GraphEdit captures a ui_graph_delete action ([kbd]Delete[/kbd] by default).
var disconnectionRequest: Signal2 { get }Emitted to the GraphEdit when the connection between fromPort of fromNode GraphNode and toPort of toNode GraphNode is attempted to be removed.
var duplicateNodesRequest: SimpleSignal { get }Emitted when this GraphEdit captures a ui_graph_duplicate action ([kbd]Ctrl + D[/kbd] by default). In general, this signal indicates that the selected GraphElements should be duplicated.
var endNodeMove: SimpleSignal { get }Emitted at the end of a GraphElement’s movement.
var frameRectChanged: Signal9 { get }Emitted when the GraphFrame frame is resized to newRect.
var graphElementsLinkedToFrameRequest: Signal11 { get }Emitted when one or more GraphElements are dropped onto the GraphFrame named frame, when they were not previously attached to any other one.
final var gridPattern: GraphEdit.GridPattern { get set }The pattern used for drawing the grid.
final var minimapEnabled: Bool { get set }If true, the minimap is visible.
final var minimapOpacity: Double { get set }The opacity of the minimap rectangle.
final var minimapSize: Vector2 { get set }The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
var nodeDeselected: Signal8 { get }Emitted when the given GraphElement node is deselected.
var nodeSelected: Signal7 { get }Emitted when the given GraphElement node is selected.
final var panningScheme: GraphEdit.PanningScheme { get set }Defines the control scheme for panning with mouse wheel.
var pasteNodesRequest: SimpleSignal { get }Emitted when this GraphEdit captures a ui_paste action ([kbd]Ctrl + V[/kbd] by default). In general, this signal indicates that previously copied GraphElements should be pasted.
var popupRequest: Signal10 { get }Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. atPosition is the position of the mouse pointer when the signal is sent.
final var rightDisconnects: Bool { get set }If true, enables disconnection of existing connections in the GraphEdit by dragging the right end.
final var scrollOffset: Vector2 { get set }The scroll offset.
var scrollOffsetChanged: Signal12 { get }Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
final var showArrangeButton: Bool { get set }If true, the button to automatically arrange graph nodes is visible.
final var showGrid: Bool { get set }If true, the grid is visible.
final var showGridButtons: Bool { get set }If true, buttons that allow to configure grid and snapping options are visible.
final var showMenu: Bool { get set }If true, the menu toolbar is visible.
final var showMinimapButton: Bool { get set }If true, the button to toggle the minimap is visible.
final var showZoomButtons: Bool { get set }If true, buttons that allow to change and reset the zoom level are visible.
final var showZoomLabel: Bool { get set }If true, the label with the current zoom level is visible. The zoom level is displayed in percents.
final var snappingDistance: Int32 { get set }The snapping distance in pixels, also determines the grid line distance.
final var snappingEnabled: Bool { get set }If true, enables snapping.
final var zoom: Double { get set }The current zoom value.
final var zoomMax: Double { get set }The upper zoom limit.
final var zoomMin: Double { get set }The lower zoom limit.
final var zoomStep: Double { get set }The step of each zoom level.
func _getConnectionLine(fromPosition: Vector2, toPosition: Vector2) -> PackedVector2Array Virtual method which can be overridden to customize how connections are drawn.
func _isInInputHotzone(inNode: Object?, inPort: Int32, mousePosition: Vector2) -> Bool Returns whether the mousePosition is in the input hot zone.
func _isInOutputHotzone(inNode: Object?, inPort: Int32, mousePosition: Vector2) -> Bool Returns whether the mousePosition is in the output hot zone. For more information on hot zones, see _isInInputHotzone(inNode:inPort:mousePosition:).
func _isNodeHoverValid(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> Bool This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
final func addValidConnectionType(fromType: Int32, toType: Int32) Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:) method.
final func addValidLeftDisconnectType(_ type: Int32) Allows to disconnect nodes when dragging from the left port of the GraphNode’s slot if it has the specified type. See also removeValidLeftDisconnectType(_:).
final func addValidRightDisconnectType(_ type: Int32) Allows to disconnect nodes when dragging from the right port of the GraphNode’s slot if it has the specified type. See also removeValidRightDisconnectType(_:).
final func arrangeNodes() Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes.
final func attachGraphElementToFrame(element: StringName, frame: StringName) Attaches the element GraphElement to the frame GraphFrame.
final func clearConnections() Removes all connections between nodes.
final func connectNode(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> GodotError Create a connection between the fromPort of the fromNode GraphNode and the toPort of the toNode GraphNode. If the connection already exists, no connection is created.
final func detachGraphElementFromFrame(element: StringName) Detaches the element GraphElement from the GraphFrame it is currently attached to.
final func disconnectNode(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) Removes the connection between the fromPort of the fromNode GraphNode and the toPort of the toNode GraphNode. If the connection does not exist, no connection is removed.
final func forceConnectionDragEnd() Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor.
final func getAttachedNodesOfFrame(_ frame: StringName) -> VariantCollection<StringName> Returns an array of node names that are attached to the GraphFrame with the given name.
final func getClosestConnectionAtPoint(_ point: Vector2, maxDistance: Double = 4.0) -> GDictionary Returns the closest connection to the given point in screen space. If no connection is found within maxDistance pixels, an empty GDictionary is returned.
final func getConnectionLine(fromNode: Vector2, toNode: Vector2) -> PackedVector2Array Returns the points which would make up a connection between fromNode and toNode.
final func getConnectionList() -> VariantCollection<GDictionary> Returns an GArray containing the list of connections. A connection consists in a structure of the form { from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }.
final func getConnectionsIntersectingWithRect(_ rect: Rect2) -> VariantCollection<GDictionary> Returns an GArray containing the list of connections that intersect with the given Rect2. A connection consists in a structure of the form { from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }.
final func getElementFrame(element: StringName) -> GraphFrame? Returns the GraphFrame that contains the GraphElement with the given name.
final func getMenuHbox() -> HBoxContainer? Gets the HBoxContainer that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it.
final func isNodeConnected(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> Bool Returns true if the fromPort of the fromNode GraphNode is connected to the toPort of the toNode GraphNode.
final func isValidConnectionType(fromType: Int32, toType: Int32) -> Bool Returns whether it’s possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:) method.
final func removeValidConnectionType(fromType: Int32, toType: Int32) Disallows the connection between two different port types previously allowed by addValidConnectionType(fromType:toType:). The port type is defined individually for the left and the right port of each slot with the setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:) method.
final func removeValidLeftDisconnectType(_ type: Int32) Disallows to disconnect nodes when dragging from the left port of the GraphNode’s slot if it has the specified type. Use this to disable disconnection previously allowed with addValidLeftDisconnectType(_:).
final func removeValidRightDisconnectType(_ type: Int32) Disallows to disconnect nodes when dragging from the right port of the GraphNode’s slot if it has the specified type. Use this to disable disconnection previously allowed with addValidRightDisconnectType(_:).
final func setConnectionActivity(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32, amount: Double) Sets the coloration of the connection between fromNode’s fromPort and toNode’s toPort with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using amount as weight.
final func setSelected(node: Node?) Sets the specified node as the one selected.
enum PanningSchemeclass Signal1Signal support.
class Signal10Signal support.
class Signal11Signal support.
class Signal12Signal support.
class Signal2Signal support.
class Signal3Signal support.
class Signal4Signal support.
class Signal5Signal support.
class Signal6Signal support.
class Signal7Signal support.
class Signal8Signal support.
class Signal9Signal support.
protocol CaseIterableA type that provides a collection of all of its values.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
init?(rawValue: Int64) var debugDescription: String { get }A textual representation of this instance, suitable for debugging
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)