Creates a new Range
object with the given starting and ending rows and columns.
Optional
startRow: numberThe starting row
Optional
startColumn: numberThe starting column
Optional
endRow: numberThe ending row
Optional
endColumn: numberThe ending column
Optional
cursorOptional
idOptional
isCompares the row
and column
with the starting and ending [[Point]]'s of the calling range.
A row to compare with
A column to compare with
This method returns one of the following numbers:
1
if row
is greater than the calling range-1
if row
is less then the calling range0
otherwiseIf the starting row of the calling range is equal to row
, and:
column
is greater than or equal to the calling range's starting column, this returns 0
If the ending row of the calling range is equal to row
, and:
column
is less than or equal to the calling range's ending column, this returns 0
Compares the row
and column
with the starting and ending [[Point]]'s of the calling range.
A row to compare with
A column to compare with
This method returns one of the following numbers:
1
if calling range's ending column and calling range's ending row are equal row
and column
.compare()
]].Compares the row
and column
with the start and end [[Point]]'s of the calling range.
A row to compare with
A column to compare with
This method returns one of the following numbers:
1
if the ending row of the calling range is equal to row
, and the ending column of the calling range is equal to column
-1
if the starting row of the calling range is equal to row
, and the starting column of the calling range is equal to column
compare()
]].Compares this
range (A) with another range (B).
This method returns one of the following numbers:
-2
: (B) is in front of (A), and doesn't intersect with (A)-1
: (B) begins before (A) but ends inside of (A)0
: (B) is completely inside of (A)+1
: (B) begins inside of (A) but ends outside of (A)+2
: (B) is after (A) and doesn't intersect with (A)42
: FTW state: (B) ends in (A) but starts outside of (A)[[Range.compare]]
Compares the row
and column
with the starting and ending [[Point]]'s of the calling range.
A row to compare with
A column to compare with
This method returns one of the following numbers:
-1
if calling range's starting column and calling range's starting row are equal row
and column
compare()
]].Returns true
if the row
and column
provided are within the given range. This can better be expressed as returning true
if:
this.start.row <= row <= this.end.row &&
this.start.column <= column <= this.end.column
A row to check for
A column to check for
[[Range.compare]]
Given the current Range
, this function converts those starting and ending [[Point]]'s into screen positions, and then returns a new Range
object.
The EditSession
to retrieve coordinates from
Generated using TypeDoc
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogous to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.