Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## selected-window-or-screen

Arguments:

This simple function is provided as a convenience when invoking the various modal utility dialogs that are built into Common Graphics, such as pop-up-message-dialog or ask-user-for-choice-from-list. These functions have a stream argument for specifying the owner window for the modal dialog. The modal dialog will appear on this owner window, and the owner window and its other child windows will be disabled while the modal dialog is present.

selected-window-or-screen returns a stream that is typically suitable as the value of this stream argument. In fact, each of the utility dialog functions defaults its stream argument to the stream returned by this function. An application may find other uses for it as well.

Specifically, if there currently are any modal dialogs being invoked in the current process, then the one that is being invoked most recently is returned. (You can invoke a modal dialog on top of one that is already being invoked.) Otherwise, the currently selected top-level window is returned unless there is no such window, in which case the screen is returned.

Here is the definition of the function.

    (defun selected-window-or-screen ()
      (or (modal-window)
          (selected-window (screen *system*))
          (screen *system*)))

See also modal-window, selected-window, screen, `*system*`.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version