GraphElement
A container that represents a basic element that can be placed inside a GraphEdit
control.
class GraphElement
GraphElement
allows to create custom elements for a GraphEdit
graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see GraphNode
.
This object emits the following signals:
Superclasses
class Container
Base class for all GUI containers.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
class Signal2
Signal support.
Type members
Instance members
var deleteRequest: SimpleSignal
Emitted when removing the GraphElement is requested.
var draggable: Bool
If
true
, the user can drag the GraphElement.var dragged: Signal2
Emitted when the GraphElement is dragged.
var nodeDeselected: SimpleSignal
Emitted when the GraphElement is deselected.
var nodeSelected: SimpleSignal
Emitted when the GraphElement is selected.
var positionOffset: Vector2
The offset of the GraphElement, relative to the scroll offset of the
GraphEdit
.var positionOffsetChanged: SimpleSignal
Emitted when the GraphElement is moved.
var raiseRequest: SimpleSignal
Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.
var resizable: Bool
If
true
, the user can resize the GraphElement.var resizeRequest: Signal1
Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see
resizable
).var selectable: Bool
If
true
, the user can select the GraphElement.var selected: Bool
If
true
, the GraphElement is selected.
Subclasses
class GraphNode
A container with connection ports, representing a node in a
GraphEdit
.