Selection
Read-only selection snapshot from
OutlineEditor::selection
.
This selection can not be changed and will not update when the outline or
editor selection changes. Use
OutlineEditor::moveSelectionToItems
or
OutlineEditor::moveSelectionToRange
to change the editor’s selection.
The selection character offsets are always valid, but in some cases the
selection endpoint
Item
s maybe be null. For instance if the
OutlineEditor
has hoisted an item that has no children then the character
selection will be 0,0, but
::startItem
and
::endItem
will be null.
The
::endItem
end point isn’t always the last item in
::selectedItems
.
For example if
::endItem
doesn’t equal
::startItem
and
::endOffset
is
0 then
::endItem
isn’t included in the selected items because it doesn’t
overlap the selection, it’s just an endpoint anchor, not a selcted item.
Selection
-
::isCollapsed -
Read-only true if selection start equals end.
-
::isFullySelectingItems -
Read-only true if selection starts at item start boundary and ends at item end boundary.
Characters
-
::start -
Read-only selection start character offset.
-
::end -
Read-only selection end character offset.
-
::location -
Read-only selection character location offset.
-
::length -
Read-only selection character length.
Items
-
::startItem -
Read-only selection start
Item(or null) in outline order. -
::startOffset -
Read-only text offset in the
::startItemwhere selection starts. -
::endItem -
Read-only selection endpoint
Item(or null) in outline order. -
::endOffset -
Read-only text offset endpoint in
::endItemor undefined. -
::selectedItems -
Read-only
ArrayofItems intersecting the selection. Does not include::endItemif::endItemdoesn’t equal::startItemand::endOffsetis 0. Does include all overlapped outline items, including folded and hidden ones, between the start and end items. -
::displayedSelectedItems -
Read-only
Arrayof displayedItems intersecting the selection. Does not include::endItemif::endItemdoesn’t equal::startItemand::endOffsetis 0. Does not include items that the selection overlaps but that are hidden in the editor. -
::displayedAncestorSelectedItems -
Read-only
Arrayof displayedItems intersecting the selection. Does not include::endItemif::endItemdoesn’t equal::startItemand::endOffsetis 0. Does include items that overlap the selection by that are not visible. -
::selectedItemsCommonAncestors -
Read-only
Arrayof the common ancestors of::selectedItems.