Next Prev Up Top Contents Index

quit-interface

Function
Summary

The quit-interface function closes the top level interface containing a specified pane.

Syntax

quit-interface pane &key force

Description

This closes the top level interface containing pane , but first it verifies that it is okay to do this by calling the interface's confirm-destroy-function . If it is okay to close the interface, it then calls destroy to do so. If force is specified, then neither the confirm-destroy-function or the destroy-callback are called, and the window is just closed immediately.

Example

Here are two examples demonstrating the use of quit-interface with the destroy-callback and the confirm-destroy-function .

(setq interface (capi:display
                  (make-instance
                   'capi:interface
                   :title "Test Interface"
                   :destroy-callback
                    #'(lambda (interface)
                        (capi:display-message
                         "Quitting ~S" interface)))))
(capi:quit-interface interface)

With this second example, the user is prompted as to whether or not to quit the interface.

(setq interface (capi:display
                  (make-instance
                   'capi:interface
                   :title "Test Interface"
                   :confirm-destroy-function
                   #'(lambda (interface)
                       (capi:confirm-yes-or-no
                        "Really quit ~S"
                        interface)))))
CL-USER 4> (capi:quit-interface interface)
See also

destroy
display
interface


LispWorks CAPI Reference Manual - 14 Dec 2001

Next Prev Up Top Contents Index