; ; errorBox.sh ; ; Reports errors in an error box ; ; © 1994-1998 Straylight ; ;----- Licensing note ------------------------------------------------------- ; ; This file is part of Straylight's Sapphire library. ; ; Sapphire is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2, or (at your option) ; any later version. ; ; Sapphire is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with Sapphire. If not, write to the Free Software Foundation, ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; errorBox_init ; errorBox_beep ; errorBox [ :LNOT::DEF:errorBox__dfn GBLL errorBox__dfn ; --- errorBox_init --- ; ; On entry: R0 == pointer to application name ; ; On exit: -- ; ; Use: Initialises the errorBox system nicely. It creates the ; dialogue box now, and just uses it for the rest of the ; time. IMPORT errorBox_init ; --- errorBox_beep --- ; ; On entry: -- ; ; On exit: -- ; ; Use: Sounds the bell (VDU 7) if the CMOS settings dictate that ; error boxes should cause a beep. IMPORT errorBox_beep ; --- errorBox --- ; ; On entry: R0 == pointer to error block ; R1 == button style code, or pointer to buttons block ; ; On exit: R0 == icon number clicked (ordered from the right) ; CS if R0 == 0, else CC ; ; Use: Displays an error box on the screen. The error block ; doesn't have to have a sensible error number, and doesn't ; have to be word aligned, either. ; ; Since errorBox claims a dialogue box handle on ; initialisation, it isn't possible for this call to fail. ; Hence it is ideal for reporting problems like `Out of ; memory' or `Too many windows'. ; ; The buttons in the error box may be given either by a code ; or by a pointer to a buttons block (these may easily be ; distinguished, since the codes are lower than &8000). ; ; Standard button arrangements are given by codes, as follows: ; ; 0 == Cancel ; 1 == OK ; 2 == OK, Cancel ; 4 == OK, Help ; 5 == OK, Cancel, Help IMPORT errorBox ] ;----- That's all, folks ---------------------------------------------------- END