Previous: Hooks, Up: gschem API Reference   [Contents][Index]


3.5 Miscellaneous gschem functions

3.5.1 gschem Attribute Helpers

To use the functions described in this section, you will need to load the (gschem 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:

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

See Text, Attributes and Windows and views.

3.5.2 Miscellaneous utility functions

To use the functions described in this section, you will need to load the (gschem 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.

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.