quit Callback Type
quit is called when a window is dismissed.
Example
function funcname (win, code, op=2)
The window identifier, win, can be obtained by calling window_id. The argument code is passed, indicating how the application is being exited.
Arguments
• win is the identifier of the window to be removed.
• code is one of the following values:
◦ 0 — prompt about any unsaved changes, that is, quit
◦ 1 — save all modified documents without prompting, that is, exit
◦ 2 — do not prompt about unsaved changes and quit without saving modified documents, that is, quit ok
• op is the function callback operation. Callbacks are called twice in succession with op specifying the stage of callback operation.
1. op == 1 first call — The returned argument specifies whether the execution should continue or be stopped:
▪ 0 — Continue callback processing.
▪ -1 — Stop further callback processing.
|
The op argument is only passed if the callback function was added as a global callback (that is, registered with the win argument to window_add_callback set to 0. For a local callback, the op argument is not passed (since the callback is actually implemented using the quit callback attribute of window_set). Because of this, the callback function must assign a default value of 2 to the op parameter (if it will be used as a local callback).
|
2. op == 2 second call — Occurs unless the processing was stopped during the first call. The returned argument allows or prevents basic Arbortext Editor processing after all callbacks have been called:
▪ 0 — Basic Arbortext Editor processing allowed.
▪ -1 — Basic Arbortext Editor processing prevented.
Related Topics