Next: , Previous: , Up: lepton-schematic API Reference   [Contents][Index]


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 pages 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 objects.

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.