Selections (Lepton EDA Scheme Reference Manual 1.9.18)

### 3.3 Selections ¶

To use the functions described in this section, you will need to load the `(schematic selection)` module.

Each `page` in lepton-schematic has a selection associated with it, which is some subset of the `page`s contents. Most actions in lepton-schematic operate on the currently selected objects.

Function: page-selection page ¶

  Returns the current selection for page, as a list of `object`s.

Function: object-selected? object ¶

  Returns ‘`#t`’ if object is in its containing page’s selection. Otherwise, returns ‘`#f`’. If object is not in a `page`, raises an ‘`object-state`’ error.

  Note: object must be directly included in a `page`, not via inclusion in a component `object`.

Function: select-object! object ¶

  Adds object to the selection of its containing `page`. If object is not directly included in a `page`, raises an ‘`object-state`’ error. If object is already selected, does nothing. Returns object.

  Note: This function does not call `select-objects-hook`.

Function: deselect-object! object ¶

  Removes object from the selection of its containing `page`. If object is not directly included in a `page`, raises an ‘`object-state`’ error. If object is not selected, does nothing. Returns object.

  Note: This function does not call `deselect-objects-hook`.