A selection owner.

interface ISelectionOwner {
    uuid: string;
    getCursorPosition(): IPosition;
    getSelection(): IRange;
    getSelections(): IRange[];
    setCursorPosition(
        position: IPosition,
        options?: { scroll?: boolean },
    ): void;
    setSelection(selection: IRange): void;
    setSelections(selections: IRange[]): void;
}

Hierarchy (View Summary)

Properties

uuid: string

The uuid of this selection owner.

Methods

  • Set the primary position of the cursor.

    Parameters

    • position: IPosition

      The new primary position.

    • Optionaloptions: { scroll?: boolean }

      Adjustment options allowing to disable scrolling.

      This will remove any secondary cursors.

    Returns void

  • Sets the selections for all the cursors.

    Parameters

    • selections: IRange[]

      The new selections.

      Cursors will be removed or added, as necessary. Passing an empty array resets a cursor position to the start of a document.

    Returns void