Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

user-close

Arguments: stream

This function is called when a user of a program makes a closing gesture. Returns true if closing was successful, nil if not (for example if the user canceled the action). stream should be a cg-stream.

An application can add user-close methods that consider whether to grant the user's request to close the window, perhaps by popping up a confirmation dialog. If it is decided that the window should in fact be closed, then the user-close method should call the function close to actually close it.

See also device-close, which is also called when a window is closed, even programmatically.

The default user-close method on basic-pane simply calls close and returns t, unless the close-button property of the window is nil (meaning that there is no "X" close button in the window's title-bar if it has a title-bar), in which case it does nothing and returns nil.

There is also a built-in :around method on basic-pane that checks to see if the window is currently being invoked modally by a call to pop-up-modal-dialog. If so, then this method calls the cancel-button's on-change function if there is a cancel-button on the window, and otherwise calls flag-modal-completion. If the window is not currently being invoked modally, then this method simply calls the next method. This :around method generally should not be overridden.

See also os-exit-request, which can be used to cancel an attempted shutdown of the entire operating system.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version