Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version