wxRichTextRange Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
wxRichTextRange Class Reference
Class List by Category » Rich Text

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/richtext/richtextbuffer.h>`

## Detailed Description

This stores beginning and end positions for a range of data.

##

Library: wxRichText
Category: Rich Text

See also
  wxRichTextBuffer, wxRichTextCtrl

## 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

## Constructor & Destructor Documentation

## ◆ wxRichTextRange() [1/3]

wxRichTextRange::wxRichTextRange | ( |  | ) |
| inline

Default constructor.

## ◆ wxRichTextRange() [2/3]

wxRichTextRange::wxRichTextRange | ( | long | start,
|  | long | end )
| inline

Constructor taking start and end positions.

## ◆ wxRichTextRange() [3/3]

wxRichTextRange::wxRichTextRange | ( | const wxRichTextRange & | range | ) |
| inline

Copy constructor.

## ◆ ~wxRichTextRange()

wxRichTextRange::~wxRichTextRange | ( |  | ) |
| inline

## Member Function Documentation

## ◆ Contains()

bool wxRichTextRange::Contains | ( | long | pos | ) | const
| inline

Returns true if pos was within the range.

Does not match if the range is empty.

## ◆ FromInternal()

wxRichTextRange wxRichTextRange::FromInternal | ( |  | ) | const
| 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.

## ◆ GetEnd()

long wxRichTextRange::GetEnd | ( |  | ) | const
| inline

Gets the end position.

## ◆ GetLength()

long wxRichTextRange::GetLength | ( |  | ) | const
| inline

Gets the length of the range.

## ◆ GetStart()

long wxRichTextRange::GetStart | ( |  | ) | const
| inline

Returns the start position.

## ◆ IsOutside()

bool wxRichTextRange::IsOutside | ( | const wxRichTextRange & | range | ) | const
| inline

Returns true if this range is completely outside range.

## ◆ IsWithin()

bool wxRichTextRange::IsWithin | ( | const wxRichTextRange & | range | ) | const
| inline

Returns true if this range is completely within range.

## ◆ LimitTo()

bool wxRichTextRange::LimitTo | ( | const wxRichTextRange & | range | ) |

Limit this range to be within range.

## ◆ operator!=()

bool wxRichTextRange::operator!= | ( | const wxRichTextRange & | range | ) | const
| inline

Inequality operator.

## ◆ operator+()

wxRichTextRange wxRichTextRange::operator+ | ( | const wxRichTextRange & | range | ) | const
| inline

Adds a range to this range.

## ◆ operator-()

wxRichTextRange wxRichTextRange::operator- | ( | const wxRichTextRange & | range | ) | const
| inline

Subtracts a range from this range.

## ◆ operator=()

void wxRichTextRange::operator= | ( | const wxRichTextRange & | range | ) |
| inline

Assigns range to this range.

## ◆ operator==()

bool wxRichTextRange::operator== | ( | const wxRichTextRange & | range | ) | const
| inline

Equality operator.

Returns true if range is the same as this range.

## ◆ SetEnd()

void wxRichTextRange::SetEnd | ( | long | end | ) |
| inline

Sets the end position.

## ◆ SetRange()

void wxRichTextRange::SetRange | ( | long | start,
|  | long | end )
| inline

Sets the range start and end positions.

## ◆ SetStart()

void wxRichTextRange::SetStart | ( | long | start | ) |
| inline

Sets the start position.

## ◆ Swap()

void wxRichTextRange::Swap | ( |  | ) |
| inline

Swaps the start and end.

## ◆ ToInternal()

wxRichTextRange wxRichTextRange::ToInternal | ( |  | ) | const
| 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.

## Member Data Documentation

## ◆ m_end

long wxRichTextRange::m_end
| protected

## ◆ m_start

long wxRichTextRange::m_start
| protected