This stores beginning and end positions for a range of data.
Default constructor. |
|
Returns |
|
Converts the internal range, which uses the first and last character positions of the range, to the API-standard range, whose end is one past the last character in the range. |
|
Return the start and end properties as a tuple. |
|
Gets the end position. |
|
Returns an immutable representation of the |
|
Gets the length of the range. |
|
Returns the start position. |
|
Returns |
|
Returns |
|
Limit this range to be within range. |
|
Sets the end position. |
|
Sets the range start and end positions. |
|
Sets the start position. |
|
Swaps the start and end. |
|
Converts the API-standard range, whose end is one past the last character in the range, to the internal form, which uses the first and last character positions of the range. |
|
Inequality operator. |
|
Adds a range to this range. |
|
Subtracts a range from this range. |
|
Equality operator. |
See |
|
Possible constructors:
RichTextRange() -> None
RichTextRange(start : int, end : int) -> None
RichTextRange(range : RichTextRange) -> None
This stores beginning and end positions for a range of data.
__init__ (self)
Default constructor.
None
__init__ (self, start : int, end : int)
Constructor taking start and end positions.
start (long)
end (long)
None
__init__ (self, range : RichTextRange)
Copy constructor.
range (wx.richtext.RichTextRange)
None
Returns True
if pos was within the range.
Does not match if the range is empty.
pos (long)
bool
Converts the internal range, which uses the first and last character positions of the range, to the API-standard range, whose end is one past the last character in the range.
In other words, one is added to the end position. (n, n+1) is the range of a single character.
Return the start and end properties as a tuple.
tuple
( start, end )
Gets the end position.
int
Returns an immutable representation of the wx.RichTextRange
object, based on namedtuple
.
This new object is hashable and can be used as a dictionary key,
be added to sets, etc. It can be converted back into a real wx.RichTextRange
with a simple statement like this: obj = wx.RichTextRange(imObj)
.
Gets the length of the range.
int
Returns the start position.
int
Returns True
if this range is completely outside range.
range (wx.richtext.RichTextRange)
bool
Returns True
if this range is completely within range.
range (wx.richtext.RichTextRange)
bool
Limit this range to be within range.
range (wx.richtext.RichTextRange)
bool
Sets the end position.
end (long)
None
Sets the range start and end positions.
start (long)
end (long)
None
Sets the start position.
start (long)
None
Swaps the start and end.
None
Converts the API-standard range, whose end is one past the last character in the range, to the internal form, which uses the first and last character positions of the range.
In other words, one is subtracted from the end position. (n, n) is the range of a single character.
Inequality operator.
range (wx.richtext.RichTextRange)
Adds a range to this range.
range (wx.richtext.RichTextRange)
Subtracts a range from this range.
range (wx.richtext.RichTextRange)
Equality operator.
Returns True
if range is the same as this range.
range (wx.richtext.RichTextRange)