Next Prev Up Top Contents Index

display-dialog

Function
Summary

The display-dialog function displays a CAPI interface as a dialog box.

Signature

display-dialog interface &key screen focus modal
owner x y position-relative-to

Arguments

interface

A CAPI interface.

screen

A screen.

focus

A pane of interface .

modal

A boolean.

owner

A pane.

x, y

Real numbers representing coordinates.

position-relative-to

:owner or nil .

Description

This is a complementary function that displays the CAPI interface interface as a dialog box.

screen is the screen for the dialog to be displayed on.

focus should be the pane within the interface that should be given the focus initially. If a focus is not supplied, then it lets the window system decide.

modal indicates whether or not the dialog takes over all input to the application. The default is t .

owner specifies an owner window for the dialog. See the "Prompting for Input" chapter in the LispWorks CAPI User Guide for details.

x and y specify the coordinates of the dialog. The default location is at the center of the dialog's owner.

position-relative-to has a default value :owner , meaning that x and y are relative to dialog's owner. The value nil means that x and y are relative to the screen.

The CAPI also provides popup-confirmer which gives you the standard OK and Cancel button functionality.

Example
(capi:display-dialog (capi:make-container
                      (make-instance
                       'capi:push-button-panel
                       :items '("OK" "Cancel")
                       :callback-type :data
                       :callbacks '(capi:exit-dialog
                                    capi:abort-dialog))
                       :title "Empty Dialog"))

There are further examples in the directory examples/capi/dialogs/ .

See also

abort-dialog
display
exit-dialog
interface
popup-confirmer
*update-screen-interfaces-hooks*


LispWorks CAPI Reference Manual - 13 Mar 2003

Next Prev Up Top Contents Index