All Manuals > CAPI User Guide and Reference Manual > 10 Dialogs: Prompting for Input

NextPrevUpTopContentsIndex

10.4 Dialog Owners

When a dialog appears, it should be "owned" by some window. The main effect of this "ownership" is that the dialog is always in front of the owner window. When either the dialog or the owner is raised, the other follows.

All CAPI functions which display a dialog allow you to specify the owner.

10.4.1 The default owner

When a dialog is displayed and the owner is not supplied or is given as nil, the CAPI tries to identify the appropriate owner. In particular, in the case where a dialog pops up in a process in which a CAPI interface is displayed, by default the CAPI uses this interface as the owner window. This case covers most situations.

10.4.2 Specifying the owner

If the default is not appropriate, then the programmer needs to supply the owner. This owner argument can be any CAPI pane that is currently displayed, and the top level interface of the pane is used as the actual owner. A CAPI pane owner must be running in the current process (see the process argument to display). Creating cross-process ownership can lead to deadlocks.

The owner can also be a screen object, which tells the system on which screen to put the dialog, but none of the windows will be the dialog's owner.

The owner can be supplied by the keyword argument :owner in functions such as display-dialog and print-dialog. Other functions such as prompt-for-string and prompt-for-file can be supplied an owner in the :popup-args list as a pair :owner owner .


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex