Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Regulars » StarInfo/Miskin/!ColourDef/!RunImage

StarInfo/Miskin/!ColourDef/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Regulars
Filename: StarInfo/Miskin/!ColourDef/!RunImage
Read OK:
File size: 0CDA bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20REM >Framework for Wimp programs
   30ON ERROR VDU4,26,30:PRINT REPORT$;" at line ";ERL:END
   40lenB%=620:DIM B% lenB%,name% 20,B2% 48,cbuff% 100
   50prog$="ColourDef"
   60$name%=prog$+CHR$0
   70col%=&ffFFFF00:r%=&ff:g%=&FF:b%=&FF
   80!cbuff%=col%:cbuff%!4=0
   90:
  100quit%=FALSE
  110$B%="TASK"
  120SYS "Wimp_Initialise",200,!B%,prog$ TO version%,task%
  130ON ERROR IF FNwimperror THEN END
  140PROCicon
  150PROCloadTemplates
  160PROCmenu(in%)
  170ON ERROR IF FNwimperror THEN END
  180REPEAT:PROCpoll:UNTIL quit%
  190PROCclose
  200END
  210:
  220DEFPROCpoll
  230SYS "Wimp_Poll",1,B% TO reason%
  240CASE reason% OF
  250  WHEN 2 :SYS "Wimp_OpenWindow",,B%
  260  WHEN 3 :SYS "Wimp_CloseWindow",,B%
  270  WHEN 6 :PROCbuttons
  280  WHEN 9 :IF !B%=1 quit%=TRUE
  290  WHEN 17,18:PROCreceive
  300ENDCASE
  310ENDPROC
  320:
  330DEFPROCreceive
  340CASE B%!16 OF
  350  WHEN 0:quit%=TRUE
  360  WHEN &47700
  370    col%=B%!28
  380    r%=B%?29:g%=B%?30:b%=B%?31
  390    FORi%=0TOB%!32+7:cbuff%?i%=B%!(28+i%):NEXT
  400    PROCwritein(r%,g%,b%,TRUE)
  410    PROCopenwindow(mb%)
  420  WHEN &47702:SYS "ColourPicker_CloseDialogue",0,B%!20
  430ENDCASE
  440ENDPROC
  450:
  460DEFPROCicon
  470B%!0=-1:B%!4=0:B%!8=0:B%!12=68:B%!16=68
  480B%!20=&3002
  490$(B%+24)="!"+prog$
  500SYS "Wimp_CreateIcon",,B% TO ih%
  510ENDPROC
  520:
  530DEFPROCseticon(i%,v%)
  540!B%=mb%:B%!4=i%:B%!8=v%<<21:B%!12=1<<21
  550SYS "Wimp_SetIconState",,B%
  560ENDPROC
  570:
  580DEFPROCopenwindow(handle%)
  590!B%=handle%:SYS "Wimp_GetWindowState",,B%
  600B%!28=-1:SYS "Wimp_OpenWindow",,B%
  610ENDPROC
  620:
  630DEFPROCclose
  640$B%="TASK":SYS "Wimp_CloseDown",task%,!B%
  650ENDPROC
  660
  670:
  680DEFFNwimperror
  690ONERROR OFF
  700!B%=ERR
  710$(B%+4)=REPORT$+" (internal error code "+STR$ERL+")"+CHR$0
  720SYS "Wimp_ReportError",B%,3,prog$ TO ,response%
  730IF response%=2 THEN PROCclose:=TRUE ELSE =FALSE
  740:
  750DEFPROCmenu(in%)
  760DIM menu% 76
  770$menu%=prog$
  780menu%!12=&70207:menu%!16=16*(LENprog$+1):menu%!20=44:menu%!24=0
  790menu%!28=0:menu%!32=in%:menu%!36=&21 +(7<<24)
  800$(menu%+40)="Info"
  810menu%!52=&80:menu%!56=-1:menu%!60=&21 +(7<<24)
  820$(menu%+64)="Quit"
  830ENDPROC
  840:
  850DEFPROCshowmenu(x%,y%,oniconbar%)
  860IF oniconbar% ypos%=96+2*44 ELSE ypos%=y%+20
  870SYS "Wimp_CreateMenu",,menu%,x%-64,ypos%
  880ENDPROC
  890:
  900DEFPROCbuttons
  910x%=!B%:y%=B%!4:butt%=B%!8:h%=B%!12:icon%=B%!16
  920IF butt% AND 2 PROCshowmenu(x%,y%,h%=-2):ENDPROC
  930CASE h% OF
  940 WHEN -2:IF butt% AND 4 PROCopenwindow(mb%) ELSE PROCopenpicker
  950 WHEN mb%
  960  CASE icon% OF
  970   WHEN 0,1,2,3:opt%=icon%:PROCwritein(r%,g%,b%,FALSE)
  980   WHEN 10:PROCopenpicker
  990  ENDCASE
 1000ENDCASE
 1010ENDPROC
 1020
 1030DEFPROCloadTemplates
 1040SYS "Wimp_OpenTemplate",,"<ColourDef$Dir>.Templates"
 1050inlen%=256
 1060DIM indir% inlen%
 1070data%=indir%:end%=indir%+inlen%
 1080in%=FNwindow("info")
 1090mb%=FNwindow("main")
 1100SYS "Wimp_CloseTemplate"
 1110PROCseticon(2,1)
 1120opt%=2
 1130ENDPROC
 1140:
 1150DEFFNwindow(a$)
 1160SYS "Wimp_LoadTemplate",,B%,data%,end%,-1,a$,0 TO ,,data%,,,,c%
 1170SYS "Wimp_CreateWindow",,B% TO c%
 1180=c%
 1190:
 1200DEFPROCchangetext(i%,t$)
 1210!B2%=mb%:B2%!4=i%
 1220SYS "Wimp_GetIconState",,B2%
 1230B2%!8=0:B2%!12=0:$(B2%!28)=t$
 1240SYS "Wimp_SetIconState",,B2%
 1250ENDPROC
 1260:
 1270DEFPROCopenpicker
 1280!B%=0:B%!4=name%:B%!8=x%:B%!12=0:B%!16=1040:B%!20=644
 1290B%!24=0:B%!28=0
 1300FORi%=0TOcbuff%!4+7:B%?(32+i%)=cbuff%?i%:NEXT
 1310SYS "ColourPicker_OpenDialogue",0,B%
 1320ENDPROC
 1330
 1340DEFPROCwritein(R%,G%,B%,do%)
 1350CASE opt% OF
 1360  WHEN 0:r$=STR$R%:b$=STR$B%:g$=STR$G%
 1370  WHEN 2:r$=STR$(R%*100/255):g$=STR$(G%*100/255):b$=STR$(B%*100/255)
 1380  WHEN 1:r$=STR$(R%/255):g$=STR$(G%/255):b$=STR$(B%/255)
 1390  WHEN 3:r$="&"+STR$~R%:b$="&"+STR$~B%:g$="&"+STR$~G%
 1400ENDCASE
 1410r$=LEFT$(r$,4):g$=LEFT$(g$,4):b$=LEFT$(b$,4)
 1420PROCchangetext(4,r$)
 1430PROCchangetext(6,b$)
 1440PROCchangetext(8,g$)
 1450IF do% PROCchangetext(11,"&"+STR$~col%)
 1460ENDPROC

� >!RunImage
"� >Framework for Wimp programs
%� � �4,26,30:� �$;" at line ";�:�
(3lenB%=620:� B% lenB%,name% 20,B2% 48,cbuff% 100
2prog$="ColourDef"
<$name%=prog$+�0
F'col%=&ffFFFF00:r%=&ff:g%=&FF:b%=&FF
P!cbuff%=col%:cbuff%!4=0
Z:
dquit%=�
n$B%="TASK"
x7ș "Wimp_Initialise",200,!B%,prog$ � version%,task%
�� � � �wimperror � �
�	�icon
��loadTemplates
��menu(in%)
�� � � �wimperror � �
��:�poll:� quit%
�
�close
��
�:
�
��poll
�!ș "Wimp_Poll",1,B% � reason%
�Ȏ reason% �
�#  � 2 :ș "Wimp_OpenWindow",,B%
$  � 3 :ș "Wimp_CloseWindow",,B%
  � 6 :�buttons
  � 9 :� !B%=1 quit%=�
"  � 17,18:�receive
,�
6�
@:
J
��receive
TȎ B%!16 �
^  � 0:quit%=�
h  � &47700
r    col%=B%!28
|"    r%=B%?29:g%=B%?30:b%=B%?31
�,    �i%=0�B%!32+7:cbuff%?i%=B%!(28+i%):�
�    �writein(r%,g%,b%,�)
�    �openwindow(mb%)
�6  � &47702:ș "ColourPicker_CloseDialogue",0,B%!20
��
��
�:
�
��icon
�+B%!0=-1:B%!4=0:B%!8=0:B%!12=68:B%!16=68
�B%!20=&3002
�$(B%+24)="!"+prog$
�"ș "Wimp_CreateIcon",,B% � ih%
��
:
��seticon(i%,v%)
+!B%=mb%:B%!4=i%:B%!8=v%<<21:B%!12=1<<21
&ș "Wimp_SetIconState",,B%
0�
::
D��openwindow(handle%)
N,!B%=handle%:ș "Wimp_GetWindowState",,B%
X%B%!28=-1:ș "Wimp_OpenWindow",,B%
b�
l:
v��close
�,$B%="TASK":ș "Wimp_CloseDown",task%,!B%
��
�
�:
�ݤwimperror
�� �
�	!B%=�
�1$(B%+4)=�$+" (internal error code "+Þ+")"+�0
�1ș "Wimp_ReportError",B%,3,prog$ � ,response%
�"� response%=2 � �close:=� � =�
�:
���menu(in%)
�� menu% 76
$menu%=prog$
Amenu%!12=&70207:menu%!16=16*(�prog$+1):menu%!20=44:menu%!24=0
1menu%!28=0:menu%!32=in%:menu%!36=&21 +(7<<24)
 $(menu%+40)="Info"
*2menu%!52=&80:menu%!56=-1:menu%!60=&21 +(7<<24)
4$(menu%+64)="Quit"
>�
H:
R ��showmenu(x%,y%,oniconbar%)
\,� oniconbar% ypos%=96+2*44 � ypos%=y%+20
f+ș "Wimp_CreateMenu",,menu%,x%-64,ypos%
p�
z:
�
��buttons
�2x%=!B%:y%=B%!4:butt%=B%!8:h%=B%!12:icon%=B%!16
�(� butt% � 2 �showmenu(x%,y%,h%=-2):�
�Ȏ h% �
�4 � -2:� butt% � 4 �openwindow(mb%) � �openpicker
�
 � mb%
�  Ȏ icon% �
�0   � 0,1,2,3:opt%=icon%:�writein(r%,g%,b%,�)
�   � 10:�openpicker
�  �
��
��
�
��loadTemplates
7ș "Wimp_OpenTemplate",,"<ColourDef$Dir>.Templates"
inlen%=256
$� indir% inlen%
.#data%=indir%:end%=indir%+inlen%
8in%=�window("info")
Bmb%=�window("main")
Lș "Wimp_CloseTemplate"
V�seticon(2,1)
`
opt%=2
j�
t:
~ݤwindow(a$)
�Aș "Wimp_LoadTemplate",,B%,data%,end%,-1,a$,0 � ,,data%,,,,c%
�#ș "Wimp_CreateWindow",,B% � c%
�=c%
�:
���changetext(i%,t$)
�!B2%=mb%:B2%!4=i%
�ș "Wimp_GetIconState",,B2%
�!B2%!8=0:B2%!12=0:$(B2%!28)=t$
�ș "Wimp_SetIconState",,B2%
��
�:
���openpicker
9!B%=0:B%!4=name%:B%!8=x%:B%!12=0:B%!16=1040:B%!20=644

B%!24=0:B%!28=0
+�i%=0�cbuff%!4+7:B%?(32+i%)=cbuff%?i%:�
'ș "ColourPicker_OpenDialogue",0,B%
(�
2
<��writein(R%,G%,B%,do%)
F
Ȏ opt% �
P  � 0:r$=�R%:b$=�B%:g$=�G%
Z<  � 2:r$=�(R%*100/255):g$=�(G%*100/255):b$=�(B%*100/255)
d0  � 1:r$=�(R%/255):g$=�(G%/255):b$=�(B%/255)
n-  � 3:r$="&"+�~R%:b$="&"+�~B%:g$="&"+�~G%
x�
�!r$=�r$,4):g$=�g$,4):b$=�b$,4)
��changetext(4,r$)
��changetext(6,b$)
��changetext(8,g$)
�$� do% �changetext(11,"&"+�~col%)
��
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 22 f4 20 3e 46  72 61 6d 65 77 6f 72 6b  |...". >Framework|
00000020  20 66 6f 72 20 57 69 6d  70 20 70 72 6f 67 72 61  | for Wimp progra|
00000030  6d 73 0d 00 1e 25 ee 20  85 20 ef 34 2c 32 36 2c  |ms...%. . .4,26,|
00000040  33 30 3a f1 20 f6 24 3b  22 20 61 74 20 6c 69 6e  |30:. .$;" at lin|
00000050  65 20 22 3b 9e 3a e0 0d  00 28 33 6c 65 6e 42 25  |e ";.:...(3lenB%|
00000060  3d 36 32 30 3a de 20 42  25 20 6c 65 6e 42 25 2c  |=620:. B% lenB%,|
00000070  6e 61 6d 65 25 20 32 30  2c 42 32 25 20 34 38 2c  |name% 20,B2% 48,|
00000080  63 62 75 66 66 25 20 31  30 30 0d 00 32 15 70 72  |cbuff% 100..2.pr|
00000090  6f 67 24 3d 22 43 6f 6c  6f 75 72 44 65 66 22 0d  |og$="ColourDef".|
000000a0  00 3c 13 24 6e 61 6d 65  25 3d 70 72 6f 67 24 2b  |.<.$name%=prog$+|
000000b0  bd 30 0d 00 46 27 63 6f  6c 25 3d 26 66 66 46 46  |.0..F'col%=&ffFF|
000000c0  46 46 30 30 3a 72 25 3d  26 66 66 3a 67 25 3d 26  |FF00:r%=&ff:g%=&|
000000d0  46 46 3a 62 25 3d 26 46  46 0d 00 50 1b 21 63 62  |FF:b%=&FF..P.!cb|
000000e0  75 66 66 25 3d 63 6f 6c  25 3a 63 62 75 66 66 25  |uff%=col%:cbuff%|
000000f0  21 34 3d 30 0d 00 5a 05  3a 0d 00 64 0b 71 75 69  |!4=0..Z.:..d.qui|
00000100  74 25 3d a3 0d 00 6e 0e  24 42 25 3d 22 54 41 53  |t%=...n.$B%="TAS|
00000110  4b 22 0d 00 78 37 c8 99  20 22 57 69 6d 70 5f 49  |K"..x7.. "Wimp_I|
00000120  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 21  |nitialise",200,!|
00000130  42 25 2c 70 72 6f 67 24  20 b8 20 76 65 72 73 69  |B%,prog$ . versi|
00000140  6f 6e 25 2c 74 61 73 6b  25 0d 00 82 18 ee 20 85  |on%,task%..... .|
00000150  20 e7 20 a4 77 69 6d 70  65 72 72 6f 72 20 8c 20  | . .wimperror . |
00000160  e0 0d 00 8c 09 f2 69 63  6f 6e 0d 00 96 12 f2 6c  |......icon.....l|
00000170  6f 61 64 54 65 6d 70 6c  61 74 65 73 0d 00 a0 0e  |oadTemplates....|
00000180  f2 6d 65 6e 75 28 69 6e  25 29 0d 00 aa 18 ee 20  |.menu(in%)..... |
00000190  85 20 e7 20 a4 77 69 6d  70 65 72 72 6f 72 20 8c  |. . .wimperror .|
000001a0  20 e0 0d 00 b4 13 f5 3a  f2 70 6f 6c 6c 3a fd 20  | ......:.poll:. |
000001b0  71 75 69 74 25 0d 00 be  0a f2 63 6c 6f 73 65 0d  |quit%.....close.|
000001c0  00 c8 05 e0 0d 00 d2 05  3a 0d 00 dc 0a dd f2 70  |........:......p|
000001d0  6f 6c 6c 0d 00 e6 21 c8  99 20 22 57 69 6d 70 5f  |oll...!.. "Wimp_|
000001e0  50 6f 6c 6c 22 2c 31 2c  42 25 20 b8 20 72 65 61  |Poll",1,B% . rea|
000001f0  73 6f 6e 25 0d 00 f0 10  c8 8e 20 72 65 61 73 6f  |son%...... reaso|
00000200  6e 25 20 ca 0d 00 fa 23  20 20 c9 20 32 20 3a c8  |n% ....#  . 2 :.|
00000210  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
00000220  6f 77 22 2c 2c 42 25 0d  01 04 24 20 20 c9 20 33  |ow",,B%...$  . 3|
00000230  20 3a c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  | :.. "Wimp_Close|
00000240  57 69 6e 64 6f 77 22 2c  2c 42 25 0d 01 0e 13 20  |Window",,B%.... |
00000250  20 c9 20 36 20 3a f2 62  75 74 74 6f 6e 73 0d 01  | . 6 :.buttons..|
00000260  18 1a 20 20 c9 20 39 20  3a e7 20 21 42 25 3d 31  |..  . 9 :. !B%=1|
00000270  20 71 75 69 74 25 3d b9  0d 01 22 16 20 20 c9 20  | quit%=...".  . |
00000280  31 37 2c 31 38 3a f2 72  65 63 65 69 76 65 0d 01  |17,18:.receive..|
00000290  2c 05 cb 0d 01 36 05 e1  0d 01 40 05 3a 0d 01 4a  |,....6....@.:..J|
000002a0  0d dd f2 72 65 63 65 69  76 65 0d 01 54 0e c8 8e  |...receive..T...|
000002b0  20 42 25 21 31 36 20 ca  0d 01 5e 11 20 20 c9 20  | B%!16 ...^.  . |
000002c0  30 3a 71 75 69 74 25 3d  b9 0d 01 68 0e 20 20 c9  |0:quit%=...h.  .|
000002d0  20 26 34 37 37 30 30 0d  01 72 12 20 20 20 20 63  | &47700..r.    c|
000002e0  6f 6c 25 3d 42 25 21 32  38 0d 01 7c 22 20 20 20  |ol%=B%!28..|"   |
000002f0  20 72 25 3d 42 25 3f 32  39 3a 67 25 3d 42 25 3f  | r%=B%?29:g%=B%?|
00000300  33 30 3a 62 25 3d 42 25  3f 33 31 0d 01 86 2c 20  |30:b%=B%?31..., |
00000310  20 20 20 e3 69 25 3d 30  b8 42 25 21 33 32 2b 37  |   .i%=0.B%!32+7|
00000320  3a 63 62 75 66 66 25 3f  69 25 3d 42 25 21 28 32  |:cbuff%?i%=B%!(2|
00000330  38 2b 69 25 29 3a ed 0d  01 90 1c 20 20 20 20 f2  |8+i%):.....    .|
00000340  77 72 69 74 65 69 6e 28  72 25 2c 67 25 2c 62 25  |writein(r%,g%,b%|
00000350  2c b9 29 0d 01 9a 18 20  20 20 20 f2 6f 70 65 6e  |,.)....    .open|
00000360  77 69 6e 64 6f 77 28 6d  62 25 29 0d 01 a4 36 20  |window(mb%)...6 |
00000370  20 c9 20 26 34 37 37 30  32 3a c8 99 20 22 43 6f  | . &47702:.. "Co|
00000380  6c 6f 75 72 50 69 63 6b  65 72 5f 43 6c 6f 73 65  |lourPicker_Close|
00000390  44 69 61 6c 6f 67 75 65  22 2c 30 2c 42 25 21 32  |Dialogue",0,B%!2|
000003a0  30 0d 01 ae 05 cb 0d 01  b8 05 e1 0d 01 c2 05 3a  |0..............:|
000003b0  0d 01 cc 0a dd f2 69 63  6f 6e 0d 01 d6 2b 42 25  |......icon...+B%|
000003c0  21 30 3d 2d 31 3a 42 25  21 34 3d 30 3a 42 25 21  |!0=-1:B%!4=0:B%!|
000003d0  38 3d 30 3a 42 25 21 31  32 3d 36 38 3a 42 25 21  |8=0:B%!12=68:B%!|
000003e0  31 36 3d 36 38 0d 01 e0  0f 42 25 21 32 30 3d 26  |16=68....B%!20=&|
000003f0  33 30 30 32 0d 01 ea 16  24 28 42 25 2b 32 34 29  |3002....$(B%+24)|
00000400  3d 22 21 22 2b 70 72 6f  67 24 0d 01 f4 22 c8 99  |="!"+prog$..."..|
00000410  20 22 57 69 6d 70 5f 43  72 65 61 74 65 49 63 6f  | "Wimp_CreateIco|
00000420  6e 22 2c 2c 42 25 20 b8  20 69 68 25 0d 01 fe 05  |n",,B% . ih%....|
00000430  e1 0d 02 08 05 3a 0d 02  12 14 dd f2 73 65 74 69  |.....:......seti|
00000440  63 6f 6e 28 69 25 2c 76  25 29 0d 02 1c 2b 21 42  |con(i%,v%)...+!B|
00000450  25 3d 6d 62 25 3a 42 25  21 34 3d 69 25 3a 42 25  |%=mb%:B%!4=i%:B%|
00000460  21 38 3d 76 25 3c 3c 32  31 3a 42 25 21 31 32 3d  |!8=v%<<21:B%!12=|
00000470  31 3c 3c 32 31 0d 02 26  1e c8 99 20 22 57 69 6d  |1<<21..&... "Wim|
00000480  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00000490  2c 42 25 0d 02 30 05 e1  0d 02 3a 05 3a 0d 02 44  |,B%..0....:.:..D|
000004a0  19 dd f2 6f 70 65 6e 77  69 6e 64 6f 77 28 68 61  |...openwindow(ha|
000004b0  6e 64 6c 65 25 29 0d 02  4e 2c 21 42 25 3d 68 61  |ndle%)..N,!B%=ha|
000004c0  6e 64 6c 65 25 3a c8 99  20 22 57 69 6d 70 5f 47  |ndle%:.. "Wimp_G|
000004d0  65 74 57 69 6e 64 6f 77  53 74 61 74 65 22 2c 2c  |etWindowState",,|
000004e0  42 25 0d 02 58 25 42 25  21 32 38 3d 2d 31 3a c8  |B%..X%B%!28=-1:.|
000004f0  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
00000500  6f 77 22 2c 2c 42 25 0d  02 62 05 e1 0d 02 6c 05  |ow",,B%..b....l.|
00000510  3a 0d 02 76 0b dd f2 63  6c 6f 73 65 0d 02 80 2c  |:..v...close...,|
00000520  24 42 25 3d 22 54 41 53  4b 22 3a c8 99 20 22 57  |$B%="TASK":.. "W|
00000530  69 6d 70 5f 43 6c 6f 73  65 44 6f 77 6e 22 2c 74  |imp_CloseDown",t|
00000540  61 73 6b 25 2c 21 42 25  0d 02 8a 05 e1 0d 02 94  |ask%,!B%........|
00000550  04 0d 02 9e 05 3a 0d 02  a8 0f dd a4 77 69 6d 70  |.....:......wimp|
00000560  65 72 72 6f 72 0d 02 b2  08 ee 85 20 87 0d 02 bc  |error...... ....|
00000570  09 21 42 25 3d 9f 0d 02  c6 31 24 28 42 25 2b 34  |.!B%=....1$(B%+4|
00000580  29 3d f6 24 2b 22 20 28  69 6e 74 65 72 6e 61 6c  |)=.$+" (internal|
00000590  20 65 72 72 6f 72 20 63  6f 64 65 20 22 2b c3 9e  | error code "+..|
000005a0  2b 22 29 22 2b bd 30 0d  02 d0 31 c8 99 20 22 57  |+")"+.0...1.. "W|
000005b0  69 6d 70 5f 52 65 70 6f  72 74 45 72 72 6f 72 22  |imp_ReportError"|
000005c0  2c 42 25 2c 33 2c 70 72  6f 67 24 20 b8 20 2c 72  |,B%,3,prog$ . ,r|
000005d0  65 73 70 6f 6e 73 65 25  0d 02 da 22 e7 20 72 65  |esponse%...". re|
000005e0  73 70 6f 6e 73 65 25 3d  32 20 8c 20 f2 63 6c 6f  |sponse%=2 . .clo|
000005f0  73 65 3a 3d b9 20 8b 20  3d a3 0d 02 e4 05 3a 0d  |se:=. . =.....:.|
00000600  02 ee 0f dd f2 6d 65 6e  75 28 69 6e 25 29 0d 02  |.....menu(in%)..|
00000610  f8 0e de 20 6d 65 6e 75  25 20 37 36 0d 03 02 10  |... menu% 76....|
00000620  24 6d 65 6e 75 25 3d 70  72 6f 67 24 0d 03 0c 41  |$menu%=prog$...A|
00000630  6d 65 6e 75 25 21 31 32  3d 26 37 30 32 30 37 3a  |menu%!12=&70207:|
00000640  6d 65 6e 75 25 21 31 36  3d 31 36 2a 28 a9 70 72  |menu%!16=16*(.pr|
00000650  6f 67 24 2b 31 29 3a 6d  65 6e 75 25 21 32 30 3d  |og$+1):menu%!20=|
00000660  34 34 3a 6d 65 6e 75 25  21 32 34 3d 30 0d 03 16  |44:menu%!24=0...|
00000670  31 6d 65 6e 75 25 21 32  38 3d 30 3a 6d 65 6e 75  |1menu%!28=0:menu|
00000680  25 21 33 32 3d 69 6e 25  3a 6d 65 6e 75 25 21 33  |%!32=in%:menu%!3|
00000690  36 3d 26 32 31 20 2b 28  37 3c 3c 32 34 29 0d 03  |6=&21 +(7<<24)..|
000006a0  20 16 24 28 6d 65 6e 75  25 2b 34 30 29 3d 22 49  | .$(menu%+40)="I|
000006b0  6e 66 6f 22 0d 03 2a 32  6d 65 6e 75 25 21 35 32  |nfo"..*2menu%!52|
000006c0  3d 26 38 30 3a 6d 65 6e  75 25 21 35 36 3d 2d 31  |=&80:menu%!56=-1|
000006d0  3a 6d 65 6e 75 25 21 36  30 3d 26 32 31 20 2b 28  |:menu%!60=&21 +(|
000006e0  37 3c 3c 32 34 29 0d 03  34 16 24 28 6d 65 6e 75  |7<<24)..4.$(menu|
000006f0  25 2b 36 34 29 3d 22 51  75 69 74 22 0d 03 3e 05  |%+64)="Quit"..>.|
00000700  e1 0d 03 48 05 3a 0d 03  52 20 dd f2 73 68 6f 77  |...H.:..R ..show|
00000710  6d 65 6e 75 28 78 25 2c  79 25 2c 6f 6e 69 63 6f  |menu(x%,y%,onico|
00000720  6e 62 61 72 25 29 0d 03  5c 2c e7 20 6f 6e 69 63  |nbar%)..\,. onic|
00000730  6f 6e 62 61 72 25 20 79  70 6f 73 25 3d 39 36 2b  |onbar% ypos%=96+|
00000740  32 2a 34 34 20 8b 20 79  70 6f 73 25 3d 79 25 2b  |2*44 . ypos%=y%+|
00000750  32 30 0d 03 66 2b c8 99  20 22 57 69 6d 70 5f 43  |20..f+.. "Wimp_C|
00000760  72 65 61 74 65 4d 65 6e  75 22 2c 2c 6d 65 6e 75  |reateMenu",,menu|
00000770  25 2c 78 25 2d 36 34 2c  79 70 6f 73 25 0d 03 70  |%,x%-64,ypos%..p|
00000780  05 e1 0d 03 7a 05 3a 0d  03 84 0d dd f2 62 75 74  |....z.:......but|
00000790  74 6f 6e 73 0d 03 8e 32  78 25 3d 21 42 25 3a 79  |tons...2x%=!B%:y|
000007a0  25 3d 42 25 21 34 3a 62  75 74 74 25 3d 42 25 21  |%=B%!4:butt%=B%!|
000007b0  38 3a 68 25 3d 42 25 21  31 32 3a 69 63 6f 6e 25  |8:h%=B%!12:icon%|
000007c0  3d 42 25 21 31 36 0d 03  98 28 e7 20 62 75 74 74  |=B%!16...(. butt|
000007d0  25 20 80 20 32 20 f2 73  68 6f 77 6d 65 6e 75 28  |% . 2 .showmenu(|
000007e0  78 25 2c 79 25 2c 68 25  3d 2d 32 29 3a e1 0d 03  |x%,y%,h%=-2):...|
000007f0  a2 0b c8 8e 20 68 25 20  ca 0d 03 ac 34 20 c9 20  |.... h% ....4 . |
00000800  2d 32 3a e7 20 62 75 74  74 25 20 80 20 34 20 f2  |-2:. butt% . 4 .|
00000810  6f 70 65 6e 77 69 6e 64  6f 77 28 6d 62 25 29 20  |openwindow(mb%) |
00000820  8b 20 f2 6f 70 65 6e 70  69 63 6b 65 72 0d 03 b6  |. .openpicker...|
00000830  0a 20 c9 20 6d 62 25 0d  03 c0 10 20 20 c8 8e 20  |. . mb%....  .. |
00000840  69 63 6f 6e 25 20 ca 0d  03 ca 30 20 20 20 c9 20  |icon% ....0   . |
00000850  30 2c 31 2c 32 2c 33 3a  6f 70 74 25 3d 69 63 6f  |0,1,2,3:opt%=ico|
00000860  6e 25 3a f2 77 72 69 74  65 69 6e 28 72 25 2c 67  |n%:.writein(r%,g|
00000870  25 2c 62 25 2c a3 29 0d  03 d4 17 20 20 20 c9 20  |%,b%,.)....   . |
00000880  31 30 3a f2 6f 70 65 6e  70 69 63 6b 65 72 0d 03  |10:.openpicker..|
00000890  de 07 20 20 cb 0d 03 e8  05 cb 0d 03 f2 05 e1 0d  |..  ............|
000008a0  03 fc 04 0d 04 06 13 dd  f2 6c 6f 61 64 54 65 6d  |.........loadTem|
000008b0  70 6c 61 74 65 73 0d 04  10 37 c8 99 20 22 57 69  |plates...7.. "Wi|
000008c0  6d 70 5f 4f 70 65 6e 54  65 6d 70 6c 61 74 65 22  |mp_OpenTemplate"|
000008d0  2c 2c 22 3c 43 6f 6c 6f  75 72 44 65 66 24 44 69  |,,"<ColourDef$Di|
000008e0  72 3e 2e 54 65 6d 70 6c  61 74 65 73 22 0d 04 1a  |r>.Templates"...|
000008f0  0e 69 6e 6c 65 6e 25 3d  32 35 36 0d 04 24 13 de  |.inlen%=256..$..|
00000900  20 69 6e 64 69 72 25 20  69 6e 6c 65 6e 25 0d 04  | indir% inlen%..|
00000910  2e 23 64 61 74 61 25 3d  69 6e 64 69 72 25 3a 65  |.#data%=indir%:e|
00000920  6e 64 25 3d 69 6e 64 69  72 25 2b 69 6e 6c 65 6e  |nd%=indir%+inlen|
00000930  25 0d 04 38 17 69 6e 25  3d a4 77 69 6e 64 6f 77  |%..8.in%=.window|
00000940  28 22 69 6e 66 6f 22 29  0d 04 42 17 6d 62 25 3d  |("info")..B.mb%=|
00000950  a4 77 69 6e 64 6f 77 28  22 6d 61 69 6e 22 29 0d  |.window("main").|
00000960  04 4c 1b c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |.L... "Wimp_Clos|
00000970  65 54 65 6d 70 6c 61 74  65 22 0d 04 56 11 f2 73  |eTemplate"..V..s|
00000980  65 74 69 63 6f 6e 28 32  2c 31 29 0d 04 60 0a 6f  |eticon(2,1)..`.o|
00000990  70 74 25 3d 32 0d 04 6a  05 e1 0d 04 74 05 3a 0d  |pt%=2..j....t.:.|
000009a0  04 7e 10 dd a4 77 69 6e  64 6f 77 28 61 24 29 0d  |.~...window(a$).|
000009b0  04 88 41 c8 99 20 22 57  69 6d 70 5f 4c 6f 61 64  |..A.. "Wimp_Load|
000009c0  54 65 6d 70 6c 61 74 65  22 2c 2c 42 25 2c 64 61  |Template",,B%,da|
000009d0  74 61 25 2c 65 6e 64 25  2c 2d 31 2c 61 24 2c 30  |ta%,end%,-1,a$,0|
000009e0  20 b8 20 2c 2c 64 61 74  61 25 2c 2c 2c 2c 63 25  | . ,,data%,,,,c%|
000009f0  0d 04 92 23 c8 99 20 22  57 69 6d 70 5f 43 72 65  |...#.. "Wimp_Cre|
00000a00  61 74 65 57 69 6e 64 6f  77 22 2c 2c 42 25 20 b8  |ateWindow",,B% .|
00000a10  20 63 25 0d 04 9c 07 3d  63 25 0d 04 a6 05 3a 0d  | c%....=c%....:.|
00000a20  04 b0 17 dd f2 63 68 61  6e 67 65 74 65 78 74 28  |.....changetext(|
00000a30  69 25 2c 74 24 29 0d 04  ba 15 21 42 32 25 3d 6d  |i%,t$)....!B2%=m|
00000a40  62 25 3a 42 32 25 21 34  3d 69 25 0d 04 c4 1f c8  |b%:B2%!4=i%.....|
00000a50  99 20 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |. "Wimp_GetIconS|
00000a60  74 61 74 65 22 2c 2c 42  32 25 0d 04 ce 21 42 32  |tate",,B2%...!B2|
00000a70  25 21 38 3d 30 3a 42 32  25 21 31 32 3d 30 3a 24  |%!8=0:B2%!12=0:$|
00000a80  28 42 32 25 21 32 38 29  3d 74 24 0d 04 d8 1f c8  |(B2%!28)=t$.....|
00000a90  99 20 22 57 69 6d 70 5f  53 65 74 49 63 6f 6e 53  |. "Wimp_SetIconS|
00000aa0  74 61 74 65 22 2c 2c 42  32 25 0d 04 e2 05 e1 0d  |tate",,B2%......|
00000ab0  04 ec 05 3a 0d 04 f6 10  dd f2 6f 70 65 6e 70 69  |...:......openpi|
00000ac0  63 6b 65 72 0d 05 00 39  21 42 25 3d 30 3a 42 25  |cker...9!B%=0:B%|
00000ad0  21 34 3d 6e 61 6d 65 25  3a 42 25 21 38 3d 78 25  |!4=name%:B%!8=x%|
00000ae0  3a 42 25 21 31 32 3d 30  3a 42 25 21 31 36 3d 31  |:B%!12=0:B%!16=1|
00000af0  30 34 30 3a 42 25 21 32  30 3d 36 34 34 0d 05 0a  |040:B%!20=644...|
00000b00  13 42 25 21 32 34 3d 30  3a 42 25 21 32 38 3d 30  |.B%!24=0:B%!28=0|
00000b10  0d 05 14 2b e3 69 25 3d  30 b8 63 62 75 66 66 25  |...+.i%=0.cbuff%|
00000b20  21 34 2b 37 3a 42 25 3f  28 33 32 2b 69 25 29 3d  |!4+7:B%?(32+i%)=|
00000b30  63 62 75 66 66 25 3f 69  25 3a ed 0d 05 1e 27 c8  |cbuff%?i%:....'.|
00000b40  99 20 22 43 6f 6c 6f 75  72 50 69 63 6b 65 72 5f  |. "ColourPicker_|
00000b50  4f 70 65 6e 44 69 61 6c  6f 67 75 65 22 2c 30 2c  |OpenDialogue",0,|
00000b60  42 25 0d 05 28 05 e1 0d  05 32 04 0d 05 3c 1b dd  |B%..(....2...<..|
00000b70  f2 77 72 69 74 65 69 6e  28 52 25 2c 47 25 2c 42  |.writein(R%,G%,B|
00000b80  25 2c 64 6f 25 29 0d 05  46 0d c8 8e 20 6f 70 74  |%,do%)..F... opt|
00000b90  25 20 ca 0d 05 50 1e 20  20 c9 20 30 3a 72 24 3d  |% ...P.  . 0:r$=|
00000ba0  c3 52 25 3a 62 24 3d c3  42 25 3a 67 24 3d c3 47  |.R%:b$=.B%:g$=.G|
00000bb0  25 0d 05 5a 3c 20 20 c9  20 32 3a 72 24 3d c3 28  |%..Z<  . 2:r$=.(|
00000bc0  52 25 2a 31 30 30 2f 32  35 35 29 3a 67 24 3d c3  |R%*100/255):g$=.|
00000bd0  28 47 25 2a 31 30 30 2f  32 35 35 29 3a 62 24 3d  |(G%*100/255):b$=|
00000be0  c3 28 42 25 2a 31 30 30  2f 32 35 35 29 0d 05 64  |.(B%*100/255)..d|
00000bf0  30 20 20 c9 20 31 3a 72  24 3d c3 28 52 25 2f 32  |0  . 1:r$=.(R%/2|
00000c00  35 35 29 3a 67 24 3d c3  28 47 25 2f 32 35 35 29  |55):g$=.(G%/255)|
00000c10  3a 62 24 3d c3 28 42 25  2f 32 35 35 29 0d 05 6e  |:b$=.(B%/255)..n|
00000c20  2d 20 20 c9 20 33 3a 72  24 3d 22 26 22 2b c3 7e  |-  . 3:r$="&"+.~|
00000c30  52 25 3a 62 24 3d 22 26  22 2b c3 7e 42 25 3a 67  |R%:b$="&"+.~B%:g|
00000c40  24 3d 22 26 22 2b c3 7e  47 25 0d 05 78 05 cb 0d  |$="&"+.~G%..x...|
00000c50  05 82 21 72 24 3d c0 72  24 2c 34 29 3a 67 24 3d  |..!r$=.r$,4):g$=|
00000c60  c0 67 24 2c 34 29 3a 62  24 3d c0 62 24 2c 34 29  |.g$,4):b$=.b$,4)|
00000c70  0d 05 8c 15 f2 63 68 61  6e 67 65 74 65 78 74 28  |.....changetext(|
00000c80  34 2c 72 24 29 0d 05 96  15 f2 63 68 61 6e 67 65  |4,r$).....change|
00000c90  74 65 78 74 28 36 2c 62  24 29 0d 05 a0 15 f2 63  |text(6,b$).....c|
00000ca0  68 61 6e 67 65 74 65 78  74 28 38 2c 67 24 29 0d  |hangetext(8,g$).|
00000cb0  05 aa 24 e7 20 64 6f 25  20 f2 63 68 61 6e 67 65  |..$. do% .change|
00000cc0  74 65 78 74 28 31 31 2c  22 26 22 2b c3 7e 63 6f  |text(11,"&"+.~co|
00000cd0  6c 25 29 0d 05 b4 05 e1  0d ff                    |l%).......|
00000cda