chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / saveWarn
1 ;
2 ; saveWarn.sh
3 ;
4 ; Warn the user about saving a document
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
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)
16 ; any later version.
17 ;
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.
22 ;
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.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ;  saveWarn
32 ;  saveWarn_saved
33 ;  saveWarn_close
34
35 ; --- saveWarn ---
36 ;
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)
44 ;
45 ; On exit:      --
46 ;
47 ; Use:          Displays a warning box allowing the user to save a modified
48 ;               document.  The flags in R6 are as follows:
49 ;
50 ;               Bit 0   File is safe; don't give a warning
51 ;               Bit 1   File's name is sensible; display it in the warning
52 ;
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.
57 ;
58 ;               In order for the system to work, you must call various
59 ;               saveWarn routines from your saveAs entry points:
60 ;
61 ;               saveWarn_saved from saEntry__success
62 ;               saveWarn_close from saEntry__closed
63
64                 IMPORT  saveWarn
65
66 ; --- saveWarn_saved ---
67 ;
68 ; On entry:     --
69 ;
70 ; On exit:      --
71 ;
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.
76
77                 IMPORT  saveWarn_saved
78
79 ; --- saveWarn_close ---
80 ;
81 ; On entry:     --
82 ;
83 ; On exit:      --
84 ;
85 ; Use:          Informs saveWarn that the save dialogue box has been closed.
86 ;               If the document is now saved, then it is removed from
87 ;               memory.
88
89                 IMPORT  saveWarn_close
90
91 ;----- That's all, folks ----------------------------------------------------
92
93                 END