Home » Archimedes archive » Acorn User » AU 1998-13 (Christmas).adf » Regulars » StarInfo/Granger/Carbon/!CarbonDem/IconPROCs

StarInfo/Granger/Carbon/!CarbonDem/IconPROCs

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 » Archimedes archive » Acorn User » AU 1998-13 (Christmas).adf » Regulars
Filename: StarInfo/Granger/Carbon/!CarbonDem/IconPROCs
Read OK:
File size: 0251 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM Icons
   20REM LEN A.Granger 98
   30END
   40DEFPROCset_id(win%,icon%)
   50!b%=win%:b%!4=icon%
   60ENDPROC
   70DEFPROCnewcaret(win%,icon%)
   80SYS&600D2,win%,icon%,0,-1,-1,LEN(FNreadicon(win%,icon%))
   90ENDPROC
  100DEFFNreadicon(win%,icon%)
  110PROCset_id(win%,icon%):SYS&400CE,,b%
  120IFb%!32<>0 THENT$=$b%!28 ELSE T$=$(b%+24)
  130=T$
  140DEFPROCicontext(win%,icon%,text$)
  150PROCset_id(win%,icon%):SYS&400CE,,b%:$(b%!28)=text$:b%!8=0:b%!12=0:SYS&400CE,,b%
  160ENDPROC
  170DEFFNcreate_icon(whan%,ix%,iy%,iw%,ih%,flag%,text$,ptr1%,ptr2%,ptr3%)
  180!b%=whan%:b%!4=ix%:b%!8=iy%:b%!12=ix%+iw%:b%!16=iy%+ih%:b%!20=flag%:$(b%+24)=text$:SYS&400C2,,b% TO ihandle%
  190=ihandle%

� Icons
� � A.Granger 98
�
(��set_id(win%,icon%)
2!b%=win%:b%!4=icon%
<�
F��newcaret(win%,icon%)
P8ș&600D2,win%,icon%,0,-1,-1,�(�readicon(win%,icon%))
Z�
dݤreadicon(win%,icon%)
n$�set_id(win%,icon%):ș&400CE,,b%
x&�b%!32<>0 �T$=$b%!28 � T$=$(b%+24)
�=T$
� ��icontext(win%,icon%,text$)
�O�set_id(win%,icon%):ș&400CE,,b%:$(b%!28)=text$:b%!8=0:b%!12=0:ș&400CE,,b%
��
�Fݤcreate_icon(whan%,ix%,iy%,iw%,ih%,flag%,text$,ptr1%,ptr2%,ptr3%)
�n!b%=whan%:b%!4=ix%:b%!8=iy%:b%!12=ix%+iw%:b%!16=iy%+ih%:b%!20=flag%:$(b%+24)=text$:ș&400C2,,b% � ihandle%
�
=ihandle%
�
00000000  0d 00 0a 0b f4 20 49 63  6f 6e 73 0d 00 14 14 f4  |..... Icons.....|
00000010  20 a9 20 41 2e 47 72 61  6e 67 65 72 20 39 38 0d  | . A.Granger 98.|
00000020  00 1e 05 e0 0d 00 28 18  dd f2 73 65 74 5f 69 64  |......(...set_id|
00000030  28 77 69 6e 25 2c 69 63  6f 6e 25 29 0d 00 32 17  |(win%,icon%)..2.|
00000040  21 62 25 3d 77 69 6e 25  3a 62 25 21 34 3d 69 63  |!b%=win%:b%!4=ic|
00000050  6f 6e 25 0d 00 3c 05 e1  0d 00 46 1a dd f2 6e 65  |on%..<....F...ne|
00000060  77 63 61 72 65 74 28 77  69 6e 25 2c 69 63 6f 6e  |wcaret(win%,icon|
00000070  25 29 0d 00 50 38 c8 99  26 36 30 30 44 32 2c 77  |%)..P8..&600D2,w|
00000080  69 6e 25 2c 69 63 6f 6e  25 2c 30 2c 2d 31 2c 2d  |in%,icon%,0,-1,-|
00000090  31 2c a9 28 a4 72 65 61  64 69 63 6f 6e 28 77 69  |1,.(.readicon(wi|
000000a0  6e 25 2c 69 63 6f 6e 25  29 29 0d 00 5a 05 e1 0d  |n%,icon%))..Z...|
000000b0  00 64 1a dd a4 72 65 61  64 69 63 6f 6e 28 77 69  |.d...readicon(wi|
000000c0  6e 25 2c 69 63 6f 6e 25  29 0d 00 6e 24 f2 73 65  |n%,icon%)..n$.se|
000000d0  74 5f 69 64 28 77 69 6e  25 2c 69 63 6f 6e 25 29  |t_id(win%,icon%)|
000000e0  3a c8 99 26 34 30 30 43  45 2c 2c 62 25 0d 00 78  |:..&400CE,,b%..x|
000000f0  26 e7 62 25 21 33 32 3c  3e 30 20 8c 54 24 3d 24  |&.b%!32<>0 .T$=$|
00000100  62 25 21 32 38 20 8b 20  54 24 3d 24 28 62 25 2b  |b%!28 . T$=$(b%+|
00000110  32 34 29 0d 00 82 07 3d  54 24 0d 00 8c 20 dd f2  |24)....=T$... ..|
00000120  69 63 6f 6e 74 65 78 74  28 77 69 6e 25 2c 69 63  |icontext(win%,ic|
00000130  6f 6e 25 2c 74 65 78 74  24 29 0d 00 96 4f f2 73  |on%,text$)...O.s|
00000140  65 74 5f 69 64 28 77 69  6e 25 2c 69 63 6f 6e 25  |et_id(win%,icon%|
00000150  29 3a c8 99 26 34 30 30  43 45 2c 2c 62 25 3a 24  |):..&400CE,,b%:$|
00000160  28 62 25 21 32 38 29 3d  74 65 78 74 24 3a 62 25  |(b%!28)=text$:b%|
00000170  21 38 3d 30 3a 62 25 21  31 32 3d 30 3a c8 99 26  |!8=0:b%!12=0:..&|
00000180  34 30 30 43 45 2c 2c 62  25 0d 00 a0 05 e1 0d 00  |400CE,,b%.......|
00000190  aa 46 dd a4 63 72 65 61  74 65 5f 69 63 6f 6e 28  |.F..create_icon(|
000001a0  77 68 61 6e 25 2c 69 78  25 2c 69 79 25 2c 69 77  |whan%,ix%,iy%,iw|
000001b0  25 2c 69 68 25 2c 66 6c  61 67 25 2c 74 65 78 74  |%,ih%,flag%,text|
000001c0  24 2c 70 74 72 31 25 2c  70 74 72 32 25 2c 70 74  |$,ptr1%,ptr2%,pt|
000001d0  72 33 25 29 0d 00 b4 6e  21 62 25 3d 77 68 61 6e  |r3%)...n!b%=whan|
000001e0  25 3a 62 25 21 34 3d 69  78 25 3a 62 25 21 38 3d  |%:b%!4=ix%:b%!8=|
000001f0  69 79 25 3a 62 25 21 31  32 3d 69 78 25 2b 69 77  |iy%:b%!12=ix%+iw|
00000200  25 3a 62 25 21 31 36 3d  69 79 25 2b 69 68 25 3a  |%:b%!16=iy%+ih%:|
00000210  62 25 21 32 30 3d 66 6c  61 67 25 3a 24 28 62 25  |b%!20=flag%:$(b%|
00000220  2b 32 34 29 3d 74 65 78  74 24 3a c8 99 26 34 30  |+24)=text$:..&40|
00000230  30 43 32 2c 2c 62 25 20  b8 20 69 68 61 6e 64 6c  |0C2,,b% . ihandl|
00000240  65 25 0d 00 be 0d 3d 69  68 61 6e 64 6c 65 25 0d  |e%....=ihandle%.|
00000250  ff                                                |.|
00000251