The following commands are used to work with a selection:
Selects the whole document.
Complexity: constant-time.
Drops the current selection.
Complexity: constant-time.
Inverts the current selection. Selected blocks become unselected, and vice versa.
Complexity: constant-time.
Use this command to add, subtract or overlap the given range with a current selection.
Complexity: from constant-time to linear-time, depending on the current selection.
Drops the current selection and adds all modified document data to the current selection.
Complexity: linear-time, depending on number of document modifications.
Compresses and saves the current selection to a disk file.
Complexity: linear-time, depending on the number of blocks in a current selection.
Loads and optionally merges the selection from disk file with a current one.
Complexity: linear-time, depending on loaded selection complexity and current selection complexity (for merge operations).
Copy the information about the current multiple selection into the Clipboard. This includes the list of all selected ranges.
Complexity: linear-time, depending on the number of blocks in a current selection.
Save the information about the current multiple selection to the text file. This includes the list of all selected ranges.
Complexity: linear-time, depending on the number of blocks in a current selection.
Scripts may use the following methods to work with selection objects:
In addition, methods and properties of the ISelection interface are available to control the multiple selection object.