4 ; Warn the user about saving a document
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
37 ; On entry: R0 == estimated size of data
38 ; R1 == file type of the data
39 ; R2 == pointer to name of the file
40 ; R3 == pointer to handler block
41 ; R4 == value to pass to handlers in R10
42 ; R5 == value to pass to handlers in R12
43 ; R6 == flags (in bottom two bits)
47 ; Use: Displays a warning box allowing the user to save a modified
48 ; document. The flags in R6 are as follows:
50 ; Bit 0 File is safe; don't give a warning
51 ; Bit 1 File's name is sensible; display it in the warning
53 ; The handler block is the same as that passed to saveAs (q.v.)
54 ; with an extra entry point on the very beginning, which is
55 ; expected to remove the document from memory. This entry
56 ; point is not passed any arguments except for R10 and R12.
58 ; In order for the system to work, you must call various
59 ; saveWarn routines from your saveAs entry points:
61 ; saveWarn_saved from saEntry__success
62 ; saveWarn_close from saEntry__closed
66 ; --- saveWarn_saved ---
72 ; Use: Informs saveWarn that the document has been saved. If
73 ; saveWarn is not operating, this call is ignored. You should
74 ; only call this routine if the document is *safe*, rather than
75 ; RAM transferred to another application, for example.
79 ; --- saveWarn_close ---
85 ; Use: Informs saveWarn that the save dialogue box has been closed.
86 ; If the document is now saved, then it is removed from
91 ;----- That's all, folks ----------------------------------------------------