Home » Archimedes archive » Acorn Computing » 1993 06 Mega Disk.adf » 93_06 » Miscellany/Identify/!Identify/Menu2
Miscellany/Identify/!Identify/Menu2
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 Computing » 1993 06 Mega Disk.adf » 93_06 |
Filename: | Miscellany/Identify/!Identify/Menu2 |
Read OK: | ✔ |
File size: | 0785 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10 ------ Menu Library v1.10 LEN D Bradshaw ------ 20 30 DEFFNconstruct_menu(mem,text$,title$,width) 40 end=FALSE 50 $mem = title$ 60 mem?12 = 7 70 mem?13 = 2 80 mem?14 = 7 90 mem?15 = 0 100 mem!16 = width 110 mem!20 = 44 120 mem!24 = 0 130 memptr=mem+28 140 REPEAT 150 pos=INSTR(text$,",") 160 t$=LEFT$(text$,(pos-1)) 170 text$=RIGHT$(text$,(LEN(text$)-pos)) 180 flg%=0 190 subptr=-1 200 indirected=FALSE 210 flags=&07000021 220 CASE LEFT$(t$,1) OF 230 WHEN "_": PROCorflags(2) 240 WHEN "`": PROCorflags(1) 250 WHEN "�" 260 PROCorflags(4) 270 pos=INSTR(text$,",") 280 pt$=LEFT$(text$,(pos-1)) 290 text$=RIGHT$(text$,(LEN(text$)-pos)) 300 indirected=TRUE 310 buff%=EVAL(pt$) 320 pos=INSTR(text$,",") 330 pt$=LEFT$(text$,(pos-1)) 340 text$=RIGHT$(text$,(LEN(text$)-pos)) 350 length=EVAL(pt$) 360 pos=INSTR(text$,",") 370 pt$=LEFT$(text$,(pos-1)) 380 text$=RIGHT$(text$,(LEN(text$)-pos)) 390 valptr=EVAL(pt$) 400 flags=&0700F121 410 WHEN ">" 420 pos=INSTR(text$,",") 430 pt$=LEFT$(text$,(pos-1)) 440 text$=RIGHT$(text$,(LEN(text$)-pos)) 450 subptr=EVAL(pt$) 460 PROCorflags(0) 470 ENDCASE 480 IF LEN(text$)<1 THEN flg%=flg% OR 128:end=TRUE 490 memptr!0 = flg% 500 memptr!4 = subptr 510 memptr!8 = flags 520 CASE indirected OF 530 WHEN FALSE :$(memptr+12)=t$ 540 WHEN TRUE 550 memptr!12=buff% 560 memptr!16=valptr 570 memptr!20=length 580 ENDCASE 590 memptr=memptr+24 600 UNTIL end=TRUE 610 =mem 620 630 DEFPROCmenu_at(handle%,N,mx,my) 640 SYS"Wimp_CreateMenu",,handle%,mx,my 650 ENDPROC 660 DEFPROCorflags(ov) 670 flg%=flg% OR ov 680 t$=RIGHT$(t$,(LEN(t$)-1)) 690 ENDPROC 700 710DEFFNiconbar(spname$,block%,IT$,wndw%) 720DIM tp% 50,vp% 50 730$tp%=IT$ 740$vp%="S"+spname$ 750LOCAL handle% 760$block% = spname$ 770wimp_block%!0 = wndw% 780wimp_block%!4 = 0 790wimp_block%!8 = -14 800wimp_block%!12 = 130 810wimp_block%!16 = 90 820wimp_block%!20 = &1700312B 830wimp_block%!24 = tp% 840wimp_block%!28 = vp% 850wimp_block%!32 = LEN($tp%)+1 860SYS "XWimp_CreateIcon",0,wimp_block% TO handle% 870=handle% 880DEFPROCtick(mh%,I%) 890mh%!(28+24*I%)=mh%!(28+24*I%)EOR&01:ENDPROC
2 ------ Menu Library v1.10 � D Bradshaw ------ - ݤconstruct_menu(mem,text$,title$,width) ( end=� 2 $mem = title$ < mem?12 = 7 F mem?13 = 2 P mem?14 = 7 Z mem?15 = 0 d mem!16 = width n mem!20 = 44 x mem!24 = 0 � memptr=mem+28 � � � pos=�text$,",") � t$=�text$,(pos-1)) �! text$=�text$,(�(text$)-pos)) � flg%=0 � subptr=-1 � indirected=� � flags=&07000021 � Ȏ �t$,1) � � � "_": �orflags(2) � � "`": �orflags(1) � � "�" �orflags(4) pos=�text$,",") pt$=�text$,(pos-1)) "$ text$=�text$,(�(text$)-pos)) , indirected=� 6 buff%=�(pt$) @ pos=�text$,",") J pt$=�text$,(pos-1)) T$ text$=�text$,(�(text$)-pos)) ^ length=�(pt$) h pos=�text$,",") r pt$=�text$,(pos-1)) |$ text$=�text$,(�(text$)-pos)) � valptr=�(pt$) � flags=&0700F121 � � ">" � pos=�text$,",") � pt$=�text$,(pos-1)) �$ text$=�text$,(�(text$)-pos)) � subptr=�(pt$) � �orflags(0) � � �) � �(text$)<1 � flg%=flg% � 128:end=� � memptr!0 = flg% � memptr!4 = subptr � memptr!8 = flags Ȏ indirected � � � :$(memptr+12)=t$ � � & memptr!12=buff% 0 memptr!16=valptr : memptr!20=length D � N memptr=memptr+24 X � end=� b =mem l v ��menu_at(handle%,N,mx,my) �' ș"Wimp_CreateMenu",,handle%,mx,my � � � ��orflags(ov) � flg%=flg% � ov � t$=�t$,(�(t$)-1)) � � � �'ݤiconbar(spname$,block%,IT$,wndw%) �� tp% 50,vp% 50 �$tp%=IT$ �$vp%="S"+spname$ � � handle% �$block% = spname$ wimp_block%!0 = wndw% wimp_block%!4 = 0 wimp_block%!8 = -14 wimp_block%!12 = 130 *wimp_block%!16 = 90 4wimp_block%!20 = &1700312B >wimp_block%!24 = tp% Hwimp_block%!28 = vp% Rwimp_block%!32 = �($tp%)+1 \1ș "XWimp_CreateIcon",0,wimp_block% � handle% f=handle% p��tick(mh%,I%) z'mh%!(28+24*I%)=mh%!(28+24*I%)�&01:� �
00000000 0d 00 0a 32 20 2d 2d 2d 2d 2d 2d 20 4d 65 6e 75 |...2 ------ Menu| 00000010 20 4c 69 62 72 61 72 79 20 76 31 2e 31 30 20 a9 | Library v1.10 .| 00000020 20 44 20 42 72 61 64 73 68 61 77 20 2d 2d 2d 2d | D Bradshaw ----| 00000030 2d 2d 0d 00 14 05 20 0d 00 1e 2d 20 dd a4 63 6f |--.... ...- ..co| 00000040 6e 73 74 72 75 63 74 5f 6d 65 6e 75 28 6d 65 6d |nstruct_menu(mem| 00000050 2c 74 65 78 74 24 2c 74 69 74 6c 65 24 2c 77 69 |,text$,title$,wi| 00000060 64 74 68 29 0d 00 28 0a 20 65 6e 64 3d a3 0d 00 |dth)..(. end=...| 00000070 32 16 20 24 6d 65 6d 20 20 20 20 20 3d 20 74 69 |2. $mem = ti| 00000080 74 6c 65 24 0d 00 3c 11 20 6d 65 6d 3f 31 32 20 |tle$..<. mem?12 | 00000090 20 20 3d 20 37 0d 00 46 11 20 6d 65 6d 3f 31 33 | = 7..F. mem?13| 000000a0 20 20 20 3d 20 32 0d 00 50 11 20 6d 65 6d 3f 31 | = 2..P. mem?1| 000000b0 34 20 20 20 3d 20 37 0d 00 5a 11 20 6d 65 6d 3f |4 = 7..Z. mem?| 000000c0 31 35 20 20 20 3d 20 30 0d 00 64 15 20 6d 65 6d |15 = 0..d. mem| 000000d0 21 31 36 20 20 20 3d 20 77 69 64 74 68 0d 00 6e |!16 = width..n| 000000e0 12 20 6d 65 6d 21 32 30 20 20 20 3d 20 34 34 0d |. mem!20 = 44.| 000000f0 00 78 11 20 6d 65 6d 21 32 34 20 20 20 3d 20 30 |.x. mem!24 = 0| 00000100 0d 00 82 12 20 6d 65 6d 70 74 72 3d 6d 65 6d 2b |.... memptr=mem+| 00000110 32 38 0d 00 8c 06 20 f5 0d 00 96 14 20 70 6f 73 |28.... ..... pos| 00000120 3d a7 74 65 78 74 24 2c 22 2c 22 29 0d 00 a0 17 |=.text$,",")....| 00000130 20 74 24 3d c0 74 65 78 74 24 2c 28 70 6f 73 2d | t$=.text$,(pos-| 00000140 31 29 29 0d 00 aa 21 20 74 65 78 74 24 3d c2 74 |1))...! text$=.t| 00000150 65 78 74 24 2c 28 a9 28 74 65 78 74 24 29 2d 70 |ext$,(.(text$)-p| 00000160 6f 73 29 29 0d 00 b4 0b 20 66 6c 67 25 3d 30 0d |os)).... flg%=0.| 00000170 00 be 0e 20 73 75 62 70 74 72 3d 2d 31 0d 00 c8 |... subptr=-1...| 00000180 11 20 69 6e 64 69 72 65 63 74 65 64 3d a3 0d 00 |. indirected=...| 00000190 d2 14 20 66 6c 61 67 73 3d 26 30 37 30 30 30 30 |.. flags=&070000| 000001a0 32 31 0d 00 dc 11 20 20 c8 8e 20 c0 74 24 2c 31 |21.... .. .t$,1| 000001b0 29 20 ca 0d 00 e6 19 20 20 20 c9 20 22 5f 22 3a |) ..... . "_":| 000001c0 20 f2 6f 72 66 6c 61 67 73 28 32 29 0d 00 f0 19 | .orflags(2)....| 000001d0 20 20 20 c9 20 22 60 22 3a 20 f2 6f 72 66 6c 61 | . "`": .orfla| 000001e0 67 73 28 31 29 0d 00 fa 0c 20 20 20 c9 20 22 a4 |gs(1).... . ".| 000001f0 22 0d 01 04 13 20 20 20 20 f2 6f 72 66 6c 61 67 |".... .orflag| 00000200 73 28 34 29 0d 01 0e 17 20 20 20 20 70 6f 73 3d |s(4).... pos=| 00000210 a7 74 65 78 74 24 2c 22 2c 22 29 0d 01 18 1b 20 |.text$,",").... | 00000220 20 20 20 70 74 24 3d c0 74 65 78 74 24 2c 28 70 | pt$=.text$,(p| 00000230 6f 73 2d 31 29 29 0d 01 22 24 20 20 20 20 74 65 |os-1)).."$ te| 00000240 78 74 24 3d c2 74 65 78 74 24 2c 28 a9 28 74 65 |xt$=.text$,(.(te| 00000250 78 74 24 29 2d 70 6f 73 29 29 0d 01 2c 14 20 20 |xt$)-pos))..,. | 00000260 20 20 69 6e 64 69 72 65 63 74 65 64 3d b9 0d 01 | indirected=...| 00000270 36 14 20 20 20 20 62 75 66 66 25 3d a0 28 70 74 |6. buff%=.(pt| 00000280 24 29 0d 01 40 17 20 20 20 20 70 6f 73 3d a7 74 |$)..@. pos=.t| 00000290 65 78 74 24 2c 22 2c 22 29 0d 01 4a 1b 20 20 20 |ext$,",")..J. | 000002a0 20 70 74 24 3d c0 74 65 78 74 24 2c 28 70 6f 73 | pt$=.text$,(pos| 000002b0 2d 31 29 29 0d 01 54 24 20 20 20 20 74 65 78 74 |-1))..T$ text| 000002c0 24 3d c2 74 65 78 74 24 2c 28 a9 28 74 65 78 74 |$=.text$,(.(text| 000002d0 24 29 2d 70 6f 73 29 29 0d 01 5e 15 20 20 20 20 |$)-pos))..^. | 000002e0 6c 65 6e 67 74 68 3d a0 28 70 74 24 29 0d 01 68 |length=.(pt$)..h| 000002f0 17 20 20 20 20 70 6f 73 3d a7 74 65 78 74 24 2c |. pos=.text$,| 00000300 22 2c 22 29 0d 01 72 1b 20 20 20 20 70 74 24 3d |",")..r. pt$=| 00000310 c0 74 65 78 74 24 2c 28 70 6f 73 2d 31 29 29 0d |.text$,(pos-1)).| 00000320 01 7c 24 20 20 20 20 74 65 78 74 24 3d c2 74 65 |.|$ text$=.te| 00000330 78 74 24 2c 28 a9 28 74 65 78 74 24 29 2d 70 6f |xt$,(.(text$)-po| 00000340 73 29 29 0d 01 86 15 20 20 20 20 76 61 6c 70 74 |s)).... valpt| 00000350 72 3d a0 28 70 74 24 29 0d 01 90 17 20 20 20 20 |r=.(pt$).... | 00000360 66 6c 61 67 73 3d 26 30 37 30 30 46 31 32 31 0d |flags=&0700F121.| 00000370 01 9a 0c 20 20 20 c9 20 22 3e 22 0d 01 a4 17 20 |... . ">".... | 00000380 20 20 20 70 6f 73 3d a7 74 65 78 74 24 2c 22 2c | pos=.text$,",| 00000390 22 29 0d 01 ae 1b 20 20 20 20 70 74 24 3d c0 74 |").... pt$=.t| 000003a0 65 78 74 24 2c 28 70 6f 73 2d 31 29 29 0d 01 b8 |ext$,(pos-1))...| 000003b0 24 20 20 20 20 74 65 78 74 24 3d c2 74 65 78 74 |$ text$=.text| 000003c0 24 2c 28 a9 28 74 65 78 74 24 29 2d 70 6f 73 29 |$,(.(text$)-pos)| 000003d0 29 0d 01 c2 15 20 20 20 20 73 75 62 70 74 72 3d |).... subptr=| 000003e0 a0 28 70 74 24 29 0d 01 cc 13 20 20 20 20 f2 6f |.(pt$).... .o| 000003f0 72 66 6c 61 67 73 28 30 29 0d 01 d6 07 20 20 cb |rflags(0).... .| 00000400 0d 01 e0 29 20 e7 20 a9 28 74 65 78 74 24 29 3c |...) . .(text$)<| 00000410 31 20 8c 20 66 6c 67 25 3d 66 6c 67 25 20 84 20 |1 . flg%=flg% . | 00000420 31 32 38 3a 65 6e 64 3d b9 0d 01 ea 15 20 6d 65 |128:end=..... me| 00000430 6d 70 74 72 21 30 20 20 3d 20 66 6c 67 25 0d 01 |mptr!0 = flg%..| 00000440 f4 17 20 6d 65 6d 70 74 72 21 34 20 20 3d 20 73 |.. memptr!4 = s| 00000450 75 62 70 74 72 0d 01 fe 16 20 6d 65 6d 70 74 72 |ubptr.... memptr| 00000460 21 38 20 20 3d 20 66 6c 61 67 73 0d 02 08 14 20 |!8 = flags.... | 00000470 c8 8e 20 69 6e 64 69 72 65 63 74 65 64 20 ca 0d |.. indirected ..| 00000480 02 12 1a 20 20 c9 20 a3 20 3a 24 28 6d 65 6d 70 |... . . :$(memp| 00000490 74 72 2b 31 32 29 3d 74 24 0d 02 1c 09 20 20 c9 |tr+12)=t$.... .| 000004a0 20 b9 0d 02 26 16 20 20 20 6d 65 6d 70 74 72 21 | ...&. memptr!| 000004b0 31 32 3d 62 75 66 66 25 0d 02 30 17 20 20 20 6d |12=buff%..0. m| 000004c0 65 6d 70 74 72 21 31 36 3d 76 61 6c 70 74 72 0d |emptr!16=valptr.| 000004d0 02 3a 17 20 20 20 6d 65 6d 70 74 72 21 32 30 3d |.:. memptr!20=| 000004e0 6c 65 6e 67 74 68 0d 02 44 06 20 cb 0d 02 4e 15 |length..D. ...N.| 000004f0 20 6d 65 6d 70 74 72 3d 6d 65 6d 70 74 72 2b 32 | memptr=memptr+2| 00000500 34 0d 02 58 0c 20 fd 20 65 6e 64 3d b9 0d 02 62 |4..X. . end=...b| 00000510 09 20 3d 6d 65 6d 0d 02 6c 05 20 0d 02 76 1f 20 |. =mem..l. ..v. | 00000520 dd f2 6d 65 6e 75 5f 61 74 28 68 61 6e 64 6c 65 |..menu_at(handle| 00000530 25 2c 4e 2c 6d 78 2c 6d 79 29 0d 02 80 27 20 c8 |%,N,mx,my)...' .| 00000540 99 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 6e |."Wimp_CreateMen| 00000550 75 22 2c 2c 68 61 6e 64 6c 65 25 2c 6d 78 2c 6d |u",,handle%,mx,m| 00000560 79 0d 02 8a 06 20 e1 0d 02 94 12 20 dd f2 6f 72 |y.... ..... ..or| 00000570 66 6c 61 67 73 28 6f 76 29 0d 02 9e 13 20 66 6c |flags(ov).... fl| 00000580 67 25 3d 66 6c 67 25 20 84 20 6f 76 0d 02 a8 16 |g%=flg% . ov....| 00000590 20 74 24 3d c2 74 24 2c 28 a9 28 74 24 29 2d 31 | t$=.t$,(.(t$)-1| 000005a0 29 29 0d 02 b2 06 20 e1 0d 02 bc 05 20 0d 02 c6 |)).... ..... ...| 000005b0 27 dd a4 69 63 6f 6e 62 61 72 28 73 70 6e 61 6d |'..iconbar(spnam| 000005c0 65 24 2c 62 6c 6f 63 6b 25 2c 49 54 24 2c 77 6e |e$,block%,IT$,wn| 000005d0 64 77 25 29 0d 02 d0 13 de 20 74 70 25 20 35 30 |dw%)..... tp% 50| 000005e0 2c 76 70 25 20 35 30 0d 02 da 0c 24 74 70 25 3d |,vp% 50....$tp%=| 000005f0 49 54 24 0d 02 e4 14 24 76 70 25 3d 22 53 22 2b |IT$....$vp%="S"+| 00000600 73 70 6e 61 6d 65 24 0d 02 ee 0d ea 20 68 61 6e |spname$..... han| 00000610 64 6c 65 25 0d 02 f8 15 24 62 6c 6f 63 6b 25 20 |dle%....$block% | 00000620 3d 20 73 70 6e 61 6d 65 24 0d 03 02 1a 77 69 6d |= spname$....wim| 00000630 70 5f 62 6c 6f 63 6b 25 21 30 20 20 3d 20 77 6e |p_block%!0 = wn| 00000640 64 77 25 0d 03 0c 17 77 69 6d 70 5f 62 6c 6f 63 |dw%....wimp_bloc| 00000650 6b 25 21 34 20 20 3d 20 20 30 0d 03 16 18 77 69 |k%!4 = 0....wi| 00000660 6d 70 5f 62 6c 6f 63 6b 25 21 38 20 20 3d 20 2d |mp_block%!8 = -| 00000670 31 34 0d 03 20 18 77 69 6d 70 5f 62 6c 6f 63 6b |14.. .wimp_block| 00000680 25 21 31 32 20 3d 20 31 33 30 0d 03 2a 17 77 69 |%!12 = 130..*.wi| 00000690 6d 70 5f 62 6c 6f 63 6b 25 21 31 36 20 3d 20 39 |mp_block%!16 = 9| 000006a0 30 0d 03 34 1e 77 69 6d 70 5f 62 6c 6f 63 6b 25 |0..4.wimp_block%| 000006b0 21 32 30 20 3d 20 26 31 37 30 30 33 31 32 42 0d |!20 = &1700312B.| 000006c0 03 3e 18 77 69 6d 70 5f 62 6c 6f 63 6b 25 21 32 |.>.wimp_block%!2| 000006d0 34 20 3d 20 74 70 25 0d 03 48 18 77 69 6d 70 5f |4 = tp%..H.wimp_| 000006e0 62 6c 6f 63 6b 25 21 32 38 20 3d 20 76 70 25 0d |block%!28 = vp%.| 000006f0 03 52 1e 77 69 6d 70 5f 62 6c 6f 63 6b 25 21 33 |.R.wimp_block%!3| 00000700 32 20 3d 20 a9 28 24 74 70 25 29 2b 31 0d 03 5c |2 = .($tp%)+1..\| 00000710 31 c8 99 20 22 58 57 69 6d 70 5f 43 72 65 61 74 |1.. "XWimp_Creat| 00000720 65 49 63 6f 6e 22 2c 30 2c 77 69 6d 70 5f 62 6c |eIcon",0,wimp_bl| 00000730 6f 63 6b 25 20 b8 20 68 61 6e 64 6c 65 25 0d 03 |ock% . handle%..| 00000740 66 0c 3d 68 61 6e 64 6c 65 25 0d 03 70 12 dd f2 |f.=handle%..p...| 00000750 74 69 63 6b 28 6d 68 25 2c 49 25 29 0d 03 7a 27 |tick(mh%,I%)..z'| 00000760 6d 68 25 21 28 32 38 2b 32 34 2a 49 25 29 3d 6d |mh%!(28+24*I%)=m| 00000770 68 25 21 28 32 38 2b 32 34 2a 49 25 29 82 26 30 |h%!(28+24*I%).&0| 00000780 31 3a e1 0d ff |1:...| 00000785