| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A number of widgets for editing s-expressions (lisp types) are also available. These basically fall in the following categories.
| 1.5.1 The Constant Widgets. | ||
| 1.5.2 Generic Sexp Widget. | ||
| 1.5.3 Atomic Sexp Widgets. | ||
| 1.5.4 Composite Sexp Widgets. |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The const widget can contain any lisp expression, but the user is
prohibited from editing it, which is mainly useful as a component of one
of the composite widgets.
The syntax for the const widget is
TYPE ::= (const [KEYWORD ARGUMENT]... [ VALUE ]) |
The value, if present, is used to initialize the :value
property and can be any s-expression.
There are two variations of the const widget, namely
variable-item and function-item. These should contain a
symbol with a variable or function binding. The major difference from
the const widget is that they will allow the user to see the
variable or function documentation for the symbol.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The sexp widget can contain any lisp expression, and allows the
user to edit it inline in the buffer.
The syntax for the sexp widget is
TYPE ::= (sexp [KEYWORD ARGUMENT]... [ VALUE ]) |
The sexp widget takes the same keyword arguments as the
editable-field widget.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The atoms are s-expressions that does not consist of other s-expressions. A string is an atom, while a list is a composite type. You can edit the value of an atom with the following widgets.
The syntax for all the atoms are
TYPE ::= (NAME [KEYWORD ARGUMENT]... [ VALUE ]) |
The value, if present, is used to initialize the :value
property and must be an expression of the same type as the widget.
I.e. the string widget can only be initialized with a string.
All the atom widgets take the same keyword arguments as the
editable-field widget.
Keywords:
:must-match
file widget.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The syntax for the composite are
TYPE ::= (NAME [KEYWORD ARGUMENT]... COMPONENT...) |
Where each component must be a widget type. Each component widget will be displayed in the buffer, and be editable to the user.
cons widget is a cons-cell where the car is the
value of the first component and the cdr is the value of the second
component. There must be exactly two components.
list widget is a list containing the value of
each of its component.
vector widget is a vector containing the value of
each of its component.
The above suffice for specifying fixed size lists and vectors. To get
variable length lists and vectors, you can use a choice,
set or repeat widgets together with the :inline
keywords. If any component of a composite widget has the :inline
keyword set, its value must be a list which will then be spliced into
the composite. For example, to specify a list whose first element must
be a file name, and whose remaining arguments should either by the
symbol t or two files, you can use the following widget
specification:
(list file
(choice (const t)
(list :inline t
:value ("foo" "bar")
string string)))
|
The value of a widget of this type will either have the form
`(file t)' or (file string string).
This concept of inline is probably hard to understand. It was certainly hard to implement so instead of confusing you more by trying to explain it here, I'll just suggest you meditate over it for a while.
choice-menu basic widget,
and has a similar syntax.
checklist basic widget, and has a
similar syntax.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |