#include <wx/richtext/richtextbuffer.h>
This stores beginning and end positions for a range of data.
Public Member Functions | |
wxRichTextRange () | |
Default constructor. | |
wxRichTextRange (long start, long end) | |
Constructor taking start and end positions. | |
wxRichTextRange (const wxRichTextRange &range) | |
Copy constructor. | |
~wxRichTextRange () | |
void | operator= (const wxRichTextRange &range) |
Assigns range to this range. | |
bool | operator== (const wxRichTextRange &range) const |
Equality operator. | |
bool | operator!= (const wxRichTextRange &range) const |
Inequality operator. | |
wxRichTextRange | operator- (const wxRichTextRange &range) const |
Subtracts a range from this range. | |
wxRichTextRange | operator+ (const wxRichTextRange &range) const |
Adds a range to this range. | |
void | SetRange (long start, long end) |
Sets the range start and end positions. | |
void | SetStart (long start) |
Sets the start position. | |
long | GetStart () const |
Returns the start position. | |
void | SetEnd (long end) |
Sets the end position. | |
long | GetEnd () const |
Gets the end position. | |
bool | IsOutside (const wxRichTextRange &range) const |
Returns true if this range is completely outside range. | |
bool | IsWithin (const wxRichTextRange &range) const |
Returns true if this range is completely within range. | |
bool | Contains (long pos) const |
Returns true if pos was within the range. | |
bool | LimitTo (const wxRichTextRange &range) |
Limit this range to be within range. | |
long | GetLength () const |
Gets the length of the range. | |
void | Swap () |
Swaps the start and end. | |
wxRichTextRange | ToInternal () const |
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. | |
wxRichTextRange | FromInternal () const |
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. | |
Protected Attributes | |
long | m_start |
long | m_end |
|
inline |
Default constructor.
|
inline |
Constructor taking start and end positions.
|
inline |
Copy constructor.
|
inline |
|
inline |
Returns true if pos was within the range.
Does not match if the range is empty.
|
inline |
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.
|
inline |
Gets the end position.
|
inline |
Gets the length of the range.
|
inline |
Returns the start position.
|
inline |
Returns true if this range is completely outside range.
|
inline |
Returns true if this range is completely within range.
bool wxRichTextRange::LimitTo | ( | const wxRichTextRange & | range | ) |
Limit this range to be within range.
|
inline |
Inequality operator.
|
inline |
Adds a range to this range.
|
inline |
Subtracts a range from this range.
|
inline |
Assigns range to this range.
|
inline |
Equality operator.
Returns true if range is the same as this range.
|
inline |
Sets the end position.
|
inline |
Sets the range start and end positions.
|
inline |
Sets the start position.
|
inline |
Swaps the start and end.
|
inline |
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.
|
protected |
|
protected |