| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: dialog-item
Returns the widget-window
instance for a widget
when it is currently on a parent window, and otherwise returns nil
. The argument should be an instance of a dialog-item
subclass.
Due to a legacy design decision in Common Graphics, a widget is
implemented as two separate objects. The logical object that an
application normally deals with is an instance of a dialog-item
subclass,
and is alternately called either a dialog-item, a widget, a control,
or a component in our documentation (though "component" can refer to
other interface objects as well).
When a dialog-item is placed onto a parent window (by including it in
the :dialog-items
argument to make-window or by calling add-component), then the
second object, a widget-window
instance, is created
internally to implement the window that then appears on the screen for
the widget. If the parent window is later closed, or if the widget is
removed from the parent window by calling remove-component, then the
widget-window is destroyed and the window of the widget will again be
nil.
Most applications should be able to work with the dialog-item only.
If needed, though, an application could pass the window of a widget to
any function that takes a window (basic-pane
) argument. And if an
application needs to add methods to a generic function that will be
called on the window of a widget rather than on the widget itself,
then the method could specialize on the widget-window class. This
generally requires defining subclasses for both the dialog-item
class and
the widget-window
class, and then
adding a trivial widget-device method that tells the
dialog-item subclass which widget-window subclass to instantiate
internally when it is added to a parent window.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |