4 ; Writable dialogue boxes
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 -------------------------------------------------------------
38 [ :LNOT::DEF:writable__dfn
41 ;+ LIB sapphire:^.bsh.stdDbox
45 ; On entry: R0 == pointer to writable dialogue block
46 ; R1 == pointer to default string to display, or 0 for null
47 ; R2 == pointer to routine to call when string set
48 ; R3 == value to pass to routine in R10
49 ; R4 == value to pass to routine in R12
51 ; On exit: R0 == dialogue handle of created dialogue box
54 ; Use: Displays a writable dialogue box, i.e. one with a writable
55 ; icon and OK button, used instead of writable menu items,
56 ; for reasons to do with caret blinking and pointer changing.
58 ; The writable dialogue block consists of:
63 ; n Validation string to use, may be null
64 ; m Title string (message tag) to display
70 ; 0-7 Maximum string length
71 ; 8 Right align text in writable icon
72 ; 9-31 Reserved; must be 0
74 ; The routine returns a dialogue handle because you may want
75 ; to attach a numWrite control to the writable icon, which
78 ; The handler routine is passed:
80 ; R0 == pointer to string typed in
81 ; R1 == dialogue box handle (for numWrite again)
82 ; R10, R12 as set up here
84 ; It must preserve all registers. If the carry flag is set
85 ; on exit, the dialogue box will not be closed. If it is
86 ; clear, the dialogue may be closed depending on the button
89 ; Note that this routine does *not* require a template --
90 ; a suitable window is generated at run-time.
100 ; Use: Initialises the writable dialogue box for use.
104 ; --- Useful constants ---
106 wrtFlag_rAlign EQU (1<<8) ;Right align text in icon
108 ; --- Macro: WRTABLE ---
110 ; Arguments: len == maximum string length to allow
111 ; flags == other flags to set
112 ; valid == (optional) validation string
113 ; title == title message tag string
115 ; Use: Builds a writable definition block.
118 $label WRTABLE $len,$flags,$valid,$title
128 ;----- That's all, folks ----------------------------------------------------