Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / dbx / colourPot
1 ;
2 ; colourPot.sh
3 ;
4 ; dbx control for selecting Wimp colours
5 ;
6 ; © 1995-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 ; Controls provided:
30 ;
31 ; colourPot
32 ;
33 ; Macros provided:
34 ;
35 ; COLPOT
36
37 GET sapphire:dbx.dbx
38
39 [ :LNOT::DEF:colourPot__dfn
40 GBLL colourPot__dfn
41
42 ; --- colourPot ---
43 ;
44 ; Control data: +0 == null terminated title string, or empty for default
45 ; +n
46 ;
47 ; Workspace: +0 == current colour selected
48 ; +1
49 ;
50 ; Flags: bit 8 == allow transparent
51 ;
52 ; Use: Provides a `colour button' which allows the user to choose
53 ; a Wimp colour. Transparent is represented by 255.
54
55 IMPORT colourPot
56
57 ;----- Macros and constants -------------------------------------------------
58
59 MACRO
60 $label COLPOT $icon,$baseReg,$data,$flags,$title
61
62 $label CONTROL $icon,colourPot,$baseReg,$flags,$data
63 DCB "$title",0
64 ALIGN
65 ECTRL
66
67 MEND
68
69 ; --- Flags ---
70
71 cpFlag_trans EQU (1<<8) ;Allow transparent colour
72
73 ; --- Event codes ---
74
75 colourPot_event EQU &80000006 ;User has changed the colour
76 ;R1 == icon handle
77 ;R2 == new colour
78
79 ]
80
81 ;----- That's all, folks ----------------------------------------------------
82
83 END