Next Previous Up Top Contents Index

9.4 DUIM-Frames Module

cancel-dialog

Generic function

Summary

Cancels the specified dialog.

Signature

cancel-dialog dialog #key destroy? => ()

Arguments

dialog
An instance of type <dialog-frame>.

destroy?
An instance of type <boolean>. Default value: #t.

Values

None

Library

duim-frames

Module

duim-frames

Description

Cancels dialog and removes it from the screen. Any changes that the user has made to information displayed in the dialog is discarded.

If destroy? is #t then the dialog is unmapped from the screen.

This is the default callback used for the cancel button in a dialog.

Example

The following example defines a button, *no-button*, that calls cancel-dialog as its activate-callback. This button is then used in a dialog that simply replaces the standard cancel button for the newly defined dialog. Note that the example assumes the existence of a similar *yes-button* to replace the exit button.

define variable *no-button*
       = make(<push-button>, label: "No",
              activate-callback: cancel-dialog,
              max-width: $fill);
make(<dialog-frame>,
     exit-button?: #f,
     cancel-button?: #f,
     layout: vertically ()
               make(<label>, 
                    label: "Simple dialog");
               horizontally ()
                 *yes-button*; 
                 *no-button*;
               end
             end);
start-frame(*dialog*);

See also

dialog-cancel-callback, page 752

<dialog-frame>, page 760

start-dialog, page 849

exit-dialog, page 783


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index