4 ; Implementation of a save as dialogue box
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 -------------------------------------------------------------
33 [ :LNOT::DEF:saveAs__dfn
38 ; On entry: R0 == estimated size of data
39 ; R1 == file type of the data
40 ; R2 == pointer to name of the file
41 ; R3 == pointer to handler block
42 ; R4 == value to pass to handlers in R10
43 ; R5 == value to pass to handlers in R12
45 ; On exit: May return an error
47 ; Use: Displays a save as dialogue box for you to save some data.
51 ;----- The SaveAs handler block ---------------------------------------------
53 ; The block begins with the message tag for the dialogue title, followed by
54 ; an align to word boundary and then branch instructions or 0 for:
57 saEntry__closed # 4 ;Save dialogue has closed
63 saEntry__save # 4 ;Write to a file
65 ; R0 == pointer to file name
66 ; R1 == 0 if file unsafe,
71 saEntry__send # 4 ;Send a block of data
75 ; R0 == pointer to block
77 ; CS if this is the last one
79 saEntry__success # 4 ;Data transfer has finished
85 saEntry__failed # 4 ;Data transfer failed
87 ; R0 == 0 or ptr to error
94 ;----- That's all, folks ----------------------------------------------------