To use the functions described in this section, you will need to load
(geda attrib) module.
Attributes are text
objects with a particular format of string.
They can be floating, or they can be attached to another
Returns true if and only if object is an attribute (i.e. a text
object and in attribute format).
Splits the string from text (a text
object) into name and
value, if it is in attribute format. If it is not in attribute
format, raises an ‘attribute-format’ error. The return value is
in the form ‘(name . value)’.
Returns the name part of attrib, as a string.
Returns the value part of attrib, as a string.
Sets the value part of attrib to value.
If attrib is attached to another
object, returns that
object. Otherwise, returns ‘#f’.
Returns a list of all attributes attached to object.
Attach attribs to object. All the attribs must be
objects. The following conditions must be satisfied, or
an ‘object-state’ error will be raised:
Any attribs that are already attached to object are ignored. Returns object.
Note: For historical reasons,
attach-attribs! does not
require that all attribs satisfy
Nevertheless, avoid attaching non-attribute text objects as attributes.
Detach attribs from object. Any attribs that are
not attached as attributes are ignored. If any attribs are
objects other than object, an
‘object-state’ error is raised.
Inherited attributes are unattached attributes inside a
Returns the inherited attributes of object, if object is a component. If object is not a component, returns the empty list.
Returns ‘#t’ if attrib is an inherited attribute.
promotable attributes are inherited attributes that are both
visible and have names that are in the list of promotable attributes
set with the
always-promote-attributes rc file parameter.
Returns a list of promotable attributes of component.
Promote all promotable attributes from component into the
page that contains component. If component is not
in a page, an ‘object-state’ error is raised.
All promotable attributes are copied, and made invisible. The copies
are added to the
page, and attached as attributes of component.
The promoted attributes are returned. If component is not in
fact a component
object, does nothing and returns the empty list.