Version: 2.9.4
Public Member Functions | Protected Attributes
wxRichTextRange Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextbuffer.h>


Detailed Description

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

Library:  wxRichText
Category:  Rich Text
参照:
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

List of all members.


Constructor & Destructor Documentation

wxRichTextRange::wxRichTextRange ( ) [inline]

Default constructor.

wxRichTextRange::wxRichTextRange ( long  start,
long  end 
) [inline]

Constructor taking start and end positions.

wxRichTextRange::wxRichTextRange ( const wxRichTextRange range) [inline]

Copy constructor.

wxRichTextRange::~wxRichTextRange ( ) [inline]

Member Function Documentation

bool wxRichTextRange::Contains ( long  pos) const [inline]

Returns true if pos was within the range.

Does not match if the range is empty.

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.

long wxRichTextRange::GetEnd ( ) const [inline]

Gets the end position.

long wxRichTextRange::GetLength ( ) const [inline]

Gets the length of the range.

long wxRichTextRange::GetStart ( ) const [inline]

Returns the start position.

bool wxRichTextRange::IsOutside ( const wxRichTextRange range) const [inline]

Returns true if this range is completely outside range.

bool wxRichTextRange::IsWithin ( const wxRichTextRange range) const [inline]

Returns true if this range is completely within range.

bool wxRichTextRange::LimitTo ( const wxRichTextRange range)

Limit this range to be within range.

bool wxRichTextRange::operator!= ( const wxRichTextRange range) const [inline]

Inequality operator.

wxRichTextRange wxRichTextRange::operator+ ( const wxRichTextRange range) const [inline]

Adds a range to this range.

wxRichTextRange wxRichTextRange::operator- ( const wxRichTextRange range) const [inline]

Subtracts a range from this range.

void wxRichTextRange::operator= ( const wxRichTextRange range) [inline]

Assigns range to this range.

bool wxRichTextRange::operator== ( const wxRichTextRange range) const [inline]

Equality operator.

Returns true if range is the same as this range.

void wxRichTextRange::SetEnd ( long  end) [inline]

Sets the end position.

void wxRichTextRange::SetRange ( long  start,
long  end 
) [inline]

Sets the range start and end positions.

void wxRichTextRange::SetStart ( long  start) [inline]

Sets the start position.

void wxRichTextRange::Swap ( ) [inline]

Swaps the start and end.

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

long wxRichTextRange::m_end [protected]
long wxRichTextRange::m_start [protected]
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines