Home » Archimedes archive » Acorn User » AU 1995-03.adf » !StarInfo_StarInfo » Bagnall/QT+/!QuickType/Libraries/Icon

Bagnall/QT+/!QuickType/Libraries/Icon

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 1995-03.adf » !StarInfo_StarInfo
Filename: Bagnall/QT+/!QuickType/Libraries/Icon
Read OK:
File size: 03E8 bytes
Load address: 0000
Exec address: 0000
File contents
    1REM Icon - icon control code
    2REM Supports
    3REM   PROC setIconText - sets the text associated with an icon (indirected only)
    4REM   PROC setIcon     - selects/delselects an icon, sets bit21 of b%!12
    5REM     FN IconText    - returns indirected text from an icon
    6
    7DEFPROCsetIconText(w%,i%,d$)
    8IF i%>=0 THEN
    9 !b%=window%(w%):b%!4=i%:SYS"Wimp_GetIconState",,b%:$(b%!28)=d$
   10 !b%=window%(w%):b%!4=i%:b%!8=0:b%!12=0:SYS"Wimp_SetIconState",,b%
   11ELSE
   12 !b%=window%(w%):b%!4=i%:SYS"Wimp_GetWindowInfo",,b%:$(b%!76)=d$
   13 IF (b%!32 AND (1<<16)) THEN
   14  b%!32=(b%!32 OR (1<<26)):SYS"Wimp_OpenWindow",,b%
   15  b%!32=(b%!32 OR (1<<26)):SYS"Wimp_OpenWindow",,b%
   16 ENDIF
   17ENDIF 
   18ENDPROC
   19
   20DEFPROCsetIcon(w%,i%,sr%)
   21!b%=window%(w%):b%!4=i%
   22IF sr% THEN b%!8=1<<21 ELSE b%!8=0
   23b%!12=1<<21
   24SYS"Wimp_SetIconState",,b%
   25ENDPROC
   26
   27DEFFNIconText(w%,i%)
   28LOCAL s$
   29IF i%>-1 THEN
   30 !b%=window%(w%):b%!4=i%:SYS"Wimp_GetIconState",,b%
   31 s$=$(b%!28)
   32ELSE
   33 !b%=window%(w%):b%!4=i%:SYS"Wimp_GetWindowInfo",,b%:s$=$(b%!76)
   34ENDIF
   35=s$
� Icon - icon control code
� Supports
R�   PROC setIconText - sets the text associated with an icon (indirected only)
J�   PROC setIcon     - selects/delselects an icon, sets bit21 of b%!12
?�     FN IconText    - returns indirected text from an icon

��setIconText(w%,i%,d$)

� i%>=0 �
	B !b%=window%(w%):b%!4=i%:ș"Wimp_GetIconState",,b%:$(b%!28)=d$

E !b%=window%(w%):b%!4=i%:b%!8=0:b%!12=0:ș"Wimp_SetIconState",,b%
�
C !b%=window%(w%):b%!4=i%:ș"Wimp_GetWindowInfo",,b%:$(b%!76)=d$

 � (b%!32 � (1<<16)) �
5  b%!32=(b%!32 � (1<<26)):ș"Wimp_OpenWindow",,b%
5  b%!32=(b%!32 � (1<<26)):ș"Wimp_OpenWindow",,b%
 �
� 
�

��setIcon(w%,i%,sr%)
!b%=window%(w%):b%!4=i%
� sr% � b%!8=1<<21 � b%!8=0
b%!12=1<<21
ș"Wimp_SetIconState",,b%
�

ݤIconText(w%,i%)
� s$

� i%>-1 �
6 !b%=window%(w%):b%!4=i%:ș"Wimp_GetIconState",,b%
 s$=$(b%!28)
 �
!C !b%=window%(w%):b%!4=i%:ș"Wimp_GetWindowInfo",,b%:s$=$(b%!76)
"�
#=s$
�
00000000  0d 00 01 1e f4 20 49 63  6f 6e 20 2d 20 69 63 6f  |..... Icon - ico|
00000010  6e 20 63 6f 6e 74 72 6f  6c 20 63 6f 64 65 0d 00  |n control code..|
00000020  02 0e f4 20 53 75 70 70  6f 72 74 73 0d 00 03 52  |... Supports...R|
00000030  f4 20 20 20 50 52 4f 43  20 73 65 74 49 63 6f 6e  |.   PROC setIcon|
00000040  54 65 78 74 20 2d 20 73  65 74 73 20 74 68 65 20  |Text - sets the |
00000050  74 65 78 74 20 61 73 73  6f 63 69 61 74 65 64 20  |text associated |
00000060  77 69 74 68 20 61 6e 20  69 63 6f 6e 20 28 69 6e  |with an icon (in|
00000070  64 69 72 65 63 74 65 64  20 6f 6e 6c 79 29 0d 00  |directed only)..|
00000080  04 4a f4 20 20 20 50 52  4f 43 20 73 65 74 49 63  |.J.   PROC setIc|
00000090  6f 6e 20 20 20 20 20 2d  20 73 65 6c 65 63 74 73  |on     - selects|
000000a0  2f 64 65 6c 73 65 6c 65  63 74 73 20 61 6e 20 69  |/delselects an i|
000000b0  63 6f 6e 2c 20 73 65 74  73 20 62 69 74 32 31 20  |con, sets bit21 |
000000c0  6f 66 20 62 25 21 31 32  0d 00 05 3f f4 20 20 20  |of b%!12...?.   |
000000d0  20 20 46 4e 20 49 63 6f  6e 54 65 78 74 20 20 20  |  FN IconText   |
000000e0  20 2d 20 72 65 74 75 72  6e 73 20 69 6e 64 69 72  | - returns indir|
000000f0  65 63 74 65 64 20 74 65  78 74 20 66 72 6f 6d 20  |ected text from |
00000100  61 6e 20 69 63 6f 6e 0d  00 06 04 0d 00 07 1b dd  |an icon.........|
00000110  f2 73 65 74 49 63 6f 6e  54 65 78 74 28 77 25 2c  |.setIconText(w%,|
00000120  69 25 2c 64 24 29 0d 00  08 0d e7 20 69 25 3e 3d  |i%,d$)..... i%>=|
00000130  30 20 8c 0d 00 09 42 20  21 62 25 3d 77 69 6e 64  |0 ....B !b%=wind|
00000140  6f 77 25 28 77 25 29 3a  62 25 21 34 3d 69 25 3a  |ow%(w%):b%!4=i%:|
00000150  c8 99 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |.."Wimp_GetIconS|
00000160  74 61 74 65 22 2c 2c 62  25 3a 24 28 62 25 21 32  |tate",,b%:$(b%!2|
00000170  38 29 3d 64 24 0d 00 0a  45 20 21 62 25 3d 77 69  |8)=d$...E !b%=wi|
00000180  6e 64 6f 77 25 28 77 25  29 3a 62 25 21 34 3d 69  |ndow%(w%):b%!4=i|
00000190  25 3a 62 25 21 38 3d 30  3a 62 25 21 31 32 3d 30  |%:b%!8=0:b%!12=0|
000001a0  3a c8 99 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |:.."Wimp_SetIcon|
000001b0  53 74 61 74 65 22 2c 2c  62 25 0d 00 0b 05 cc 0d  |State",,b%......|
000001c0  00 0c 43 20 21 62 25 3d  77 69 6e 64 6f 77 25 28  |..C !b%=window%(|
000001d0  77 25 29 3a 62 25 21 34  3d 69 25 3a c8 99 22 57  |w%):b%!4=i%:.."W|
000001e0  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 49 6e 66  |imp_GetWindowInf|
000001f0  6f 22 2c 2c 62 25 3a 24  28 62 25 21 37 36 29 3d  |o",,b%:$(b%!76)=|
00000200  64 24 0d 00 0d 1a 20 e7  20 28 62 25 21 33 32 20  |d$.... . (b%!32 |
00000210  80 20 28 31 3c 3c 31 36  29 29 20 8c 0d 00 0e 35  |. (1<<16)) ....5|
00000220  20 20 62 25 21 33 32 3d  28 62 25 21 33 32 20 84  |  b%!32=(b%!32 .|
00000230  20 28 31 3c 3c 32 36 29  29 3a c8 99 22 57 69 6d  | (1<<26)):.."Wim|
00000240  70 5f 4f 70 65 6e 57 69  6e 64 6f 77 22 2c 2c 62  |p_OpenWindow",,b|
00000250  25 0d 00 0f 35 20 20 62  25 21 33 32 3d 28 62 25  |%...5  b%!32=(b%|
00000260  21 33 32 20 84 20 28 31  3c 3c 32 36 29 29 3a c8  |!32 . (1<<26)):.|
00000270  99 22 57 69 6d 70 5f 4f  70 65 6e 57 69 6e 64 6f  |."Wimp_OpenWindo|
00000280  77 22 2c 2c 62 25 0d 00  10 06 20 cd 0d 00 11 06  |w",,b%.... .....|
00000290  cd 20 0d 00 12 05 e1 0d  00 13 04 0d 00 14 18 dd  |. ..............|
000002a0  f2 73 65 74 49 63 6f 6e  28 77 25 2c 69 25 2c 73  |.setIcon(w%,i%,s|
000002b0  72 25 29 0d 00 15 1b 21  62 25 3d 77 69 6e 64 6f  |r%)....!b%=windo|
000002c0  77 25 28 77 25 29 3a 62  25 21 34 3d 69 25 0d 00  |w%(w%):b%!4=i%..|
000002d0  16 1f e7 20 73 72 25 20  8c 20 62 25 21 38 3d 31  |... sr% . b%!8=1|
000002e0  3c 3c 32 31 20 8b 20 62  25 21 38 3d 30 0d 00 17  |<<21 . b%!8=0...|
000002f0  0f 62 25 21 31 32 3d 31  3c 3c 32 31 0d 00 18 1d  |.b%!12=1<<21....|
00000300  c8 99 22 57 69 6d 70 5f  53 65 74 49 63 6f 6e 53  |.."Wimp_SetIconS|
00000310  74 61 74 65 22 2c 2c 62  25 0d 00 19 05 e1 0d 00  |tate",,b%.......|
00000320  1a 04 0d 00 1b 15 dd a4  49 63 6f 6e 54 65 78 74  |........IconText|
00000330  28 77 25 2c 69 25 29 0d  00 1c 08 ea 20 73 24 0d  |(w%,i%)..... s$.|
00000340  00 1d 0d e7 20 69 25 3e  2d 31 20 8c 0d 00 1e 36  |.... i%>-1 ....6|
00000350  20 21 62 25 3d 77 69 6e  64 6f 77 25 28 77 25 29  | !b%=window%(w%)|
00000360  3a 62 25 21 34 3d 69 25  3a c8 99 22 57 69 6d 70  |:b%!4=i%:.."Wimp|
00000370  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00000380  62 25 0d 00 1f 10 20 73  24 3d 24 28 62 25 21 32  |b%.... s$=$(b%!2|
00000390  38 29 0d 00 20 05 cc 0d  00 21 43 20 21 62 25 3d  |8).. ....!C !b%=|
000003a0  77 69 6e 64 6f 77 25 28  77 25 29 3a 62 25 21 34  |window%(w%):b%!4|
000003b0  3d 69 25 3a c8 99 22 57  69 6d 70 5f 47 65 74 57  |=i%:.."Wimp_GetW|
000003c0  69 6e 64 6f 77 49 6e 66  6f 22 2c 2c 62 25 3a 73  |indowInfo",,b%:s|
000003d0  24 3d 24 28 62 25 21 37  36 29 0d 00 22 05 cd 0d  |$=$(b%!76).."...|
000003e0  00 23 07 3d 73 24 0d ff                           |.#.=s$..|
000003e8