| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This is the general syntax of a type specification:
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.
The following keyword arguments apply to all widgets:
:value
:format
By default, the text will be shown in widget-button-face, and
surrounded by brackets.
:sample-face.
Warning: In an editable-field widget, the `%v' escape
must be preceded by some other text in the format string (if specified).
: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
These can be
:doc
:tag
:tag-glyph
:tag on
Emacsen that supports it.
:help-echo
widget-forward or widget-backward or move the mouse
over it (using the standard help-echo mechanism). The argument
is either a string to display, a function of one argument, the widget,
which should return a string to display, or a form that evaluates to
such a string.
:follow-link
: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
nil if the widget can represent the specified value.
:validate
nil
if the widget's current value is valid for the widget. Otherwise it
should return the widget containing the invalid data, and set that
widget's :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.
nil, allow glyphs to appear on displays where they are supported.
| [ < ] | [ > ] | [ << ] | [ 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 reader 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 the
field. This widget will match all string values.
The following extra properties are recognized:
:size
:value-face
widget-field-face, see 1.1 User Interface.
:secret
?*
if the field contains a password or other secret information. By
default, this is nil, and 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 suppresses some of
them. Pressing RET 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 RET 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
nil if you don't want to ignore case when prompting for a
choice through the minibuffer.
:children
:choice
:args
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radio-button-choice Widget Syntax:
type ::= (radio-button-choice [keyword argument]... type ... ) |
The component types specify the choices, with one radio button for each. The widget's value will be that of the chosen type argument. This widget matches 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.
| [ < ] | [ > ] | [ << ] | [ 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
This 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 represent each checklist item. The widget's value will be a list containing the values of all checked 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 value 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] | [ ? ] |