| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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
By default, the text will be shown in 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
Text around %[ %] in the format.
These can be
:doc
:tag
:tag-glyph
:help-echo
widget-forward or widget-backward.
:indent
:offset
:extra-offset
:notify
:action callback.
: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 an 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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
link Widget Syntax:
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
url-link Widget Syntax:
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
info-link Widget Syntax:
TYPE ::= (info-link [KEYWORD ARGUMENT]... ADDRESS) |
When this link is invoked, the built-in info browser is started on address.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
push-button Widget Syntax:
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
editable-field Widget Syntax:
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 buffer's major mode suppress some of them.
Pressing return invokes the function specified by :action.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
menu-choice Widget Syntax:
TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... ) |
The type argument represents each possible choice. The widget's value will be that of the chosen type argument. This widget will match any value matching at least one of the specified type arguments.
:void
:case-fold
:children
:choice
:args
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radio-button-choice Widget Syntax:
TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... ) |
The type argument represents each possible choice. The widget's value will be that of the chosen type argument. This widget will match any value matching 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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
item Widget Syntax:
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
choice-item Widget Syntax:
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
toggle Widget Syntax:
TYPE ::= (toggle [KEYWORD ARGUMENT]...) |
The widget has two possible states, `on' and `off', which correspond to
a t or nil value respectively.
The following extra properties are recognized.
:on
:off
:on-glyph
:off-glyph
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
checkbox Widget
The widget has two possible states, `selected' and `unselected', which
corresponds to a t or nil value.
Syntax:
TYPE ::= (checkbox [KEYWORD ARGUMENT]...) |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
checklist Widget Syntax:
TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... ) |
The type arguments represents each checklist item. The widget's value will be a list containing the values of all ticked type arguments. The checklist widget will match a list whose elements all match 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 appear in any sequence. However, if
you extract the values they will be in the sequence given in the
checklist. I.e. the original sequence is forgotten.
button-args
:buttons
:children
:args
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
editable-list Widget Syntax:
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
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
group Widget This widget simply groups other widgets together.
Syntax:
TYPE ::= (group [KEYWORD ARGUMENT]... TYPE...) |
The value is a list, with one member for each type.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |