GhosttySelection class final

A snapshot selection range defined by two grid references.

Both endpoints are inclusive. The endpoints preserve selection direction and may be reversed; callers must not assume that start is the top-left endpoint or that end is the bottom-right endpoint.

When rectangle is false, the endpoints describe a linear selection. When rectangle is true, the same endpoints are interpreted as opposite corners of a rectangular/block selection.

The start and end values are untracked GhosttyGridRef snapshots and are only valid until the next mutating operation on the terminal that produced them unless the selection is reconstructed from tracked references.

This is a sized struct. Use GHOSTTY_INIT_SIZED() to initialize it.

@ingroup selection

Inheritance
Implemented types
Available extensions

Constructors

GhosttySelection()

Properties

address Pointer<T>

Available on T, provided by the StructAddress extension

The memory address of the underlying data.
no setter
end GhosttyGridRef
End of the selection range (inclusive).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
rectangle bool
Whether the endpoints are interpreted as a rectangular/block selection rather than a linear selection.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Size of this struct in bytes. Must be set to sizeof(GhosttySelection).
getter/setter pair
start GhosttyGridRef
Start of the selection range (inclusive).
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited