Next: The radio-button-choice Widget, Previous: The text Widget, Up: Basic Types [Contents][Index]
menu-choice WidgetSyntax:
type ::= (menu-choice [keyword argument]... type ... )
A widget to represent a menu of options. Its super is the
default widget.
The type argument represents each possible choice. The widget’s value will be that of the chosen type argument.
It either overrides or adds the following properties:
:convert-widgetA function that takes care of converting each possible choice.
:copyA function to copy each possible choice.
:formatBy default, buttonize the tag and show the value.
:voidWidget type used as a fallback when the value does not match any of the specified type arguments.
By default this is an item widget.
:case-foldIf nil don’t ignore case when prompting for a choice through
the minibuffer.
By default, its value is t.
:childrenA list whose CAR is the widget representing the currently chosen type in the buffer.
:choiceThe current chosen type.
:argsThe list of types.
:value-createThe function that inserts the current value for the widget.
It inserts the first choice that matches, as with the :match
function, the value of the widget.
:value-getReturns the value of the first child for the widget (see the
description for :children above).
:value-inlineReturns the inline value of the first child for the widget.
:default-getThe default value for this widget is the default value for the first
choice, in case :value is missing.
This means that if you want a specific default value for the
menu-choice widget, you should either pass a :value
property when creating it, or arrange the choices so that the first
one can hold your desired default value.
:mouse-down-actionA function that takes care of showing a menu, if possible and desired.
:actionA function that takes care of getting a new choice for the widget.
Depending on the number of choices available, it may show a menu or just toggle the choices, or even do nothing at all.
After getting the choice, it recreates the widget and notifies it.
:validateReturns nil if the widget’s value is a valid choice.
:matchThis widget will match any value matching at least one of the specified type arguments.
:match-inlineA function that returns non-nil if the values match the widget,
taking into account the :inline property.
Next: The radio-button-choice Widget, Previous: The text Widget, Up: Basic Types [Contents][Index]