widget-device

Arguments:
dialog-item dialog

Every dialog-item instance that is placed
onto a parent window has an associated widget-window or lisp-widget-window
instance for the
actual window that appears on the screen for the dialog-item. This
generic function returns the name of the widget-window class that
should be instantiated automatically for a dialog-item. Typically this
class is based solely on the class of the
dialog-item argument, and the
dialog argument is ignored. Here, for example, is
the method for radio-button:

Most applications are not expected to need to subclass widget-window or
lisp-widget-window classes, since
the standard behavior built into each dialog-item is provided via the
dialog-item instance itself rather than its associated widget-window
instance. But if it is necessary to customize a dialog-item by adding
methods to low-level generic functions such as mouse-left-down or virtual-key-down, then
the widget-window or lisp-widget-window
class may be
subclassed to provide an application-specific class on which to define
these methods.

Here is a simple example that subclasses the standard single-item-list
control and causes the numeric keypad keys zero through nine to select
one of the first ten values (respectively) in the list. (The NumLock
key must first be toggled on if it is off.) A
call-next-method allows the arrow keys and
first letters of items to move to items as usual.