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

### 3.6 Miscellaneous lepton-schematic functions

#### 3.6.1 lepton-schematic Attribute Helpers

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

Function: add-attrib! target name value visible show

  Create a new attribute, either attached to a target `object` in the current `page`, or floating in the current `page` if target is ‘`#f`’. The name and value for the attribute must be strings, and if visible is ‘`#f`’, the attribute will be invisible. The show argument controls which parts of the attribute will be visible, and must be one of the following symbols:

  - ‘`name`’
  - ‘`value`’
  - ‘`both`’

  This function exists to provide a way for actions defined in Scheme to use the same attribute placement heuristics as lepton-schematic’s built-in Add Attribute action.

  See Text, Attributes and Windows and views.

#### 3.6.2 Miscellaneous utility functions

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

Function: show-uri uri

  Open uri in the registered default application associated for that type of file or protocol. URI should be fully-qualified URI; which URIs can be handled by `show-uri` will depend on the system configuration. Raises `misc-error` on failure.

Function: show-file filename

  Displays a file in the registered default application for files of that type. filename should be the absolute path and filename of a local file. Convenience function which calls `(show-uri "file://filename")`