Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / dbx / stringSet
1 ;
2 ; stringSet.sh
3 ;
4 ; String set dialogue box control
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 ; stringSet_setValue
32 ;
33 ; Controls provided:
34 ;
35 ; stringSet
36 ;
37 ; Macros provided:
38 ;
39 ; STRSET
40
41 GET sapphire:dbx.dbx
42
43 [ :LNOT::DEF:stringSet__dfn
44 GBLL stringSet__dfn
45
46 ; --- stringSet ---
47 ;
48 ; Control data: +0 == address of menu definition
49 ; +4 == address of string table
50 ; +8 == icon number in which to write string
51 ; +12
52 ;
53 ; Workspace: +0 == current value of radio selection
54 ; +4
55 ;
56 ; Flags: --
57 ;
58 ; Use: Provides handling for a `menu button' -- when clicked, a
59 ; menu of possible values appears, from which the user may
60 ; choose an entry. The chosen string is copied to the icon.
61
62 IMPORT stringSet
63
64 ; --- stringSet_setValue ---
65 ;
66 ; On entry: R0 == dialogue box handle
67 ; R1 == icon handle
68 ;
69 ; On exit: --
70 ;
71 ; Use: Sets the contents of the display area attached to a string
72 ; set control from the current state of the control.
73
74 IMPORT stringSet_setValue
75
76 ;----- Macros and symbols ---------------------------------------------------
77
78 stringSet_event EQU &80000005 ;Value of stringset changed
79 ;R1 == icon number of
80
81 MACRO
82 $label STRSET $icon,$base,$data,$menu,$strings,$display
83
84 $label CONTROL $icon,stringSet,$base,0,$data
85 DCD $menu,$strings,$display
86 ECTRL
87
88 MEND
89
90 ]
91
92 ;----- That's all, folks ----------------------------------------------------
93
94 END