SheetXL - v1.0.2
    Preparing search index...

    Interface IMovableSelection

    The drawings selected on a sheet's view: shapes, pictures, charts, controls, groups and the members of groups.

    The counterpart of IRangeSelection. A view holds both, independently: selecting a drawing does not change the range selection and selecting cells does not clear this one. Which of the two the keyboard acts on is a matter of focus, which belongs to the UI.

    Empty is the usual state, when the cells have the selection.

    Every selected movable has the same parent, its container: the sheet, or one group. Selecting a movable from another container replaces the selection.

    interface IMovableSelection {
        isIMovableSelection: true;
        addListeners(
            listeners: IMovableSelection.IListeners,
            options?: IListener.Options,
        ): Remove;
        clear(): this;
        getActive(): IMovable | null;
        getContainer(): IMovable | null;
        getItems(): readonly IMovable[];
        getWorksheet(): IWorksheet;
        isEmpty(): boolean;
        isEquals(other: IItemSelection<IMovable>): boolean;
        isSelected(item: IMovable): boolean;
        select(
            movables: readonly IMovable[],
            options?: IMovableSelection.SelectOptions,
        ): this;
        traverse(reverse?: boolean): this;
        unselect(items: readonly IMovable[]): this;
    }

    Hierarchy (View Summary)

    Index
    isIMovableSelection: true

    For runtime type checking.

    • Returns the movable selected most recently, or null when the selection is empty.

      Returns IMovable | null

      The one a Format pane shows.

    • Returns what every selected movable shares as its parent: null for the sheet, else the group's movable.

      Returns IMovable | null

      null when the selection is empty.

    • Returns true if nothing is selected.

      Returns boolean

    • Selects movables, replacing the selection.

      Parameters

      Returns this

      Movables are taken in order, as picks: one in another container than those selected before it replaces them.

      If a movable is not on this sheet, or has been deleted.

    • Selects the next drawing on the sheet, alone.

      Parameters

      • Optionalreverse: boolean

        Selects the previous one instead.

      Returns this

      Visits every drawing back to front, a group and then its members in the group's order. A hidden drawing is not visited. Wraps at the ends. With nothing selected, starts from the first (or, in reverse, the last).

      Useful for pressing Tab from the UI.

    • Removes items from the selection. Items not selected are ignored.

      Parameters

      Returns this