Creates a new Range
object with the given starting and ending rows and columns.
The starting row
The starting column
The ending row
The ending column
Returns the part of the current Range
that occurs within the boundaries of firstRow
and lastRow
as a new Range
object.
The starting row
The ending row
Returns a duplicate of the calling range.
Returns a range containing the starting and ending rows of the original range, but with a column value of 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 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 the row and column of p
with the starting and ending Point's of the calling range (by calling Range.compare).
A point to compare with
Compares this
range (A) with another range (B).
A range to compare with
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) OR (A) is completely inside of (B)+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)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:
```javascript
this.start.row <= row <= this.end.row &&
this.start.column <= column <= this.end.column ```
A row to check for
A column to check for
Returns true
if the row
and column
are within the given range.
A row to compare with
A column to compare with
Returns true
if the row
and column
are within the given range's ending Point.
A row to compare with
A column to compare with
Returns true
if the row
and column
are within the given range's starting Point.
A row to compare with
A column to compare with
Returns true
if passed in range
intersects with the one calling this method.
A range to compare with
Returns true
if the caller's ending row is the same as row
, and if the caller's ending column is the same as column
.
A row to compare with
A column to compare with
Returns true
if and only if the starting row and column, and ending row and column, are equivalent to those given by range
.
A range to check against
Returns true
if the range spans across multiple lines.
Returns true
if the caller's starting row is the same as row
, and if the caller's starting column is the same as column
.
A row to compare with
A column to compare with
Shift the calling range by row
and column
values.
Sets the starting row and column for the range.
A row to set
A column to set
Sets the starting row and column for the range.
A row to set
A column to set
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
Returns a string containing the range's row and column information, given like this: ```
[start.row/start.column] -> [end.row/end.column] ```
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.