1 CAPI Reference Entries

quit-interface

Function

Summary

Thequit-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'sconfirm-destroy-function. If it is okay to close the interface, it then callsdestroy to do so. If force is specified, then neither theconfirm-destroy-function or thedestroy-callback are called, and the window is just closed immediately.

Example

Here are two examples demonstrating the use ofquit-interface with thedestroy-callback and theconfirm-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


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker