Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / errorBox
1 ;
2 ; errorBox.sh
3 ;
4 ; Reports errors in an error box
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 ; errorBox_init
32 ; errorBox_beep
33 ; errorBox
34
35 [ :LNOT::DEF:errorBox__dfn
36 GBLL errorBox__dfn
37
38 ; --- errorBox_init ---
39 ;
40 ; On entry: R0 == pointer to application name
41 ;
42 ; On exit: --
43 ;
44 ; Use: Initialises the errorBox system nicely. It creates the
45 ; dialogue box now, and just uses it for the rest of the
46 ; time.
47
48 IMPORT errorBox_init
49
50 ; --- errorBox_beep ---
51 ;
52 ; On entry: --
53 ;
54 ; On exit: --
55 ;
56 ; Use: Sounds the bell (VDU 7) if the CMOS settings dictate that
57 ; error boxes should cause a beep.
58
59 IMPORT errorBox_beep
60
61 ; --- errorBox ---
62 ;
63 ; On entry: R0 == pointer to error block
64 ; R1 == button style code, or pointer to buttons block
65 ;
66 ; On exit: R0 == icon number clicked (ordered from the right)
67 ; CS if R0 == 0, else CC
68 ;
69 ; Use: Displays an error box on the screen. The error block
70 ; doesn't have to have a sensible error number, and doesn't
71 ; have to be word aligned, either.
72 ;
73 ; Since errorBox claims a dialogue box handle on
74 ; initialisation, it isn't possible for this call to fail.
75 ; Hence it is ideal for reporting problems like `Out of
76 ; memory' or `Too many windows'.
77 ;
78 ; The buttons in the error box may be given either by a code
79 ; or by a pointer to a buttons block (these may easily be
80 ; distinguished, since the codes are lower than &8000).
81 ;
82 ; Standard button arrangements are given by codes, as follows:
83 ;
84 ; 0 == Cancel
85 ; 1 == OK
86 ; 2 == OK, Cancel
87 ; 4 == OK, Help
88 ; 5 == OK, Cancel, Help
89
90 IMPORT errorBox
91
92 ]
93
94 ;----- That's all, folks ----------------------------------------------------
95
96 END