Stores selection information.
The selection does not have to be contiguous, though currently non-contiguous selections are only supported for a range of table cells (a geometric block of cells can consist of a set of non-contiguous positions).
The selection consists of an array of ranges, and the container that is the context for the selection. It follows that a single selection object can only represent ranges with the same parent container.
Copy constructor. |
|
Adds a range to the selection. |
|
Copies from sel. |
|
Returns the container for which the selection is valid. |
|
Returns the number of ranges in the selection. |
|
Returns the range at the given index. |
|
Returns the selection ranges. |
|
Returns the selection appropriate to the specified object, if any; returns an empty array if none at the level of the object’s container. |
|
Returns |
|
Resets the selection. |
|
Sets the selection. |
|
Sets the container for which the selection is valid. |
|
Sets a single range. |
|
Sets the selection ranges. |
|
Returns |
|
Equality operator. |
See |
|
See |
|
A public C++ attribute of type |
|
A public C++ attribute of type |
Possible constructors:
RichTextSelection(sel : RichTextSelection) -> None
RichTextSelection(range : RichTextRange, container :
RichTextParagraphLayoutBox) -> None
RichTextSelection() -> None
Stores selection information.
__init__ (self, sel : RichTextSelection)
Copy constructor.
None
__init__ (self, range : RichTextRange, container : RichTextParagraphLayoutBox)
Creates a selection from a range and a container.
range (wx.richtext.RichTextRange)
container (wx.richtext.RichTextParagraphLayoutBox)
None
__init__ (self)
Default constructor.
None
Adds a range to the selection.
range (wx.richtext.RichTextRange)
None
Copies from sel.
None
Returns the container for which the selection is valid.
Returns the number of ranges in the selection.
int
GetRange (self, i : int)
Returns the range at the given index.
i (int)
GetRange (self)
Returns the first range if there is one, otherwise wx.richtext.RICHTEXT_NO_SELECTION
.
Returns the selection ranges.
RichTextRangeArray
Returns the selection appropriate to the specified object, if any; returns an empty array if none at the level of the object’s container.
RichTextRangeArray
Returns True
if the selection is valid.
bool
Resets the selection.
None
Set (self, range : RichTextRange, container : RichTextParagraphLayoutBox)
Sets the selection.
range (wx.richtext.RichTextRange)
container (wx.richtext.RichTextParagraphLayoutBox)
None
Set (self, ranges : RichTextRangeArray, container : RichTextParagraphLayoutBox)
Sets the selections from an array of ranges and a container object.
ranges (RichTextRangeArray)
container (wx.richtext.RichTextParagraphLayoutBox)
None
Sets the container for which the selection is valid.
container (wx.richtext.RichTextParagraphLayoutBox)
None
Sets a single range.
range (wx.richtext.RichTextRange)
None
Sets the selection ranges.
ranges (RichTextRangeArray)
None
WithinSelection (self, pos : int, obj : RichTextObject)
Returns True
if the given position is within the selection.
pos (long)
bool
WithinSelection (self, pos : int)
Returns True
if the given position is within the selection.
pos (long)
bool
WithinSelection (pos : int, ranges : RichTextRangeArray)
Returns True
if the given position is within the selection range.
pos (long)
ranges (RichTextRangeArray)
bool
WithinSelection (range : RichTextRange, ranges : RichTextRangeArray)
Returns True
if the given range is within the selection range.
range (wx.richtext.RichTextRange)
ranges (RichTextRangeArray)
bool
int
int
Equality operator.
See GetContainer
and SetContainer
A public C++ attribute of type RichTextParagraphLayoutBox
.
A public C++ attribute of type RichTextRangeArray
.