The syntax of a type specification is given below:
NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS) | NAME
Where, name is a widget name, keyword is the name of a property, argument is the value of the property, and args are interpreted in a widget specific way.
There following keyword arguments that apply to all widgets:
:value
:format
widget-button-face
, and
surrounded by brackets.
:sample-face
.
:doc
here.
:doc
property in the widget, it will
instead examine the :documentation-property
property. If it is a
lambda expression, it will be called with the widget's value as an
argument, and the result will be used as the documentation text.
:tag
here, or the princ
representation of the value if there is no tag.
:button-face
:button-prefix
:button-suffix
:doc
:tag
:tag-glyph
:help-echo
widget-forward
or widget-backward
.
:indent
:offset
:extra-offset
:notify
:menu-tag
menu-choice
widget.
:menu-tag-get
menu-choice
widget. By default, the tag used will be either the
:menu-tag
or :tag
property if present, or the princ
representation of the :value
property if not.
:match
:validate
:error
property to a string explaining the error.
The following predefined function can be used:
:children
of widget must be valid.
:tab-order
widget-forward
or widget-backward
. This is only partially
implemented.
-1
are ignored.
nil
,
whichever comes first.
nil
:parent
menu-choice
item or an
element of a editable-list
widget).
:sibling-args
radio-button-choice
or
checklist
. The value should be a list of extra keyword
arguments, which will be used when creating the radio-button
or
checkbox
associated with this item.
link
WidgetSyntax:
TYPE ::= (link [KEYWORD ARGUMENT]... [ VALUE ])
The value, if present, is used to initialize the :value
property. The value should be a string, which will be inserted in the
buffer.
By default the link will be shown in brackets.
url-link
WidgetSyntax:
TYPE ::= (url-link [KEYWORD ARGUMENT]... URL)
When this link is invoked, the WWW browser specified by
browse-url-browser-function
will be called with url.
info-link
WidgetSyntax:
TYPE ::= (info-link [KEYWORD ARGUMENT]... ADDRESS)
When this link is invoked, the build-in info browser is started on address.
push-button
WidgetSyntax:
TYPE ::= (push-button [KEYWORD ARGUMENT]... [ VALUE ])
The value, if present, is used to initialize the :value
property. The value should be a string, which will be inserted in the
buffer.
By default the tag will be shown in brackets.
editable-field
WidgetSyntax:
TYPE ::= (editable-field [KEYWORD ARGUMENT]... [ VALUE ])
The value, if present, is used to initialize the :value
property. The value should be a string, which will be inserted in
field. This widget will match all string values.
The following extra properties are recognized.
:size
:value-face
widget-field-face
.
:secret
?*
if the field contains a password or other secret information. By
default, the value is not secret.
:valid-regexp
:validate
function will match the content of the
field with the value of this attribute. The default value is ""
which matches everything.
:keymap
widget-field-keymap
, which allows you to use all the normal
editing commands, even if the buffers major mode suppress some of them.
Pressing return invokes the function specified by :action
.
text
Widget
This is just like editable-field
, but intended for multiline text
fields. The default :keymap
is widget-text-keymap
, which
does not rebind the return key.
menu-choice
WidgetSyntax:
TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... )
The type arguments represents each possible choice. The widgets value of will be the value of the chosen type argument. This widget will match any value that matches at least one of the specified type arguments.
:void
:case-fold
:children
:choice
:args
radio-button-choice
WidgetSyntax:
TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... )
The type arguments represents each possible choice. The widgets value of will be the value of the chosen type argument. This widget will match any value that matches at least one of the specified type arguments.
The following extra properties are recognized.
:entry-format
button-args
:buttons
:children
:choice
:args
You can add extra radio button items to a radio-button-choice
widget after it has been created with the function
widget-radio-add-item
.
radio-button-choice
widget widget a new radio button item of type
type.
Please note that such items added after the radio-button-choice
widget has been created will not be properly destructed when
you call widget-delete
.
item
WidgetSyntax:
ITEM ::= (item [KEYWORD ARGUMENT]... VALUE)
The value, if present, is used to initialize the :value
property. The value should be a string, which will be inserted in the
buffer. This widget will only match the specified value.
choice-item
WidgetSyntax:
ITEM ::= (choice-item [KEYWORD ARGUMENT]... VALUE)
The value, if present, is used to initialize the :value
property. The value should be a string, which will be inserted in the
buffer as a button. Activating the button of a choice-item
is
equivalent to activating the parent widget. This widget will only match
the specified value.
toggle
WidgetSyntax:
TYPE ::= (toggle [KEYWORD ARGUMENT]...)
The widget has two possible states, `on' and `off', which corresponds to
a t
or nil
value.
The following extra properties are recognized.
:on
:off
:on-glyph
:off-glyph
checkbox
Widget
The widget has two possible states, `selected' and `unselected', which
corresponds to a t
or nil
value.
Syntax:
TYPE ::= (checkbox [KEYWORD ARGUMENT]...)
checklist
WidgetSyntax:
TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... )
The type arguments represents each checklist item. The widgets value of will be a list containing the value of each ticked type argument. The checklist widget will match a list whose elements all matches at least one of the specified type arguments.
The following extra properties are recognized.
:entry-format
:greedy
:greedy
to
non-nil, it will allow the items to come in any sequence. However, if
you extract the value they will be in the sequence given in the
checklist. I.e. the original sequence is forgotten.
button-args
:buttons
:children
:args
editable-list
WidgetSyntax:
TYPE ::= (editable-list [KEYWORD ARGUMENT]... TYPE)
The value is a list, where each member represents one widget of type type.
The following extra properties are recognized.
:entry-format
:insert-button-args
:delete-button-args
:append-button-args
:buttons
:children
:args
group
WidgetThis widget simply group other widget together.
Syntax:
TYPE ::= (group [KEYWORD ARGUMENT]... TYPE...)
The value is a list, with one member for each type.
Go to the first, previous, next, last section, table of contents.