Home » Archimedes archive » Acorn User » AU 1993-11.adf » !OmniDesk_OmniDesk » !OmniDesk/Utilities/!IconFlags/!RunImage

!OmniDesk/Utilities/!IconFlags/!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 » Archimedes archive » Acorn User » AU 1993-11.adf » !OmniDesk_OmniDesk
Filename: !OmniDesk/Utilities/!IconFlags/!RunImage
Read OK:
File size: A8C4 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage for Icon Flags
   20:
   30VersionNumber$="1�02 (24 June 1993)":Taskname$="Icon�Flags"
   40Exit=FALSE:Startup=FALSE:Done=FALSE
   50DoModeChange=FALSE
   60:
   70DIM Block 256,Buffer 256,MenuHelp 16,ISpyBlock 40,Transmission 10
   80IndMenuMax=64:DIM IndirectMenuText IndMenuMax
   90DIM Templates 2179,InfoInd 189,LocInd 592,SpyInd 900
  100DIM IBMenu 76,MainMenu 124
  110:
  120REM Messages used by the OmniDesk suite:
  130UtilDeclare=&825C0:UtilOpen=&825C1:UtilQuitting=&825C2:UtilReside=&825C3:UtilAckLoad=&825C4
  140REM These are official Acorn allocations.
  150:
  160ON ERROR Block!0=ERR:$(Block+4)=REPORT$+" (internal error code "+STR$(ERL)+")"+CHR$0:SYS "Wimp_ReportError",Block,1,Taskname$:END
  170:
  180OmniDesk=FNReadStartupString:REM Also assigns Exit and Startup
  190:
  200*Set IconFlags$RISCOS 3
  210*RMEnsure UtilityModule 3.00 Set IconFlags$RISCOS 2
  220SYS "XOS_ReadVarVal","IconFlags$RISCOS",Block,256,0,0 TO ,,len:Block?len=13:wimp$=$Block
  230IF wimp$<>"3" THEN wimp$="2"
  240*Unset IconFlags$RISCOS
  250:
  260*Set IconFlags$SpriteDrag Yes
  270*RMEnsure DragASprite 0.00 Set IconFlags$SpriteDrag No
  280SYS "XOS_ReadVarVal","IconFlags$SpriteDrag",Block,256,0,0 TO ,,len:Block?len=13
  290IF $Block="Yes" THEN DragASprite=TRUE:ELSE DragASprite=FALSE
  300*Unset IconFlags$SpriteDrag
  310:
  320SYS "XOS_ReadVarVal","Obey$Dir",Block,256,0,0 TO ,,len:Block?len=13:OurFileName$=$Block
  330N=-1:REPEAT:N+=1:UNTIL MID$(OurFileName$,LEN(OurFileName$)-N,1)="."
  340OurPathName$=LEFT$(OurFileName$,LEN(OurFileName$)-N):OurFileName$=RIGHT$(OurFileName$,N)
  350:
  360REM Read size of sprite file and load it. We need to DIM 16 bytes more than the file's size.
  370SYS "OS_FSControl",28,"<IconFlags$Dir>.Sprites" TO ,,len
  380DIM Sprites len+16:!Sprites=len+16:Sprites!4=0:Sprites!8=16:Sprites!12=16:SYS "OS_SpriteOp",256+10,Sprites,"<IconFlags$Dir>.Sprites"
  390:
  400IF wimp$="3" THEN
  410  DIM messagelist% 36
  420  messagelist%!0=&502:messagelist%!4=&400C1
  430  messagelist%!8=UtilOpen:messagelist%!12=UtilQuitting
  440  messagelist%!16=UtilReside:messagelist%!20=10
  450  messagelist%!24=6:messagelist%!28=2:messagelist%!32=0
  460  SYS "Wimp_Initialise",300,&4B534154,Taskname$,messagelist% TO wimp,Task
  470ELSE
  480  SYS "Wimp_Initialise",200,&4B534154,Taskname$ TO wimp,Task
  490ENDIF
  500:
  510SYS "Interface_Initialise",Task
  520:
  530SYS "Wimp_OpenTemplate",,"<IconFlags$Dir>.Templates"
  540SYS "Wimp_LoadTemplate",,Templates,InfoInd,InfoInd+189,-1,"Info",0
  550SYS "Wimp_CreateWindow",,Templates TO Info
  560SYS "Wimp_LoadTemplate",,Templates,LocInd,LocInd+592,-1,"WindowXY",0:Templates!64=Sprites
  570SYS "Wimp_CreateWindow",,Templates TO Loc
  580SYS "Wimp_LoadTemplate",,Templates,SpyInd,SpyInd+900,-1,"SpyCalc",0:Templates!64=Sprites
  590SYS "Wimp_CreateWindow",,Templates TO SpyCalc
  600SYS "Wimp_CloseTemplate"
  610:
  620PROCBuildMenus
  630:
  640PROCCleanUpLocWindow
  650ReadError=NOT(FNLoadSettings)
  660PROCClearSpyCalcWindow(Spying)
  670:
  680PROCInitialise
  690:
  700IF OmniDesk=0 THEN
  710  REM Put Icon on the icon-bar
  720  Block!0=-1
  730  Block!4=0:Block!8=0:Block!12=68:Block!16=68
  740  Block!20=&17003002:$(Block+24)="!IconFlags"+CHR$13
  750  SYS "Wimp_CreateIcon",,Block TO IconBar
  760ENDIF
  770:
  780IF OmniDesk<>0 THEN PROCDeclareToOmniDesk
  790IF Startup THEN Done=TRUE:REM '-Startup' parameter means 'declare and die immediately'.
  800:
  810PROCUpdateIcon(Info,3,VersionNumber$)
  820PROCModeChange:REM To update icon-bar icon if necessary
  830:
  840ON ERROR PROCError
  850IF ReadError THEN ReadError=FALSE:PROCDefaultSettings:ERROR 9999,"An error occurred whilst reading the settings file. Default settings will therefore be used."
  860:
  870SYS "OS_ReadMonotonicTime" TO polltime%
  880OldWin=0:OldIc=-1
  890:
  900REM Main program loop
  910REPEAT
  920  SYS "Wimp_PollIdle",%1100000110000,Block TO Reason
  930  SYS "Interface_Poll",Reason,,Task
  940  SYS "Interface_PreProcessKey",Reason,Block,Task
  950  CASE Reason OF
  960    WHEN 0 : SYS "OS_ReadMonotonicTime" TO polltime%
  970             IF Spying AND (FNOpenState(SpyCalc))  THEN
  980               PROCDoSpy(OldWin,OldIc):polltime%+=10
  990             ELSE
 1000               polltime%+=100:REM Do a Wimp_Poll approximately once a second
 1010             ENDIF
 1020             IF DoModeChange THEN IF FNOpenState(SpyCalc) THEN PROCOpen(SpyCalc,FALSE,XPosition,YPosition)
 1030    WHEN 1 : PROCRedraw
 1040    WHEN 2 : SYS "Wimp_OpenWindow",,Block
 1050    WHEN 3 : SYS "Wimp_CloseWindow",,Block
 1060             IF Exit THEN Done=TRUE
 1070    WHEN 6 : PROCMouseButton
 1080    WHEN 7 : PROCDragFinished
 1090    WHEN 8 : PROCKeyPressed
 1100    WHEN 9 : PROCDecodeMenu
 1110    WHEN 17,18,19 : PROCRecieveMessage
 1120  ENDCASE
 1130UNTIL Done
 1140PROCSayGoodbye
 1150END
 1160:
 1170DEF PROCError
 1180Click=0:Block!0=ERR:CASE ERR OF
 1190  WHEN 9999:REM Custom error
 1200    $(Block+4)=REPORT$+CHR$0
 1210    SYS "Wimp_ReportError",Block,17,"Notice from "+Taskname$
 1220  OTHERWISE
 1230    $(Block+4)=REPORT$+" (internal error code "+STR$ERL+"). Click on OK to continue, or Cancel to terminate the program."+CHR$0
 1240    SYS "Wimp_ReportError",Block,3,Taskname$ TO ,Click
 1250ENDCASE
 1260IF Click=2 THEN PROCSayGoodbye:END
 1270ENDPROC
 1280:
 1290DEF PROCOpen(WindowHandle,TopOfStack,across,up)
 1300Block!0=WindowHandle
 1310SYS "Wimp_GetWindowState",,Block
 1320IF (across<>-1) AND (across<>-1) THEN PROCDecideWindowPosition(Block,across,up)
 1330IF TopOfStack THEN Block!28=-1
 1340SYS "Wimp_OpenWindow",,Block
 1350ENDPROC
 1360:
 1370DEF PROCClose(WindowHandle)
 1380Block!0=WindowHandle
 1390SYS "Wimp_GetWindowState",,Block
 1400SYS "Wimp_CloseWindow",,Block
 1410ENDPROC
 1420:
 1430DEF PROCDecideWindowPosition(Block,across,up)
 1440REM Use of this procedure lets you open windows on an invisible grid which
 1450REM automatically fits itself to the screen mode in use. There are five
 1460REM positions across (left, mid-left, centre, mid-right, right) and five
 1470REM positions up (bottom of screen, above icon-bar, centre of screen,
 1480REM centre top of screen, top of screen).
 1490  :
 1500Xpixels=FNModeInfo("XPixels",-1):Ypixels=FNModeInfo("YPixels",-1)
 1510XEigFactor=FNModeInfo("XEigFactor",-1):YEigFactor=FNModeInfo("YEigFactor",-1)
 1520  :
 1530top=Block!16:right=Block!12:bot=Block!8:left=Block!4
 1540SYS "Wimp_OpenWindow",,Block:SYS "Wimp_GetWindowOutline",,Block
 1550TB=((Block!16)-top)/(2^YEigFactor)
 1560VS=((Block!12)-right)/(2^XEigFactor)
 1570HS=(bot-(Block!8))/(2^YEigFactor)
 1580LP=(left-(Block!4))/(2^XEigFactor)
 1590REM LP is Left Pixel: normally present, but not if window is transparent.
 1600width=(right-left)/(2^XEigFactor)
 1610height=(top-bot)/(2^YEigFactor)
 1620CASE across OF
 1630  WHEN 0:x=LP
 1640  WHEN 1:x=LP+((Xpixels+1)-(width+LP+VS))/4
 1650  WHEN 2:x=LP+((Xpixels+1)-(width+LP+VS))/2
 1660  WHEN 3:x=LP+(3*(((Xpixels+1)-(width+LP+VS))/4))
 1670  WHEN 4:x=(Xpixels+1)-(width+VS)
 1680ENDCASE
 1690CASE up OF
 1700  WHEN 0:y=HS
 1710  WHEN 1:y=HS+(132/(2^YEigFactor))
 1720  WHEN 2:y=HS+((Ypixels+1)-(height+TB+HS))/2
 1730  WHEN 3:y=HS+(3*(((Ypixels+1)-(height+TB+HS))/4))
 1740  WHEN 4:y=(Ypixels+1)-(height+TB)
 1750ENDCASE
 1760REM Above coordinates position window.
 1770REM Now convert to screen coordinates:
 1780x=x*(2^XEigFactor):y=y*(2^YEigFactor)
 1790width=width*(2^XEigFactor):height=height*(2^YEigFactor)
 1800Block!12=x+width:Block!4=x
 1810Block!16=y+height:Block!8=y
 1820ENDPROC
 1830:
 1840REM -------------------------------------------------------------------------
 1850REM Wimp poll routines
 1860REM -------------------------------------------------------------------------
 1870:
 1880DEF PROCRedraw
 1890IF DoModeChange THEN
 1900  REM Re-opening windows need an extra wimp_poll to happen after the mode change in order to work:
 1910  IF FNOpenState(SpyCalc) THEN PROCOpen(SpyCalc,FALSE,XPosition,YPosition)
 1920  DoModeChange=FALSE
 1930ENDIF
 1940SYS "Wimp_RedrawWindow",,Block TO flag
 1950WHILE flag
 1960  SYS "Interface_Render3dWindow",,Block
 1970  SYS "Wimp_GetRectangle",,Block TO flag
 1980ENDWHILE
 1990ENDPROC
 2000:
 2010DEF PROCRecieveMessage
 2020CASE Block!16 OF
 2030  WHEN 0 : Done=TRUE
 2040  WHEN 2 : REM DataSaveAck
 2050           REM Other task wants a transfer via <Wimp$Scrap> rather than RAM
 2060           PROCWimpScrapTransmit
 2070  WHEN 6 : REM RAM Fetch
 2080           REM Other task is asking for data
 2090           PROCRAMTransmit
 2100  WHEN 10: IF OmniDesk=0 THEN PROCSaveDesktop(Block!20)
 2110           REM Only save if we have not been started up by OmniDesk
 2120  WHEN &502 : PROCHelp
 2130  WHEN &400C1 : PROCModeChange
 2140  WHEN UtilOpen : IF $(Block+24)=Taskname$ THEN PROCOmniDeskCalling
 2150  WHEN UtilQuitting : IF OmniDesk<>0 THEN
 2160                        IF Block!20=OmniDesk THEN Done=TRUE
 2170                      ENDIF
 2180  WHEN UtilReside : Exit=FALSE
 2190ENDCASE
 2200ENDPROC
 2210:
 2220DEF PROCDeleteWimpScrap
 2230LOCAL ERROR
 2240ON ERROR LOCAL RESTORE ERROR:ENDPROC
 2250REM We may receive try to delete a non-existant Wimp$Scrap
 2260REM file if the receiving task did not recognise the filetype.
 2270OSCLI("Delete <Wimp$Scrap>")
 2280ENDPROC
 2290:
 2300DEF PROCMouseButton
 2310MouseX=Block!0:MouseY=Block!4:Buttons=Block!8
 2320Window=Block!12:Icon=Block!16
 2330CASE Window OF
 2340  WHEN -2:REM Icon bar icon clicked
 2350    CASE Buttons OF
 2360      WHEN 1 : REM Adjust
 2370      WHEN 2 : REM Menu
 2380        M%=IBMenu:MenuX=MouseX:MenuY=MouseY:PROCMakeMenu
 2390      WHEN 4 : REM Select
 2400        PROCOpen(SpyCalc,TRUE,XPosition,YPosition)
 2410    ENDCASE
 2420  WHEN SpyCalc
 2430    CASE Buttons OF
 2440      WHEN 2 : REM Menu
 2450        M%=MainMenu:MenuX=MouseX:MenuY=MouseY
 2460        IF wimp>=310 THEN
 2470          IF LEFT$($MainMenuTitle,1)="\" THEN $MainMenuTitle=RIGHT$($MainMenuTitle,LEN($MainMenuTitle)-1)+CHR$13
 2480          IF XPosition=4 THEN $MainMenuTitle="\"+$MainMenuTitle+CHR$13
 2490        ENDIF
 2500        PROCMakeMenu
 2510      WHEN 1,4 : REM Select,Adjust
 2520        IF (Icon>=20) AND (Icon<=32) THEN
 2530          PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
 2540          IF FNSelectedState(SpyCalc,26) THEN
 2550            REM Fonts on
 2560            A=EVAL(FNReadIconStr(SpyCalc,33))
 2570            IF FNReadIconStr(SpyCalc,43)="" THEN PROCUpdateIcon(SpyCalc,43,STR$((A>>>24) MOD 256))
 2580            IF FNReadIconStr(SpyCalc,39)<>"" THEN FOR N=39 TO 41 STEP 2:PROCUpdateIcon(SpyCalc,N,""):PROCColourIcon(SpyCalc,N,1):NEXT
 2590          ELSE
 2600            REM Fonts off
 2610            A=EVAL(FNReadIconStr(SpyCalc,33))
 2620            Fcol=(A>>>24) MOD 16:Bcol=(A>>>28) MOD 16
 2630            IF FNReadIconStr(SpyCalc,43)<>"" THEN PROCUpdateIcon(SpyCalc,43,"")
 2640            IF FNReadIconStr(SpyCalc,39)="" THEN
 2650              PROCUpdateIcon(SpyCalc,39,STR$(Fcol))
 2660              PROCColourIcon(SpyCalc,39,Fcol)
 2670              PROCUpdateIcon(SpyCalc,41,STR$(Bcol))
 2680              PROCColourIcon(SpyCalc,41,Bcol)
 2690            ENDIF
 2700          ENDIF
 2710        ENDIF
 2720        IF (Icon=39) OR (Icon=41) THEN
 2730          A=FNReadIcon(SpyCalc,Icon)
 2740          IF Buttons=4 THEN A+=1
 2750          IF Buttons=1 THEN A-=1
 2760          IF A=-1 THEN A=15
 2770          IF A=16 THEN A=0
 2780          PROCUpdateIcon(SpyCalc,Icon,STR$(A))
 2790          PROCColourIcon(SpyCalc,Icon,A)
 2800          REM Now check font icon:
 2810          IF FNReadIconStr(SpyCalc,43)<>"" THEN
 2820            PROCUpdateIcon(SpyCalc,43,"")
 2830            IF Icon=39 THEN
 2840              PROCUpdateIcon(SpyCalc,41,"1")
 2850              PROCColourIcon(SpyCalc,41,1)
 2860            ELSE
 2870              PROCUpdateIcon(SpyCalc,39,"7")
 2880              PROCColourIcon(SpyCalc,39,7)
 2890            ENDIF
 2900          ENDIF
 2910          PROCUpdateSelectedFlag(SpyCalc,26,FALSE)
 2920          PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
 2930        ENDIF
 2940      OTHERWISE
 2950        IF (Buttons>7) AND (Window=SpyCalc) AND (Icon=33) THEN
 2960          $Transmission=FNReadIconStr(SpyCalc,33)
 2970          Dragging$="Flags":PROCDragBox(SpyCalc,33,5,Sprites,FNMakeDraggingSprite)
 2980        ENDIF
 2990    ENDCASE
 3000  WHEN Loc AND Buttons<8:REM Reposition main window
 3010    IF Icon>=6 THEN
 3020      XPosition=FNReadWindowLocation("X")
 3030      YPosition=FNReadWindowLocation("Y")
 3040      IF FNOpenState(SpyCalc) THEN PROCOpen(SpyCalc,FALSE,XPosition,YPosition)
 3050    ENDIF
 3060ENDCASE
 3070ENDPROC
 3080:
 3090DEF PROCDragFinished
 3100IF DragASprite THEN SYS "DragASprite_Stop"
 3110SYS "Wimp_GetPointerInfo",,Block
 3120IF Block!12=-1 THEN ENDPROC:REM Dragged to background.
 3130DraggedToX=Block!0:DraggedToY=Block!4:DraggedToWindow=Block!12:DraggedToIcon=Block!16
 3140REM OK - Let's begin an inter-application save
 3150MyRef=0
 3160Block!0=256:Block!12=MyRef:Block!16=1:REM DataSave
 3170Block!20=DraggedToWindow:Block!24=DraggedToIcon:Block!28=DraggedToX:Block!32=DraggedToY
 3180Block!36=12:REM Never more than 12 bytes
 3190Block!40=&FFF:REM Filetype of Text
 3200$(Block+44)=Dragging$+CHR$0
 3210SYS "Wimp_SendMessage",17,Block,DraggedToWindow,DraggedToIcon
 3220REM DraggedToIcon included in case DraggedToWindow=-2 (icon bar)
 3230ENDPROC
 3240:
 3250DEF PROCKeyPressed
 3260Window=Block!0:Icon=Block!4:Character=Block!24
 3270CASE Window OF
 3280  WHEN SpyCalc:
 3290    CASE Character OF
 3300      WHEN &18F,&19F,&1AF,&1BF:REM Up
 3310        CASE Icon OF
 3320          WHEN 33:ToIcon=43
 3330          WHEN 35:ToIcon=33
 3340          WHEN 37:ToIcon=35
 3350          WHEN 43:ToIcon=37
 3360        ENDCASE
 3370        IF Icon=33 THEN
 3380          A$=FNReadIconStr(SpyCalc,33):IF A$="" THEN A$="&0":PROCUpdateIcon(SpyCalc,33,"&0")
 3390          PROCUpdateSwitches(EVAL(A$))
 3400          PROCUpdateOthers(EVAL(A$))
 3410        ENDIF
 3420        IF Icon=35 THEN
 3430          IF FNReadIconStr(SpyCalc,35)="" THEN PROCUpdateIcon(SpyCalc,35,"0")
 3440          IF FNReadIcon(SpyCalc,35)>15 THEN PROCUpdateIcon(SpyCalc,35,"15")
 3450        ENDIF
 3460        IF Icon=37 THEN
 3470          IF FNReadIconStr(SpyCalc,37)="" THEN PROCUpdateIcon(SpyCalc,37,"0")
 3480          IF FNReadIcon(SpyCalc,37)>31 THEN PROCUpdateIcon(SpyCalc,37,"31")
 3490        ENDIF
 3500        IF Icon=43 THEN
 3510          IF FNReadIconStr(SpyCalc,43)<>"" THEN FOR N=39 TO 41 STEP 2:PROCUpdateIcon(SpyCalc,N,""):PROCColourIcon(SpyCalc,N,1):NEXT:PROCUpdateSelectedFlag(SpyCalc,26,TRUE)
 3520          IF (FNReadIconStr(SpyCalc,43)="") AND (FNReadIconStr(SpyCalc,39)="") THEN
 3530            PROCUpdateIcon(SpyCalc,39,"7")
 3540            PROCColourIcon(SpyCalc,39,7)
 3550            PROCUpdateIcon(SpyCalc,41,"1")
 3560            PROCColourIcon(SpyCalc,41,1)
 3570            PROCUpdateSelectedFlag(SpyCalc,26,FALSE)
 3580          ENDIF
 3590          IF FNReadIcon(SpyCalc,43)>255 THEN PROCUpdateIcon(SpyCalc,43,"255")
 3600        ENDIF
 3610        SYS "Wimp_SetCaretPosition",SpyCalc,ToIcon,,,-1,-1
 3620        PROCUpdateIcon(SpyCalc,ToIcon,FNReadIconStr(SpyCalc,ToIcon))
 3630        PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
 3640      WHEN &18E,&19E,&1AE,&1BE,13:REM Down,Return
 3650        CASE Icon OF
 3660          WHEN 33:ToIcon=35:IF Character=13 THEN ToIcon=33:REM Don't move
 3670          WHEN 35:ToIcon=37
 3680          WHEN 37:ToIcon=43
 3690          WHEN 43:ToIcon=33
 3700        ENDCASE
 3710        IF Icon=33 THEN
 3720          A$=FNReadIconStr(SpyCalc,33):IF A$="" THEN A$="&0":PROCUpdateIcon(SpyCalc,33,"&0")
 3730          PROCUpdateSwitches(EVAL(A$))
 3740          PROCUpdateOthers(EVAL(A$))
 3750        ENDIF
 3760        IF Icon=35 THEN
 3770          IF FNReadIconStr(SpyCalc,35)="" THEN PROCUpdateIcon(SpyCalc,35,"0")
 3780          IF FNReadIcon(SpyCalc,35)>15 THEN PROCUpdateIcon(SpyCalc,35,"15")
 3790        ENDIF
 3800        IF Icon=37 THEN
 3810          IF FNReadIconStr(SpyCalc,37)="" THEN PROCUpdateIcon(SpyCalc,37,"0")
 3820          IF FNReadIcon(SpyCalc,37)>31 THEN PROCUpdateIcon(SpyCalc,37,"31")
 3830        ENDIF
 3840        IF Icon=43 THEN
 3850          IF FNReadIconStr(SpyCalc,43)<>"" THEN FOR N=39 TO 41 STEP 2:PROCUpdateIcon(SpyCalc,N,""):PROCColourIcon(SpyCalc,N,1):NEXT:PROCUpdateSelectedFlag(SpyCalc,26,TRUE)
 3860          IF (FNReadIconStr(SpyCalc,43)="") AND (FNReadIconStr(SpyCalc,39)="") THEN
 3870            PROCUpdateIcon(SpyCalc,39,"7")
 3880            PROCColourIcon(SpyCalc,39,7)
 3890            PROCUpdateIcon(SpyCalc,41,"1")
 3900            PROCColourIcon(SpyCalc,41,1)
 3910            PROCUpdateSelectedFlag(SpyCalc,26,FALSE)
 3920          ENDIF
 3930          IF FNReadIcon(SpyCalc,43)>255 THEN PROCUpdateIcon(SpyCalc,43,"255")
 3940        ENDIF
 3950        IF NOT((Character=13) AND (Icon=33)) THEN
 3960          SYS "Wimp_SetCaretPosition",SpyCalc,ToIcon,,,-1,-1
 3970          PROCUpdateIcon(SpyCalc,ToIcon,FNReadIconStr(SpyCalc,ToIcon))
 3980        ENDIF
 3990        PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
 4000    OTHERWISE
 4010      SYS "Wimp_ProcessKey",Character
 4020    ENDCASE
 4030  OTHERWISE
 4040    SYS "Wimp_ProcessKey",Character
 4050ENDCASE
 4060ENDPROC
 4070:
 4080DEF PROCDecodeMenu
 4090Sub0=Block!0:Sub1=Block!4:Sub2=Block!8
 4100CloseMenu=FALSE
 4110CASE M% OF
 4120  WHEN IBMenu:
 4130    CASE Sub0 OF
 4140      WHEN 0
 4150        SYS "Wimp_GetPointerInfo",,Block
 4160        SYS "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
 4170        CloseMenu=TRUE
 4180      WHEN 1
 4190        Done=TRUE
 4200    ENDCASE
 4210  WHEN MainMenu:
 4220    CASE Sub0 OF
 4230      WHEN 0
 4240        SYS "Wimp_GetPointerInfo",,Block
 4250        SYS "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
 4260        CloseMenu=TRUE
 4270      WHEN 1
 4280        Spying=NOT Spying:PROCTickMenu(MainMenu,1,Spying)
 4290        PROCClearSpyCalcWindow(Spying):OldWin=0
 4300        PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
 4310        SYS "Wimp_GetCaretPosition",,Block:IF (Block!0=SpyCalc) AND Spying THEN SYS "Wimp_SetCaretPosition",-1,-1
 4320      WHEN 2
 4330        SYS "Wimp_GetPointerInfo",,Block
 4340        SYS "Wimp_CreateMenu",,Loc,Block!0-24,Block!4+24
 4350        CloseMenu=TRUE
 4360      WHEN 3
 4370        IF NOT FNSaveSettings THEN ERROR 9999,"An error occurred whilst writing the settings file."
 4380    ENDCASE
 4390ENDCASE
 4400SYS "Wimp_GetPointerInfo",,Block
 4410IF ((Block!8 AND 1)=1) AND (NOT CloseMenu) THEN PROCMakeMenu
 4420ENDPROC
 4430:
 4440REM -------------------------------------------------------------------------
 4450REM Menu routines
 4460REM -------------------------------------------------------------------------
 4470:
 4480DEF PROCBuildMenus
 4490REM This procedure should only be visited once, since it contains DIMs.
 4500  :
 4510REM In the menu title strings below, if a "|" character is present it will be
 4520REM replaced by a space under RISC OS 3.1 (or greater), or will terminate the
 4530REM string under earlier versions of the wimp. This allows the new indirected
 4540REM menu titles to be used (which were introduced with RISC OS 3.1).
 4550  :
 4560IndirectMenuTextOffsetPointer=0
 4570REM This points to a pool to be used by all menus for their indirected text.
 4580  :
 4590M%=IBMenu
 4600Title$="Icon Flags":DIM IBMenuTitle LEN(Title$)+1:$IBMenuTitle=Title$+CHR$13
 4610PROCMenuInit(IBMenuTitle)
 4620PROCMenuItem("Info",0,Info)
 4630PROCMenuItem("Quit",128,-1)
 4640  :
 4650M%=MainMenu
 4660Title$="Icon Flags":DIM MainMenuTitle LEN(Title$)+2:$MainMenuTitle=Title$+CHR$13
 4670PROCMenuInit(MainMenuTitle)
 4680PROCMenuItem("Info",2,Info)
 4690PROCMenuItem("Spy on icons",0,-1)
 4700PROCMenuItem("Window position",2,Loc)
 4710PROCMenuItem("Save settings",128,-1)
 4720ENDPROC
 4730:
 4740DEF PROCMakeMenu
 4750IF MenuX<0 THEN MenuX=0
 4760IF MenuY<184 THEN MenuY=184:REM for icon bar
 4770SYS "Wimp_CreateMenu",,M%,MenuX-((36+M%!16)/2),MenuY
 4780ENDPROC
 4790:
 4800DEF PROCMenuInit(MenuTitle)
 4810IF wimp>=310 THEN
 4820  A=INSTR($MenuTitle,"|"):IF A<>0 THEN ?(MenuTitle+(A-1))=32
 4830  MenuMax=LEN($MenuTitle)
 4840  M%!0=MenuTitle
 4850ELSE
 4860  A=INSTR($MenuTitle,"|"):IF A<>0 THEN ?(MenuTitle+(A-1))=13
 4870  MenuMax=LEN(LEFT$($MenuTitle,12))
 4880  $M%=LEFT$($MenuTitle,12)
 4890ENDIF
 4900M%?12=7:M%?13=2:M%?14=11:M%?15=0
 4910M%!16=MenuMax*16
 4920M%!20=44:M%!24=0
 4930P%=M%+28
 4940ENDPROC
 4950:
 4960DEF PROCMenuItem(Text$,Flags,Link)
 4970REM Flags: 1-ticked, 2-dashed line, 4-writeable, 8-message, 128-last item
 4980REM Link: menu or window handle for sub-pointer
 4990P%!0=Flags:P%!4=Link
 5000IF LEN(Text$)<=12 THEN
 5010  P%!8=&07003021:REM Not indirected
 5020  $(P%+12)=Text$
 5030ELSE
 5040  P%!8=&07003121:REM Indirected
 5050  P%!12=IndirectMenuText+IndirectMenuTextOffsetPointer
 5060  P%!16=0:P%!20=0
 5070  $(IndirectMenuText+IndirectMenuTextOffsetPointer)=Text$+CHR$13
 5080  IndirectMenuTextOffsetPointer+=LEN(Text$)+1
 5090  IF IndirectMenuTextOffsetPointer>IndMenuMax THEN ERROR 0,"The indirect menu text buffer has overflowed. Please allocate more space."
 5100ENDIF
 5110P%+=24
 5120IF MenuMax<LEN(Text$) THEN MenuMax=LEN(Text$):M%!16=(MenuMax+1)*16
 5130IF (Flags=128) AND (wimp>=310) THEN M%!28=(((M%!28) AND NOT 256) EOR 256)
 5140  REM Indirected menu titles for RISC OS 3.1 upwards.
 5150ENDPROC
 5160:
 5170REM -------------------------------------------------------------------------
 5180REM Responses to incoming wimp messages
 5190REM -------------------------------------------------------------------------
 5200:
 5210DEF PROCSaveDesktop(File)
 5220LOCAL ERROR
 5230ON ERROR LOCAL Block!12=Block!8:SYS "Wimp_SendMessage",19,Block,Block!4:RESTORE ERROR:ENDPROC
 5240REM The above line acknowledges the message if an error occurs, thereby
 5250REM aborting the desktop save.
 5260BPUT#File,"Run "+OurPathName$+OurFileName$
 5270ENDPROC
 5280:
 5290DEF PROCHelp
 5300Block!12=Block!8:Block!16=&503:HelpInfo=Block+20
 5310  :
 5320REM Block!32 gives window, Block!36 gives icon
 5330  :
 5340CASE Block!32 OF
 5350  WHEN -2:PROCSend("This is the Icon Flags icon.")
 5360          PROCSend("Click MENU for information or to quit.")
 5370          PROCSend("Click SELECT to open the Icon Flags window.")
 5380  WHEN SpyCalc:
 5390    CASE Block!36 OF
 5400      WHEN 0,1,2,3,4,5:PROCSend("This area shows the window and icon handles under the pointer.")
 5410      WHEN 6,7,8,9,10,11:PROCSend("This area shows the minimum coordinates of the icon under the pointer.")
 5420      WHEN 12,13,14,15,16,17:PROCSend("This area shows the maximum coordinates of the icon under the pointer.")
 5430      WHEN 18,19:IF Spying THEN
 5440                   PROCSend("This area shows the individual flags for the icon under the pointer.")
 5450                 ELSE
 5460                   PROCSend("Click the switches in this area to work out the icon flags, or enter a value in the box and press RETURN to find out what it means.")
 5470                 ENDIF
 5480      WHEN 20:PROCSend("This switch is selected if the icon contains text.")
 5490      WHEN 21:PROCSend("This switch is selected if the icon contains a sprite.")
 5500      WHEN 22:PROCSend("This switch is selected if the icon has a border.")
 5510      WHEN 23:PROCSend("This switch is selected if the icon is horizontally centred.")
 5520      WHEN 24:PROCSend("This switch is selected if the icon is vertically centred.")
 5530      WHEN 25:PROCSend("This switch is selected if the icon has a filled background.")
 5540      WHEN 26:PROCSend("This switch is selected if the icon contains anti-aliased text drawn by the font manager.")
 5550      WHEN 27:PROCSend("This switch is selected if the icon must clear its background when it is being updated.")
 5560      WHEN 28:PROCSend("This switch is selected if the icon's contents are indirected.")
 5570      WHEN 29:PROCSend("This switch is selected if the icon is right-justified.")
 5580      WHEN 30:PROCSend("This switch is selected if the icon allows the ADJUST button to make multiple selections in the same ESG.")
 5590      WHEN 31:PROCSend("This switch is selected if the icon displays its sprite at half-size.")
 5600      WHEN 32:PROCSend("This switch is selected if the icon is selected.")
 5610      WHEN 33:PROCSend("This shows the icon flags in hexadecimal.")
 5620              IF NOT Spying THEN PROCSend("Enter a value here and press RETURN to find out what it means.")
 5630              IF NOT Spying THEN PROCSend("You can drag this figure out to another application or to a directory display.")
 5640      WHEN 34:PROCSend("This shows the button type of the icon.")
 5650      WHEN 35:PROCSend("This shows the button type of the icon.")
 5660              IF NOT Spying THEN PROCSend("Enter a new value to update the flags.")
 5670      WHEN 36:PROCSend("This shows the exclusive selection group of the icon.")
 5680      WHEN 37:PROCSend("This shows the exclusive selection group of the icon.")
 5690              IF NOT Spying THEN PROCSend("Enter a new value to update the flags.")
 5700      WHEN 38:PROCSend("This shows the icon's foreground colour, if it has one.")
 5710      WHEN 39:PROCSend("This shows the icon's foreground colour, if it has one.")
 5720              IF NOT Spying THEN PROCSend("Click SELECT or ADJUST to cycle forwards or backwards through the colours.")
 5730      WHEN 40:PROCSend("This shows the icon's background colour, if it has one.")
 5740      WHEN 41:PROCSend("This shows the icon's background colour, if it has one.")
 5750              IF NOT Spying THEN PROCSend("Click SELECT or ADJUST to cycle forwards or backwards through the colours.")
 5760      WHEN 42:PROCSend("If the icon uses a font, this shows the font handle.")
 5770      WHEN 43:PROCSend("If the icon uses a font, this shows the font handle.")
 5780              IF NOT Spying THEN PROCSend("Enter a new value to update the flags.")
 5790      OTHERWISE PROCSend("This is the Icon Flags main window.")
 5800                PROCSend("You can spy on icons or calculate icon flags.")
 5810    ENDCASE
 5820  WHEN Info:PROCSend("This window displays information about Icon Flags.")
 5830            PROCSend("Icon Flags is a member of the OmniDesk Suite of desktop utilities.")
 5840  WHEN Loc:
 5850   CASE TRUE OF
 5860     WHEN ((Block!36)<6):PROCSend("This window lets you snap the magnifier window to an invisble screen grid.")
 5870                         PROCSend("The second position up puts the window just above the icon-bar, and is therefore not evenly spaced with the other rows.")
 5880     OTHERWISE PROCSend("Click SELECT on the position you want the window to snap to, or ADJUST on the window icon to turn the snapping off.")
 5890               PROCSend("If snapping is on, the window will open at the appropriate position when you change mode.")
 5900   ENDCASE
 5910OTHERWISE
 5920  IF wimp>=217 THEN
 5930    MenuHelp!0=-1:MenuHelp!4=-1:MenuHelp!8=-1
 5940    SYS "Wimp_GetMenuState",1,MenuHelp,Block!32,Block!36
 5950    CASE M% OF
 5960      WHEN IBMenu:
 5970        IF MenuHelp!4=-1 THEN
 5980          CASE MenuHelp!0 OF
 5990            WHEN 0:PROCSend("Move the pointer right to see information about Icon Flags.")
 6000            WHEN 1:PROCSend("Click SELECT to quit Icon Flags.")
 6010            OTHERWISE PROCSend("This is the Icon Flags icon-bar menu.")
 6020          ENDCASE
 6030        ENDIF
 6040      WHEN MainMenu:
 6050        Direction$="right":IF wimp>=310 AND CHR$(MainMenuTitle?0)="\" THEN Direction$="left"
 6060        CASE MenuHelp!0 OF
 6070          WHEN 0:PROCSend("Move the pointer "+Direction$+" to see information about Icon Flags.")
 6080          WHEN 1:IF Spying THEN
 6090                   PROCSend("Click SELECT or ADJUST to stop spying and work out icon flags.")
 6100                 ELSE
 6110                   PROCSend("Click SELECT or ADJUST to spy on icons you point to with the mouse pointer.")
 6120                 ENDIF
 6130          WHEN 2:PROCSend("Move the pointer "+Direction$+" to set the position of the Icon Flags window on the screen.")
 6140          WHEN 3:PROCSend("Click SELECT or ADJUST to save the Icon Flags window position and spying status.")
 6150          OTHERWISE PROCSend("This is the Icon Flags main menu.")
 6160        ENDCASE
 6170    ENDCASE
 6180  ENDIF
 6190ENDCASE
 6200  :
 6210?HelpInfo=0
 6220Block!0=(HelpInfo+4-Block) AND NOT 3
 6230SYS "Wimp_SendMessage",17,Block,Block!4
 6240ENDPROC
 6250:
 6260DEF FNOmniHelpMessage(A$)
 6270IF A$="CLICK" THEN =LEFT$("open the Icon Flags window.",76)+CHR$13
 6280IF A$="DRAG" THEN =LEFT$("",76)+CHR$13
 6290=""
 6300:
 6310DEF PROCSend(Text$)
 6320$HelpInfo=Text$+"|M"
 6330HelpInfo+=LEN(Text$)+2
 6340ENDPROC
 6350:
 6360DEF PROCOmniDeskCalling
 6370IF OmniDesk=0 THEN ENDPROC
 6380REM This first line is for if a broadcast message is received which was
 6390REM intended for a transient copy of the utility. A stand-alone
 6400REM instantiation of the utility should ignore such messages.
 6410CASE Block!20 OF
 6420  WHEN 4:PROCOpen(SpyCalc,TRUE,XPosition,YPosition)
 6430ENDCASE
 6440ENDPROC
 6450:
 6460DEF PROCModeChange
 6470DoModeChange=TRUE
 6480IF OmniDesk=0 THEN PROCUpdateIconForMode("!IconFlags",-2,IconBar)
 6490ENDPROC
 6500:
 6510REM -------------------------------------------------------------------------
 6520REM General non-specific useful routines (mostly wimp)
 6530REM -------------------------------------------------------------------------
 6540:
 6550DEF PROCUpdateIcon(Wndw,Icn,Txt$)
 6560Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 6570IF LEN(Txt$)>(Block!36)-1 THEN
 6580  IF ((Block!24) AND (1<<9))=(1<<9) THEN
 6590    REM Right-justified
 6600    Txt$="�"+RIGHT$(Txt$,(Block!36)-2)
 6610  ELSE
 6620    REM Left-justified or centred
 6630    Txt$=LEFT$(Txt$,(Block!36)-1):RIGHT$(Txt$)="�"
 6640  ENDIF
 6650ENDIF
 6660REM ^ Ensures the text can't overflow the maximum space in the icon.
 6670IF $(Block!28)<>Txt$ THEN
 6680  $(Block!28)=Txt$:Block!8=0:Block!12=0
 6690  SYS "Wimp_SetIconState",,Block
 6700ENDIF
 6710SYS "Wimp_GetCaretPosition",,Block
 6720IF Block!0=Wndw AND Block!4=Icn THEN
 6730  REM If this icon owns the caret, then put it at the end.
 6740  SYS "Wimp_SetCaretPosition",Wndw,Icn,0,0,-1,LEN(Txt$)
 6750ENDIF
 6760ENDPROC
 6770:
 6780DEF PROCUpdateIconColour(Wndw,Icn,FCol,BCol)
 6790REM Change an icon's colours
 6800Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 6810IF (((Block?27)>>4)=BCol) AND (((Block?27) MOD 16)=FCol) THEN ENDPROC
 6820  REM ^ Same colour, so don't change.
 6830Block!12=(%11111111<<24):Block!8=(BCol<<28)+(FCol<<24)
 6840SYS "Wimp_SetIconState",,Block
 6850ENDPROC
 6860:
 6870DEF PROCUpdateSelectedFlag(Wndw,Icn,State)
 6880REM Use State=TRUE to make icon become selected
 6890Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 6900IF ((Block!24) AND (1<<21))=((-State)<<21) THEN ENDPROC
 6910Block!12=(1<<21):IF State THEN Block!8=(1<<21) ELSE Block!8=(0<<21)
 6920SYS "Wimp_SetIconState",,Block
 6930ENDPROC
 6940:
 6950DEF PROCUpdateShadedFlag(Wndw,Icn,State)
 6960REM Use State=TRUE to make icon become shaded
 6970Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 6980IF ((Block!24) AND (1<<22))=((-State)<<22) THEN ENDPROC
 6990Block!12=(1<<22):IF State THEN Block!8=(1<<22) ELSE Block!8=(0<<22)
 7000SYS "Wimp_SetIconState",,Block
 7010ENDPROC
 7020:
 7030DEF FNSelectedState(Wndw,Icn)
 7040Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 7050IF ((Block!24) AND (1<<21))=(1<<21) THEN =TRUE
 7060=FALSE
 7070:
 7080DEF FNShadedState(Wndw,Icn)
 7090Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 7100IF ((Block!24) AND (1<<22))=(1<<22) THEN =TRUE
 7110=FALSE
 7120:
 7130DEF FNOpenState(Wndw)
 7140REM Returns TRUE if window is open; false otherwise
 7150Block!0=Wndw:SYS "Wimp_GetWindowState",,Block
 7160IF ((Block!32) AND (1<<16))=(1<<16) THEN =TRUE
 7170=FALSE
 7180:
 7190DEF PROCShadeMenu(Menu,Item,State)
 7200!(Menu+28+(24*Item)+8)=(!(Menu+28+(24*Item)+8) AND NOT (1<<22)) EOR ((-State)<<22)
 7210ENDPROC
 7220:
 7230DEF PROCTickMenu(Menu,Item,State)
 7240!(Menu+28+(24*Item))=(!(Menu+28+(24*Item)) AND NOT 1) EOR (-State)
 7250ENDPROC
 7260:
 7270DEF FNMenuShaded(Menu,Item)
 7280IF (!(Menu+28+(24*Item)+8) AND (1<<22))=(1<<22) THEN =TRUE
 7290=FALSE
 7300:
 7310DEF FNMenuTicked(Menu,Item)
 7320IF (!(Menu+28+(24*Item)) AND 1)=1 THEN =TRUE
 7330=FALSE
 7340:
 7350DEF FNReadIcon(Wndw,Icn)
 7360REM Read numeric value of icon
 7370Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 7380=VAL($(Block!28))
 7390:
 7400DEF FNReadIconStr(Wndw,Icn)
 7410REM Read string value of icon
 7420Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 7430=$(Block!28)
 7440:
 7450DEF FNModeInfo(var$,mode)
 7460REM Use mode=-1 for current screen mode
 7470CASE var$ OF
 7480  WHEN "XPixels":SYS "OS_ReadModeVariable",mode,11 TO ,,var
 7490  WHEN "YPixels":SYS "OS_ReadModeVariable",mode,12 TO ,,var
 7500  WHEN "NCol":SYS "OS_ReadModeVariable",mode,3 TO ,,var
 7510  WHEN "XEigFactor":SYS "OS_ReadModeVariable",mode,4 TO ,,var
 7520  WHEN "YEigFactor":SYS "OS_ReadModeVariable",mode,5 TO ,,var
 7530  WHEN "BPP":SYS "OS_ReadModeVariable",mode,9 TO ,,var:var=2^var
 7540  OTHERWISE var=-1:REM Fall-through for a faulty input value
 7550ENDCASE
 7560=var
 7570:
 7580DEF PROCUpdateIconForMode(Appname$,Wndw,Icn)
 7590REM This procedure requires that ALL the icon sprites are defined in mode 20
 7600REM or mode 27 (which is equivalent) with a mask but no palette. They should
 7610REM still appear to have the expected resolutions and number of colours, i.e
 7620REM !Sprites23: two colours, high resolution, !Sprites (actually !Sprites24)
 7630REM at mode 12 resolution (double height pixels) in 16 colours, and normal
 7640REM mode 20 resolution, 16 colours for the !Sprites22 icon. If this is not
 7650REM adhered to, then memory shortage errors may occur on a mode change.
 7660Extension$="24"
 7670IF FNModeInfo("YEigFactor",-1)<2 THEN
 7680  IF FNModeInfo("NCol",-1)>2 THEN
 7690    Extension$="22"
 7700  ELSE
 7710    Extension$="23"
 7720  ENDIF
 7730ENDIF
 7740SYS "Wimp_BaseOfSprites" TO ,iconsprite%
 7750SYS "OS_SpriteOp",256+25,iconsprite%,Appname$:REM Delete icon sprite
 7760REM The following three lines assume a mask but no palette:
 7770SYS "OS_SpriteOp",256+40,Sprites,Appname$+Extension$ TO ,,,w,h,,mode:REM Get info about new sprite
 7780SYS "OS_SpriteOp",256+15,iconsprite%,Appname$,0,w,h,mode:REM Create replacement icon sprite
 7790SYS "OS_SpriteOp",256+29,iconsprite%,Appname$:REM Create mask
 7800  :
 7810REM Paint sprite mask into iconsprite mask:
 7820SYS "OS_SpriteOp",256+61,iconsprite%,Appname$,0 TO r0,r1,r2,r3:REM Output to mask
 7830SYS "OS_SpriteOp",256+49,Sprites,Appname$+Extension$,0,0:REM Paint mask from Sprites
 7840GCOL 4,128:CLG:REM Invert to make mask the right way round
 7850SYS "OS_SpriteOp",r0,r1,r2,r3:REM Reset screen output
 7860  :
 7870REM Paint sprite into iconsprite:
 7880SYS "OS_SpriteOp",256+60,iconsprite%,Appname$,0 TO r0,r1,r2,r3:REM Output to new icon sprite
 7890SYS "OS_SpriteOp",256+34,Sprites,Appname$+Extension$,0,0,8:REM Paint copy from Sprites
 7900SYS "OS_SpriteOp",r0,r1,r2,r3:REM Reset screen output
 7910Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
 7920Block!8=0:Block!12=0:SYS "Wimp_SetIconState",,Block:REM Re-plot icon
 7930ENDPROC
 7940:
 7950DEF FNCreateWindow(minX,minY,maxX,maxY,Xoffset,Yoffset,Handle,Flags,TitleCol,TitleBackCol,WorkCol,WorkBackCol,ScrollCol,SliderCol,InputCol,WminX,WminY,WmaxX,WmaxY,TitleFlags,Wbutton,SpritePoint,MinW,MinH,TitleData$)
 7960Block!0=minX:Block!4=minY:Block!8=maxX:Block!12=maxY:Block!16=Xoffset:Block!20=Yoffset
 7970Block!24=Handle:Block!28=Flags
 7980Block?32=TitleCol:Block?33=TitleBackCol:Block?34=WorkCol:Block?35=WorkBackCol
 7990Block?36=ScrollCol:Block?37=SliderCol:Block?38=InputCol:Block?39=0
 8000Block!40=WminX:Block!44=WminY:Block!48=WmaxX:Block!52=WmaxY
 8010Block!56=TitleFlags:Block!60=Wbutton:Block!64=SpritePoint
 8020Block!68=(MinH<<15)+MinW :::::::::::: REM 0,0 sets the minimum window with to the title width
 8030$(Block+72)=TitleData$:Block!84=0 ::: REM No icons initially
 8040SYS "Wimp_CreateWindow",,Block TO WindowHandle
 8050=WindowHandle
 8060:
 8070DEF FNCreateIcon(WindowHandle,minX,minY,maxX,maxY,Flags,IconData)
 8080Block!0=WindowHandle
 8090Block!4=minX:Block!8=minY:Block!12=maxX:Block!16=maxY:Block!20=Flags
 8100Block!24=IconData!0:Block!28=IconData!4:Block!32=IconData!8
 8110SYS "Wimp_CreateIcon",,Block TO IconHandle
 8120=IconHandle
 8130:
 8140DEF PROCInitialise
 8150AppSize=HIMEM-&8000:MinSize=AppSize:SlotEnd=HIMEM
 8160ENDPROC
 8170:
 8180DEF FNAllocateMemory(Required)
 8190SlotSize=FNSlotSize(-1)
 8200IF SlotSize<Required THEN NewSize=FNSlotSize(Required):IF NewSize<Required THEN SlotSize=FNSlotSize(AppSize):=0:REM Returns, indicating memory not claimed
 8210IF SlotSize>Required THEN SlotSize=FNSlotSize(Required)
 8220=SlotSize:REM Returns with bytes claimed
 8230:
 8240DEF FNSlotSize(Bytes)
 8250SYS "Wimp_SlotSize",Bytes,-1 TO Bytes
 8260=Bytes
 8270:
 8280DEF PROCMinimiseWimpSlot
 8290dummy=FNAllocateMemory(MinSize)
 8300ENDPROC
 8310:
 8320DEF PROCCloseFileIfPoss(FileHandle)
 8330LOCAL ERROR
 8340ON ERROR LOCAL RESTORE ERROR:ENDPROC:REM Unable to close file
 8350CLOSE#FileHandle
 8360ENDPROC
 8370:
 8380DEF FNFindFileSize(FileName$)
 8390IF FileName$="<Wimp$Scrap>" THEN
 8400  SYS "OS_File",15,FileName$,,,FileName$ TO ,,,,FileSize
 8410ELSE
 8420  N=-1:REPEAT:N+=1:UNTIL MID$(FileName$,LEN(FileName$)-N,1)="."
 8430  PathName$=LEFT$(FileName$,LEN(FileName$)-N):LeafName$=RIGHT$(FileName$,N)
 8440  SYS "OS_File",13,LeafName$,,,PathName$ TO ,,,,FileSize
 8450ENDIF
 8460=FileSize
 8470:
 8480DEF FNNextEntry
 8490REM Gets next entry (created by BPUT#Data,A$) from a file as a string.
 8500REM Use as A$=FNNextEntry.
 8510LOCAL ERROR
 8520ON ERROR LOCAL RESTORE ERROR:="":REM Error reading file
 8530NE$=GET$#Data
 8540WHILE LEFT$(NE$,1)="|"
 8550  NE$=GET$#Data
 8560ENDWHILE
 8570=NE$
 8580:
 8590DEF PROCDragBox(WindowHandle,IconHandle,DragType,SpriteArea,SpriteName$)
 8600Block!0=WindowHandle:SYS "Wimp_GetWindowState",,Block
 8610wminx=Block!4:wmaxy=Block!16
 8620Block!0=WindowHandle:Block!4=IconHandle:SYS "Wimp_GetIconState",,Block
 8630iminx=Block!8:iminy=Block!12:imaxx=Block!16:imaxy=Block!20
 8640Block!0=WindowHandle:Block!4=DragType
 8650Block!8=(wminx+iminx)
 8660Block!12=(wmaxy+iminy)
 8670Block!16=(wminx+imaxx)
 8680Block!20=(wmaxy+imaxy)
 8690Block!24=1:Block!28=1
 8700Block!32=(FNModeInfo("Xpixels",-1)+1)*(2^FNModeInfo("XEigFactor",-1))
 8710Block!36=(FNModeInfo("Ypixels",-1)+1)*(2^FNModeInfo("YEigFactor",-1))
 8720IF DragASprite THEN
 8730  SYS "DragASprite_Start",%10000101,SpriteArea,SpriteName$,Block+8
 8740ELSE
 8750  SYS "Wimp_DragBox",,Block
 8760ENDIF
 8770ENDPROC
 8780:
 8790REM -------------------------------------------------------------------------
 8800REM Routines common to the OmniDesk utilities
 8810REM -------------------------------------------------------------------------
 8820:
 8830DEF PROCDeclareToOmniDesk
 8840Block!0=208:Block!12=0:Block!16=UtilDeclare
 8850Block!20=Task
 8860$(Block+24)=Taskname$
 8870$(Block+44)=OurFileName$
 8880$(Block+55)=FNOmniHelpMessage("CLICK")
 8890$(Block+132)=FNOmniHelpMessage("DRAG")
 8900SYS "Wimp_SendMessage",17,Block,OmniDesk
 8910ENDPROC
 8920:
 8930DEF PROCSayGoodbye
 8940IF OmniDesk<>0 THEN
 8950  Block!0=24:Block!12=0:Block!16=UtilQuitting
 8960  Block!20=Task
 8970  SYS "Wimp_SendMessage",17,Block,OmniDesk
 8980ENDIF
 8990SYS "Interface_CloseDown",Task
 9000SYS "Wimp_CloseDown",Task,&4B534154
 9010ENDPROC
 9020:
 9030DEF FNReadStartupString
 9040REM Returns task handle of OmniDesk (which is passed in the command string)
 9050REM or 0 if not started by OmniDesk.
 9060SYS "OS_GetEnv" TO Command$
 9070A=INSTR(Command$,"-Startup")
 9080IF A<>0 THEN Startup=TRUE
 9090A=INSTR(Command$,"-Exit")
 9100IF A<>0 THEN Exit=TRUE
 9110A=INSTR(Command$,"-OmniDesk")
 9120IF A=0 THEN =0
 9130=VAL(MID$(Command$,A+9))
 9140:
 9150DEF FNReadWindowLocation(Axis$)
 9160REM Reads which radio icon (if any) is selected in the Window Position
 9170REM selector window and returns the axis coordinate (two calls needed)
 9180REM or -1 for no position selected.
 9190Icon=5:REPEAT:Icon+=1:UNTIL (FNSelectedState(Loc,Icon)=TRUE) OR (Icon=31)
 9200IF Icon=31 THEN =-1:REM All icons deselected
 9210Location=-1:Icon-=6:REM Bring icon into range 0-14
 9220CASE Axis$ OF
 9230  WHEN "X","x":Location=Icon DIV 5
 9240  WHEN "Y","y":Location=4-(Icon MOD 5)
 9250ENDCASE
 9260=Location
 9270:
 9280DEF PROCCleanUpLocWindow
 9290REM Makes sure that none of the 'window' icons in the Loc window is selected.
 9300N=5:REPEAT
 9310N+=1:UNTIL N=30 OR FNSelectedState(Loc,N)
 9320PROCUpdateSelectedFlag(Loc,N,FALSE)
 9330ENDPROC
 9340:
 9350REM -------------------------------------------------------------------------
 9360REM Special routines for this program only
 9370REM -------------------------------------------------------------------------
 9380:
 9390DEF PROCClearSpyCalcWindow(Spy)
 9400RESTORE +1
 9410DATA 4,5,10,11,16,17,35,37,39,41,43
 9420FOR N=1 TO 11
 9430  READ Icon:PROCUpdateIcon(SpyCalc,Icon,"")
 9440NEXT
 9450IF NOT Spy THEN
 9460  PROCUpdateIcon(SpyCalc,39,"7")
 9470  PROCColourIcon(SpyCalc,39,7)
 9480  PROCUpdateIcon(SpyCalc,41,"1")
 9490  PROCColourIcon(SpyCalc,41,1)
 9500  PROCUpdateIcon(SpyCalc,35,"0")
 9510  PROCUpdateIcon(SpyCalc,37,"0")
 9520ELSE
 9530  PROCColourIcon(SpyCalc,39,1)
 9540  PROCColourIcon(SpyCalc,41,1)
 9550ENDIF
 9560FOR N=20 TO 32
 9570  Block!0=SpyCalc:Block!4=N:SYS "Wimp_GetIconState",,Block
 9580  Block!8=(0<<21):Block!12=(1<<21)
 9590  IF Spy THEN Block!8+=(0<<12):ELSE Block!8+=(11<<12)
 9600  Block!12+=(255<<12)
 9610  SYS "Wimp_SetIconState",,Block
 9620NEXT
 9630PROCUpdateIcon(SpyCalc,33,"&17000000")
 9640FOR N=33 TO 43 STEP 2
 9650  Block!0=SpyCalc:Block!4=N:SYS "Wimp_GetIconState",,Block
 9660  IF Spy THEN
 9670    Block!8=(0<<12)
 9680  ELSE
 9690    IF (N=39) OR (N=41) THEN
 9700      Block!8=(2<<12)
 9710    ELSE
 9720      Block!8=(15<<12)
 9730      IF N=33 THEN Block!8=(14<<12)
 9740    ENDIF
 9750  ENDIF
 9760  Block!12=(255<<12)
 9770  SYS "Wimp_SetIconState",,Block
 9780NEXT
 9790ENDPROC
 9800:
 9810DEF PROCDoSpy(RETURN OldWin,RETURN OldIc)
 9820SYS "Wimp_GetPointerInfo",,Block
 9830Win=Block!12:Ic=Block!16
 9840IF Win=-1 THEN PROCUpdateIcon(SpyCalc,4,"") ELSE PROCUpdateIcon(SpyCalc,4,STR$(Win))
 9850IF Ic=-1 THEN PROCUpdateIcon(SpyCalc,5,"") ELSE PROCUpdateIcon(SpyCalc,5,STR$(Ic))
 9860IF (Win=OldWin) AND (Ic=OldIc) THEN ENDPROC
 9870REM ^ Don't update the rest because it's the same.
 9880OldWin=Win:OldIc=Ic
 9890IF ((Win>0) OR ((Win=-2) AND (wimp>=300))) AND (Ic>=0) THEN
 9900  ISpyBlock!0=Win:ISpyBlock!4=Ic:SYS "Wimp_GetIconState",,ISpyBlock
 9910  minX=ISpyBlock!8:minY=ISpyBlock!12
 9920  maxX=ISpyBlock!16:maxY=ISpyBlock!20
 9930  PROCUpdateIcon(SpyCalc,10,STR$(minX)):PROCUpdateIcon(SpyCalc,11,STR$(minY))
 9940  PROCUpdateIcon(SpyCalc,16,STR$(maxX)):PROCUpdateIcon(SpyCalc,17,STR$(maxY))
 9950  PROCUpdateIcon(SpyCalc,35,STR$((ISpyBlock?25)>>4)):REM Button type
 9960  PROCUpdateIcon(SpyCalc,37,STR$((ISpyBlock?26) MOD 32)):REM ESG
 9970  IF ((ISpyBlock!24) AND (1<<6))=(1<<6) THEN
 9980    REM Fonts used
 9990    PROCUpdateIcon(SpyCalc,39,""):REM F col
10000    PROCColourIcon(SpyCalc,39,1)
10010    PROCUpdateIcon(SpyCalc,41,""):REM B col
10020    PROCColourIcon(SpyCalc,41,1)
10030    PROCUpdateIcon(SpyCalc,43,STR$(ISpyBlock?27)):REM Font
10040  ELSE
10050    REM No fonts: normal colours
10060    Fcol=(ISpyBlock?27) MOD 16:Bcol=(ISpyBlock?27)>>4
10070    PROCUpdateIcon(SpyCalc,39,STR$(Fcol)):REM F col
10080    PROCColourIcon(SpyCalc,39,Fcol)
10090    PROCUpdateIcon(SpyCalc,41,STR$(Bcol)):REM B col
10100    PROCColourIcon(SpyCalc,41,Bcol)
10110    PROCUpdateIcon(SpyCalc,43,""):REM Font
10120  ENDIF
10130  PROCUpdateSwitches(ISpyBlock!24)
10140  PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
10150ELSE
10160  RESTORE +1
10170  DATA 10,11,16,17,35,37,39,41,43
10180  FOR N=1 TO 9
10190    READ Icon:PROCUpdateIcon(SpyCalc,Icon,"")
10200  NEXT
10210  FOR N=20 TO 32
10220    PROCUpdateSelectedFlag(SpyCalc,N,FALSE)
10230  NEXT
10240  PROCColourIcon(SpyCalc,39,1)
10250  PROCColourIcon(SpyCalc,41,1)
10260  PROCUpdateIcon(SpyCalc,33,"&"+STR$~FNIconFlags)
10270ENDIF
10280ENDPROC
10290:
10300DEF PROCUpdateSwitches(IconFlags)
10310FOR N=20 TO 31
10320  PROCUpdateSelectedFlag(SpyCalc,N,(IconFlags AND (1<<(N-20)))=(1<<(N-20)))
10330NEXT
10340PROCUpdateSelectedFlag(SpyCalc,32,(IconFlags AND (1<<21))=(1<<21))
10350ENDPROC
10360:
10370DEF PROCUpdateOthers(IconFlags)
10380PROCUpdateIcon(SpyCalc,35,STR$((IconFlags>>>12) MOD 16)):REM Button type
10390PROCUpdateIcon(SpyCalc,37,STR$((IconFlags>>>16) MOD 32)):REM ESG
10400IF (IconFlags AND (1<<6))=(1<<6) THEN
10410  REM Fonts used
10420  PROCUpdateIcon(SpyCalc,39,""):REM F col
10430  PROCColourIcon(SpyCalc,39,1)
10440  PROCUpdateIcon(SpyCalc,41,""):REM B col
10450  PROCColourIcon(SpyCalc,41,1)
10460  PROCUpdateIcon(SpyCalc,43,STR$((IconFlags>>>24) MOD 256)):REM Font
10470ELSE
10480  REM No fonts: normal colours
10490  Fcol=(IconFlags>>>24) MOD 16:Bcol=(IconFlags>>>28) MOD 16
10500  PROCUpdateIcon(SpyCalc,39,STR$(Fcol)):REM F col
10510  PROCColourIcon(SpyCalc,39,Fcol)
10520  PROCUpdateIcon(SpyCalc,41,STR$(Bcol)):REM B col
10530  PROCColourIcon(SpyCalc,41,Bcol)
10540  PROCUpdateIcon(SpyCalc,43,""):REM Font
10550ENDIF
10560ENDPROC
10570:
10580DEF FNIconFlags
10590IconFlags=0
10600FOR N=20 TO 31
10610  IF FNSelectedState(SpyCalc,N) THEN IconFlags+=(1<<(N-20))
10620NEXT
10630IF FNSelectedState(SpyCalc,32) THEN IconFlags+=(1<<21)
10640IconFlags+=(FNReadIcon(SpyCalc,35)<<12):REM Button type
10650IconFlags+=(FNReadIcon(SpyCalc,37)<<16):REM ESG
10660IF FNReadIconStr(SpyCalc,43)<>"" THEN
10670  IconFlags+=(FNReadIcon(SpyCalc,43)<<24)
10680ELSE
10690  IconFlags+=(FNReadIcon(SpyCalc,39)<<24)
10700  IconFlags+=(FNReadIcon(SpyCalc,41)<<28)
10710ENDIF
10720=IconFlags
10730:
10740DEF PROCColourIcon(Wndw,Icn,Col)
10750REM Change background of an icon.
10760Block!0=Wndw:Block!4=Icn:SYS "Wimp_GetIconState",,Block
10770IF ((Block?27)>>4)=Col THEN ENDPROC:REM Same colour, so don't change.
10780Block!12=(%11111111<<24):Block!8=(Col<<28)
10790REM Change foreground to black/white according to background:
10800CASE Col OF
10810  WHEN 4,5,6,7,11,13:Block!8+=(0<<24)
10820  WHEN 8:Block?11=%10000001
10830  OTHERWISE Block!8+=(7<<24)
10840ENDCASE
10850SYS "Wimp_SetIconState",,Block
10860ENDPROC
10870:
10880DEF FNSaveSettings
10890LOCAL ERROR
10900ON ERROR LOCAL RESTORE ERROR:PROCCloseFileIfPoss(Data):=FALSE:REM Error writing file
10910  :
10920  Data=OPENOUT ("<IconFlags$Dir>.Settings")
10930  BPUT#Data,"| X and Y grid coordinates of Icon Flags window:"
10940  BPUT#Data,STR$(XPosition)
10950  BPUT#Data,STR$(YPosition)
10960  BPUT#Data,"| Spying at startup (-1 for TRUE; 0 for FALSE):"
10970  BPUT#Data,STR$(Spying)
10980  CLOSE#Data
10990  OSCLI("Settype <IconFlags$Dir>.Settings Text")
11000  :
11010=TRUE
11020:
11030DEF FNLoadSettings
11040LOCAL ERROR
11050ON ERROR LOCAL RESTORE ERROR:PROCCloseFileIfPoss(Data):=FALSE:REM 'Settings' file is damaged or missing
11060  :
11070  Data=OPENIN "<IconFlags$Dir>.Settings"
11080  XPosition=VAL(FNNextEntry)
11090  YPosition=VAL(FNNextEntry)
11100  Spying=VAL(FNNextEntry)
11110  CLOSE#Data
11120  :
11130  IF XPosition<>-1 AND YPosition<>-1 THEN PROCUpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),TRUE)
11140  PROCTickMenu(MainMenu,1,Spying)
11150  :
11160=TRUE
11170:
11180DEF PROCDefaultSettings
11190XPosition=4:YPosition=2
11200PROCUpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),TRUE)
11210Spying=TRUE
11220PROCTickMenu(MainMenu,1,Spying)
11230ENDPROC
11240:
11250DEF PROCRAMTransmit
11260OtherTaskHandle=Block!4:MyRef=Block!8:TransmitBuffer=Block!20
11270SYS "Wimp_TransferBlock",Task,Transmission,OtherTaskHandle,TransmitBuffer,10
11280Block!0=28:Block!16=7:REM RAM Transmit
11290Block!12=MyRef:Block!20=TransmitBuffer
11300Block!24=LEN($Transmission)
11310SYS "Wimp_SendMessage",17,Block,OtherTaskHandle
11320Dragging$=""
11330ENDPROC
11340:
11350DEF PROCWimpScrapTransmit
11360OtherTaskHandle=Block!4:MyRef=Block!8
11370SaveFilename$=LEFT$($(Block+44),INSTR($(Block+44),CHR$0)-1)
11380LOCAL ERROR
11390ON ERROR LOCAL RESTORE ERROR:ERROR 9999,"An error has occurred during transmission."
11400Data=OPENOUT SaveFilename$
11410BPUT#Data,$(Transmission)
11420CLOSE#Data
11430OSCLI("SetType "+SaveFilename$+" Text")
11440Block!0=(44+LEN(SaveFilename$)):Block!0=(Block!0)+(4-((Block!0) MOD 4)):REM Word align
11450Block!12=MyRef:Block!16=3:REM DataLoad
11460Block!20=DraggedToWindow:Block!24=DraggedToIcon
11470Block!28=DraggedToX:Block!32=DraggedToY
11480Block!36=10:REM Never more than 10 bytes
11490Block!40=&FFF:REM Filetype of Text
11500$(Block+44)=SaveFilename$+CHR$0:Dragging$=""
11510SYS "Wimp_SendMessage",18,Block,OtherTaskHandle
11520ENDPROC
11530:
11540DEF FNMakeDraggingSprite
11550LOCAL ERROR
11560ON ERROR LOCAL SYS "OS_SpriteOp",r0,r1,r2,r3:RESTORE ERROR:ERROR ERR,REPORT$
11570Scaling=FNModeInfo("YEigFactor",-1)
11580IF Scaling<=1 THEN
11590  Name$="flags_high"
11600  SYS "OS_SpriteOp",256+60,Sprites,Name$ TO r0,r1,r2,r3
11610  SYS "OS_SpriteOp",256+34,Sprites,"draghigh",0,0,8
11620ELSE
11630  Name$="flags_low"
11640  SYS "OS_SpriteOp",256+60,Sprites,Name$ TO r0,r1,r2,r3
11650  SYS "OS_SpriteOp",256+34,Sprites,"draglow",0,0,8
11660ENDIF
11670SYS "Wimp_SetColour",7
11680VDU5:MOVE (160-(16*LEN($Transmission)))/2,36
11690VDU 23,17,7,6,8;8;0;:REM Single-height text
11700IF Scaling<=1 THEN VDU 23,17,7,6,8;16;0;:REM Double-height text
11710PRINT $Transmission
11720SYS "OS_SpriteOp",r0,r1,r2,r3
11730=Name$

� >!RunImage for Icon Flags
:
?VersionNumber$="1�02 (24 June 1993)":Taskname$="Icon�Flags"
(Exit=�:Startup=�:Done=�
2DoModeChange=�
<:
FC� Block 256,Buffer 256,MenuHelp 16,ISpyBlock 40,Transmission 10
P/IndMenuMax=64:� IndirectMenuText IndMenuMax
Z6� Templates 2179,InfoInd 189,LocInd 592,SpyInd 900
d� IBMenu 76,MainMenu 124
n:
x*� Messages used by the OmniDesk suite:
�_UtilDeclare=&825C0:UtilOpen=&825C1:UtilQuitting=&825C2:UtilReside=&825C3:UtilAckLoad=&825C4
�+� These are official Acorn allocations.
�:
�n� � Block!0=�:$(Block+4)=�$+" (internal error code "+�(�)+")"+�0:ș "Wimp_ReportError",Block,1,Taskname$:�
�:
�?OmniDesk=�ReadStartupString:� Also assigns Exit and Startup
�:
�*Set IconFlags$RISCOS 3
�7*RMEnsure UtilityModule 3.00 Set IconFlags$RISCOS 2
�Zș "XOS_ReadVarVal","IconFlags$RISCOS",Block,256,0,0 � ,,len:Block?len=13:wimp$=$Block
�� wimp$<>"3" � wimp$="2"
�*Unset IconFlags$RISCOS
�:
!*Set IconFlags$SpriteDrag Yes
:*RMEnsure DragASprite 0.00 Set IconFlags$SpriteDrag No
Qș "XOS_ReadVarVal","IconFlags$SpriteDrag",Block,256,0,0 � ,,len:Block?len=13
"2� $Block="Yes" � DragASprite=�:� DragASprite=�
,*Unset IconFlags$SpriteDrag
6:
@Yș "XOS_ReadVarVal","Obey$Dir",Block,256,0,0 � ,,len:Block?len=13:OurFileName$=$Block
J8N=-1:�:N+=1:� �OurFileName$,�(OurFileName$)-N,1)="."
TOOurPathName$=�OurFileName$,�(OurFileName$)-N):OurFileName$=�OurFileName$,N)
^:
h^� Read size of sprite file and load it. We need to DIM 16 bytes more than the file's size.
r:ș "OS_FSControl",28,"<IconFlags$Dir>.Sprites" � ,,len
|�� Sprites len+16:!Sprites=len+16:Sprites!4=0:Sprites!8=16:Sprites!12=16:ș "OS_SpriteOp",256+10,Sprites,"<IconFlags$Dir>.Sprites"
�:
�� wimp$="3" �
�  � messagelist% 36
�/  messagelist%!0=&502:messagelist%!4=&400C1
�:  messagelist%!8=UtilOpen:messagelist%!12=UtilQuitting
�3  messagelist%!16=UtilReside:messagelist%!20=10
�;  messagelist%!24=6:messagelist%!28=2:messagelist%!32=0
�K  ș "Wimp_Initialise",300,&4B534154,Taskname$,messagelist% � wimp,Task
��
�>  ș "Wimp_Initialise",200,&4B534154,Taskname$ � wimp,Task
��
�:
�"ș "Interface_Initialise",Task
:
7ș "Wimp_OpenTemplate",,"<IconFlags$Dir>.Templates"
Eș "Wimp_LoadTemplate",,Templates,InfoInd,InfoInd+189,-1,"Info",0
&,ș "Wimp_CreateWindow",,Templates � Info
0\ș "Wimp_LoadTemplate",,Templates,LocInd,LocInd+592,-1,"WindowXY",0:Templates!64=Sprites
:+ș "Wimp_CreateWindow",,Templates � Loc
D[ș "Wimp_LoadTemplate",,Templates,SpyInd,SpyInd+900,-1,"SpyCalc",0:Templates!64=Sprites
N/ș "Wimp_CreateWindow",,Templates � SpyCalc
Xș "Wimp_CloseTemplate"
b:
l�BuildMenus
v:
��CleanUpLocWindow
�ReadError=�(�LoadSettings)
��ClearSpyCalcWindow(Spying)
�:
��Initialise
�:
�� OmniDesk=0 �
�   � Put Icon on the icon-bar
�  Block!0=-1
�1  Block!4=0:Block!8=0:Block!12=68:Block!16=68
�5  Block!20=&17003002:$(Block+24)="!IconFlags"+�13
�+  ș "Wimp_CreateIcon",,Block � IconBar
��
:
&� OmniDesk<>0 � �DeclareToOmniDesk
R� Startup � Done=�:� '-Startup' parameter means 'declare and die immediately'.
 :
*&�UpdateIcon(Info,3,VersionNumber$)
46�ModeChange:� To update icon-bar icon if necessary
>:
H� � �Error
R�� ReadError � ReadError=�:�DefaultSettings:� 9999,"An error occurred whilst reading the settings file. Default settings will therefore be used."
\:
f)ș "OS_ReadMonotonicTime" � polltime%
pOldWin=0:OldIc=-1
z:
�� Main program loop
��
�6  ș "Wimp_PollIdle",%1100000110000,Block � Reason
�&  ș "Interface_Poll",Reason,,Task
�4  ș "Interface_PreProcessKey",Reason,Block,Task
�  Ȏ Reason �
�3    � 0 : ș "OS_ReadMonotonicTime" � polltime%
�4             � Spying � (�OpenState(SpyCalc))  �
�5               �DoSpy(OldWin,OldIc):polltime%+=10
�             �
�N               polltime%+=100:� Do a Wimp_Poll approximately once a second
�             �
�^             � DoModeChange � � �OpenState(SpyCalc) � �Open(SpyCalc,�,XPosition,YPosition)
    � 1 : �Redraw
)    � 2 : ș "Wimp_OpenWindow",,Block
*    � 3 : ș "Wimp_CloseWindow",,Block
$              � Exit � Done=�
.    � 6 : �MouseButton
8    � 7 : �DragFinished
B    � 8 : �KeyPressed
L    � 9 : �DecodeMenu
V$    � 17,18,19 : �RecieveMessage
`  �
j
� Done
t�SayGoodbye
~�
�:
�� �Error
�Click=0:Block!0=�:Ȏ � �
�  � 9999:� Custom error
�    $(Block+4)=�$+�0
�?    ș "Wimp_ReportError",Block,17,"Notice from "+Taskname$
�  
�v    $(Block+4)=�$+" (internal error code "+Þ+"). Click on OK to continue, or Cancel to terminate the program."+�0
�8    ș "Wimp_ReportError",Block,3,Taskname$ � ,Click
��
�� Click=2 � �SayGoodbye:�
��
:

.� �Open(WindowHandle,TopOfStack,across,up)
Block!0=WindowHandle
#ș "Wimp_GetWindowState",,Block
(J� (across<>-1) � (across<>-1) � �DecideWindowPosition(Block,across,up)
2� TopOfStack � Block!28=-1
<ș "Wimp_OpenWindow",,Block
F�
P:
Z� �Close(WindowHandle)
dBlock!0=WindowHandle
n#ș "Wimp_GetWindowState",,Block
x ș "Wimp_CloseWindow",,Block
��
�:
�,� �DecideWindowPosition(Block,across,up)
�L� Use of this procedure lets you open windows on an invisible grid which
�I� automatically fits itself to the screen mode in use. There are five
�J� positions across (left, mid-left, centre, mid-right, right) and five
�G� positions up (bottom of screen, above icon-bar, centre of screen,
�+� centre top of screen, top of screen).
�  :
�CXpixels=�ModeInfo("XPixels",-1):Ypixels=�ModeInfo("YPixels",-1)
�OXEigFactor=�ModeInfo("XEigFactor",-1):YEigFactor=�ModeInfo("YEigFactor",-1)
�  :
�8top=Block!16:right=Block!12:bot=Block!8:left=Block!4
Aș "Wimp_OpenWindow",,Block:ș "Wimp_GetWindowOutline",,Block
&TB=((Block!16)-top)/(2^YEigFactor)
(VS=((Block!12)-right)/(2^XEigFactor)
"%HS=(bot-(Block!8))/(2^YEigFactor)
,&LP=(left-(Block!4))/(2^XEigFactor)
6K� LP is Left Pixel: normally present, but not if window is transparent.
@%width=(right-left)/(2^XEigFactor)
J#height=(top-bot)/(2^YEigFactor)
TȎ across �
^  � 0:x=LP
h,  � 1:x=LP+((Xpixels+1)-(width+LP+VS))/4
r,  � 2:x=LP+((Xpixels+1)-(width+LP+VS))/2
|2  � 3:x=LP+(3*(((Xpixels+1)-(width+LP+VS))/4))
�"  � 4:x=(Xpixels+1)-(width+VS)
��
�Ȏ up �
�  � 0:y=HS
�#  � 1:y=HS+(132/(2^YEigFactor))
�-  � 2:y=HS+((Ypixels+1)-(height+TB+HS))/2
�3  � 3:y=HS+(3*(((Ypixels+1)-(height+TB+HS))/4))
�#  � 4:y=(Ypixels+1)-(height+TB)
��
�(� Above coordinates position window.
�(� Now convert to screen coordinates:
�)x=x*(2^XEigFactor):y=y*(2^YEigFactor)
�;width=width*(2^XEigFactor):height=height*(2^YEigFactor)
Block!12=x+width:Block!4=x
Block!16=y+height:Block!8=y
�
&:
0O� -------------------------------------------------------------------------
:� Wimp poll routines
DO� -------------------------------------------------------------------------
N:
X
� �Redraw
b� DoModeChange �
ld  � Re-opening windows need an extra wimp_poll to happen after the mode change in order to work:
vB  � �OpenState(SpyCalc) � �Open(SpyCalc,�,XPosition,YPosition)
�  DoModeChange=�
��
�(ș "Wimp_RedrawWindow",,Block � flag
�ȕ flag
�*  ș "Interface_Render3dWindow",,Block
�*  ș "Wimp_GetRectangle",,Block � flag
��
��
�:
�� �RecieveMessage
�Ȏ Block!16 �
�  � 0 : Done=�
�  � 2 : � DataSaveAck
M           � Other task wants a transfer via <Wimp$Scrap> rather than RAM
!           �WimpScrapTransmit
  � 6 : � RAM Fetch
 .           � Other task is asking for data
*           �RAMTransmit
41  � 10: � OmniDesk=0 � �SaveDesktop(Block!20)
>E           � Only save if we have not been started up by OmniDesk
H  � &502 : �Help
R  � &400C1 : �ModeChange
\=  � UtilOpen : � $(Block+24)=Taskname$ � �OmniDeskCalling
f&  � UtilQuitting : � OmniDesk<>0 �
p8                        � Block!20=OmniDesk � Done=�
z                      �
�  � UtilReside : Exit=�
��
��
�:
�� �DeleteWimpScrap
�� �
�� � � � �:�
�<� We may receive try to delete a non-existant Wimp$Scrap
�@� file if the receiving task did not recognise the filetype.
��("Delete <Wimp$Scrap>")
��
�:
�� �MouseButton
	1MouseX=Block!0:MouseY=Block!4:Buttons=Block!8
	!Window=Block!12:Icon=Block!16
	Ȏ Window �
	$"  � -2:� Icon bar icon clicked
	.    Ȏ Buttons �
	8      � 1 : � Adjust
	B      � 2 : � Menu
	L9        M%=IBMenu:MenuX=MouseX:MenuY=MouseY:�MakeMenu
	V      � 4 : � Select
	`0        �Open(SpyCalc,�,XPosition,YPosition)
	j	    �
	t  � SpyCalc
	~    Ȏ Buttons �
	�      � 2 : � Menu
	�1        M%=MainMenu:MenuX=MouseX:MenuY=MouseY
	�        � wimp>=310 �
	�`          � �$MainMenuTitle,1)="\" � $MainMenuTitle=�$MainMenuTitle,�($MainMenuTitle)-1)+�13
	�C          � XPosition=4 � $MainMenuTitle="\"+$MainMenuTitle+�13
	�
        �
	�        �MakeMenu
	�!      � 1,4 : � Select,Adjust
	�'        � (Icon>=20) � (Icon<=32) �
	�6          �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
	�,          � �SelectedState(SpyCalc,26) �
	�            � Fonts on
-            A=�(�ReadIconStr(SpyCalc,33))

Y            � �ReadIconStr(SpyCalc,43)="" � �UpdateIcon(SpyCalc,43,�((A>>>24) � 256))
u            � �ReadIconStr(SpyCalc,39)<>"" � � N=39 � 41 � 2:�UpdateIcon(SpyCalc,N,""):�ColourIcon(SpyCalc,N,1):�
          �
(            � Fonts off
2-            A=�(�ReadIconStr(SpyCalc,33))
<5            Fcol=(A>>>24) � 16:Bcol=(A>>>28) � 16
FK            � �ReadIconStr(SpyCalc,43)<>"" � �UpdateIcon(SpyCalc,43,"")
P/            � �ReadIconStr(SpyCalc,39)="" �
Z1              �UpdateIcon(SpyCalc,39,�(Fcol))
d.              �ColourIcon(SpyCalc,39,Fcol)
n1              �UpdateIcon(SpyCalc,41,�(Bcol))
x.              �ColourIcon(SpyCalc,41,Bcol)
�            �
�          �
�
        �
�%        � (Icon=39) � (Icon=41) �
�'          A=�ReadIcon(SpyCalc,Icon)
�           � Buttons=4 � A+=1
�           � Buttons=1 � A-=1
�          � A=-1 � A=15
�          � A=16 � A=0
�,          �UpdateIcon(SpyCalc,Icon,�(A))
�)          �ColourIcon(SpyCalc,Icon,A)
�$          � Now check font icon:
�.          � �ReadIconStr(SpyCalc,43)<>"" �
*            �UpdateIcon(SpyCalc,43,"")
            � Icon=39 �
-              �UpdateIcon(SpyCalc,41,"1")
"+              �ColourIcon(SpyCalc,41,1)
,            �
6-              �UpdateIcon(SpyCalc,39,"7")
@+              �ColourIcon(SpyCalc,39,7)
J            �
T          �
^/          �UpdateSelectedFlag(SpyCalc,26,�)
h6          �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
r
        �
|      
�:        � (Buttons>7) � (Window=SpyCalc) � (Icon=33) �
�4          $Transmission=�ReadIconStr(SpyCalc,33)
�R          Dragging$="Flags":�DragBox(SpyCalc,33,5,Sprites,�MakeDraggingSprite)
�
        �
�	    �
�0  � Loc � Buttons<8:� Reposition main window
�    � Icon>=6 �
�,      XPosition=�ReadWindowLocation("X")
�,      YPosition=�ReadWindowLocation("Y")
�F      � �OpenState(SpyCalc) � �Open(SpyCalc,�,XPosition,YPosition)
�	    �
��
��
:
� �DragFinished
)� DragASprite � ș "DragASprite_Stop"
&#ș "Wimp_GetPointerInfo",,Block
0.� Block!12=-1 � �:� Dragged to background.
:YDraggedToX=Block!0:DraggedToY=Block!4:DraggedToWindow=Block!12:DraggedToIcon=Block!16
D0� OK - Let's begin an inter-application save
NMyRef=0
X4Block!0=256:Block!12=MyRef:Block!16=1:� DataSave
b[Block!20=DraggedToWindow:Block!24=DraggedToIcon:Block!28=DraggedToX:Block!32=DraggedToY
l*Block!36=12:� Never more than 12 bytes
v$Block!40=&FFF:� Filetype of Text
�$(Block+44)=Dragging$+�0
�@ș "Wimp_SendMessage",17,Block,DraggedToWindow,DraggedToIcon
�B� DraggedToIcon included in case DraggedToWindow=-2 (icon bar)
��
�:
�� �KeyPressed
�2Window=Block!0:Icon=Block!4:Character=Block!24
�Ȏ Window �
�  � SpyCalc:
�    Ȏ Character �
�$      � &18F,&19F,&1AF,&1BF:� Up
�        Ȏ Icon �
�          � 33:ToIcon=43

          � 35:ToIcon=33

          � 37:ToIcon=35

          � 43:ToIcon=37

 
        �

*        � Icon=33 �

4X          A$=�ReadIconStr(SpyCalc,33):� A$="" � A$="&0":�UpdateIcon(SpyCalc,33,"&0")

>$          �UpdateSwitches(�(A$))

H"          �UpdateOthers(�(A$))

R
        �

\        � Icon=35 �

fI          � �ReadIconStr(SpyCalc,35)="" � �UpdateIcon(SpyCalc,35,"0")

pG          � �ReadIcon(SpyCalc,35)>15 � �UpdateIcon(SpyCalc,35,"15")

z
        �

�        � Icon=37 �

�I          � �ReadIconStr(SpyCalc,37)="" � �UpdateIcon(SpyCalc,37,"0")

�G          � �ReadIcon(SpyCalc,37)>31 � �UpdateIcon(SpyCalc,37,"31")

�
        �

�        � Icon=43 �

��          � �ReadIconStr(SpyCalc,43)<>"" � � N=39 � 41 � 2:�UpdateIcon(SpyCalc,N,""):�ColourIcon(SpyCalc,N,1):�:�UpdateSelectedFlag(SpyCalc,26,�)

�O          � (�ReadIconStr(SpyCalc,43)="") � (�ReadIconStr(SpyCalc,39)="") �

�+            �UpdateIcon(SpyCalc,39,"7")

�)            �ColourIcon(SpyCalc,39,7)

�+            �UpdateIcon(SpyCalc,41,"1")

�)            �ColourIcon(SpyCalc,41,1)

�1            �UpdateSelectedFlag(SpyCalc,26,�)

�          �
I          � �ReadIcon(SpyCalc,43)>255 � �UpdateIcon(SpyCalc,43,"255")

        �
=        ș "Wimp_SetCaretPosition",SpyCalc,ToIcon,,,-1,-1
$D        �UpdateIcon(SpyCalc,ToIcon,�ReadIconStr(SpyCalc,ToIcon))
.4        �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
80      � &18E,&19E,&1AE,&1BE,13:� Down,Return
B        Ȏ Icon �
LD          � 33:ToIcon=35:� Character=13 � ToIcon=33:� Don't move
V          � 35:ToIcon=37
`          � 37:ToIcon=43
j          � 43:ToIcon=33
t
        �
~        � Icon=33 �
�X          A$=�ReadIconStr(SpyCalc,33):� A$="" � A$="&0":�UpdateIcon(SpyCalc,33,"&0")
�$          �UpdateSwitches(�(A$))
�"          �UpdateOthers(�(A$))
�
        �
�        � Icon=35 �
�I          � �ReadIconStr(SpyCalc,35)="" � �UpdateIcon(SpyCalc,35,"0")
�G          � �ReadIcon(SpyCalc,35)>15 � �UpdateIcon(SpyCalc,35,"15")
�
        �
�        � Icon=37 �
�I          � �ReadIconStr(SpyCalc,37)="" � �UpdateIcon(SpyCalc,37,"0")
�G          � �ReadIcon(SpyCalc,37)>31 � �UpdateIcon(SpyCalc,37,"31")
�
        �
        � Icon=43 �

�          � �ReadIconStr(SpyCalc,43)<>"" � � N=39 � 41 � 2:�UpdateIcon(SpyCalc,N,""):�ColourIcon(SpyCalc,N,1):�:�UpdateSelectedFlag(SpyCalc,26,�)
O          � (�ReadIconStr(SpyCalc,43)="") � (�ReadIconStr(SpyCalc,39)="") �
+            �UpdateIcon(SpyCalc,39,"7")
()            �ColourIcon(SpyCalc,39,7)
2+            �UpdateIcon(SpyCalc,41,"1")
<)            �ColourIcon(SpyCalc,41,1)
F1            �UpdateSelectedFlag(SpyCalc,26,�)
P          �
ZI          � �ReadIcon(SpyCalc,43)>255 � �UpdateIcon(SpyCalc,43,"255")
d
        �
n-        � �((Character=13) � (Icon=33)) �
x?          ș "Wimp_SetCaretPosition",SpyCalc,ToIcon,,,-1,-1
�F          �UpdateIcon(SpyCalc,ToIcon,�ReadIconStr(SpyCalc,ToIcon))
�
        �
�4        �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
�	    
�(      ș "Wimp_ProcessKey",Character
�	    �
�  
�&    ș "Wimp_ProcessKey",Character
��
��
�:
�� �DecodeMenu
�*Sub0=Block!0:Sub1=Block!4:Sub2=Block!8
CloseMenu=�
Ȏ M% �
  � IBMenu:
"    Ȏ Sub0 �
,
      � 0
6+        ș "Wimp_GetPointerInfo",,Block
@<        ș "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
J        CloseMenu=�
T
      � 1
^        Done=�
h	    �
r  � MainMenu:
|    Ȏ Sub0 �
�
      � 0
�+        ș "Wimp_GetPointerInfo",,Block
�<        ș "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
�        CloseMenu=�
�
      � 1
�8        Spying=� Spying:�TickMenu(MainMenu,1,Spying)
�0        �ClearSpyCalcWindow(Spying):OldWin=0
�4        �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
�m        ș "Wimp_GetCaretPosition",,Block:� (Block!0=SpyCalc) � Spying � ș "Wimp_SetCaretPosition",-1,-1
�
      � 2
�+        ș "Wimp_GetPointerInfo",,Block
�;        ș "Wimp_CreateMenu",,Loc,Block!0-24,Block!4+24
�        CloseMenu=�

      � 3
\        � � �SaveSettings � � 9999,"An error occurred whilst writing the settings file."
	    �
&�
0#ș "Wimp_GetPointerInfo",,Block
:3� ((Block!8 � 1)=1) � (� CloseMenu) � �MakeMenu
D�
N:
XO� -------------------------------------------------------------------------
b� Menu routines
lO� -------------------------------------------------------------------------
v:
�� �BuildMenus
�I� This procedure should only be visited once, since it contains DIMs.
�  :
�O� In the menu title strings below, if a "|" character is present it will be
�O� replaced by a space under RISC OS 3.1 (or greater), or will terminate the
�O� string under earlier versions of the wimp. This allows the new indirected
�F� menu titles to be used (which were introduced with RISC OS 3.1).
�  :
�#IndirectMenuTextOffsetPointer=0
�N� This points to a pool to be used by all menus for their indirected text.
�  :
�
M%=IBMenu
�ITitle$="Icon Flags":� IBMenuTitle �(Title$)+1:$IBMenuTitle=Title$+�13
�MenuInit(IBMenuTitle)
�MenuItem("Info",0,Info)
�MenuItem("Quit",128,-1)
   :
*M%=MainMenu
4MTitle$="Icon Flags":� MainMenuTitle �(Title$)+2:$MainMenuTitle=Title$+�13
>�MenuInit(MainMenuTitle)
H�MenuItem("Info",2,Info)
R"�MenuItem("Spy on icons",0,-1)
\&�MenuItem("Window position",2,Loc)
f%�MenuItem("Save settings",128,-1)
p�
z:
�� �MakeMenu
�� MenuX<0 � MenuX=0
�*� MenuY<184 � MenuY=184:� for icon bar
�7ș "Wimp_CreateMenu",,M%,MenuX-((36+M%!16)/2),MenuY
��
�:
�� �MenuInit(MenuTitle)
�� wimp>=310 �
�7  A=�$MenuTitle,"|"):� A<>0 � ?(MenuTitle+(A-1))=32
�  MenuMax=�($MenuTitle)
�  M%!0=MenuTitle
��
�7  A=�$MenuTitle,"|"):� A<>0 � ?(MenuTitle+(A-1))=13
   MenuMax=�(�$MenuTitle,12))
  $M%=�$MenuTitle,12)
�
$$M%?12=7:M%?13=2:M%?14=11:M%?15=0
.M%!16=MenuMax*16
8M%!20=44:M%!24=0
BP%=M%+28
L�
V:
`!� �MenuItem(Text$,Flags,Link)
jK� Flags: 1-ticked, 2-dashed line, 4-writeable, 8-message, 128-last item
t1� Link: menu or window handle for sub-pointer
~P%!0=Flags:P%!4=Link
�� �(Text$)<=12 �
�%  P%!8=&07003021:� Not indirected
�  $(P%+12)=Text$
��
�!  P%!8=&07003121:� Indirected
�:  P%!12=IndirectMenuText+IndirectMenuTextOffsetPointer
�  P%!16=0:P%!20=0
�A  $(IndirectMenuText+IndirectMenuTextOffsetPointer)=Text$+�13
�/  IndirectMenuTextOffsetPointer+=�(Text$)+1
�  � IndirectMenuTextOffsetPointer>IndMenuMax � � 0,"The indirect menu text buffer has overflowed. Please allocate more space."
��
�
P%+=24
>� MenuMax<�(Text$) � MenuMax=�(Text$):M%!16=(MenuMax+1)*16

A� (Flags=128) � (wimp>=310) � M%!28=(((M%!28) � � 256) � 256)
7  � Indirected menu titles for RISC OS 3.1 upwards.
�
(:
2O� -------------------------------------------------------------------------
<)� Responses to incoming wimp messages
FO� -------------------------------------------------------------------------
P:
Z� �SaveDesktop(File)
d� �
nG� � � Block!12=Block!8:ș "Wimp_SendMessage",19,Block,Block!4:� �:�
xI� The above line acknowledges the message if an error occurs, thereby
� � aborting the desktop save.
�+�#File,"Run "+OurPathName$+OurFileName$
��
�:
�� �Help
�4Block!12=Block!8:Block!16=&503:HelpInfo=Block+20
�  :
�0� Block!32 gives window, Block!36 gives icon
�  :
�Ȏ Block!32 �
�0  � -2:�Send("This is the Icon Flags icon.")
�=          �Send("Click MENU for information or to quit.")
�B          �Send("Click SELECT to open the Icon Flags window.")
  � SpyCalc:
    Ȏ Block!36 �
_      � 0,1,2,3,4,5:�Send("This area shows the window and icon handles under the pointer.")
"i      � 6,7,8,9,10,11:�Send("This area shows the minimum coordinates of the icon under the pointer.")
,m      � 12,13,14,15,16,17:�Send("This area shows the maximum coordinates of the icon under the pointer.")
6      � 18,19:� Spying �
@d                   �Send("This area shows the individual flags for the icon under the pointer.")
J                 �
T�                   �Send("Click the switches in this area to work out the icon flags, or enter a value in the box and press RETURN to find out what it means.")
^                 �
hJ      � 20:�Send("This switch is selected if the icon contains text.")
rN      � 21:�Send("This switch is selected if the icon contains a sprite.")
|I      � 22:�Send("This switch is selected if the icon has a border.")
�T      � 23:�Send("This switch is selected if the icon is horizontally centred.")
�R      � 24:�Send("This switch is selected if the icon is vertically centred.")
�T      � 25:�Send("This switch is selected if the icon has a filled background.")
�q      � 26:�Send("This switch is selected if the icon contains anti-aliased text drawn by the font manager.")
�o      � 27:�Send("This switch is selected if the icon must clear its background when it is being updated.")
�V      � 28:�Send("This switch is selected if the icon's contents are indirected.")
�O      � 29:�Send("This switch is selected if the icon is right-justified.")
́      � 30:�Send("This switch is selected if the icon allows the ADJUST button to make multiple selections in the same ESG.")
�]      � 31:�Send("This switch is selected if the icon displays its sprite at half-size.")
�H      � 32:�Send("This switch is selected if the icon is selected.")
�A      � 33:�Send("This shows the icon flags in hexadecimal.")
�f              � � Spying � �Send("Enter a value here and press RETURN to find out what it means.")
�v              � � Spying � �Send("You can drag this figure out to another application or to a directory display.")
?      � 34:�Send("This shows the button type of the icon.")
?      � 35:�Send("This shows the button type of the icon.")
N              � � Spying � �Send("Enter a new value to update the flags.")
&M      � 36:�Send("This shows the exclusive selection group of the icon.")
0M      � 37:�Send("This shows the exclusive selection group of the icon.")
:N              � � Spying � �Send("Enter a new value to update the flags.")
DO      � 38:�Send("This shows the icon's foreground colour, if it has one.")
NO      � 39:�Send("This shows the icon's foreground colour, if it has one.")
Xr              � � Spying � �Send("Click SELECT or ADJUST to cycle forwards or backwards through the colours.")
bO      � 40:�Send("This shows the icon's background colour, if it has one.")
lO      � 41:�Send("This shows the icon's background colour, if it has one.")
vr              � � Spying � �Send("Click SELECT or ADJUST to cycle forwards or backwards through the colours.")
�L      � 42:�Send("If the icon uses a font, this shows the font handle.")
�L      � 43:�Send("If the icon uses a font, this shows the font handle.")
�N              � � Spying � �Send("Enter a new value to update the flags.")
�8       �Send("This is the Icon Flags main window.")
�J                �Send("You can spy on icons or calculate icon flags.")
�	    �
�H  � Info:�Send("This window displays information about Icon Flags.")
�[            �Send("Icon Flags is a member of the OmniDesk Suite of desktop utilities.")
�  � Loc:
�
   Ȏ � �
�m     � ((Block!36)<6):�Send("This window lets you snap the magnifier window to an invisble screen grid.")
�                         �Send("The second position up puts the window just above the icon-bar, and is therefore not evenly spaced with the other rows.")
��      �Send("Click SELECT on the position you want the window to snap to, or ADJUST on the window icon to turn the snapping off.")
u               �Send("If snapping is on, the window will open at the appropriate position when you change mode.")
   �

   � wimp>=217 �
*1    MenuHelp!0=-1:MenuHelp!4=-1:MenuHelp!8=-1
4;    ș "Wimp_GetMenuState",1,MenuHelp,Block!32,Block!36
>    Ȏ M% �
H      � IBMenu:
R        � MenuHelp!4=-1 �
\          Ȏ MenuHelp!0 �
fX            � 0:�Send("Move the pointer right to see information about Icon Flags.")
p=            � 1:�Send("Click SELECT to quit Icon Flags.")
z@             �Send("This is the Icon Flags icon-bar menu.")
�          �
�
        �
�      � MainMenu:
�W        Direction$="right":� wimp>=310 � �(MainMenuTitle?0)="\" � Direction$="left"
�        Ȏ MenuHelp!0 �
�_          � 0:�Send("Move the pointer "+Direction$+" to see information about Icon Flags.")
�          � 1:� Spying �
�^                   �Send("Click SELECT or ADJUST to stop spying and work out icon flags.")
�                 �
�k                   �Send("Click SELECT or ADJUST to spy on icons you point to with the mouse pointer.")
�                 �
�v          � 2:�Send("Move the pointer "+Direction$+" to set the position of the Icon Flags window on the screen.")
�k          � 3:�Send("Click SELECT or ADJUST to save the Icon Flags window position and spying status.")
:           �Send("This is the Icon Flags main menu.")

        �
	    �
$  �
.�
8  :
B?HelpInfo=0
L$Block!0=(HelpInfo+4-Block) � � 3
V*ș "Wimp_SendMessage",17,Block,Block!4
`�
j:
t� �OmniHelpMessage(A$)
~:� A$="CLICK" � =�"open the Icon Flags window.",76)+�13
�� A$="DRAG" � =�"",76)+�13
�=""
�:
�� �Send(Text$)
�$HelpInfo=Text$+"|M"
�HelpInfo+=�(Text$)+2
��
�:
�� �OmniDeskCalling
�� OmniDesk=0 � �
�I� This first line is for if a broadcast message is received which was
�A� intended for a transient copy of the utility. A stand-alone
?� instantiation of the utility should ignore such messages.

Ȏ Block!20 �
.  � 4:�Open(SpyCalc,�,XPosition,YPosition)
�
(�
2:
<� �ModeChange
FDoModeChange=�
P>� OmniDesk=0 � �UpdateIconForMode("!IconFlags",-2,IconBar)
Z�
d:
nO� -------------------------------------------------------------------------
x8� General non-specific useful routines (mostly wimp)
�O� -------------------------------------------------------------------------
�:
� � �UpdateIcon(Wndw,Icn,Txt$)
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�� �(Txt$)>(Block!36)-1 �
�&  � ((Block!24) � (1<<9))=(1<<9) �
�    � Right-justified
�$    Txt$="�"+�Txt$,(Block!36)-2)
�  �
�#    � Left-justified or centred
�+    Txt$=�Txt$,(Block!36)-1):�Txt$)="�"
�  �
��
F� ^ Ensures the text can't overflow the maximum space in the icon.
� $(Block!28)<>Txt$ �
+  $(Block!28)=Txt$:Block!8=0:Block!12=0
"#  ș "Wimp_SetIconState",,Block
,�
6%ș "Wimp_GetCaretPosition",,Block
@"� Block!0=Wndw � Block!4=Icn �
J<  � If this icon owns the caret, then put it at the end.
T8  ș "Wimp_SetCaretPosition",Wndw,Icn,0,0,-1,�(Txt$)
^�
h�
r:
|+� �UpdateIconColour(Wndw,Icn,FCol,BCol)
�� Change an icon's colours
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�;� (((Block?27)>>4)=BCol) � (((Block?27) � 16)=FCol) � �
�'  � ^ Same colour, so don't change.
�:Block!12=(%11111111<<24):Block!8=(BCol<<28)+(FCol<<24)
�!ș "Wimp_SetIconState",,Block
��
�:
�)� �UpdateSelectedFlag(Wndw,Icn,State)
�1� Use State=TRUE to make icon become selected
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�/� ((Block!24) � (1<<21))=((-State)<<21) � �
�@Block!12=(1<<21):� State � Block!8=(1<<21) � Block!8=(0<<21)
!ș "Wimp_SetIconState",,Block
�
:
&'� �UpdateShadedFlag(Wndw,Icn,State)
0/� Use State=TRUE to make icon become shaded
::Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
D/� ((Block!24) � (1<<22))=((-State)<<22) � �
N@Block!12=(1<<22):� State � Block!8=(1<<22) � Block!8=(0<<22)
X!ș "Wimp_SetIconState",,Block
b�
l:
v� �SelectedState(Wndw,Icn)
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�)� ((Block!24) � (1<<21))=(1<<21) � =�
�=�
�:
�� �ShadedState(Wndw,Icn)
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�)� ((Block!24) � (1<<22))=(1<<22) � =�
�=�
�:
�� �OpenState(Wndw)
�5� Returns TRUE if window is open; false otherwise
�0Block!0=Wndw:ș "Wimp_GetWindowState",,Block
�)� ((Block!32) � (1<<16))=(1<<16) � =�
=�
:
!� �ShadeMenu(Menu,Item,State)
 P!(Menu+28+(24*Item)+8)=(!(Menu+28+(24*Item)+8) � � (1<<22)) � ((-State)<<22)
*�
4:
> � �TickMenu(Menu,Item,State)
H@!(Menu+28+(24*Item))=(!(Menu+28+(24*Item)) � � 1) � (-State)
R�
\:
f� �MenuShaded(Menu,Item)
p5� (!(Menu+28+(24*Item)+8) � (1<<22))=(1<<22) � =�
z=�
�:
�� �MenuTicked(Menu,Item)
�'� (!(Menu+28+(24*Item)) � 1)=1 � =�
�=�
�:
�� �ReadIcon(Wndw,Icn)
� � Read numeric value of icon
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�=�($(Block!28))
�:
�� �ReadIconStr(Wndw,Icn)
�� Read string value of icon
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
=$(Block!28)
:
� �ModeInfo(var$,mode)
$)� Use mode=-1 for current screen mode
.
Ȏ var$ �
8:  � "XPixels":ș "OS_ReadModeVariable",mode,11 � ,,var
B:  � "YPixels":ș "OS_ReadModeVariable",mode,12 � ,,var
L6  � "NCol":ș "OS_ReadModeVariable",mode,3 � ,,var
V<  � "XEigFactor":ș "OS_ReadModeVariable",mode,4 � ,,var
`<  � "YEigFactor":ș "OS_ReadModeVariable",mode,5 � ,,var
j?  � "BPP":ș "OS_ReadModeVariable",mode,9 � ,,var:var=2^var
t6   var=-1:� Fall-through for a faulty input value
~�
�=var
�:
�+� �UpdateIconForMode(Appname$,Wndw,Icn)
�N� This procedure requires that ALL the icon sprites are defined in mode 20
�N� or mode 27 (which is equivalent) with a mask but no palette. They should
�N� still appear to have the expected resolutions and number of colours, i.e
�N� !Sprites23: two colours, high resolution, !Sprites (actually !Sprites24)
�L� at mode 12 resolution (double height pixels) in 16 colours, and normal
�L� mode 20 resolution, 16 colours for the !Sprites22 icon. If this is not
�I� adhered to, then memory shortage errors may occur on a mode change.
�Extension$="24"
�$� �ModeInfo("YEigFactor",-1)<2 �
   � �ModeInfo("NCol",-1)>2 �

    Extension$="22"
  �
    Extension$="23"
(  �
2�
<*ș "Wimp_BaseOfSprites" � ,iconsprite%
FEș "OS_SpriteOp",256+25,iconsprite%,Appname$:� Delete icon sprite
P=� The following three lines assume a mask but no palette:
Zbș "OS_SpriteOp",256+40,Sprites,Appname$+Extension$ � ,,,w,h,,mode:� Get info about new sprite
d\ș "OS_SpriteOp",256+15,iconsprite%,Appname$,0,w,h,mode:� Create replacement icon sprite
n>ș "OS_SpriteOp",256+29,iconsprite%,Appname$:� Create mask
x  :
�-� Paint sprite mask into iconsprite mask:
�Qș "OS_SpriteOp",256+61,iconsprite%,Appname$,0 � r0,r1,r2,r3:� Output to mask
�Uș "OS_SpriteOp",256+49,Sprites,Appname$+Extension$,0,0:� Paint mask from Sprites
�7� 4,128:�:� Invert to make mask the right way round
�6ș "OS_SpriteOp",r0,r1,r2,r3:� Reset screen output
�  :
�#� Paint sprite into iconsprite:
�\ș "OS_SpriteOp",256+60,iconsprite%,Appname$,0 � r0,r1,r2,r3:� Output to new icon sprite
�Wș "OS_SpriteOp",256+34,Sprites,Appname$+Extension$,0,0,8:� Paint copy from Sprites
�6ș "OS_SpriteOp",r0,r1,r2,r3:� Reset screen output
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�EBlock!8=0:Block!12=0:ș "Wimp_SetIconState",,Block:� Re-plot icon
��
:
�� �CreateWindow(minX,minY,maxX,maxY,Xoffset,Yoffset,Handle,Flags,TitleCol,TitleBackCol,WorkCol,WorkBackCol,ScrollCol,SliderCol,InputCol,WminX,WminY,WmaxX,WmaxY,TitleFlags,Wbutton,SpritePoint,MinW,MinH,TitleData$)
ZBlock!0=minX:Block!4=minY:Block!8=maxX:Block!12=maxY:Block!16=Xoffset:Block!20=Yoffset
""Block!24=Handle:Block!28=Flags
,QBlock?32=TitleCol:Block?33=TitleBackCol:Block?34=WorkCol:Block?35=WorkBackCol
6FBlock?36=ScrollCol:Block?37=SliderCol:Block?38=InputCol:Block?39=0
@?Block!40=WminX:Block!44=WminY:Block!48=WmaxX:Block!52=WmaxY
J=Block!56=TitleFlags:Block!60=Wbutton:Block!64=SpritePoint
T_Block!68=(MinH<<15)+MinW :::::::::::: � 0,0 sets the minimum window with to the title width
^>$(Block+72)=TitleData$:Block!84=0 ::: � No icons initially
h0ș "Wimp_CreateWindow",,Block � WindowHandle
r=WindowHandle
|:
�B� �CreateIcon(WindowHandle,minX,minY,maxX,maxY,Flags,IconData)
�Block!0=WindowHandle
�HBlock!4=minX:Block!8=minY:Block!12=maxX:Block!16=maxY:Block!20=Flags
�?Block!24=IconData!0:Block!28=IconData!4:Block!32=IconData!8
�,ș "Wimp_CreateIcon",,Block � IconHandle
�=IconHandle
�:
�� �Initialise
�-AppSize=�-&8000:MinSize=AppSize:SlotEnd=�
��
�:
�� �AllocateMemory(Required)
�SlotSize=�SlotSize(-1)
 �� SlotSize<Required � NewSize=�SlotSize(Required):� NewSize<Required � SlotSize=�SlotSize(AppSize):=0:� Returns, indicating memory not claimed
 6� SlotSize>Required � SlotSize=�SlotSize(Required)
 *=SlotSize:� Returns with bytes claimed
 &:
 0� �SlotSize(Bytes)
 :'ș "Wimp_SlotSize",Bytes,-1 � Bytes
 D
=Bytes
 N:
 X� �MinimiseWimpSlot
 b"dummy=�AllocateMemory(MinSize)
 l�
 v:
 �"� �CloseFileIfPoss(FileHandle)
 �� �
 �&� � � � �:�:� Unable to close file
 ��#FileHandle
 ��
 �:
 �� �FindFileSize(FileName$)
 � � FileName$="<Wimp$Scrap>" �
 �:  ș "OS_File",15,FileName$,,,FileName$ � ,,,,FileSize
 ��
 �4  N=-1:�:N+=1:� �FileName$,�(FileName$)-N,1)="."
 �B  PathName$=�FileName$,�(FileName$)-N):LeafName$=�FileName$,N)
 �:  ș "OS_File",13,LeafName$,,,PathName$ � ,,,,FileSize
!�
!
=FileSize
!:
! � �NextEntry
!*H� Gets next entry (created by BPUT#Data,A$) from a file as a string.
!4� Use as A$=FNNextEntry.
!>� �
!H&� � � � �:="":� Error reading file
!RNE$=�#Data
!\ȕ �NE$,1)="|"
!f  NE$=�#Data
!p�
!z=NE$
!�:
!�G� �DragBox(WindowHandle,IconHandle,DragType,SpriteArea,SpriteName$)
!�8Block!0=WindowHandle:ș "Wimp_GetWindowState",,Block
!� wminx=Block!4:wmaxy=Block!16
!�IBlock!0=WindowHandle:Block!4=IconHandle:ș "Wimp_GetIconState",,Block
!�>iminx=Block!8:iminy=Block!12:imaxx=Block!16:imaxy=Block!20
!�)Block!0=WindowHandle:Block!4=DragType
!�Block!8=(wminx+iminx)
!�Block!12=(wmaxy+iminy)
!�Block!16=(wminx+imaxx)
!�Block!20=(wmaxy+imaxy)
!�Block!24=1:Block!28=1
!�GBlock!32=(�ModeInfo("Xpixels",-1)+1)*(2^�ModeInfo("XEigFactor",-1))
"GBlock!36=(�ModeInfo("Ypixels",-1)+1)*(2^�ModeInfo("YEigFactor",-1))
"� DragASprite �
"E  ș "DragASprite_Start",%10000101,SpriteArea,SpriteName$,Block+8
"$�
".  ș "Wimp_DragBox",,Block
"8�
"B�
"L:
"VO� -------------------------------------------------------------------------
"`/� Routines common to the OmniDesk utilities
"jO� -------------------------------------------------------------------------
"t:
"~� �DeclareToOmniDesk
"�/Block!0=208:Block!12=0:Block!16=UtilDeclare
"�Block!20=Task
"�$(Block+24)=Taskname$
"�$(Block+44)=OurFileName$
"�)$(Block+55)=�OmniHelpMessage("CLICK")
"�)$(Block+132)=�OmniHelpMessage("DRAG")
"�+ș "Wimp_SendMessage",17,Block,OmniDesk
"��
"�:
"�� �SayGoodbye
"�� OmniDesk<>0 �
"�1  Block!0=24:Block!12=0:Block!16=UtilQuitting
#  Block!20=Task
#
-  ș "Wimp_SendMessage",17,Block,OmniDesk
#�
#!ș "Interface_CloseDown",Task
#(&ș "Wimp_CloseDown",Task,&4B534154
#2�
#<:
#F� �ReadStartupString
#PM� Returns task handle of OmniDesk (which is passed in the command string)
#Z&� or 0 if not started by OmniDesk.
#dș "OS_GetEnv" � Command$
#nA=�Command$,"-Startup")
#x� A<>0 � Startup=�
#�A=�Command$,"-Exit")
#�� A<>0 � Exit=�
#�A=�Command$,"-OmniDesk")
#�� A=0 � =0
#�=�(�Command$,A+9))
#�:
#� � �ReadWindowLocation(Axis$)
#�H� Reads which radio icon (if any) is selected in the Window Position
#�H� selector window and returns the axis coordinate (two calls needed)
#�%� or -1 for no position selected.
#�?Icon=5:�:Icon+=1:� (�SelectedState(Loc,Icon)=�) � (Icon=31)
#�*� Icon=31 � =-1:� All icons deselected
#�4Location=-1:Icon-=6:� Bring icon into range 0-14
$Ȏ Axis$ �
$!  � "X","x":Location=Icon � 5
$%  � "Y","y":Location=4-(Icon � 5)
$"�
$,
=Location
$6:
$@� �CleanUpLocWindow
$JO� Makes sure that none of the 'window' icons in the Loc window is selected.
$T	N=5:�
$^'N+=1:� N=30 � �SelectedState(Loc,N)
$h �UpdateSelectedFlag(Loc,N,�)
$r�
$|:
$�O� -------------------------------------------------------------------------
$�,� Special routines for this program only
$�O� -------------------------------------------------------------------------
$�:
$�� �ClearSpyCalcWindow(Spy)
$�� +1
$�$� 4,5,10,11,16,17,35,37,39,41,43
$�� N=1 � 11
$�)  � Icon:�UpdateIcon(SpyCalc,Icon,"")
$��
$�
� � Spy �
$�!  �UpdateIcon(SpyCalc,39,"7")
$�  �ColourIcon(SpyCalc,39,7)
%!  �UpdateIcon(SpyCalc,41,"1")
%  �ColourIcon(SpyCalc,41,1)
%!  �UpdateIcon(SpyCalc,35,"0")
%&!  �UpdateIcon(SpyCalc,37,"0")
%0�
%:  �ColourIcon(SpyCalc,39,1)
%D  �ColourIcon(SpyCalc,41,1)
%N�
%X� N=20 � 32
%b=  Block!0=SpyCalc:Block!4=N:ș "Wimp_GetIconState",,Block
%l&  Block!8=(0<<21):Block!12=(1<<21)
%v2  � Spy � Block!8+=(0<<12):� Block!8+=(11<<12)
%�  Block!12+=(255<<12)
%�#  ș "Wimp_SetIconState",,Block
%��
%�'�UpdateIcon(SpyCalc,33,"&17000000")
%�� N=33 � 43 � 2
%�=  Block!0=SpyCalc:Block!4=N:ș "Wimp_GetIconState",,Block
%�
  � Spy �
%�    Block!8=(0<<12)
%�  �
%�    � (N=39) � (N=41) �
%�      Block!8=(2<<12)
%�	    �
%�      Block!8=(15<<12)
&#      � N=33 � Block!8=(14<<12)
&	    �
&  �
&   Block!12=(255<<12)
&*#  ș "Wimp_SetIconState",,Block
&4�
&>�
&H:
&R� �DoSpy(� OldWin,� OldIc)
&\#ș "Wimp_GetPointerInfo",,Block
&fWin=Block!12:Ic=Block!16
&pH� Win=-1 � �UpdateIcon(SpyCalc,4,"") � �UpdateIcon(SpyCalc,4,�(Win))
&zF� Ic=-1 � �UpdateIcon(SpyCalc,5,"") � �UpdateIcon(SpyCalc,5,�(Ic))
&�#� (Win=OldWin) � (Ic=OldIc) � �
&�4� ^ Don't update the rest because it's the same.
&�OldWin=Win:OldIc=Ic
&�6� ((Win>0) � ((Win=-2) � (wimp>=300))) � (Ic>=0) �
&�F  ISpyBlock!0=Win:ISpyBlock!4=Ic:ș "Wimp_GetIconState",,ISpyBlock
&�(  minX=ISpyBlock!8:minY=ISpyBlock!12
&�)  maxX=ISpyBlock!16:maxY=ISpyBlock!20
&�E  �UpdateIcon(SpyCalc,10,�(minX)):�UpdateIcon(SpyCalc,11,�(minY))
&�E  �UpdateIcon(SpyCalc,16,�(maxX)):�UpdateIcon(SpyCalc,17,�(maxY))
&�@  �UpdateIcon(SpyCalc,35,�((ISpyBlock?25)>>4)):� Button type
&�:  �UpdateIcon(SpyCalc,37,�((ISpyBlock?26) � 32)):� ESG
&�*  � ((ISpyBlock!24) � (1<<6))=(1<<6) �
&�    � Fonts used
'*    �UpdateIcon(SpyCalc,39,""):� F col
'!    �ColourIcon(SpyCalc,39,1)
'*    �UpdateIcon(SpyCalc,41,""):� B col
'$!    �ColourIcon(SpyCalc,41,1)
'.6    �UpdateIcon(SpyCalc,43,�(ISpyBlock?27)):� Font
'8  �
'B"    � No fonts: normal colours
'L7    Fcol=(ISpyBlock?27) � 16:Bcol=(ISpyBlock?27)>>4
'V/    �UpdateIcon(SpyCalc,39,�(Fcol)):� F col
'`$    �ColourIcon(SpyCalc,39,Fcol)
'j/    �UpdateIcon(SpyCalc,41,�(Bcol)):� B col
't$    �ColourIcon(SpyCalc,41,Bcol)
'~)    �UpdateIcon(SpyCalc,43,""):� Font
'�  �
'�#  �UpdateSwitches(ISpyBlock!24)
'�.  �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
'��
'�
  � +1
'�"  � 10,11,16,17,35,37,39,41,43
'�  � N=1 � 9
'�+    � Icon:�UpdateIcon(SpyCalc,Icon,"")
'�  �
'�  � N=20 � 32
'�(    �UpdateSelectedFlag(SpyCalc,N,�)
'�  �
(  �ColourIcon(SpyCalc,39,1)
(
  �ColourIcon(SpyCalc,41,1)
(.  �UpdateIcon(SpyCalc,33,"&"+�~�IconFlags)
(�
((�
(2:
(< � �UpdateSwitches(IconFlags)
(F� N=20 � 31
(PJ  �UpdateSelectedFlag(SpyCalc,N,(IconFlags � (1<<(N-20)))=(1<<(N-20)))
(Z�
(dA�UpdateSelectedFlag(SpyCalc,32,(IconFlags � (1<<21))=(1<<21))
(n�
(x:
(�� �UpdateOthers(IconFlags)
(�B�UpdateIcon(SpyCalc,35,�((IconFlags>>>12) � 16)):� Button type
(�:�UpdateIcon(SpyCalc,37,�((IconFlags>>>16) � 32)):� ESG
(�#� (IconFlags � (1<<6))=(1<<6) �
(�  � Fonts used
(�(  �UpdateIcon(SpyCalc,39,""):� F col
(�  �ColourIcon(SpyCalc,39,1)
(�(  �UpdateIcon(SpyCalc,41,""):� B col
(�  �ColourIcon(SpyCalc,41,1)
(�>  �UpdateIcon(SpyCalc,43,�((IconFlags>>>24) � 256)):� Font
(��
(�   � No fonts: normal colours
(�;  Fcol=(IconFlags>>>24) � 16:Bcol=(IconFlags>>>28) � 16
)-  �UpdateIcon(SpyCalc,39,�(Fcol)):� F col
)"  �ColourIcon(SpyCalc,39,Fcol)
)-  �UpdateIcon(SpyCalc,41,�(Bcol)):� B col
)""  �ColourIcon(SpyCalc,41,Bcol)
),'  �UpdateIcon(SpyCalc,43,""):� Font
)6�
)@�
)J:
)T� �IconFlags
)^IconFlags=0
)h� N=20 � 31
)r:  � �SelectedState(SpyCalc,N) � IconFlags+=(1<<(N-20))
)|�
)�5� �SelectedState(SpyCalc,32) � IconFlags+=(1<<21)
)�8IconFlags+=(�ReadIcon(SpyCalc,35)<<12):� Button type
)�0IconFlags+=(�ReadIcon(SpyCalc,37)<<16):� ESG
)�$� �ReadIconStr(SpyCalc,43)<>"" �
)�,  IconFlags+=(�ReadIcon(SpyCalc,43)<<24)
)��
)�,  IconFlags+=(�ReadIcon(SpyCalc,39)<<24)
)�,  IconFlags+=(�ReadIcon(SpyCalc,41)<<28)
)��
)�=IconFlags
)�:
)�� �ColourIcon(Wndw,Icn,Col)
)�#� Change background of an icon.
*:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
*=� ((Block?27)>>4)=Col � �:� Same colour, so don't change.
*.Block!12=(%11111111<<24):Block!8=(Col<<28)
*&?� Change foreground to black/white according to background:
*0Ȏ Col �
*:&  � 4,5,6,7,11,13:Block!8+=(0<<24)
*D  � 8:Block?11=%10000001
*N   Block!8+=(7<<24)
*X�
*b!ș "Wimp_SetIconState",,Block
*l�
*v:
*�� �SaveSettings
*�� �
*�<� � � � �:�CloseFileIfPoss(Data):=�:� Error writing file
*�  :
*�)  Data=� ("<IconFlags$Dir>.Settings")
*�?  �#Data,"| X and Y grid coordinates of Icon Flags window:"
*�  �#Data,�(XPosition)
*�  �#Data,�(YPosition)
*�>  �#Data,"| Spying at startup (-1 for TRUE; 0 for FALSE):"
*�  �#Data,�(Spying)
*�  �#Data
*�0  �("Settype <IconFlags$Dir>.Settings Text")
*�  :
+=�
+:
+� �LoadSettings
+ � �
+*O� � � � �:�CloseFileIfPoss(Data):=�:� 'Settings' file is damaged or missing
+4  :
+>'  Data=� "<IconFlags$Dir>.Settings"
+H  XPosition=�(�NextEntry)
+R  YPosition=�(�NextEntry)
+\  Spying=�(�NextEntry)
+f  �#Data
+p  :
+zb  � XPosition<>-1 � YPosition<>-1 � �UpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),�)
+�"  �TickMenu(MainMenu,1,Spying)
+�  :
+�=�
+�:
+�� �DefaultSettings
+�XPosition=4:YPosition=2
+�>�UpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),�)
+�Spying=�
+� �TickMenu(MainMenu,1,Spying)
+��
+�:
+�� �RAMTransmit
+�AOtherTaskHandle=Block!4:MyRef=Block!8:TransmitBuffer=Block!20
,Oș "Wimp_TransferBlock",Task,Transmission,OtherTaskHandle,TransmitBuffer,10
,(Block!0=28:Block!16=7:� RAM Transmit
,*Block!12=MyRef:Block!20=TransmitBuffer
,$Block!24=�($Transmission)
,.2ș "Wimp_SendMessage",17,Block,OtherTaskHandle
,8Dragging$=""
,B�
,L:
,V� �WimpScrapTransmit
,`)OtherTaskHandle=Block!4:MyRef=Block!8
,j2SaveFilename$=�$(Block+44),�$(Block+44),�0)-1)
,t� �
,~A� � � � �:� 9999,"An error has occurred during transmission."
,�Data=� SaveFilename$
,��#Data,$(Transmission)
,�
�#Data
,�'�("SetType "+SaveFilename$+" Text")
,�TBlock!0=(44+�(SaveFilename$)):Block!0=(Block!0)+(4-((Block!0) � 4)):� Word align
,�(Block!12=MyRef:Block!16=3:� DataLoad
,�3Block!20=DraggedToWindow:Block!24=DraggedToIcon
,�+Block!28=DraggedToX:Block!32=DraggedToY
,�*Block!36=10:� Never more than 10 bytes
,�$Block!40=&FFF:� Filetype of Text
,�-$(Block+44)=SaveFilename$+�0:Dragging$=""
,�2ș "Wimp_SendMessage",18,Block,OtherTaskHandle
-�
-
:
-� �MakeDraggingSprite
-� �
-(1� � � ș "OS_SpriteOp",r0,r1,r2,r3:� �:� �,�$
-2&Scaling=�ModeInfo("YEigFactor",-1)
-<� Scaling<=1 �
-F  Name$="flags_high"
-P9  ș "OS_SpriteOp",256+60,Sprites,Name$ � r0,r1,r2,r3
-Z6  ș "OS_SpriteOp",256+34,Sprites,"draghigh",0,0,8
-d�
-n  Name$="flags_low"
-x9  ș "OS_SpriteOp",256+60,Sprites,Name$ � r0,r1,r2,r3
-�5  ș "OS_SpriteOp",256+34,Sprites,"draglow",0,0,8
-��
-�ș "Wimp_SetColour",7
-�)�5:� (160-(16*�($Transmission)))/2,36
-�+� 23,17,7,6,8;8;0;:� Single-height text
-�;� Scaling<=1 � � 23,17,7,6,8;16;0;:� Double-height text
-�� $Transmission
-� ș "OS_SpriteOp",r0,r1,r2,r3
-�
=Name$
�
00000000  0d 00 0a 1f f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  20 66 6f 72 20 49 63 6f  6e 20 46 6c 61 67 73 0d  | for Icon Flags.|
00000020  00 14 05 3a 0d 00 1e 3f  56 65 72 73 69 6f 6e 4e  |...:...?VersionN|
00000030  75 6d 62 65 72 24 3d 22  31 b7 30 32 20 28 32 34  |umber$="1.02 (24|
00000040  20 4a 75 6e 65 20 31 39  39 33 29 22 3a 54 61 73  | June 1993)":Tas|
00000050  6b 6e 61 6d 65 24 3d 22  49 63 6f 6e a0 46 6c 61  |kname$="Icon.Fla|
00000060  67 73 22 0d 00 28 1b 45  78 69 74 3d a3 3a 53 74  |gs"..(.Exit=.:St|
00000070  61 72 74 75 70 3d a3 3a  44 6f 6e 65 3d a3 0d 00  |artup=.:Done=...|
00000080  32 12 44 6f 4d 6f 64 65  43 68 61 6e 67 65 3d a3  |2.DoModeChange=.|
00000090  0d 00 3c 05 3a 0d 00 46  43 de 20 42 6c 6f 63 6b  |..<.:..FC. Block|
000000a0  20 32 35 36 2c 42 75 66  66 65 72 20 32 35 36 2c  | 256,Buffer 256,|
000000b0  4d 65 6e 75 48 65 6c 70  20 31 36 2c 49 53 70 79  |MenuHelp 16,ISpy|
000000c0  42 6c 6f 63 6b 20 34 30  2c 54 72 61 6e 73 6d 69  |Block 40,Transmi|
000000d0  73 73 69 6f 6e 20 31 30  0d 00 50 2f 49 6e 64 4d  |ssion 10..P/IndM|
000000e0  65 6e 75 4d 61 78 3d 36  34 3a de 20 49 6e 64 69  |enuMax=64:. Indi|
000000f0  72 65 63 74 4d 65 6e 75  54 65 78 74 20 49 6e 64  |rectMenuText Ind|
00000100  4d 65 6e 75 4d 61 78 0d  00 5a 36 de 20 54 65 6d  |MenuMax..Z6. Tem|
00000110  70 6c 61 74 65 73 20 32  31 37 39 2c 49 6e 66 6f  |plates 2179,Info|
00000120  49 6e 64 20 31 38 39 2c  4c 6f 63 49 6e 64 20 35  |Ind 189,LocInd 5|
00000130  39 32 2c 53 70 79 49 6e  64 20 39 30 30 0d 00 64  |92,SpyInd 900..d|
00000140  1c de 20 49 42 4d 65 6e  75 20 37 36 2c 4d 61 69  |.. IBMenu 76,Mai|
00000150  6e 4d 65 6e 75 20 31 32  34 0d 00 6e 05 3a 0d 00  |nMenu 124..n.:..|
00000160  78 2a f4 20 4d 65 73 73  61 67 65 73 20 75 73 65  |x*. Messages use|
00000170  64 20 62 79 20 74 68 65  20 4f 6d 6e 69 44 65 73  |d by the OmniDes|
00000180  6b 20 73 75 69 74 65 3a  0d 00 82 5f 55 74 69 6c  |k suite:..._Util|
00000190  44 65 63 6c 61 72 65 3d  26 38 32 35 43 30 3a 55  |Declare=&825C0:U|
000001a0  74 69 6c 4f 70 65 6e 3d  26 38 32 35 43 31 3a 55  |tilOpen=&825C1:U|
000001b0  74 69 6c 51 75 69 74 74  69 6e 67 3d 26 38 32 35  |tilQuitting=&825|
000001c0  43 32 3a 55 74 69 6c 52  65 73 69 64 65 3d 26 38  |C2:UtilReside=&8|
000001d0  32 35 43 33 3a 55 74 69  6c 41 63 6b 4c 6f 61 64  |25C3:UtilAckLoad|
000001e0  3d 26 38 32 35 43 34 0d  00 8c 2b f4 20 54 68 65  |=&825C4...+. The|
000001f0  73 65 20 61 72 65 20 6f  66 66 69 63 69 61 6c 20  |se are official |
00000200  41 63 6f 72 6e 20 61 6c  6c 6f 63 61 74 69 6f 6e  |Acorn allocation|
00000210  73 2e 0d 00 96 05 3a 0d  00 a0 6e ee 20 85 20 42  |s.....:...n. . B|
00000220  6c 6f 63 6b 21 30 3d 9f  3a 24 28 42 6c 6f 63 6b  |lock!0=.:$(Block|
00000230  2b 34 29 3d f6 24 2b 22  20 28 69 6e 74 65 72 6e  |+4)=.$+" (intern|
00000240  61 6c 20 65 72 72 6f 72  20 63 6f 64 65 20 22 2b  |al error code "+|
00000250  c3 28 9e 29 2b 22 29 22  2b bd 30 3a c8 99 20 22  |.(.)+")"+.0:.. "|
00000260  57 69 6d 70 5f 52 65 70  6f 72 74 45 72 72 6f 72  |Wimp_ReportError|
00000270  22 2c 42 6c 6f 63 6b 2c  31 2c 54 61 73 6b 6e 61  |",Block,1,Taskna|
00000280  6d 65 24 3a e0 0d 00 aa  05 3a 0d 00 b4 3f 4f 6d  |me$:.....:...?Om|
00000290  6e 69 44 65 73 6b 3d a4  52 65 61 64 53 74 61 72  |niDesk=.ReadStar|
000002a0  74 75 70 53 74 72 69 6e  67 3a f4 20 41 6c 73 6f  |tupString:. Also|
000002b0  20 61 73 73 69 67 6e 73  20 45 78 69 74 20 61 6e  | assigns Exit an|
000002c0  64 20 53 74 61 72 74 75  70 0d 00 be 05 3a 0d 00  |d Startup....:..|
000002d0  c8 1b 2a 53 65 74 20 49  63 6f 6e 46 6c 61 67 73  |..*Set IconFlags|
000002e0  24 52 49 53 43 4f 53 20  33 0d 00 d2 37 2a 52 4d  |$RISCOS 3...7*RM|
000002f0  45 6e 73 75 72 65 20 55  74 69 6c 69 74 79 4d 6f  |Ensure UtilityMo|
00000300  64 75 6c 65 20 33 2e 30  30 20 53 65 74 20 49 63  |dule 3.00 Set Ic|
00000310  6f 6e 46 6c 61 67 73 24  52 49 53 43 4f 53 20 32  |onFlags$RISCOS 2|
00000320  0d 00 dc 5a c8 99 20 22  58 4f 53 5f 52 65 61 64  |...Z.. "XOS_Read|
00000330  56 61 72 56 61 6c 22 2c  22 49 63 6f 6e 46 6c 61  |VarVal","IconFla|
00000340  67 73 24 52 49 53 43 4f  53 22 2c 42 6c 6f 63 6b  |gs$RISCOS",Block|
00000350  2c 32 35 36 2c 30 2c 30  20 b8 20 2c 2c 6c 65 6e  |,256,0,0 . ,,len|
00000360  3a 42 6c 6f 63 6b 3f 6c  65 6e 3d 31 33 3a 77 69  |:Block?len=13:wi|
00000370  6d 70 24 3d 24 42 6c 6f  63 6b 0d 00 e6 1c e7 20  |mp$=$Block..... |
00000380  77 69 6d 70 24 3c 3e 22  33 22 20 8c 20 77 69 6d  |wimp$<>"3" . wim|
00000390  70 24 3d 22 32 22 0d 00  f0 1b 2a 55 6e 73 65 74  |p$="2"....*Unset|
000003a0  20 49 63 6f 6e 46 6c 61  67 73 24 52 49 53 43 4f  | IconFlags$RISCO|
000003b0  53 0d 00 fa 05 3a 0d 01  04 21 2a 53 65 74 20 49  |S....:...!*Set I|
000003c0  63 6f 6e 46 6c 61 67 73  24 53 70 72 69 74 65 44  |conFlags$SpriteD|
000003d0  72 61 67 20 59 65 73 0d  01 0e 3a 2a 52 4d 45 6e  |rag Yes...:*RMEn|
000003e0  73 75 72 65 20 44 72 61  67 41 53 70 72 69 74 65  |sure DragASprite|
000003f0  20 30 2e 30 30 20 53 65  74 20 49 63 6f 6e 46 6c  | 0.00 Set IconFl|
00000400  61 67 73 24 53 70 72 69  74 65 44 72 61 67 20 4e  |ags$SpriteDrag N|
00000410  6f 0d 01 18 51 c8 99 20  22 58 4f 53 5f 52 65 61  |o...Q.. "XOS_Rea|
00000420  64 56 61 72 56 61 6c 22  2c 22 49 63 6f 6e 46 6c  |dVarVal","IconFl|
00000430  61 67 73 24 53 70 72 69  74 65 44 72 61 67 22 2c  |ags$SpriteDrag",|
00000440  42 6c 6f 63 6b 2c 32 35  36 2c 30 2c 30 20 b8 20  |Block,256,0,0 . |
00000450  2c 2c 6c 65 6e 3a 42 6c  6f 63 6b 3f 6c 65 6e 3d  |,,len:Block?len=|
00000460  31 33 0d 01 22 32 e7 20  24 42 6c 6f 63 6b 3d 22  |13.."2. $Block="|
00000470  59 65 73 22 20 8c 20 44  72 61 67 41 53 70 72 69  |Yes" . DragASpri|
00000480  74 65 3d b9 3a 8b 20 44  72 61 67 41 53 70 72 69  |te=.:. DragASpri|
00000490  74 65 3d a3 0d 01 2c 1f  2a 55 6e 73 65 74 20 49  |te=...,.*Unset I|
000004a0  63 6f 6e 46 6c 61 67 73  24 53 70 72 69 74 65 44  |conFlags$SpriteD|
000004b0  72 61 67 0d 01 36 05 3a  0d 01 40 59 c8 99 20 22  |rag..6.:..@Y.. "|
000004c0  58 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |XOS_ReadVarVal",|
000004d0  22 4f 62 65 79 24 44 69  72 22 2c 42 6c 6f 63 6b  |"Obey$Dir",Block|
000004e0  2c 32 35 36 2c 30 2c 30  20 b8 20 2c 2c 6c 65 6e  |,256,0,0 . ,,len|
000004f0  3a 42 6c 6f 63 6b 3f 6c  65 6e 3d 31 33 3a 4f 75  |:Block?len=13:Ou|
00000500  72 46 69 6c 65 4e 61 6d  65 24 3d 24 42 6c 6f 63  |rFileName$=$Bloc|
00000510  6b 0d 01 4a 38 4e 3d 2d  31 3a f5 3a 4e 2b 3d 31  |k..J8N=-1:.:N+=1|
00000520  3a fd 20 c1 4f 75 72 46  69 6c 65 4e 61 6d 65 24  |:. .OurFileName$|
00000530  2c a9 28 4f 75 72 46 69  6c 65 4e 61 6d 65 24 29  |,.(OurFileName$)|
00000540  2d 4e 2c 31 29 3d 22 2e  22 0d 01 54 4f 4f 75 72  |-N,1)="."..TOOur|
00000550  50 61 74 68 4e 61 6d 65  24 3d c0 4f 75 72 46 69  |PathName$=.OurFi|
00000560  6c 65 4e 61 6d 65 24 2c  a9 28 4f 75 72 46 69 6c  |leName$,.(OurFil|
00000570  65 4e 61 6d 65 24 29 2d  4e 29 3a 4f 75 72 46 69  |eName$)-N):OurFi|
00000580  6c 65 4e 61 6d 65 24 3d  c2 4f 75 72 46 69 6c 65  |leName$=.OurFile|
00000590  4e 61 6d 65 24 2c 4e 29  0d 01 5e 05 3a 0d 01 68  |Name$,N)..^.:..h|
000005a0  5e f4 20 52 65 61 64 20  73 69 7a 65 20 6f 66 20  |^. Read size of |
000005b0  73 70 72 69 74 65 20 66  69 6c 65 20 61 6e 64 20  |sprite file and |
000005c0  6c 6f 61 64 20 69 74 2e  20 57 65 20 6e 65 65 64  |load it. We need|
000005d0  20 74 6f 20 44 49 4d 20  31 36 20 62 79 74 65 73  | to DIM 16 bytes|
000005e0  20 6d 6f 72 65 20 74 68  61 6e 20 74 68 65 20 66  | more than the f|
000005f0  69 6c 65 27 73 20 73 69  7a 65 2e 0d 01 72 3a c8  |ile's size...r:.|
00000600  99 20 22 4f 53 5f 46 53  43 6f 6e 74 72 6f 6c 22  |. "OS_FSControl"|
00000610  2c 32 38 2c 22 3c 49 63  6f 6e 46 6c 61 67 73 24  |,28,"<IconFlags$|
00000620  44 69 72 3e 2e 53 70 72  69 74 65 73 22 20 b8 20  |Dir>.Sprites" . |
00000630  2c 2c 6c 65 6e 0d 01 7c  85 de 20 53 70 72 69 74  |,,len..|.. Sprit|
00000640  65 73 20 6c 65 6e 2b 31  36 3a 21 53 70 72 69 74  |es len+16:!Sprit|
00000650  65 73 3d 6c 65 6e 2b 31  36 3a 53 70 72 69 74 65  |es=len+16:Sprite|
00000660  73 21 34 3d 30 3a 53 70  72 69 74 65 73 21 38 3d  |s!4=0:Sprites!8=|
00000670  31 36 3a 53 70 72 69 74  65 73 21 31 32 3d 31 36  |16:Sprites!12=16|
00000680  3a c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |:.. "OS_SpriteOp|
00000690  22 2c 32 35 36 2b 31 30  2c 53 70 72 69 74 65 73  |",256+10,Sprites|
000006a0  2c 22 3c 49 63 6f 6e 46  6c 61 67 73 24 44 69 72  |,"<IconFlags$Dir|
000006b0  3e 2e 53 70 72 69 74 65  73 22 0d 01 86 05 3a 0d  |>.Sprites"....:.|
000006c0  01 90 11 e7 20 77 69 6d  70 24 3d 22 33 22 20 8c  |.... wimp$="3" .|
000006d0  0d 01 9a 17 20 20 de 20  6d 65 73 73 61 67 65 6c  |....  . messagel|
000006e0  69 73 74 25 20 33 36 0d  01 a4 2f 20 20 6d 65 73  |ist% 36.../  mes|
000006f0  73 61 67 65 6c 69 73 74  25 21 30 3d 26 35 30 32  |sagelist%!0=&502|
00000700  3a 6d 65 73 73 61 67 65  6c 69 73 74 25 21 34 3d  |:messagelist%!4=|
00000710  26 34 30 30 43 31 0d 01  ae 3a 20 20 6d 65 73 73  |&400C1...:  mess|
00000720  61 67 65 6c 69 73 74 25  21 38 3d 55 74 69 6c 4f  |agelist%!8=UtilO|
00000730  70 65 6e 3a 6d 65 73 73  61 67 65 6c 69 73 74 25  |pen:messagelist%|
00000740  21 31 32 3d 55 74 69 6c  51 75 69 74 74 69 6e 67  |!12=UtilQuitting|
00000750  0d 01 b8 33 20 20 6d 65  73 73 61 67 65 6c 69 73  |...3  messagelis|
00000760  74 25 21 31 36 3d 55 74  69 6c 52 65 73 69 64 65  |t%!16=UtilReside|
00000770  3a 6d 65 73 73 61 67 65  6c 69 73 74 25 21 32 30  |:messagelist%!20|
00000780  3d 31 30 0d 01 c2 3b 20  20 6d 65 73 73 61 67 65  |=10...;  message|
00000790  6c 69 73 74 25 21 32 34  3d 36 3a 6d 65 73 73 61  |list%!24=6:messa|
000007a0  67 65 6c 69 73 74 25 21  32 38 3d 32 3a 6d 65 73  |gelist%!28=2:mes|
000007b0  73 61 67 65 6c 69 73 74  25 21 33 32 3d 30 0d 01  |sagelist%!32=0..|
000007c0  cc 4b 20 20 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |.K  .. "Wimp_Ini|
000007d0  74 69 61 6c 69 73 65 22  2c 33 30 30 2c 26 34 42  |tialise",300,&4B|
000007e0  35 33 34 31 35 34 2c 54  61 73 6b 6e 61 6d 65 24  |534154,Taskname$|
000007f0  2c 6d 65 73 73 61 67 65  6c 69 73 74 25 20 b8 20  |,messagelist% . |
00000800  77 69 6d 70 2c 54 61 73  6b 0d 01 d6 05 cc 0d 01  |wimp,Task.......|
00000810  e0 3e 20 20 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |.>  .. "Wimp_Ini|
00000820  74 69 61 6c 69 73 65 22  2c 32 30 30 2c 26 34 42  |tialise",200,&4B|
00000830  35 33 34 31 35 34 2c 54  61 73 6b 6e 61 6d 65 24  |534154,Taskname$|
00000840  20 b8 20 77 69 6d 70 2c  54 61 73 6b 0d 01 ea 05  | . wimp,Task....|
00000850  cd 0d 01 f4 05 3a 0d 01  fe 22 c8 99 20 22 49 6e  |.....:...".. "In|
00000860  74 65 72 66 61 63 65 5f  49 6e 69 74 69 61 6c 69  |terface_Initiali|
00000870  73 65 22 2c 54 61 73 6b  0d 02 08 05 3a 0d 02 12  |se",Task....:...|
00000880  37 c8 99 20 22 57 69 6d  70 5f 4f 70 65 6e 54 65  |7.. "Wimp_OpenTe|
00000890  6d 70 6c 61 74 65 22 2c  2c 22 3c 49 63 6f 6e 46  |mplate",,"<IconF|
000008a0  6c 61 67 73 24 44 69 72  3e 2e 54 65 6d 70 6c 61  |lags$Dir>.Templa|
000008b0  74 65 73 22 0d 02 1c 45  c8 99 20 22 57 69 6d 70  |tes"...E.. "Wimp|
000008c0  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
000008d0  54 65 6d 70 6c 61 74 65  73 2c 49 6e 66 6f 49 6e  |Templates,InfoIn|
000008e0  64 2c 49 6e 66 6f 49 6e  64 2b 31 38 39 2c 2d 31  |d,InfoInd+189,-1|
000008f0  2c 22 49 6e 66 6f 22 2c  30 0d 02 26 2c c8 99 20  |,"Info",0..&,.. |
00000900  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00000910  6f 77 22 2c 2c 54 65 6d  70 6c 61 74 65 73 20 b8  |ow",,Templates .|
00000920  20 49 6e 66 6f 0d 02 30  5c c8 99 20 22 57 69 6d  | Info..0\.. "Wim|
00000930  70 5f 4c 6f 61 64 54 65  6d 70 6c 61 74 65 22 2c  |p_LoadTemplate",|
00000940  2c 54 65 6d 70 6c 61 74  65 73 2c 4c 6f 63 49 6e  |,Templates,LocIn|
00000950  64 2c 4c 6f 63 49 6e 64  2b 35 39 32 2c 2d 31 2c  |d,LocInd+592,-1,|
00000960  22 57 69 6e 64 6f 77 58  59 22 2c 30 3a 54 65 6d  |"WindowXY",0:Tem|
00000970  70 6c 61 74 65 73 21 36  34 3d 53 70 72 69 74 65  |plates!64=Sprite|
00000980  73 0d 02 3a 2b c8 99 20  22 57 69 6d 70 5f 43 72  |s..:+.. "Wimp_Cr|
00000990  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 54 65 6d  |eateWindow",,Tem|
000009a0  70 6c 61 74 65 73 20 b8  20 4c 6f 63 0d 02 44 5b  |plates . Loc..D[|
000009b0  c8 99 20 22 57 69 6d 70  5f 4c 6f 61 64 54 65 6d  |.. "Wimp_LoadTem|
000009c0  70 6c 61 74 65 22 2c 2c  54 65 6d 70 6c 61 74 65  |plate",,Template|
000009d0  73 2c 53 70 79 49 6e 64  2c 53 70 79 49 6e 64 2b  |s,SpyInd,SpyInd+|
000009e0  39 30 30 2c 2d 31 2c 22  53 70 79 43 61 6c 63 22  |900,-1,"SpyCalc"|
000009f0  2c 30 3a 54 65 6d 70 6c  61 74 65 73 21 36 34 3d  |,0:Templates!64=|
00000a00  53 70 72 69 74 65 73 0d  02 4e 2f c8 99 20 22 57  |Sprites..N/.. "W|
00000a10  69 6d 70 5f 43 72 65 61  74 65 57 69 6e 64 6f 77  |imp_CreateWindow|
00000a20  22 2c 2c 54 65 6d 70 6c  61 74 65 73 20 b8 20 53  |",,Templates . S|
00000a30  70 79 43 61 6c 63 0d 02  58 1b c8 99 20 22 57 69  |pyCalc..X... "Wi|
00000a40  6d 70 5f 43 6c 6f 73 65  54 65 6d 70 6c 61 74 65  |mp_CloseTemplate|
00000a50  22 0d 02 62 05 3a 0d 02  6c 0f f2 42 75 69 6c 64  |"..b.:..l..Build|
00000a60  4d 65 6e 75 73 0d 02 76  05 3a 0d 02 80 15 f2 43  |Menus..v.:.....C|
00000a70  6c 65 61 6e 55 70 4c 6f  63 57 69 6e 64 6f 77 0d  |leanUpLocWindow.|
00000a80  02 8a 1e 52 65 61 64 45  72 72 6f 72 3d ac 28 a4  |...ReadError=.(.|
00000a90  4c 6f 61 64 53 65 74 74  69 6e 67 73 29 0d 02 94  |LoadSettings)...|
00000aa0  1f f2 43 6c 65 61 72 53  70 79 43 61 6c 63 57 69  |..ClearSpyCalcWi|
00000ab0  6e 64 6f 77 28 53 70 79  69 6e 67 29 0d 02 9e 05  |ndow(Spying)....|
00000ac0  3a 0d 02 a8 0f f2 49 6e  69 74 69 61 6c 69 73 65  |:.....Initialise|
00000ad0  0d 02 b2 05 3a 0d 02 bc  12 e7 20 4f 6d 6e 69 44  |....:..... OmniD|
00000ae0  65 73 6b 3d 30 20 8c 0d  02 c6 20 20 20 f4 20 50  |esk=0 ....   . P|
00000af0  75 74 20 49 63 6f 6e 20  6f 6e 20 74 68 65 20 69  |ut Icon on the i|
00000b00  63 6f 6e 2d 62 61 72 0d  02 d0 10 20 20 42 6c 6f  |con-bar....  Blo|
00000b10  63 6b 21 30 3d 2d 31 0d  02 da 31 20 20 42 6c 6f  |ck!0=-1...1  Blo|
00000b20  63 6b 21 34 3d 30 3a 42  6c 6f 63 6b 21 38 3d 30  |ck!4=0:Block!8=0|
00000b30  3a 42 6c 6f 63 6b 21 31  32 3d 36 38 3a 42 6c 6f  |:Block!12=68:Blo|
00000b40  63 6b 21 31 36 3d 36 38  0d 02 e4 35 20 20 42 6c  |ck!16=68...5  Bl|
00000b50  6f 63 6b 21 32 30 3d 26  31 37 30 30 33 30 30 32  |ock!20=&17003002|
00000b60  3a 24 28 42 6c 6f 63 6b  2b 32 34 29 3d 22 21 49  |:$(Block+24)="!I|
00000b70  63 6f 6e 46 6c 61 67 73  22 2b bd 31 33 0d 02 ee  |conFlags"+.13...|
00000b80  2b 20 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |+  .. "Wimp_Crea|
00000b90  74 65 49 63 6f 6e 22 2c  2c 42 6c 6f 63 6b 20 b8  |teIcon",,Block .|
00000ba0  20 49 63 6f 6e 42 61 72  0d 02 f8 05 cd 0d 03 02  | IconBar........|
00000bb0  05 3a 0d 03 0c 26 e7 20  4f 6d 6e 69 44 65 73 6b  |.:...&. OmniDesk|
00000bc0  3c 3e 30 20 8c 20 f2 44  65 63 6c 61 72 65 54 6f  |<>0 . .DeclareTo|
00000bd0  4f 6d 6e 69 44 65 73 6b  0d 03 16 52 e7 20 53 74  |OmniDesk...R. St|
00000be0  61 72 74 75 70 20 8c 20  44 6f 6e 65 3d b9 3a f4  |artup . Done=.:.|
00000bf0  20 27 2d 53 74 61 72 74  75 70 27 20 70 61 72 61  | '-Startup' para|
00000c00  6d 65 74 65 72 20 6d 65  61 6e 73 20 27 64 65 63  |meter means 'dec|
00000c10  6c 61 72 65 20 61 6e 64  20 64 69 65 20 69 6d 6d  |lare and die imm|
00000c20  65 64 69 61 74 65 6c 79  27 2e 0d 03 20 05 3a 0d  |ediately'... .:.|
00000c30  03 2a 26 f2 55 70 64 61  74 65 49 63 6f 6e 28 49  |.*&.UpdateIcon(I|
00000c40  6e 66 6f 2c 33 2c 56 65  72 73 69 6f 6e 4e 75 6d  |nfo,3,VersionNum|
00000c50  62 65 72 24 29 0d 03 34  36 f2 4d 6f 64 65 43 68  |ber$)..46.ModeCh|
00000c60  61 6e 67 65 3a f4 20 54  6f 20 75 70 64 61 74 65  |ange:. To update|
00000c70  20 69 63 6f 6e 2d 62 61  72 20 69 63 6f 6e 20 69  | icon-bar icon i|
00000c80  66 20 6e 65 63 65 73 73  61 72 79 0d 03 3e 05 3a  |f necessary..>.:|
00000c90  0d 03 48 0e ee 20 85 20  f2 45 72 72 6f 72 0d 03  |..H.. . .Error..|
00000ca0  52 94 e7 20 52 65 61 64  45 72 72 6f 72 20 8c 20  |R.. ReadError . |
00000cb0  52 65 61 64 45 72 72 6f  72 3d a3 3a f2 44 65 66  |ReadError=.:.Def|
00000cc0  61 75 6c 74 53 65 74 74  69 6e 67 73 3a 85 20 39  |aultSettings:. 9|
00000cd0  39 39 39 2c 22 41 6e 20  65 72 72 6f 72 20 6f 63  |999,"An error oc|
00000ce0  63 75 72 72 65 64 20 77  68 69 6c 73 74 20 72 65  |curred whilst re|
00000cf0  61 64 69 6e 67 20 74 68  65 20 73 65 74 74 69 6e  |ading the settin|
00000d00  67 73 20 66 69 6c 65 2e  20 44 65 66 61 75 6c 74  |gs file. Default|
00000d10  20 73 65 74 74 69 6e 67  73 20 77 69 6c 6c 20 74  | settings will t|
00000d20  68 65 72 65 66 6f 72 65  20 62 65 20 75 73 65 64  |herefore be used|
00000d30  2e 22 0d 03 5c 05 3a 0d  03 66 29 c8 99 20 22 4f  |."..\.:..f).. "O|
00000d40  53 5f 52 65 61 64 4d 6f  6e 6f 74 6f 6e 69 63 54  |S_ReadMonotonicT|
00000d50  69 6d 65 22 20 b8 20 70  6f 6c 6c 74 69 6d 65 25  |ime" . polltime%|
00000d60  0d 03 70 15 4f 6c 64 57  69 6e 3d 30 3a 4f 6c 64  |..p.OldWin=0:Old|
00000d70  49 63 3d 2d 31 0d 03 7a  05 3a 0d 03 84 17 f4 20  |Ic=-1..z.:..... |
00000d80  4d 61 69 6e 20 70 72 6f  67 72 61 6d 20 6c 6f 6f  |Main program loo|
00000d90  70 0d 03 8e 05 f5 0d 03  98 36 20 20 c8 99 20 22  |p........6  .. "|
00000da0  57 69 6d 70 5f 50 6f 6c  6c 49 64 6c 65 22 2c 25  |Wimp_PollIdle",%|
00000db0  31 31 30 30 30 30 30 31  31 30 30 30 30 2c 42 6c  |1100000110000,Bl|
00000dc0  6f 63 6b 20 b8 20 52 65  61 73 6f 6e 0d 03 a2 26  |ock . Reason...&|
00000dd0  20 20 c8 99 20 22 49 6e  74 65 72 66 61 63 65 5f  |  .. "Interface_|
00000de0  50 6f 6c 6c 22 2c 52 65  61 73 6f 6e 2c 2c 54 61  |Poll",Reason,,Ta|
00000df0  73 6b 0d 03 ac 34 20 20  c8 99 20 22 49 6e 74 65  |sk...4  .. "Inte|
00000e00  72 66 61 63 65 5f 50 72  65 50 72 6f 63 65 73 73  |rface_PreProcess|
00000e10  4b 65 79 22 2c 52 65 61  73 6f 6e 2c 42 6c 6f 63  |Key",Reason,Bloc|
00000e20  6b 2c 54 61 73 6b 0d 03  b6 11 20 20 c8 8e 20 52  |k,Task....  .. R|
00000e30  65 61 73 6f 6e 20 ca 0d  03 c0 33 20 20 20 20 c9  |eason ....3    .|
00000e40  20 30 20 3a 20 c8 99 20  22 4f 53 5f 52 65 61 64  | 0 : .. "OS_Read|
00000e50  4d 6f 6e 6f 74 6f 6e 69  63 54 69 6d 65 22 20 b8  |MonotonicTime" .|
00000e60  20 70 6f 6c 6c 74 69 6d  65 25 0d 03 ca 34 20 20  | polltime%...4  |
00000e70  20 20 20 20 20 20 20 20  20 20 20 e7 20 53 70 79  |           . Spy|
00000e80  69 6e 67 20 80 20 28 a4  4f 70 65 6e 53 74 61 74  |ing . (.OpenStat|
00000e90  65 28 53 70 79 43 61 6c  63 29 29 20 20 8c 0d 03  |e(SpyCalc))  ...|
00000ea0  d4 35 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.5              |
00000eb0  20 f2 44 6f 53 70 79 28  4f 6c 64 57 69 6e 2c 4f  | .DoSpy(OldWin,O|
00000ec0  6c 64 49 63 29 3a 70 6f  6c 6c 74 69 6d 65 25 2b  |ldIc):polltime%+|
00000ed0  3d 31 30 0d 03 de 12 20  20 20 20 20 20 20 20 20  |=10....         |
00000ee0  20 20 20 20 cc 0d 03 e8  4e 20 20 20 20 20 20 20  |    ....N       |
00000ef0  20 20 20 20 20 20 20 20  70 6f 6c 6c 74 69 6d 65  |        polltime|
00000f00  25 2b 3d 31 30 30 3a f4  20 44 6f 20 61 20 57 69  |%+=100:. Do a Wi|
00000f10  6d 70 5f 50 6f 6c 6c 20  61 70 70 72 6f 78 69 6d  |mp_Poll approxim|
00000f20  61 74 65 6c 79 20 6f 6e  63 65 20 61 20 73 65 63  |ately once a sec|
00000f30  6f 6e 64 0d 03 f2 12 20  20 20 20 20 20 20 20 20  |ond....         |
00000f40  20 20 20 20 cd 0d 03 fc  5e 20 20 20 20 20 20 20  |    ....^       |
00000f50  20 20 20 20 20 20 e7 20  44 6f 4d 6f 64 65 43 68  |      . DoModeCh|
00000f60  61 6e 67 65 20 8c 20 e7  20 a4 4f 70 65 6e 53 74  |ange . . .OpenSt|
00000f70  61 74 65 28 53 70 79 43  61 6c 63 29 20 8c 20 f2  |ate(SpyCalc) . .|
00000f80  4f 70 65 6e 28 53 70 79  43 61 6c 63 2c a3 2c 58  |Open(SpyCalc,.,X|
00000f90  50 6f 73 69 74 69 6f 6e  2c 59 50 6f 73 69 74 69  |Position,YPositi|
00000fa0  6f 6e 29 0d 04 06 15 20  20 20 20 c9 20 31 20 3a  |on)....    . 1 :|
00000fb0  20 f2 52 65 64 72 61 77  0d 04 10 29 20 20 20 20  | .Redraw...)    |
00000fc0  c9 20 32 20 3a 20 c8 99  20 22 57 69 6d 70 5f 4f  |. 2 : .. "Wimp_O|
00000fd0  70 65 6e 57 69 6e 64 6f  77 22 2c 2c 42 6c 6f 63  |penWindow",,Bloc|
00000fe0  6b 0d 04 1a 2a 20 20 20  20 c9 20 33 20 3a 20 c8  |k...*    . 3 : .|
00000ff0  99 20 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |. "Wimp_CloseWin|
00001000  64 6f 77 22 2c 2c 42 6c  6f 63 6b 0d 04 24 20 20  |dow",,Block..$  |
00001010  20 20 20 20 20 20 20 20  20 20 20 20 e7 20 45 78  |            . Ex|
00001020  69 74 20 8c 20 44 6f 6e  65 3d b9 0d 04 2e 1a 20  |it . Done=..... |
00001030  20 20 20 c9 20 36 20 3a  20 f2 4d 6f 75 73 65 42  |   . 6 : .MouseB|
00001040  75 74 74 6f 6e 0d 04 38  1b 20 20 20 20 c9 20 37  |utton..8.    . 7|
00001050  20 3a 20 f2 44 72 61 67  46 69 6e 69 73 68 65 64  | : .DragFinished|
00001060  0d 04 42 19 20 20 20 20  c9 20 38 20 3a 20 f2 4b  |..B.    . 8 : .K|
00001070  65 79 50 72 65 73 73 65  64 0d 04 4c 19 20 20 20  |eyPressed..L.   |
00001080  20 c9 20 39 20 3a 20 f2  44 65 63 6f 64 65 4d 65  | . 9 : .DecodeMe|
00001090  6e 75 0d 04 56 24 20 20  20 20 c9 20 31 37 2c 31  |nu..V$    . 17,1|
000010a0  38 2c 31 39 20 3a 20 f2  52 65 63 69 65 76 65 4d  |8,19 : .RecieveM|
000010b0  65 73 73 61 67 65 0d 04  60 07 20 20 cb 0d 04 6a  |essage..`.  ...j|
000010c0  0a fd 20 44 6f 6e 65 0d  04 74 0f f2 53 61 79 47  |.. Done..t..SayG|
000010d0  6f 6f 64 62 79 65 0d 04  7e 05 e0 0d 04 88 05 3a  |oodbye..~......:|
000010e0  0d 04 92 0c dd 20 f2 45  72 72 6f 72 0d 04 9c 1c  |..... .Error....|
000010f0  43 6c 69 63 6b 3d 30 3a  42 6c 6f 63 6b 21 30 3d  |Click=0:Block!0=|
00001100  9f 3a c8 8e 20 9f 20 ca  0d 04 a6 1b 20 20 c9 20  |.:.. . .....  . |
00001110  39 39 39 39 3a f4 20 43  75 73 74 6f 6d 20 65 72  |9999:. Custom er|
00001120  72 6f 72 0d 04 b0 18 20  20 20 20 24 28 42 6c 6f  |ror....    $(Blo|
00001130  63 6b 2b 34 29 3d f6 24  2b bd 30 0d 04 ba 3f 20  |ck+4)=.$+.0...? |
00001140  20 20 20 c8 99 20 22 57  69 6d 70 5f 52 65 70 6f  |   .. "Wimp_Repo|
00001150  72 74 45 72 72 6f 72 22  2c 42 6c 6f 63 6b 2c 31  |rtError",Block,1|
00001160  37 2c 22 4e 6f 74 69 63  65 20 66 72 6f 6d 20 22  |7,"Notice from "|
00001170  2b 54 61 73 6b 6e 61 6d  65 24 0d 04 c4 07 20 20  |+Taskname$....  |
00001180  7f 0d 04 ce 76 20 20 20  20 24 28 42 6c 6f 63 6b  |....v    $(Block|
00001190  2b 34 29 3d f6 24 2b 22  20 28 69 6e 74 65 72 6e  |+4)=.$+" (intern|
000011a0  61 6c 20 65 72 72 6f 72  20 63 6f 64 65 20 22 2b  |al error code "+|
000011b0  c3 9e 2b 22 29 2e 20 43  6c 69 63 6b 20 6f 6e 20  |..+"). Click on |
000011c0  4f 4b 20 74 6f 20 63 6f  6e 74 69 6e 75 65 2c 20  |OK to continue, |
000011d0  6f 72 20 43 61 6e 63 65  6c 20 74 6f 20 74 65 72  |or Cancel to ter|
000011e0  6d 69 6e 61 74 65 20 74  68 65 20 70 72 6f 67 72  |minate the progr|
000011f0  61 6d 2e 22 2b bd 30 0d  04 d8 38 20 20 20 20 c8  |am."+.0...8    .|
00001200  99 20 22 57 69 6d 70 5f  52 65 70 6f 72 74 45 72  |. "Wimp_ReportEr|
00001210  72 6f 72 22 2c 42 6c 6f  63 6b 2c 33 2c 54 61 73  |ror",Block,3,Tas|
00001220  6b 6e 61 6d 65 24 20 b8  20 2c 43 6c 69 63 6b 0d  |kname$ . ,Click.|
00001230  04 e2 05 cb 0d 04 ec 1d  e7 20 43 6c 69 63 6b 3d  |......... Click=|
00001240  32 20 8c 20 f2 53 61 79  47 6f 6f 64 62 79 65 3a  |2 . .SayGoodbye:|
00001250  e0 0d 04 f6 05 e1 0d 05  00 05 3a 0d 05 0a 2e dd  |..........:.....|
00001260  20 f2 4f 70 65 6e 28 57  69 6e 64 6f 77 48 61 6e  | .Open(WindowHan|
00001270  64 6c 65 2c 54 6f 70 4f  66 53 74 61 63 6b 2c 61  |dle,TopOfStack,a|
00001280  63 72 6f 73 73 2c 75 70  29 0d 05 14 18 42 6c 6f  |cross,up)....Blo|
00001290  63 6b 21 30 3d 57 69 6e  64 6f 77 48 61 6e 64 6c  |ck!0=WindowHandl|
000012a0  65 0d 05 1e 23 c8 99 20  22 57 69 6d 70 5f 47 65  |e...#.. "Wimp_Ge|
000012b0  74 57 69 6e 64 6f 77 53  74 61 74 65 22 2c 2c 42  |tWindowState",,B|
000012c0  6c 6f 63 6b 0d 05 28 4a  e7 20 28 61 63 72 6f 73  |lock..(J. (acros|
000012d0  73 3c 3e 2d 31 29 20 80  20 28 61 63 72 6f 73 73  |s<>-1) . (across|
000012e0  3c 3e 2d 31 29 20 8c 20  f2 44 65 63 69 64 65 57  |<>-1) . .DecideW|
000012f0  69 6e 64 6f 77 50 6f 73  69 74 69 6f 6e 28 42 6c  |indowPosition(Bl|
00001300  6f 63 6b 2c 61 63 72 6f  73 73 2c 75 70 29 0d 05  |ock,across,up)..|
00001310  32 1e e7 20 54 6f 70 4f  66 53 74 61 63 6b 20 8c  |2.. TopOfStack .|
00001320  20 42 6c 6f 63 6b 21 32  38 3d 2d 31 0d 05 3c 1f  | Block!28=-1..<.|
00001330  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 57 69 6e  |.. "Wimp_OpenWin|
00001340  64 6f 77 22 2c 2c 42 6c  6f 63 6b 0d 05 46 05 e1  |dow",,Block..F..|
00001350  0d 05 50 05 3a 0d 05 5a  1a dd 20 f2 43 6c 6f 73  |..P.:..Z.. .Clos|
00001360  65 28 57 69 6e 64 6f 77  48 61 6e 64 6c 65 29 0d  |e(WindowHandle).|
00001370  05 64 18 42 6c 6f 63 6b  21 30 3d 57 69 6e 64 6f  |.d.Block!0=Windo|
00001380  77 48 61 6e 64 6c 65 0d  05 6e 23 c8 99 20 22 57  |wHandle..n#.. "W|
00001390  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
000013a0  74 65 22 2c 2c 42 6c 6f  63 6b 0d 05 78 20 c8 99  |te",,Block..x ..|
000013b0  20 22 57 69 6d 70 5f 43  6c 6f 73 65 57 69 6e 64  | "Wimp_CloseWind|
000013c0  6f 77 22 2c 2c 42 6c 6f  63 6b 0d 05 82 05 e1 0d  |ow",,Block......|
000013d0  05 8c 05 3a 0d 05 96 2c  dd 20 f2 44 65 63 69 64  |...:...,. .Decid|
000013e0  65 57 69 6e 64 6f 77 50  6f 73 69 74 69 6f 6e 28  |eWindowPosition(|
000013f0  42 6c 6f 63 6b 2c 61 63  72 6f 73 73 2c 75 70 29  |Block,across,up)|
00001400  0d 05 a0 4c f4 20 55 73  65 20 6f 66 20 74 68 69  |...L. Use of thi|
00001410  73 20 70 72 6f 63 65 64  75 72 65 20 6c 65 74 73  |s procedure lets|
00001420  20 79 6f 75 20 6f 70 65  6e 20 77 69 6e 64 6f 77  | you open window|
00001430  73 20 6f 6e 20 61 6e 20  69 6e 76 69 73 69 62 6c  |s on an invisibl|
00001440  65 20 67 72 69 64 20 77  68 69 63 68 0d 05 aa 49  |e grid which...I|
00001450  f4 20 61 75 74 6f 6d 61  74 69 63 61 6c 6c 79 20  |. automatically |
00001460  66 69 74 73 20 69 74 73  65 6c 66 20 74 6f 20 74  |fits itself to t|
00001470  68 65 20 73 63 72 65 65  6e 20 6d 6f 64 65 20 69  |he screen mode i|
00001480  6e 20 75 73 65 2e 20 54  68 65 72 65 20 61 72 65  |n use. There are|
00001490  20 66 69 76 65 0d 05 b4  4a f4 20 70 6f 73 69 74  | five...J. posit|
000014a0  69 6f 6e 73 20 61 63 72  6f 73 73 20 28 6c 65 66  |ions across (lef|
000014b0  74 2c 20 6d 69 64 2d 6c  65 66 74 2c 20 63 65 6e  |t, mid-left, cen|
000014c0  74 72 65 2c 20 6d 69 64  2d 72 69 67 68 74 2c 20  |tre, mid-right, |
000014d0  72 69 67 68 74 29 20 61  6e 64 20 66 69 76 65 0d  |right) and five.|
000014e0  05 be 47 f4 20 70 6f 73  69 74 69 6f 6e 73 20 75  |..G. positions u|
000014f0  70 20 28 62 6f 74 74 6f  6d 20 6f 66 20 73 63 72  |p (bottom of scr|
00001500  65 65 6e 2c 20 61 62 6f  76 65 20 69 63 6f 6e 2d  |een, above icon-|
00001510  62 61 72 2c 20 63 65 6e  74 72 65 20 6f 66 20 73  |bar, centre of s|
00001520  63 72 65 65 6e 2c 0d 05  c8 2b f4 20 63 65 6e 74  |creen,...+. cent|
00001530  72 65 20 74 6f 70 20 6f  66 20 73 63 72 65 65 6e  |re top of screen|
00001540  2c 20 74 6f 70 20 6f 66  20 73 63 72 65 65 6e 29  |, top of screen)|
00001550  2e 0d 05 d2 07 20 20 3a  0d 05 dc 43 58 70 69 78  |.....  :...CXpix|
00001560  65 6c 73 3d a4 4d 6f 64  65 49 6e 66 6f 28 22 58  |els=.ModeInfo("X|
00001570  50 69 78 65 6c 73 22 2c  2d 31 29 3a 59 70 69 78  |Pixels",-1):Ypix|
00001580  65 6c 73 3d a4 4d 6f 64  65 49 6e 66 6f 28 22 59  |els=.ModeInfo("Y|
00001590  50 69 78 65 6c 73 22 2c  2d 31 29 0d 05 e6 4f 58  |Pixels",-1)...OX|
000015a0  45 69 67 46 61 63 74 6f  72 3d a4 4d 6f 64 65 49  |EigFactor=.ModeI|
000015b0  6e 66 6f 28 22 58 45 69  67 46 61 63 74 6f 72 22  |nfo("XEigFactor"|
000015c0  2c 2d 31 29 3a 59 45 69  67 46 61 63 74 6f 72 3d  |,-1):YEigFactor=|
000015d0  a4 4d 6f 64 65 49 6e 66  6f 28 22 59 45 69 67 46  |.ModeInfo("YEigF|
000015e0  61 63 74 6f 72 22 2c 2d  31 29 0d 05 f0 07 20 20  |actor",-1)....  |
000015f0  3a 0d 05 fa 38 74 6f 70  3d 42 6c 6f 63 6b 21 31  |:...8top=Block!1|
00001600  36 3a 72 69 67 68 74 3d  42 6c 6f 63 6b 21 31 32  |6:right=Block!12|
00001610  3a 62 6f 74 3d 42 6c 6f  63 6b 21 38 3a 6c 65 66  |:bot=Block!8:lef|
00001620  74 3d 42 6c 6f 63 6b 21  34 0d 06 04 41 c8 99 20  |t=Block!4...A.. |
00001630  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00001640  22 2c 2c 42 6c 6f 63 6b  3a c8 99 20 22 57 69 6d  |",,Block:.. "Wim|
00001650  70 5f 47 65 74 57 69 6e  64 6f 77 4f 75 74 6c 69  |p_GetWindowOutli|
00001660  6e 65 22 2c 2c 42 6c 6f  63 6b 0d 06 0e 26 54 42  |ne",,Block...&TB|
00001670  3d 28 28 42 6c 6f 63 6b  21 31 36 29 2d 74 6f 70  |=((Block!16)-top|
00001680  29 2f 28 32 5e 59 45 69  67 46 61 63 74 6f 72 29  |)/(2^YEigFactor)|
00001690  0d 06 18 28 56 53 3d 28  28 42 6c 6f 63 6b 21 31  |...(VS=((Block!1|
000016a0  32 29 2d 72 69 67 68 74  29 2f 28 32 5e 58 45 69  |2)-right)/(2^XEi|
000016b0  67 46 61 63 74 6f 72 29  0d 06 22 25 48 53 3d 28  |gFactor).."%HS=(|
000016c0  62 6f 74 2d 28 42 6c 6f  63 6b 21 38 29 29 2f 28  |bot-(Block!8))/(|
000016d0  32 5e 59 45 69 67 46 61  63 74 6f 72 29 0d 06 2c  |2^YEigFactor)..,|
000016e0  26 4c 50 3d 28 6c 65 66  74 2d 28 42 6c 6f 63 6b  |&LP=(left-(Block|
000016f0  21 34 29 29 2f 28 32 5e  58 45 69 67 46 61 63 74  |!4))/(2^XEigFact|
00001700  6f 72 29 0d 06 36 4b f4  20 4c 50 20 69 73 20 4c  |or)..6K. LP is L|
00001710  65 66 74 20 50 69 78 65  6c 3a 20 6e 6f 72 6d 61  |eft Pixel: norma|
00001720  6c 6c 79 20 70 72 65 73  65 6e 74 2c 20 62 75 74  |lly present, but|
00001730  20 6e 6f 74 20 69 66 20  77 69 6e 64 6f 77 20 69  | not if window i|
00001740  73 20 74 72 61 6e 73 70  61 72 65 6e 74 2e 0d 06  |s transparent...|
00001750  40 25 77 69 64 74 68 3d  28 72 69 67 68 74 2d 6c  |@%width=(right-l|
00001760  65 66 74 29 2f 28 32 5e  58 45 69 67 46 61 63 74  |eft)/(2^XEigFact|
00001770  6f 72 29 0d 06 4a 23 68  65 69 67 68 74 3d 28 74  |or)..J#height=(t|
00001780  6f 70 2d 62 6f 74 29 2f  28 32 5e 59 45 69 67 46  |op-bot)/(2^YEigF|
00001790  61 63 74 6f 72 29 0d 06  54 0f c8 8e 20 61 63 72  |actor)..T... acr|
000017a0  6f 73 73 20 ca 0d 06 5e  0e 20 20 c9 20 30 3a 78  |oss ...^.  . 0:x|
000017b0  3d 4c 50 0d 06 68 2c 20  20 c9 20 31 3a 78 3d 4c  |=LP..h,  . 1:x=L|
000017c0  50 2b 28 28 58 70 69 78  65 6c 73 2b 31 29 2d 28  |P+((Xpixels+1)-(|
000017d0  77 69 64 74 68 2b 4c 50  2b 56 53 29 29 2f 34 0d  |width+LP+VS))/4.|
000017e0  06 72 2c 20 20 c9 20 32  3a 78 3d 4c 50 2b 28 28  |.r,  . 2:x=LP+((|
000017f0  58 70 69 78 65 6c 73 2b  31 29 2d 28 77 69 64 74  |Xpixels+1)-(widt|
00001800  68 2b 4c 50 2b 56 53 29  29 2f 32 0d 06 7c 32 20  |h+LP+VS))/2..|2 |
00001810  20 c9 20 33 3a 78 3d 4c  50 2b 28 33 2a 28 28 28  | . 3:x=LP+(3*(((|
00001820  58 70 69 78 65 6c 73 2b  31 29 2d 28 77 69 64 74  |Xpixels+1)-(widt|
00001830  68 2b 4c 50 2b 56 53 29  29 2f 34 29 29 0d 06 86  |h+LP+VS))/4))...|
00001840  22 20 20 c9 20 34 3a 78  3d 28 58 70 69 78 65 6c  |"  . 4:x=(Xpixel|
00001850  73 2b 31 29 2d 28 77 69  64 74 68 2b 56 53 29 0d  |s+1)-(width+VS).|
00001860  06 90 05 cb 0d 06 9a 0b  c8 8e 20 75 70 20 ca 0d  |.......... up ..|
00001870  06 a4 0e 20 20 c9 20 30  3a 79 3d 48 53 0d 06 ae  |...  . 0:y=HS...|
00001880  23 20 20 c9 20 31 3a 79  3d 48 53 2b 28 31 33 32  |#  . 1:y=HS+(132|
00001890  2f 28 32 5e 59 45 69 67  46 61 63 74 6f 72 29 29  |/(2^YEigFactor))|
000018a0  0d 06 b8 2d 20 20 c9 20  32 3a 79 3d 48 53 2b 28  |...-  . 2:y=HS+(|
000018b0  28 59 70 69 78 65 6c 73  2b 31 29 2d 28 68 65 69  |(Ypixels+1)-(hei|
000018c0  67 68 74 2b 54 42 2b 48  53 29 29 2f 32 0d 06 c2  |ght+TB+HS))/2...|
000018d0  33 20 20 c9 20 33 3a 79  3d 48 53 2b 28 33 2a 28  |3  . 3:y=HS+(3*(|
000018e0  28 28 59 70 69 78 65 6c  73 2b 31 29 2d 28 68 65  |((Ypixels+1)-(he|
000018f0  69 67 68 74 2b 54 42 2b  48 53 29 29 2f 34 29 29  |ight+TB+HS))/4))|
00001900  0d 06 cc 23 20 20 c9 20  34 3a 79 3d 28 59 70 69  |...#  . 4:y=(Ypi|
00001910  78 65 6c 73 2b 31 29 2d  28 68 65 69 67 68 74 2b  |xels+1)-(height+|
00001920  54 42 29 0d 06 d6 05 cb  0d 06 e0 28 f4 20 41 62  |TB)........(. Ab|
00001930  6f 76 65 20 63 6f 6f 72  64 69 6e 61 74 65 73 20  |ove coordinates |
00001940  70 6f 73 69 74 69 6f 6e  20 77 69 6e 64 6f 77 2e  |position window.|
00001950  0d 06 ea 28 f4 20 4e 6f  77 20 63 6f 6e 76 65 72  |...(. Now conver|
00001960  74 20 74 6f 20 73 63 72  65 65 6e 20 63 6f 6f 72  |t to screen coor|
00001970  64 69 6e 61 74 65 73 3a  0d 06 f4 29 78 3d 78 2a  |dinates:...)x=x*|
00001980  28 32 5e 58 45 69 67 46  61 63 74 6f 72 29 3a 79  |(2^XEigFactor):y|
00001990  3d 79 2a 28 32 5e 59 45  69 67 46 61 63 74 6f 72  |=y*(2^YEigFactor|
000019a0  29 0d 06 fe 3b 77 69 64  74 68 3d 77 69 64 74 68  |)...;width=width|
000019b0  2a 28 32 5e 58 45 69 67  46 61 63 74 6f 72 29 3a  |*(2^XEigFactor):|
000019c0  68 65 69 67 68 74 3d 68  65 69 67 68 74 2a 28 32  |height=height*(2|
000019d0  5e 59 45 69 67 46 61 63  74 6f 72 29 0d 07 08 1e  |^YEigFactor)....|
000019e0  42 6c 6f 63 6b 21 31 32  3d 78 2b 77 69 64 74 68  |Block!12=x+width|
000019f0  3a 42 6c 6f 63 6b 21 34  3d 78 0d 07 12 1f 42 6c  |:Block!4=x....Bl|
00001a00  6f 63 6b 21 31 36 3d 79  2b 68 65 69 67 68 74 3a  |ock!16=y+height:|
00001a10  42 6c 6f 63 6b 21 38 3d  79 0d 07 1c 05 e1 0d 07  |Block!8=y.......|
00001a20  26 05 3a 0d 07 30 4f f4  20 2d 2d 2d 2d 2d 2d 2d  |&.:..0O. -------|
00001a30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001a70  2d 2d 0d 07 3a 18 f4 20  57 69 6d 70 20 70 6f 6c  |--..:.. Wimp pol|
00001a80  6c 20 72 6f 75 74 69 6e  65 73 0d 07 44 4f f4 20  |l routines..DO. |
00001a90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001ad0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 07 4e 05 3a 0d 07  |---------..N.:..|
00001ae0  58 0d dd 20 f2 52 65 64  72 61 77 0d 07 62 14 e7  |X.. .Redraw..b..|
00001af0  20 44 6f 4d 6f 64 65 43  68 61 6e 67 65 20 8c 0d  | DoModeChange ..|
00001b00  07 6c 64 20 20 f4 20 52  65 2d 6f 70 65 6e 69 6e  |.ld  . Re-openin|
00001b10  67 20 77 69 6e 64 6f 77  73 20 6e 65 65 64 20 61  |g windows need a|
00001b20  6e 20 65 78 74 72 61 20  77 69 6d 70 5f 70 6f 6c  |n extra wimp_pol|
00001b30  6c 20 74 6f 20 68 61 70  70 65 6e 20 61 66 74 65  |l to happen afte|
00001b40  72 20 74 68 65 20 6d 6f  64 65 20 63 68 61 6e 67  |r the mode chang|
00001b50  65 20 69 6e 20 6f 72 64  65 72 20 74 6f 20 77 6f  |e in order to wo|
00001b60  72 6b 3a 0d 07 76 42 20  20 e7 20 a4 4f 70 65 6e  |rk:..vB  . .Open|
00001b70  53 74 61 74 65 28 53 70  79 43 61 6c 63 29 20 8c  |State(SpyCalc) .|
00001b80  20 f2 4f 70 65 6e 28 53  70 79 43 61 6c 63 2c a3  | .Open(SpyCalc,.|
00001b90  2c 58 50 6f 73 69 74 69  6f 6e 2c 59 50 6f 73 69  |,XPosition,YPosi|
00001ba0  74 69 6f 6e 29 0d 07 80  14 20 20 44 6f 4d 6f 64  |tion)....  DoMod|
00001bb0  65 43 68 61 6e 67 65 3d  a3 0d 07 8a 05 cd 0d 07  |eChange=........|
00001bc0  94 28 c8 99 20 22 57 69  6d 70 5f 52 65 64 72 61  |.(.. "Wimp_Redra|
00001bd0  77 57 69 6e 64 6f 77 22  2c 2c 42 6c 6f 63 6b 20  |wWindow",,Block |
00001be0  b8 20 66 6c 61 67 0d 07  9e 0b c8 95 20 66 6c 61  |. flag...... fla|
00001bf0  67 0d 07 a8 2a 20 20 c8  99 20 22 49 6e 74 65 72  |g...*  .. "Inter|
00001c00  66 61 63 65 5f 52 65 6e  64 65 72 33 64 57 69 6e  |face_Render3dWin|
00001c10  64 6f 77 22 2c 2c 42 6c  6f 63 6b 0d 07 b2 2a 20  |dow",,Block...* |
00001c20  20 c8 99 20 22 57 69 6d  70 5f 47 65 74 52 65 63  | .. "Wimp_GetRec|
00001c30  74 61 6e 67 6c 65 22 2c  2c 42 6c 6f 63 6b 20 b8  |tangle",,Block .|
00001c40  20 66 6c 61 67 0d 07 bc  05 ce 0d 07 c6 05 e1 0d  | flag...........|
00001c50  07 d0 05 3a 0d 07 da 15  dd 20 f2 52 65 63 69 65  |...:..... .Recie|
00001c60  76 65 4d 65 73 73 61 67  65 0d 07 e4 11 c8 8e 20  |veMessage...... |
00001c70  42 6c 6f 63 6b 21 31 36  20 ca 0d 07 ee 12 20 20  |Block!16 .....  |
00001c80  c9 20 30 20 3a 20 44 6f  6e 65 3d b9 0d 07 f8 19  |. 0 : Done=.....|
00001c90  20 20 c9 20 32 20 3a 20  f4 20 44 61 74 61 53 61  |  . 2 : . DataSa|
00001ca0  76 65 41 63 6b 0d 08 02  4d 20 20 20 20 20 20 20  |veAck...M       |
00001cb0  20 20 20 20 f4 20 4f 74  68 65 72 20 74 61 73 6b  |    . Other task|
00001cc0  20 77 61 6e 74 73 20 61  20 74 72 61 6e 73 66 65  | wants a transfe|
00001cd0  72 20 76 69 61 20 3c 57  69 6d 70 24 53 63 72 61  |r via <Wimp$Scra|
00001ce0  70 3e 20 72 61 74 68 65  72 20 74 68 61 6e 20 52  |p> rather than R|
00001cf0  41 4d 0d 08 0c 21 20 20  20 20 20 20 20 20 20 20  |AM...!          |
00001d00  20 f2 57 69 6d 70 53 63  72 61 70 54 72 61 6e 73  | .WimpScrapTrans|
00001d10  6d 69 74 0d 08 16 17 20  20 c9 20 36 20 3a 20 f4  |mit....  . 6 : .|
00001d20  20 52 41 4d 20 46 65 74  63 68 0d 08 20 2e 20 20  | RAM Fetch.. .  |
00001d30  20 20 20 20 20 20 20 20  20 f4 20 4f 74 68 65 72  |         . Other|
00001d40  20 74 61 73 6b 20 69 73  20 61 73 6b 69 6e 67 20  | task is asking |
00001d50  66 6f 72 20 64 61 74 61  0d 08 2a 1b 20 20 20 20  |for data..*.    |
00001d60  20 20 20 20 20 20 20 f2  52 41 4d 54 72 61 6e 73  |       .RAMTrans|
00001d70  6d 69 74 0d 08 34 31 20  20 c9 20 31 30 3a 20 e7  |mit..41  . 10: .|
00001d80  20 4f 6d 6e 69 44 65 73  6b 3d 30 20 8c 20 f2 53  | OmniDesk=0 . .S|
00001d90  61 76 65 44 65 73 6b 74  6f 70 28 42 6c 6f 63 6b  |aveDesktop(Block|
00001da0  21 32 30 29 0d 08 3e 45  20 20 20 20 20 20 20 20  |!20)..>E        |
00001db0  20 20 20 f4 20 4f 6e 6c  79 20 73 61 76 65 20 69  |   . Only save i|
00001dc0  66 20 77 65 20 68 61 76  65 20 6e 6f 74 20 62 65  |f we have not be|
00001dd0  65 6e 20 73 74 61 72 74  65 64 20 75 70 20 62 79  |en started up by|
00001de0  20 4f 6d 6e 69 44 65 73  6b 0d 08 48 14 20 20 c9  | OmniDesk..H.  .|
00001df0  20 26 35 30 32 20 3a 20  f2 48 65 6c 70 0d 08 52  | &502 : .Help..R|
00001e00  1c 20 20 c9 20 26 34 30  30 43 31 20 3a 20 f2 4d  |.  . &400C1 : .M|
00001e10  6f 64 65 43 68 61 6e 67  65 0d 08 5c 3d 20 20 c9  |odeChange..\=  .|
00001e20  20 55 74 69 6c 4f 70 65  6e 20 3a 20 e7 20 24 28  | UtilOpen : . $(|
00001e30  42 6c 6f 63 6b 2b 32 34  29 3d 54 61 73 6b 6e 61  |Block+24)=Taskna|
00001e40  6d 65 24 20 8c 20 f2 4f  6d 6e 69 44 65 73 6b 43  |me$ . .OmniDeskC|
00001e50  61 6c 6c 69 6e 67 0d 08  66 26 20 20 c9 20 55 74  |alling..f&  . Ut|
00001e60  69 6c 51 75 69 74 74 69  6e 67 20 3a 20 e7 20 4f  |ilQuitting : . O|
00001e70  6d 6e 69 44 65 73 6b 3c  3e 30 20 8c 0d 08 70 38  |mniDesk<>0 ...p8|
00001e80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001e90  20 20 20 20 20 20 20 20  e7 20 42 6c 6f 63 6b 21  |        . Block!|
00001ea0  32 30 3d 4f 6d 6e 69 44  65 73 6b 20 8c 20 44 6f  |20=OmniDesk . Do|
00001eb0  6e 65 3d b9 0d 08 7a 1b  20 20 20 20 20 20 20 20  |ne=...z.        |
00001ec0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |              ..|
00001ed0  08 84 1b 20 20 c9 20 55  74 69 6c 52 65 73 69 64  |...  . UtilResid|
00001ee0  65 20 3a 20 45 78 69 74  3d a3 0d 08 8e 05 cb 0d  |e : Exit=.......|
00001ef0  08 98 05 e1 0d 08 a2 05  3a 0d 08 ac 16 dd 20 f2  |........:..... .|
00001f00  44 65 6c 65 74 65 57 69  6d 70 53 63 72 61 70 0d  |DeleteWimpScrap.|
00001f10  08 b6 07 ea 20 85 0d 08  c0 0f ee 20 85 20 ea 20  |.... ...... . . |
00001f20  f7 20 85 3a e1 0d 08 ca  3c f4 20 57 65 20 6d 61  |. .:....<. We ma|
00001f30  79 20 72 65 63 65 69 76  65 20 74 72 79 20 74 6f  |y receive try to|
00001f40  20 64 65 6c 65 74 65 20  61 20 6e 6f 6e 2d 65 78  | delete a non-ex|
00001f50  69 73 74 61 6e 74 20 57  69 6d 70 24 53 63 72 61  |istant Wimp$Scra|
00001f60  70 0d 08 d4 40 f4 20 66  69 6c 65 20 69 66 20 74  |p...@. file if t|
00001f70  68 65 20 72 65 63 65 69  76 69 6e 67 20 74 61 73  |he receiving tas|
00001f80  6b 20 64 69 64 20 6e 6f  74 20 72 65 63 6f 67 6e  |k did not recogn|
00001f90  69 73 65 20 74 68 65 20  66 69 6c 65 74 79 70 65  |ise the filetype|
00001fa0  2e 0d 08 de 1c ff 28 22  44 65 6c 65 74 65 20 3c  |......("Delete <|
00001fb0  57 69 6d 70 24 53 63 72  61 70 3e 22 29 0d 08 e8  |Wimp$Scrap>")...|
00001fc0  05 e1 0d 08 f2 05 3a 0d  08 fc 12 dd 20 f2 4d 6f  |......:..... .Mo|
00001fd0  75 73 65 42 75 74 74 6f  6e 0d 09 06 31 4d 6f 75  |useButton...1Mou|
00001fe0  73 65 58 3d 42 6c 6f 63  6b 21 30 3a 4d 6f 75 73  |seX=Block!0:Mous|
00001ff0  65 59 3d 42 6c 6f 63 6b  21 34 3a 42 75 74 74 6f  |eY=Block!4:Butto|
00002000  6e 73 3d 42 6c 6f 63 6b  21 38 0d 09 10 21 57 69  |ns=Block!8...!Wi|
00002010  6e 64 6f 77 3d 42 6c 6f  63 6b 21 31 32 3a 49 63  |ndow=Block!12:Ic|
00002020  6f 6e 3d 42 6c 6f 63 6b  21 31 36 0d 09 1a 0f c8  |on=Block!16.....|
00002030  8e 20 57 69 6e 64 6f 77  20 ca 0d 09 24 22 20 20  |. Window ...$"  |
00002040  c9 20 2d 32 3a f4 20 49  63 6f 6e 20 62 61 72 20  |. -2:. Icon bar |
00002050  69 63 6f 6e 20 63 6c 69  63 6b 65 64 0d 09 2e 14  |icon clicked....|
00002060  20 20 20 20 c8 8e 20 42  75 74 74 6f 6e 73 20 ca  |    .. Buttons .|
00002070  0d 09 38 18 20 20 20 20  20 20 c9 20 31 20 3a 20  |..8.      . 1 : |
00002080  f4 20 41 64 6a 75 73 74  0d 09 42 16 20 20 20 20  |. Adjust..B.    |
00002090  20 20 c9 20 32 20 3a 20  f4 20 4d 65 6e 75 0d 09  |  . 2 : . Menu..|
000020a0  4c 39 20 20 20 20 20 20  20 20 4d 25 3d 49 42 4d  |L9        M%=IBM|
000020b0  65 6e 75 3a 4d 65 6e 75  58 3d 4d 6f 75 73 65 58  |enu:MenuX=MouseX|
000020c0  3a 4d 65 6e 75 59 3d 4d  6f 75 73 65 59 3a f2 4d  |:MenuY=MouseY:.M|
000020d0  61 6b 65 4d 65 6e 75 0d  09 56 18 20 20 20 20 20  |akeMenu..V.     |
000020e0  20 c9 20 34 20 3a 20 f4  20 53 65 6c 65 63 74 0d  | . 4 : . Select.|
000020f0  09 60 30 20 20 20 20 20  20 20 20 f2 4f 70 65 6e  |.`0        .Open|
00002100  28 53 70 79 43 61 6c 63  2c b9 2c 58 50 6f 73 69  |(SpyCalc,.,XPosi|
00002110  74 69 6f 6e 2c 59 50 6f  73 69 74 69 6f 6e 29 0d  |tion,YPosition).|
00002120  09 6a 09 20 20 20 20 cb  0d 09 74 0f 20 20 c9 20  |.j.    ...t.  . |
00002130  53 70 79 43 61 6c 63 0d  09 7e 14 20 20 20 20 c8  |SpyCalc..~.    .|
00002140  8e 20 42 75 74 74 6f 6e  73 20 ca 0d 09 88 16 20  |. Buttons ..... |
00002150  20 20 20 20 20 c9 20 32  20 3a 20 f4 20 4d 65 6e  |     . 2 : . Men|
00002160  75 0d 09 92 31 20 20 20  20 20 20 20 20 4d 25 3d  |u...1        M%=|
00002170  4d 61 69 6e 4d 65 6e 75  3a 4d 65 6e 75 58 3d 4d  |MainMenu:MenuX=M|
00002180  6f 75 73 65 58 3a 4d 65  6e 75 59 3d 4d 6f 75 73  |ouseX:MenuY=Mous|
00002190  65 59 0d 09 9c 19 20 20  20 20 20 20 20 20 e7 20  |eY....        . |
000021a0  77 69 6d 70 3e 3d 33 31  30 20 8c 0d 09 a6 60 20  |wimp>=310 ....` |
000021b0  20 20 20 20 20 20 20 20  20 e7 20 c0 24 4d 61 69  |         . .$Mai|
000021c0  6e 4d 65 6e 75 54 69 74  6c 65 2c 31 29 3d 22 5c  |nMenuTitle,1)="\|
000021d0  22 20 8c 20 24 4d 61 69  6e 4d 65 6e 75 54 69 74  |" . $MainMenuTit|
000021e0  6c 65 3d c2 24 4d 61 69  6e 4d 65 6e 75 54 69 74  |le=.$MainMenuTit|
000021f0  6c 65 2c a9 28 24 4d 61  69 6e 4d 65 6e 75 54 69  |le,.($MainMenuTi|
00002200  74 6c 65 29 2d 31 29 2b  bd 31 33 0d 09 b0 43 20  |tle)-1)+.13...C |
00002210  20 20 20 20 20 20 20 20  20 e7 20 58 50 6f 73 69  |         . XPosi|
00002220  74 69 6f 6e 3d 34 20 8c  20 24 4d 61 69 6e 4d 65  |tion=4 . $MainMe|
00002230  6e 75 54 69 74 6c 65 3d  22 5c 22 2b 24 4d 61 69  |nuTitle="\"+$Mai|
00002240  6e 4d 65 6e 75 54 69 74  6c 65 2b bd 31 33 0d 09  |nMenuTitle+.13..|
00002250  ba 0d 20 20 20 20 20 20  20 20 cd 0d 09 c4 15 20  |..        ..... |
00002260  20 20 20 20 20 20 20 f2  4d 61 6b 65 4d 65 6e 75  |       .MakeMenu|
00002270  0d 09 ce 21 20 20 20 20  20 20 c9 20 31 2c 34 20  |...!      . 1,4 |
00002280  3a 20 f4 20 53 65 6c 65  63 74 2c 41 64 6a 75 73  |: . Select,Adjus|
00002290  74 0d 09 d8 27 20 20 20  20 20 20 20 20 e7 20 28  |t...'        . (|
000022a0  49 63 6f 6e 3e 3d 32 30  29 20 80 20 28 49 63 6f  |Icon>=20) . (Ico|
000022b0  6e 3c 3d 33 32 29 20 8c  0d 09 e2 36 20 20 20 20  |n<=32) ....6    |
000022c0  20 20 20 20 20 20 f2 55  70 64 61 74 65 49 63 6f  |      .UpdateIco|
000022d0  6e 28 53 70 79 43 61 6c  63 2c 33 33 2c 22 26 22  |n(SpyCalc,33,"&"|
000022e0  2b c3 7e a4 49 63 6f 6e  46 6c 61 67 73 29 0d 09  |+.~.IconFlags)..|
000022f0  ec 2c 20 20 20 20 20 20  20 20 20 20 e7 20 a4 53  |.,          . .S|
00002300  65 6c 65 63 74 65 64 53  74 61 74 65 28 53 70 79  |electedState(Spy|
00002310  43 61 6c 63 2c 32 36 29  20 8c 0d 09 f6 1a 20 20  |Calc,26) .....  |
00002320  20 20 20 20 20 20 20 20  20 20 f4 20 46 6f 6e 74  |          . Font|
00002330  73 20 6f 6e 0d 0a 00 2d  20 20 20 20 20 20 20 20  |s on...-        |
00002340  20 20 20 20 41 3d a0 28  a4 52 65 61 64 49 63 6f  |    A=.(.ReadIco|
00002350  6e 53 74 72 28 53 70 79  43 61 6c 63 2c 33 33 29  |nStr(SpyCalc,33)|
00002360  29 0d 0a 0a 59 20 20 20  20 20 20 20 20 20 20 20  |)...Y           |
00002370  20 e7 20 a4 52 65 61 64  49 63 6f 6e 53 74 72 28  | . .ReadIconStr(|
00002380  53 70 79 43 61 6c 63 2c  34 33 29 3d 22 22 20 8c  |SpyCalc,43)="" .|
00002390  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  | .UpdateIcon(Spy|
000023a0  43 61 6c 63 2c 34 33 2c  c3 28 28 41 3e 3e 3e 32  |Calc,43,.((A>>>2|
000023b0  34 29 20 83 20 32 35 36  29 29 0d 0a 14 75 20 20  |4) . 256))...u  |
000023c0  20 20 20 20 20 20 20 20  20 20 e7 20 a4 52 65 61  |          . .Rea|
000023d0  64 49 63 6f 6e 53 74 72  28 53 70 79 43 61 6c 63  |dIconStr(SpyCalc|
000023e0  2c 33 39 29 3c 3e 22 22  20 8c 20 e3 20 4e 3d 33  |,39)<>"" . . N=3|
000023f0  39 20 b8 20 34 31 20 88  20 32 3a f2 55 70 64 61  |9 . 41 . 2:.Upda|
00002400  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 4e  |teIcon(SpyCalc,N|
00002410  2c 22 22 29 3a f2 43 6f  6c 6f 75 72 49 63 6f 6e  |,""):.ColourIcon|
00002420  28 53 70 79 43 61 6c 63  2c 4e 2c 31 29 3a ed 0d  |(SpyCalc,N,1):..|
00002430  0a 1e 0f 20 20 20 20 20  20 20 20 20 20 cc 0d 0a  |...          ...|
00002440  28 1b 20 20 20 20 20 20  20 20 20 20 20 20 f4 20  |(.            . |
00002450  46 6f 6e 74 73 20 6f 66  66 0d 0a 32 2d 20 20 20  |Fonts off..2-   |
00002460  20 20 20 20 20 20 20 20  20 41 3d a0 28 a4 52 65  |         A=.(.Re|
00002470  61 64 49 63 6f 6e 53 74  72 28 53 70 79 43 61 6c  |adIconStr(SpyCal|
00002480  63 2c 33 33 29 29 0d 0a  3c 35 20 20 20 20 20 20  |c,33))..<5      |
00002490  20 20 20 20 20 20 46 63  6f 6c 3d 28 41 3e 3e 3e  |      Fcol=(A>>>|
000024a0  32 34 29 20 83 20 31 36  3a 42 63 6f 6c 3d 28 41  |24) . 16:Bcol=(A|
000024b0  3e 3e 3e 32 38 29 20 83  20 31 36 0d 0a 46 4b 20  |>>>28) . 16..FK |
000024c0  20 20 20 20 20 20 20 20  20 20 20 e7 20 a4 52 65  |           . .Re|
000024d0  61 64 49 63 6f 6e 53 74  72 28 53 70 79 43 61 6c  |adIconStr(SpyCal|
000024e0  63 2c 34 33 29 3c 3e 22  22 20 8c 20 f2 55 70 64  |c,43)<>"" . .Upd|
000024f0  61 74 65 49 63 6f 6e 28  53 70 79 43 61 6c 63 2c  |ateIcon(SpyCalc,|
00002500  34 33 2c 22 22 29 0d 0a  50 2f 20 20 20 20 20 20  |43,"")..P/      |
00002510  20 20 20 20 20 20 e7 20  a4 52 65 61 64 49 63 6f  |      . .ReadIco|
00002520  6e 53 74 72 28 53 70 79  43 61 6c 63 2c 33 39 29  |nStr(SpyCalc,39)|
00002530  3d 22 22 20 8c 0d 0a 5a  31 20 20 20 20 20 20 20  |="" ...Z1       |
00002540  20 20 20 20 20 20 20 f2  55 70 64 61 74 65 49 63  |       .UpdateIc|
00002550  6f 6e 28 53 70 79 43 61  6c 63 2c 33 39 2c c3 28  |on(SpyCalc,39,.(|
00002560  46 63 6f 6c 29 29 0d 0a  64 2e 20 20 20 20 20 20  |Fcol))..d.      |
00002570  20 20 20 20 20 20 20 20  f2 43 6f 6c 6f 75 72 49  |        .ColourI|
00002580  63 6f 6e 28 53 70 79 43  61 6c 63 2c 33 39 2c 46  |con(SpyCalc,39,F|
00002590  63 6f 6c 29 0d 0a 6e 31  20 20 20 20 20 20 20 20  |col)..n1        |
000025a0  20 20 20 20 20 20 f2 55  70 64 61 74 65 49 63 6f  |      .UpdateIco|
000025b0  6e 28 53 70 79 43 61 6c  63 2c 34 31 2c c3 28 42  |n(SpyCalc,41,.(B|
000025c0  63 6f 6c 29 29 0d 0a 78  2e 20 20 20 20 20 20 20  |col))..x.       |
000025d0  20 20 20 20 20 20 20 f2  43 6f 6c 6f 75 72 49 63  |       .ColourIc|
000025e0  6f 6e 28 53 70 79 43 61  6c 63 2c 34 31 2c 42 63  |on(SpyCalc,41,Bc|
000025f0  6f 6c 29 0d 0a 82 11 20  20 20 20 20 20 20 20 20  |ol)....         |
00002600  20 20 20 cd 0d 0a 8c 0f  20 20 20 20 20 20 20 20  |   .....        |
00002610  20 20 cd 0d 0a 96 0d 20  20 20 20 20 20 20 20 cd  |  .....        .|
00002620  0d 0a a0 25 20 20 20 20  20 20 20 20 e7 20 28 49  |...%        . (I|
00002630  63 6f 6e 3d 33 39 29 20  84 20 28 49 63 6f 6e 3d  |con=39) . (Icon=|
00002640  34 31 29 20 8c 0d 0a aa  27 20 20 20 20 20 20 20  |41) ....'       |
00002650  20 20 20 41 3d a4 52 65  61 64 49 63 6f 6e 28 53  |   A=.ReadIcon(S|
00002660  70 79 43 61 6c 63 2c 49  63 6f 6e 29 0d 0a b4 20  |pyCalc,Icon)... |
00002670  20 20 20 20 20 20 20 20  20 20 e7 20 42 75 74 74  |          . Butt|
00002680  6f 6e 73 3d 34 20 8c 20  41 2b 3d 31 0d 0a be 20  |ons=4 . A+=1... |
00002690  20 20 20 20 20 20 20 20  20 20 e7 20 42 75 74 74  |          . Butt|
000026a0  6f 6e 73 3d 31 20 8c 20  41 2d 3d 31 0d 0a c8 1b  |ons=1 . A-=1....|
000026b0  20 20 20 20 20 20 20 20  20 20 e7 20 41 3d 2d 31  |          . A=-1|
000026c0  20 8c 20 41 3d 31 35 0d  0a d2 1a 20 20 20 20 20  | . A=15....     |
000026d0  20 20 20 20 20 e7 20 41  3d 31 36 20 8c 20 41 3d  |     . A=16 . A=|
000026e0  30 0d 0a dc 2c 20 20 20  20 20 20 20 20 20 20 f2  |0...,          .|
000026f0  55 70 64 61 74 65 49 63  6f 6e 28 53 70 79 43 61  |UpdateIcon(SpyCa|
00002700  6c 63 2c 49 63 6f 6e 2c  c3 28 41 29 29 0d 0a e6  |lc,Icon,.(A))...|
00002710  29 20 20 20 20 20 20 20  20 20 20 f2 43 6f 6c 6f  |)          .Colo|
00002720  75 72 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 49  |urIcon(SpyCalc,I|
00002730  63 6f 6e 2c 41 29 0d 0a  f0 24 20 20 20 20 20 20  |con,A)...$      |
00002740  20 20 20 20 f4 20 4e 6f  77 20 63 68 65 63 6b 20  |    . Now check |
00002750  66 6f 6e 74 20 69 63 6f  6e 3a 0d 0a fa 2e 20 20  |font icon:....  |
00002760  20 20 20 20 20 20 20 20  e7 20 a4 52 65 61 64 49  |        . .ReadI|
00002770  63 6f 6e 53 74 72 28 53  70 79 43 61 6c 63 2c 34  |conStr(SpyCalc,4|
00002780  33 29 3c 3e 22 22 20 8c  0d 0b 04 2a 20 20 20 20  |3)<>"" ....*    |
00002790  20 20 20 20 20 20 20 20  f2 55 70 64 61 74 65 49  |        .UpdateI|
000027a0  63 6f 6e 28 53 70 79 43  61 6c 63 2c 34 33 2c 22  |con(SpyCalc,43,"|
000027b0  22 29 0d 0b 0e 1b 20 20  20 20 20 20 20 20 20 20  |")....          |
000027c0  20 20 e7 20 49 63 6f 6e  3d 33 39 20 8c 0d 0b 18  |  . Icon=39 ....|
000027d0  2d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 f2  |-              .|
000027e0  55 70 64 61 74 65 49 63  6f 6e 28 53 70 79 43 61  |UpdateIcon(SpyCa|
000027f0  6c 63 2c 34 31 2c 22 31  22 29 0d 0b 22 2b 20 20  |lc,41,"1").."+  |
00002800  20 20 20 20 20 20 20 20  20 20 20 20 f2 43 6f 6c  |            .Col|
00002810  6f 75 72 49 63 6f 6e 28  53 70 79 43 61 6c 63 2c  |ourIcon(SpyCalc,|
00002820  34 31 2c 31 29 0d 0b 2c  11 20 20 20 20 20 20 20  |41,1)..,.       |
00002830  20 20 20 20 20 cc 0d 0b  36 2d 20 20 20 20 20 20  |     ...6-      |
00002840  20 20 20 20 20 20 20 20  f2 55 70 64 61 74 65 49  |        .UpdateI|
00002850  63 6f 6e 28 53 70 79 43  61 6c 63 2c 33 39 2c 22  |con(SpyCalc,39,"|
00002860  37 22 29 0d 0b 40 2b 20  20 20 20 20 20 20 20 20  |7")..@+         |
00002870  20 20 20 20 20 f2 43 6f  6c 6f 75 72 49 63 6f 6e  |     .ColourIcon|
00002880  28 53 70 79 43 61 6c 63  2c 33 39 2c 37 29 0d 0b  |(SpyCalc,39,7)..|
00002890  4a 11 20 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |J.            ..|
000028a0  0b 54 0f 20 20 20 20 20  20 20 20 20 20 cd 0d 0b  |.T.          ...|
000028b0  5e 2f 20 20 20 20 20 20  20 20 20 20 f2 55 70 64  |^/          .Upd|
000028c0  61 74 65 53 65 6c 65 63  74 65 64 46 6c 61 67 28  |ateSelectedFlag(|
000028d0  53 70 79 43 61 6c 63 2c  32 36 2c a3 29 0d 0b 68  |SpyCalc,26,.)..h|
000028e0  36 20 20 20 20 20 20 20  20 20 20 f2 55 70 64 61  |6          .Upda|
000028f0  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
00002900  33 2c 22 26 22 2b c3 7e  a4 49 63 6f 6e 46 6c 61  |3,"&"+.~.IconFla|
00002910  67 73 29 0d 0b 72 0d 20  20 20 20 20 20 20 20 cd  |gs)..r.        .|
00002920  0d 0b 7c 0b 20 20 20 20  20 20 7f 0d 0b 86 3a 20  |..|.      ....: |
00002930  20 20 20 20 20 20 20 e7  20 28 42 75 74 74 6f 6e  |       . (Button|
00002940  73 3e 37 29 20 80 20 28  57 69 6e 64 6f 77 3d 53  |s>7) . (Window=S|
00002950  70 79 43 61 6c 63 29 20  80 20 28 49 63 6f 6e 3d  |pyCalc) . (Icon=|
00002960  33 33 29 20 8c 0d 0b 90  34 20 20 20 20 20 20 20  |33) ....4       |
00002970  20 20 20 24 54 72 61 6e  73 6d 69 73 73 69 6f 6e  |   $Transmission|
00002980  3d a4 52 65 61 64 49 63  6f 6e 53 74 72 28 53 70  |=.ReadIconStr(Sp|
00002990  79 43 61 6c 63 2c 33 33  29 0d 0b 9a 52 20 20 20  |yCalc,33)...R   |
000029a0  20 20 20 20 20 20 20 44  72 61 67 67 69 6e 67 24  |       Dragging$|
000029b0  3d 22 46 6c 61 67 73 22  3a f2 44 72 61 67 42 6f  |="Flags":.DragBo|
000029c0  78 28 53 70 79 43 61 6c  63 2c 33 33 2c 35 2c 53  |x(SpyCalc,33,5,S|
000029d0  70 72 69 74 65 73 2c a4  4d 61 6b 65 44 72 61 67  |prites,.MakeDrag|
000029e0  67 69 6e 67 53 70 72 69  74 65 29 0d 0b a4 0d 20  |gingSprite).... |
000029f0  20 20 20 20 20 20 20 cd  0d 0b ae 09 20 20 20 20  |       .....    |
00002a00  cb 0d 0b b8 30 20 20 c9  20 4c 6f 63 20 80 20 42  |....0  . Loc . B|
00002a10  75 74 74 6f 6e 73 3c 38  3a f4 20 52 65 70 6f 73  |uttons<8:. Repos|
00002a20  69 74 69 6f 6e 20 6d 61  69 6e 20 77 69 6e 64 6f  |ition main windo|
00002a30  77 0d 0b c2 13 20 20 20  20 e7 20 49 63 6f 6e 3e  |w....    . Icon>|
00002a40  3d 36 20 8c 0d 0b cc 2c  20 20 20 20 20 20 58 50  |=6 ....,      XP|
00002a50  6f 73 69 74 69 6f 6e 3d  a4 52 65 61 64 57 69 6e  |osition=.ReadWin|
00002a60  64 6f 77 4c 6f 63 61 74  69 6f 6e 28 22 58 22 29  |dowLocation("X")|
00002a70  0d 0b d6 2c 20 20 20 20  20 20 59 50 6f 73 69 74  |...,      YPosit|
00002a80  69 6f 6e 3d a4 52 65 61  64 57 69 6e 64 6f 77 4c  |ion=.ReadWindowL|
00002a90  6f 63 61 74 69 6f 6e 28  22 59 22 29 0d 0b e0 46  |ocation("Y")...F|
00002aa0  20 20 20 20 20 20 e7 20  a4 4f 70 65 6e 53 74 61  |      . .OpenSta|
00002ab0  74 65 28 53 70 79 43 61  6c 63 29 20 8c 20 f2 4f  |te(SpyCalc) . .O|
00002ac0  70 65 6e 28 53 70 79 43  61 6c 63 2c a3 2c 58 50  |pen(SpyCalc,.,XP|
00002ad0  6f 73 69 74 69 6f 6e 2c  59 50 6f 73 69 74 69 6f  |osition,YPositio|
00002ae0  6e 29 0d 0b ea 09 20 20  20 20 cd 0d 0b f4 05 cb  |n)....    ......|
00002af0  0d 0b fe 05 e1 0d 0c 08  05 3a 0d 0c 12 13 dd 20  |.........:..... |
00002b00  f2 44 72 61 67 46 69 6e  69 73 68 65 64 0d 0c 1c  |.DragFinished...|
00002b10  29 e7 20 44 72 61 67 41  53 70 72 69 74 65 20 8c  |). DragASprite .|
00002b20  20 c8 99 20 22 44 72 61  67 41 53 70 72 69 74 65  | .. "DragASprite|
00002b30  5f 53 74 6f 70 22 0d 0c  26 23 c8 99 20 22 57 69  |_Stop"..&#.. "Wi|
00002b40  6d 70 5f 47 65 74 50 6f  69 6e 74 65 72 49 6e 66  |mp_GetPointerInf|
00002b50  6f 22 2c 2c 42 6c 6f 63  6b 0d 0c 30 2e e7 20 42  |o",,Block..0.. B|
00002b60  6c 6f 63 6b 21 31 32 3d  2d 31 20 8c 20 e1 3a f4  |lock!12=-1 . .:.|
00002b70  20 44 72 61 67 67 65 64  20 74 6f 20 62 61 63 6b  | Dragged to back|
00002b80  67 72 6f 75 6e 64 2e 0d  0c 3a 59 44 72 61 67 67  |ground...:YDragg|
00002b90  65 64 54 6f 58 3d 42 6c  6f 63 6b 21 30 3a 44 72  |edToX=Block!0:Dr|
00002ba0  61 67 67 65 64 54 6f 59  3d 42 6c 6f 63 6b 21 34  |aggedToY=Block!4|
00002bb0  3a 44 72 61 67 67 65 64  54 6f 57 69 6e 64 6f 77  |:DraggedToWindow|
00002bc0  3d 42 6c 6f 63 6b 21 31  32 3a 44 72 61 67 67 65  |=Block!12:Dragge|
00002bd0  64 54 6f 49 63 6f 6e 3d  42 6c 6f 63 6b 21 31 36  |dToIcon=Block!16|
00002be0  0d 0c 44 30 f4 20 4f 4b  20 2d 20 4c 65 74 27 73  |..D0. OK - Let's|
00002bf0  20 62 65 67 69 6e 20 61  6e 20 69 6e 74 65 72 2d  | begin an inter-|
00002c00  61 70 70 6c 69 63 61 74  69 6f 6e 20 73 61 76 65  |application save|
00002c10  0d 0c 4e 0b 4d 79 52 65  66 3d 30 0d 0c 58 34 42  |..N.MyRef=0..X4B|
00002c20  6c 6f 63 6b 21 30 3d 32  35 36 3a 42 6c 6f 63 6b  |lock!0=256:Block|
00002c30  21 31 32 3d 4d 79 52 65  66 3a 42 6c 6f 63 6b 21  |!12=MyRef:Block!|
00002c40  31 36 3d 31 3a f4 20 44  61 74 61 53 61 76 65 0d  |16=1:. DataSave.|
00002c50  0c 62 5b 42 6c 6f 63 6b  21 32 30 3d 44 72 61 67  |.b[Block!20=Drag|
00002c60  67 65 64 54 6f 57 69 6e  64 6f 77 3a 42 6c 6f 63  |gedToWindow:Bloc|
00002c70  6b 21 32 34 3d 44 72 61  67 67 65 64 54 6f 49 63  |k!24=DraggedToIc|
00002c80  6f 6e 3a 42 6c 6f 63 6b  21 32 38 3d 44 72 61 67  |on:Block!28=Drag|
00002c90  67 65 64 54 6f 58 3a 42  6c 6f 63 6b 21 33 32 3d  |gedToX:Block!32=|
00002ca0  44 72 61 67 67 65 64 54  6f 59 0d 0c 6c 2a 42 6c  |DraggedToY..l*Bl|
00002cb0  6f 63 6b 21 33 36 3d 31  32 3a f4 20 4e 65 76 65  |ock!36=12:. Neve|
00002cc0  72 20 6d 6f 72 65 20 74  68 61 6e 20 31 32 20 62  |r more than 12 b|
00002cd0  79 74 65 73 0d 0c 76 24  42 6c 6f 63 6b 21 34 30  |ytes..v$Block!40|
00002ce0  3d 26 46 46 46 3a f4 20  46 69 6c 65 74 79 70 65  |=&FFF:. Filetype|
00002cf0  20 6f 66 20 54 65 78 74  0d 0c 80 1c 24 28 42 6c  | of Text....$(Bl|
00002d00  6f 63 6b 2b 34 34 29 3d  44 72 61 67 67 69 6e 67  |ock+44)=Dragging|
00002d10  24 2b bd 30 0d 0c 8a 40  c8 99 20 22 57 69 6d 70  |$+.0...@.. "Wimp|
00002d20  5f 53 65 6e 64 4d 65 73  73 61 67 65 22 2c 31 37  |_SendMessage",17|
00002d30  2c 42 6c 6f 63 6b 2c 44  72 61 67 67 65 64 54 6f  |,Block,DraggedTo|
00002d40  57 69 6e 64 6f 77 2c 44  72 61 67 67 65 64 54 6f  |Window,DraggedTo|
00002d50  49 63 6f 6e 0d 0c 94 42  f4 20 44 72 61 67 67 65  |Icon...B. Dragge|
00002d60  64 54 6f 49 63 6f 6e 20  69 6e 63 6c 75 64 65 64  |dToIcon included|
00002d70  20 69 6e 20 63 61 73 65  20 44 72 61 67 67 65 64  | in case Dragged|
00002d80  54 6f 57 69 6e 64 6f 77  3d 2d 32 20 28 69 63 6f  |ToWindow=-2 (ico|
00002d90  6e 20 62 61 72 29 0d 0c  9e 05 e1 0d 0c a8 05 3a  |n bar).........:|
00002da0  0d 0c b2 11 dd 20 f2 4b  65 79 50 72 65 73 73 65  |..... .KeyPresse|
00002db0  64 0d 0c bc 32 57 69 6e  64 6f 77 3d 42 6c 6f 63  |d...2Window=Bloc|
00002dc0  6b 21 30 3a 49 63 6f 6e  3d 42 6c 6f 63 6b 21 34  |k!0:Icon=Block!4|
00002dd0  3a 43 68 61 72 61 63 74  65 72 3d 42 6c 6f 63 6b  |:Character=Block|
00002de0  21 32 34 0d 0c c6 0f c8  8e 20 57 69 6e 64 6f 77  |!24...... Window|
00002df0  20 ca 0d 0c d0 10 20 20  c9 20 53 70 79 43 61 6c  | .....  . SpyCal|
00002e00  63 3a 0d 0c da 16 20 20  20 20 c8 8e 20 43 68 61  |c:....    .. Cha|
00002e10  72 61 63 74 65 72 20 ca  0d 0c e4 24 20 20 20 20  |racter ....$    |
00002e20  20 20 c9 20 26 31 38 46  2c 26 31 39 46 2c 26 31  |  . &18F,&19F,&1|
00002e30  41 46 2c 26 31 42 46 3a  f4 20 55 70 0d 0c ee 15  |AF,&1BF:. Up....|
00002e40  20 20 20 20 20 20 20 20  c8 8e 20 49 63 6f 6e 20  |        .. Icon |
00002e50  ca 0d 0c f8 1c 20 20 20  20 20 20 20 20 20 20 c9  |.....          .|
00002e60  20 33 33 3a 54 6f 49 63  6f 6e 3d 34 33 0d 0d 02  | 33:ToIcon=43...|
00002e70  1c 20 20 20 20 20 20 20  20 20 20 c9 20 33 35 3a  |.          . 35:|
00002e80  54 6f 49 63 6f 6e 3d 33  33 0d 0d 0c 1c 20 20 20  |ToIcon=33....   |
00002e90  20 20 20 20 20 20 20 c9  20 33 37 3a 54 6f 49 63  |       . 37:ToIc|
00002ea0  6f 6e 3d 33 35 0d 0d 16  1c 20 20 20 20 20 20 20  |on=35....       |
00002eb0  20 20 20 c9 20 34 33 3a  54 6f 49 63 6f 6e 3d 33  |   . 43:ToIcon=3|
00002ec0  37 0d 0d 20 0d 20 20 20  20 20 20 20 20 cb 0d 0d  |7.. .        ...|
00002ed0  2a 17 20 20 20 20 20 20  20 20 e7 20 49 63 6f 6e  |*.        . Icon|
00002ee0  3d 33 33 20 8c 0d 0d 34  58 20 20 20 20 20 20 20  |=33 ...4X       |
00002ef0  20 20 20 41 24 3d a4 52  65 61 64 49 63 6f 6e 53  |   A$=.ReadIconS|
00002f00  74 72 28 53 70 79 43 61  6c 63 2c 33 33 29 3a e7  |tr(SpyCalc,33):.|
00002f10  20 41 24 3d 22 22 20 8c  20 41 24 3d 22 26 30 22  | A$="" . A$="&0"|
00002f20  3a f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  |:.UpdateIcon(Spy|
00002f30  43 61 6c 63 2c 33 33 2c  22 26 30 22 29 0d 0d 3e  |Calc,33,"&0")..>|
00002f40  24 20 20 20 20 20 20 20  20 20 20 f2 55 70 64 61  |$          .Upda|
00002f50  74 65 53 77 69 74 63 68  65 73 28 a0 28 41 24 29  |teSwitches(.(A$)|
00002f60  29 0d 0d 48 22 20 20 20  20 20 20 20 20 20 20 f2  |)..H"          .|
00002f70  55 70 64 61 74 65 4f 74  68 65 72 73 28 a0 28 41  |UpdateOthers(.(A|
00002f80  24 29 29 0d 0d 52 0d 20  20 20 20 20 20 20 20 cd  |$))..R.        .|
00002f90  0d 0d 5c 17 20 20 20 20  20 20 20 20 e7 20 49 63  |..\.        . Ic|
00002fa0  6f 6e 3d 33 35 20 8c 0d  0d 66 49 20 20 20 20 20  |on=35 ...fI     |
00002fb0  20 20 20 20 20 e7 20 a4  52 65 61 64 49 63 6f 6e  |     . .ReadIcon|
00002fc0  53 74 72 28 53 70 79 43  61 6c 63 2c 33 35 29 3d  |Str(SpyCalc,35)=|
00002fd0  22 22 20 8c 20 f2 55 70  64 61 74 65 49 63 6f 6e  |"" . .UpdateIcon|
00002fe0  28 53 70 79 43 61 6c 63  2c 33 35 2c 22 30 22 29  |(SpyCalc,35,"0")|
00002ff0  0d 0d 70 47 20 20 20 20  20 20 20 20 20 20 e7 20  |..pG          . |
00003000  a4 52 65 61 64 49 63 6f  6e 28 53 70 79 43 61 6c  |.ReadIcon(SpyCal|
00003010  63 2c 33 35 29 3e 31 35  20 8c 20 f2 55 70 64 61  |c,35)>15 . .Upda|
00003020  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
00003030  35 2c 22 31 35 22 29 0d  0d 7a 0d 20 20 20 20 20  |5,"15")..z.     |
00003040  20 20 20 cd 0d 0d 84 17  20 20 20 20 20 20 20 20  |   .....        |
00003050  e7 20 49 63 6f 6e 3d 33  37 20 8c 0d 0d 8e 49 20  |. Icon=37 ....I |
00003060  20 20 20 20 20 20 20 20  20 e7 20 a4 52 65 61 64  |         . .Read|
00003070  49 63 6f 6e 53 74 72 28  53 70 79 43 61 6c 63 2c  |IconStr(SpyCalc,|
00003080  33 37 29 3d 22 22 20 8c  20 f2 55 70 64 61 74 65  |37)="" . .Update|
00003090  49 63 6f 6e 28 53 70 79  43 61 6c 63 2c 33 37 2c  |Icon(SpyCalc,37,|
000030a0  22 30 22 29 0d 0d 98 47  20 20 20 20 20 20 20 20  |"0")...G        |
000030b0  20 20 e7 20 a4 52 65 61  64 49 63 6f 6e 28 53 70  |  . .ReadIcon(Sp|
000030c0  79 43 61 6c 63 2c 33 37  29 3e 33 31 20 8c 20 f2  |yCalc,37)>31 . .|
000030d0  55 70 64 61 74 65 49 63  6f 6e 28 53 70 79 43 61  |UpdateIcon(SpyCa|
000030e0  6c 63 2c 33 37 2c 22 33  31 22 29 0d 0d a2 0d 20  |lc,37,"31").... |
000030f0  20 20 20 20 20 20 20 cd  0d 0d ac 17 20 20 20 20  |       .....    |
00003100  20 20 20 20 e7 20 49 63  6f 6e 3d 34 33 20 8c 0d  |    . Icon=43 ..|
00003110  0d b6 95 20 20 20 20 20  20 20 20 20 20 e7 20 a4  |...          . .|
00003120  52 65 61 64 49 63 6f 6e  53 74 72 28 53 70 79 43  |ReadIconStr(SpyC|
00003130  61 6c 63 2c 34 33 29 3c  3e 22 22 20 8c 20 e3 20  |alc,43)<>"" . . |
00003140  4e 3d 33 39 20 b8 20 34  31 20 88 20 32 3a f2 55  |N=39 . 41 . 2:.U|
00003150  70 64 61 74 65 49 63 6f  6e 28 53 70 79 43 61 6c  |pdateIcon(SpyCal|
00003160  63 2c 4e 2c 22 22 29 3a  f2 43 6f 6c 6f 75 72 49  |c,N,""):.ColourI|
00003170  63 6f 6e 28 53 70 79 43  61 6c 63 2c 4e 2c 31 29  |con(SpyCalc,N,1)|
00003180  3a ed 3a f2 55 70 64 61  74 65 53 65 6c 65 63 74  |:.:.UpdateSelect|
00003190  65 64 46 6c 61 67 28 53  70 79 43 61 6c 63 2c 32  |edFlag(SpyCalc,2|
000031a0  36 2c b9 29 0d 0d c0 4f  20 20 20 20 20 20 20 20  |6,.)...O        |
000031b0  20 20 e7 20 28 a4 52 65  61 64 49 63 6f 6e 53 74  |  . (.ReadIconSt|
000031c0  72 28 53 70 79 43 61 6c  63 2c 34 33 29 3d 22 22  |r(SpyCalc,43)=""|
000031d0  29 20 80 20 28 a4 52 65  61 64 49 63 6f 6e 53 74  |) . (.ReadIconSt|
000031e0  72 28 53 70 79 43 61 6c  63 2c 33 39 29 3d 22 22  |r(SpyCalc,39)=""|
000031f0  29 20 8c 0d 0d ca 2b 20  20 20 20 20 20 20 20 20  |) ....+         |
00003200  20 20 20 f2 55 70 64 61  74 65 49 63 6f 6e 28 53  |   .UpdateIcon(S|
00003210  70 79 43 61 6c 63 2c 33  39 2c 22 37 22 29 0d 0d  |pyCalc,39,"7")..|
00003220  d4 29 20 20 20 20 20 20  20 20 20 20 20 20 f2 43  |.)            .C|
00003230  6f 6c 6f 75 72 49 63 6f  6e 28 53 70 79 43 61 6c  |olourIcon(SpyCal|
00003240  63 2c 33 39 2c 37 29 0d  0d de 2b 20 20 20 20 20  |c,39,7)...+     |
00003250  20 20 20 20 20 20 20 f2  55 70 64 61 74 65 49 63  |       .UpdateIc|
00003260  6f 6e 28 53 70 79 43 61  6c 63 2c 34 31 2c 22 31  |on(SpyCalc,41,"1|
00003270  22 29 0d 0d e8 29 20 20  20 20 20 20 20 20 20 20  |")...)          |
00003280  20 20 f2 43 6f 6c 6f 75  72 49 63 6f 6e 28 53 70  |  .ColourIcon(Sp|
00003290  79 43 61 6c 63 2c 34 31  2c 31 29 0d 0d f2 31 20  |yCalc,41,1)...1 |
000032a0  20 20 20 20 20 20 20 20  20 20 20 f2 55 70 64 61  |           .Upda|
000032b0  74 65 53 65 6c 65 63 74  65 64 46 6c 61 67 28 53  |teSelectedFlag(S|
000032c0  70 79 43 61 6c 63 2c 32  36 2c a3 29 0d 0d fc 0f  |pyCalc,26,.)....|
000032d0  20 20 20 20 20 20 20 20  20 20 cd 0d 0e 06 49 20  |          ....I |
000032e0  20 20 20 20 20 20 20 20  20 e7 20 a4 52 65 61 64  |         . .Read|
000032f0  49 63 6f 6e 28 53 70 79  43 61 6c 63 2c 34 33 29  |Icon(SpyCalc,43)|
00003300  3e 32 35 35 20 8c 20 f2  55 70 64 61 74 65 49 63  |>255 . .UpdateIc|
00003310  6f 6e 28 53 70 79 43 61  6c 63 2c 34 33 2c 22 32  |on(SpyCalc,43,"2|
00003320  35 35 22 29 0d 0e 10 0d  20 20 20 20 20 20 20 20  |55")....        |
00003330  cd 0d 0e 1a 3d 20 20 20  20 20 20 20 20 c8 99 20  |....=        .. |
00003340  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
00003350  73 69 74 69 6f 6e 22 2c  53 70 79 43 61 6c 63 2c  |sition",SpyCalc,|
00003360  54 6f 49 63 6f 6e 2c 2c  2c 2d 31 2c 2d 31 0d 0e  |ToIcon,,,-1,-1..|
00003370  24 44 20 20 20 20 20 20  20 20 f2 55 70 64 61 74  |$D        .Updat|
00003380  65 49 63 6f 6e 28 53 70  79 43 61 6c 63 2c 54 6f  |eIcon(SpyCalc,To|
00003390  49 63 6f 6e 2c a4 52 65  61 64 49 63 6f 6e 53 74  |Icon,.ReadIconSt|
000033a0  72 28 53 70 79 43 61 6c  63 2c 54 6f 49 63 6f 6e  |r(SpyCalc,ToIcon|
000033b0  29 29 0d 0e 2e 34 20 20  20 20 20 20 20 20 f2 55  |))...4        .U|
000033c0  70 64 61 74 65 49 63 6f  6e 28 53 70 79 43 61 6c  |pdateIcon(SpyCal|
000033d0  63 2c 33 33 2c 22 26 22  2b c3 7e a4 49 63 6f 6e  |c,33,"&"+.~.Icon|
000033e0  46 6c 61 67 73 29 0d 0e  38 30 20 20 20 20 20 20  |Flags)..80      |
000033f0  c9 20 26 31 38 45 2c 26  31 39 45 2c 26 31 41 45  |. &18E,&19E,&1AE|
00003400  2c 26 31 42 45 2c 31 33  3a f4 20 44 6f 77 6e 2c  |,&1BE,13:. Down,|
00003410  52 65 74 75 72 6e 0d 0e  42 15 20 20 20 20 20 20  |Return..B.      |
00003420  20 20 c8 8e 20 49 63 6f  6e 20 ca 0d 0e 4c 44 20  |  .. Icon ...LD |
00003430  20 20 20 20 20 20 20 20  20 c9 20 33 33 3a 54 6f  |         . 33:To|
00003440  49 63 6f 6e 3d 33 35 3a  e7 20 43 68 61 72 61 63  |Icon=35:. Charac|
00003450  74 65 72 3d 31 33 20 8c  20 54 6f 49 63 6f 6e 3d  |ter=13 . ToIcon=|
00003460  33 33 3a f4 20 44 6f 6e  27 74 20 6d 6f 76 65 0d  |33:. Don't move.|
00003470  0e 56 1c 20 20 20 20 20  20 20 20 20 20 c9 20 33  |.V.          . 3|
00003480  35 3a 54 6f 49 63 6f 6e  3d 33 37 0d 0e 60 1c 20  |5:ToIcon=37..`. |
00003490  20 20 20 20 20 20 20 20  20 c9 20 33 37 3a 54 6f  |         . 37:To|
000034a0  49 63 6f 6e 3d 34 33 0d  0e 6a 1c 20 20 20 20 20  |Icon=43..j.     |
000034b0  20 20 20 20 20 c9 20 34  33 3a 54 6f 49 63 6f 6e  |     . 43:ToIcon|
000034c0  3d 33 33 0d 0e 74 0d 20  20 20 20 20 20 20 20 cb  |=33..t.        .|
000034d0  0d 0e 7e 17 20 20 20 20  20 20 20 20 e7 20 49 63  |..~.        . Ic|
000034e0  6f 6e 3d 33 33 20 8c 0d  0e 88 58 20 20 20 20 20  |on=33 ....X     |
000034f0  20 20 20 20 20 41 24 3d  a4 52 65 61 64 49 63 6f  |     A$=.ReadIco|
00003500  6e 53 74 72 28 53 70 79  43 61 6c 63 2c 33 33 29  |nStr(SpyCalc,33)|
00003510  3a e7 20 41 24 3d 22 22  20 8c 20 41 24 3d 22 26  |:. A$="" . A$="&|
00003520  30 22 3a f2 55 70 64 61  74 65 49 63 6f 6e 28 53  |0":.UpdateIcon(S|
00003530  70 79 43 61 6c 63 2c 33  33 2c 22 26 30 22 29 0d  |pyCalc,33,"&0").|
00003540  0e 92 24 20 20 20 20 20  20 20 20 20 20 f2 55 70  |..$          .Up|
00003550  64 61 74 65 53 77 69 74  63 68 65 73 28 a0 28 41  |dateSwitches(.(A|
00003560  24 29 29 0d 0e 9c 22 20  20 20 20 20 20 20 20 20  |$))..."         |
00003570  20 f2 55 70 64 61 74 65  4f 74 68 65 72 73 28 a0  | .UpdateOthers(.|
00003580  28 41 24 29 29 0d 0e a6  0d 20 20 20 20 20 20 20  |(A$))....       |
00003590  20 cd 0d 0e b0 17 20 20  20 20 20 20 20 20 e7 20  | .....        . |
000035a0  49 63 6f 6e 3d 33 35 20  8c 0d 0e ba 49 20 20 20  |Icon=35 ....I   |
000035b0  20 20 20 20 20 20 20 e7  20 a4 52 65 61 64 49 63  |       . .ReadIc|
000035c0  6f 6e 53 74 72 28 53 70  79 43 61 6c 63 2c 33 35  |onStr(SpyCalc,35|
000035d0  29 3d 22 22 20 8c 20 f2  55 70 64 61 74 65 49 63  |)="" . .UpdateIc|
000035e0  6f 6e 28 53 70 79 43 61  6c 63 2c 33 35 2c 22 30  |on(SpyCalc,35,"0|
000035f0  22 29 0d 0e c4 47 20 20  20 20 20 20 20 20 20 20  |")...G          |
00003600  e7 20 a4 52 65 61 64 49  63 6f 6e 28 53 70 79 43  |. .ReadIcon(SpyC|
00003610  61 6c 63 2c 33 35 29 3e  31 35 20 8c 20 f2 55 70  |alc,35)>15 . .Up|
00003620  64 61 74 65 49 63 6f 6e  28 53 70 79 43 61 6c 63  |dateIcon(SpyCalc|
00003630  2c 33 35 2c 22 31 35 22  29 0d 0e ce 0d 20 20 20  |,35,"15")....   |
00003640  20 20 20 20 20 cd 0d 0e  d8 17 20 20 20 20 20 20  |     .....      |
00003650  20 20 e7 20 49 63 6f 6e  3d 33 37 20 8c 0d 0e e2  |  . Icon=37 ....|
00003660  49 20 20 20 20 20 20 20  20 20 20 e7 20 a4 52 65  |I          . .Re|
00003670  61 64 49 63 6f 6e 53 74  72 28 53 70 79 43 61 6c  |adIconStr(SpyCal|
00003680  63 2c 33 37 29 3d 22 22  20 8c 20 f2 55 70 64 61  |c,37)="" . .Upda|
00003690  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
000036a0  37 2c 22 30 22 29 0d 0e  ec 47 20 20 20 20 20 20  |7,"0")...G      |
000036b0  20 20 20 20 e7 20 a4 52  65 61 64 49 63 6f 6e 28  |    . .ReadIcon(|
000036c0  53 70 79 43 61 6c 63 2c  33 37 29 3e 33 31 20 8c  |SpyCalc,37)>31 .|
000036d0  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  | .UpdateIcon(Spy|
000036e0  43 61 6c 63 2c 33 37 2c  22 33 31 22 29 0d 0e f6  |Calc,37,"31")...|
000036f0  0d 20 20 20 20 20 20 20  20 cd 0d 0f 00 17 20 20  |.        .....  |
00003700  20 20 20 20 20 20 e7 20  49 63 6f 6e 3d 34 33 20  |      . Icon=43 |
00003710  8c 0d 0f 0a 95 20 20 20  20 20 20 20 20 20 20 e7  |.....          .|
00003720  20 a4 52 65 61 64 49 63  6f 6e 53 74 72 28 53 70  | .ReadIconStr(Sp|
00003730  79 43 61 6c 63 2c 34 33  29 3c 3e 22 22 20 8c 20  |yCalc,43)<>"" . |
00003740  e3 20 4e 3d 33 39 20 b8  20 34 31 20 88 20 32 3a  |. N=39 . 41 . 2:|
00003750  f2 55 70 64 61 74 65 49  63 6f 6e 28 53 70 79 43  |.UpdateIcon(SpyC|
00003760  61 6c 63 2c 4e 2c 22 22  29 3a f2 43 6f 6c 6f 75  |alc,N,""):.Colou|
00003770  72 49 63 6f 6e 28 53 70  79 43 61 6c 63 2c 4e 2c  |rIcon(SpyCalc,N,|
00003780  31 29 3a ed 3a f2 55 70  64 61 74 65 53 65 6c 65  |1):.:.UpdateSele|
00003790  63 74 65 64 46 6c 61 67  28 53 70 79 43 61 6c 63  |ctedFlag(SpyCalc|
000037a0  2c 32 36 2c b9 29 0d 0f  14 4f 20 20 20 20 20 20  |,26,.)...O      |
000037b0  20 20 20 20 e7 20 28 a4  52 65 61 64 49 63 6f 6e  |    . (.ReadIcon|
000037c0  53 74 72 28 53 70 79 43  61 6c 63 2c 34 33 29 3d  |Str(SpyCalc,43)=|
000037d0  22 22 29 20 80 20 28 a4  52 65 61 64 49 63 6f 6e  |"") . (.ReadIcon|
000037e0  53 74 72 28 53 70 79 43  61 6c 63 2c 33 39 29 3d  |Str(SpyCalc,39)=|
000037f0  22 22 29 20 8c 0d 0f 1e  2b 20 20 20 20 20 20 20  |"") ....+       |
00003800  20 20 20 20 20 f2 55 70  64 61 74 65 49 63 6f 6e  |     .UpdateIcon|
00003810  28 53 70 79 43 61 6c 63  2c 33 39 2c 22 37 22 29  |(SpyCalc,39,"7")|
00003820  0d 0f 28 29 20 20 20 20  20 20 20 20 20 20 20 20  |..()            |
00003830  f2 43 6f 6c 6f 75 72 49  63 6f 6e 28 53 70 79 43  |.ColourIcon(SpyC|
00003840  61 6c 63 2c 33 39 2c 37  29 0d 0f 32 2b 20 20 20  |alc,39,7)..2+   |
00003850  20 20 20 20 20 20 20 20  20 f2 55 70 64 61 74 65  |         .Update|
00003860  49 63 6f 6e 28 53 70 79  43 61 6c 63 2c 34 31 2c  |Icon(SpyCalc,41,|
00003870  22 31 22 29 0d 0f 3c 29  20 20 20 20 20 20 20 20  |"1")..<)        |
00003880  20 20 20 20 f2 43 6f 6c  6f 75 72 49 63 6f 6e 28  |    .ColourIcon(|
00003890  53 70 79 43 61 6c 63 2c  34 31 2c 31 29 0d 0f 46  |SpyCalc,41,1)..F|
000038a0  31 20 20 20 20 20 20 20  20 20 20 20 20 f2 55 70  |1            .Up|
000038b0  64 61 74 65 53 65 6c 65  63 74 65 64 46 6c 61 67  |dateSelectedFlag|
000038c0  28 53 70 79 43 61 6c 63  2c 32 36 2c a3 29 0d 0f  |(SpyCalc,26,.)..|
000038d0  50 0f 20 20 20 20 20 20  20 20 20 20 cd 0d 0f 5a  |P.          ...Z|
000038e0  49 20 20 20 20 20 20 20  20 20 20 e7 20 a4 52 65  |I          . .Re|
000038f0  61 64 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 34  |adIcon(SpyCalc,4|
00003900  33 29 3e 32 35 35 20 8c  20 f2 55 70 64 61 74 65  |3)>255 . .Update|
00003910  49 63 6f 6e 28 53 70 79  43 61 6c 63 2c 34 33 2c  |Icon(SpyCalc,43,|
00003920  22 32 35 35 22 29 0d 0f  64 0d 20 20 20 20 20 20  |"255")..d.      |
00003930  20 20 cd 0d 0f 6e 2d 20  20 20 20 20 20 20 20 e7  |  ...n-        .|
00003940  20 ac 28 28 43 68 61 72  61 63 74 65 72 3d 31 33  | .((Character=13|
00003950  29 20 80 20 28 49 63 6f  6e 3d 33 33 29 29 20 8c  |) . (Icon=33)) .|
00003960  0d 0f 78 3f 20 20 20 20  20 20 20 20 20 20 c8 99  |..x?          ..|
00003970  20 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  | "Wimp_SetCaretP|
00003980  6f 73 69 74 69 6f 6e 22  2c 53 70 79 43 61 6c 63  |osition",SpyCalc|
00003990  2c 54 6f 49 63 6f 6e 2c  2c 2c 2d 31 2c 2d 31 0d  |,ToIcon,,,-1,-1.|
000039a0  0f 82 46 20 20 20 20 20  20 20 20 20 20 f2 55 70  |..F          .Up|
000039b0  64 61 74 65 49 63 6f 6e  28 53 70 79 43 61 6c 63  |dateIcon(SpyCalc|
000039c0  2c 54 6f 49 63 6f 6e 2c  a4 52 65 61 64 49 63 6f  |,ToIcon,.ReadIco|
000039d0  6e 53 74 72 28 53 70 79  43 61 6c 63 2c 54 6f 49  |nStr(SpyCalc,ToI|
000039e0  63 6f 6e 29 29 0d 0f 8c  0d 20 20 20 20 20 20 20  |con))....       |
000039f0  20 cd 0d 0f 96 34 20 20  20 20 20 20 20 20 f2 55  | ....4        .U|
00003a00  70 64 61 74 65 49 63 6f  6e 28 53 70 79 43 61 6c  |pdateIcon(SpyCal|
00003a10  63 2c 33 33 2c 22 26 22  2b c3 7e a4 49 63 6f 6e  |c,33,"&"+.~.Icon|
00003a20  46 6c 61 67 73 29 0d 0f  a0 09 20 20 20 20 7f 0d  |Flags)....    ..|
00003a30  0f aa 28 20 20 20 20 20  20 c8 99 20 22 57 69 6d  |..(      .. "Wim|
00003a40  70 5f 50 72 6f 63 65 73  73 4b 65 79 22 2c 43 68  |p_ProcessKey",Ch|
00003a50  61 72 61 63 74 65 72 0d  0f b4 09 20 20 20 20 cb  |aracter....    .|
00003a60  0d 0f be 07 20 20 7f 0d  0f c8 26 20 20 20 20 c8  |....  ....&    .|
00003a70  99 20 22 57 69 6d 70 5f  50 72 6f 63 65 73 73 4b  |. "Wimp_ProcessK|
00003a80  65 79 22 2c 43 68 61 72  61 63 74 65 72 0d 0f d2  |ey",Character...|
00003a90  05 cb 0d 0f dc 05 e1 0d  0f e6 05 3a 0d 0f f0 11  |...........:....|
00003aa0  dd 20 f2 44 65 63 6f 64  65 4d 65 6e 75 0d 0f fa  |. .DecodeMenu...|
00003ab0  2a 53 75 62 30 3d 42 6c  6f 63 6b 21 30 3a 53 75  |*Sub0=Block!0:Su|
00003ac0  62 31 3d 42 6c 6f 63 6b  21 34 3a 53 75 62 32 3d  |b1=Block!4:Sub2=|
00003ad0  42 6c 6f 63 6b 21 38 0d  10 04 0f 43 6c 6f 73 65  |Block!8....Close|
00003ae0  4d 65 6e 75 3d a3 0d 10  0e 0b c8 8e 20 4d 25 20  |Menu=....... M% |
00003af0  ca 0d 10 18 0f 20 20 c9  20 49 42 4d 65 6e 75 3a  |.....  . IBMenu:|
00003b00  0d 10 22 11 20 20 20 20  c8 8e 20 53 75 62 30 20  |..".    .. Sub0 |
00003b10  ca 0d 10 2c 0d 20 20 20  20 20 20 c9 20 30 0d 10  |...,.      . 0..|
00003b20  36 2b 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |6+        .. "Wi|
00003b30  6d 70 5f 47 65 74 50 6f  69 6e 74 65 72 49 6e 66  |mp_GetPointerInf|
00003b40  6f 22 2c 2c 42 6c 6f 63  6b 0d 10 40 3c 20 20 20  |o",,Block..@<   |
00003b50  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 43 72  |     .. "Wimp_Cr|
00003b60  65 61 74 65 4d 65 6e 75  22 2c 2c 49 6e 66 6f 2c  |eateMenu",,Info,|
00003b70  42 6c 6f 63 6b 21 30 2d  32 34 2c 42 6c 6f 63 6b  |Block!0-24,Block|
00003b80  21 34 2b 32 34 0d 10 4a  17 20 20 20 20 20 20 20  |!4+24..J.       |
00003b90  20 43 6c 6f 73 65 4d 65  6e 75 3d b9 0d 10 54 0d  | CloseMenu=...T.|
00003ba0  20 20 20 20 20 20 c9 20  31 0d 10 5e 12 20 20 20  |      . 1..^.   |
00003bb0  20 20 20 20 20 44 6f 6e  65 3d b9 0d 10 68 09 20  |     Done=...h. |
00003bc0  20 20 20 cb 0d 10 72 11  20 20 c9 20 4d 61 69 6e  |   ...r.  . Main|
00003bd0  4d 65 6e 75 3a 0d 10 7c  11 20 20 20 20 c8 8e 20  |Menu:..|.    .. |
00003be0  53 75 62 30 20 ca 0d 10  86 0d 20 20 20 20 20 20  |Sub0 .....      |
00003bf0  c9 20 30 0d 10 90 2b 20  20 20 20 20 20 20 20 c8  |. 0...+        .|
00003c00  99 20 22 57 69 6d 70 5f  47 65 74 50 6f 69 6e 74  |. "Wimp_GetPoint|
00003c10  65 72 49 6e 66 6f 22 2c  2c 42 6c 6f 63 6b 0d 10  |erInfo",,Block..|
00003c20  9a 3c 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |.<        .. "Wi|
00003c30  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
00003c40  49 6e 66 6f 2c 42 6c 6f  63 6b 21 30 2d 32 34 2c  |Info,Block!0-24,|
00003c50  42 6c 6f 63 6b 21 34 2b  32 34 0d 10 a4 17 20 20  |Block!4+24....  |
00003c60  20 20 20 20 20 20 43 6c  6f 73 65 4d 65 6e 75 3d  |      CloseMenu=|
00003c70  b9 0d 10 ae 0d 20 20 20  20 20 20 c9 20 31 0d 10  |.....      . 1..|
00003c80  b8 38 20 20 20 20 20 20  20 20 53 70 79 69 6e 67  |.8        Spying|
00003c90  3d ac 20 53 70 79 69 6e  67 3a f2 54 69 63 6b 4d  |=. Spying:.TickM|
00003ca0  65 6e 75 28 4d 61 69 6e  4d 65 6e 75 2c 31 2c 53  |enu(MainMenu,1,S|
00003cb0  70 79 69 6e 67 29 0d 10  c2 30 20 20 20 20 20 20  |pying)...0      |
00003cc0  20 20 f2 43 6c 65 61 72  53 70 79 43 61 6c 63 57  |  .ClearSpyCalcW|
00003cd0  69 6e 64 6f 77 28 53 70  79 69 6e 67 29 3a 4f 6c  |indow(Spying):Ol|
00003ce0  64 57 69 6e 3d 30 0d 10  cc 34 20 20 20 20 20 20  |dWin=0...4      |
00003cf0  20 20 f2 55 70 64 61 74  65 49 63 6f 6e 28 53 70  |  .UpdateIcon(Sp|
00003d00  79 43 61 6c 63 2c 33 33  2c 22 26 22 2b c3 7e a4  |yCalc,33,"&"+.~.|
00003d10  49 63 6f 6e 46 6c 61 67  73 29 0d 10 d6 6d 20 20  |IconFlags)...m  |
00003d20  20 20 20 20 20 20 c8 99  20 22 57 69 6d 70 5f 47  |      .. "Wimp_G|
00003d30  65 74 43 61 72 65 74 50  6f 73 69 74 69 6f 6e 22  |etCaretPosition"|
00003d40  2c 2c 42 6c 6f 63 6b 3a  e7 20 28 42 6c 6f 63 6b  |,,Block:. (Block|
00003d50  21 30 3d 53 70 79 43 61  6c 63 29 20 80 20 53 70  |!0=SpyCalc) . Sp|
00003d60  79 69 6e 67 20 8c 20 c8  99 20 22 57 69 6d 70 5f  |ying . .. "Wimp_|
00003d70  53 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |SetCaretPosition|
00003d80  22 2c 2d 31 2c 2d 31 0d  10 e0 0d 20 20 20 20 20  |",-1,-1....     |
00003d90  20 c9 20 32 0d 10 ea 2b  20 20 20 20 20 20 20 20  | . 2...+        |
00003da0  c8 99 20 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |.. "Wimp_GetPoin|
00003db0  74 65 72 49 6e 66 6f 22  2c 2c 42 6c 6f 63 6b 0d  |terInfo",,Block.|
00003dc0  10 f4 3b 20 20 20 20 20  20 20 20 c8 99 20 22 57  |..;        .. "W|
00003dd0  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 22 2c  |imp_CreateMenu",|
00003de0  2c 4c 6f 63 2c 42 6c 6f  63 6b 21 30 2d 32 34 2c  |,Loc,Block!0-24,|
00003df0  42 6c 6f 63 6b 21 34 2b  32 34 0d 10 fe 17 20 20  |Block!4+24....  |
00003e00  20 20 20 20 20 20 43 6c  6f 73 65 4d 65 6e 75 3d  |      CloseMenu=|
00003e10  b9 0d 11 08 0d 20 20 20  20 20 20 c9 20 33 0d 11  |.....      . 3..|
00003e20  12 5c 20 20 20 20 20 20  20 20 e7 20 ac 20 a4 53  |.\        . . .S|
00003e30  61 76 65 53 65 74 74 69  6e 67 73 20 8c 20 85 20  |aveSettings . . |
00003e40  39 39 39 39 2c 22 41 6e  20 65 72 72 6f 72 20 6f  |9999,"An error o|
00003e50  63 63 75 72 72 65 64 20  77 68 69 6c 73 74 20 77  |ccurred whilst w|
00003e60  72 69 74 69 6e 67 20 74  68 65 20 73 65 74 74 69  |riting the setti|
00003e70  6e 67 73 20 66 69 6c 65  2e 22 0d 11 1c 09 20 20  |ngs file."....  |
00003e80  20 20 cb 0d 11 26 05 cb  0d 11 30 23 c8 99 20 22  |  ...&....0#.. "|
00003e90  57 69 6d 70 5f 47 65 74  50 6f 69 6e 74 65 72 49  |Wimp_GetPointerI|
00003ea0  6e 66 6f 22 2c 2c 42 6c  6f 63 6b 0d 11 3a 33 e7  |nfo",,Block..:3.|
00003eb0  20 28 28 42 6c 6f 63 6b  21 38 20 80 20 31 29 3d  | ((Block!8 . 1)=|
00003ec0  31 29 20 80 20 28 ac 20  43 6c 6f 73 65 4d 65 6e  |1) . (. CloseMen|
00003ed0  75 29 20 8c 20 f2 4d 61  6b 65 4d 65 6e 75 0d 11  |u) . .MakeMenu..|
00003ee0  44 05 e1 0d 11 4e 05 3a  0d 11 58 4f f4 20 2d 2d  |D....N.:..XO. --|
00003ef0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003f30  2d 2d 2d 2d 2d 2d 2d 0d  11 62 13 f4 20 4d 65 6e  |-------..b.. Men|
00003f40  75 20 72 6f 75 74 69 6e  65 73 0d 11 6c 4f f4 20  |u routines..lO. |
00003f50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003f90  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 11 76 05 3a 0d 11  |---------..v.:..|
00003fa0  80 11 dd 20 f2 42 75 69  6c 64 4d 65 6e 75 73 0d  |... .BuildMenus.|
00003fb0  11 8a 49 f4 20 54 68 69  73 20 70 72 6f 63 65 64  |..I. This proced|
00003fc0  75 72 65 20 73 68 6f 75  6c 64 20 6f 6e 6c 79 20  |ure should only |
00003fd0  62 65 20 76 69 73 69 74  65 64 20 6f 6e 63 65 2c  |be visited once,|
00003fe0  20 73 69 6e 63 65 20 69  74 20 63 6f 6e 74 61 69  | since it contai|
00003ff0  6e 73 20 44 49 4d 73 2e  0d 11 94 07 20 20 3a 0d  |ns DIMs.....  :.|
00004000  11 9e 4f f4 20 49 6e 20  74 68 65 20 6d 65 6e 75  |..O. In the menu|
00004010  20 74 69 74 6c 65 20 73  74 72 69 6e 67 73 20 62  | title strings b|
00004020  65 6c 6f 77 2c 20 69 66  20 61 20 22 7c 22 20 63  |elow, if a "|" c|
00004030  68 61 72 61 63 74 65 72  20 69 73 20 70 72 65 73  |haracter is pres|
00004040  65 6e 74 20 69 74 20 77  69 6c 6c 20 62 65 0d 11  |ent it will be..|
00004050  a8 4f f4 20 72 65 70 6c  61 63 65 64 20 62 79 20  |.O. replaced by |
00004060  61 20 73 70 61 63 65 20  75 6e 64 65 72 20 52 49  |a space under RI|
00004070  53 43 20 4f 53 20 33 2e  31 20 28 6f 72 20 67 72  |SC OS 3.1 (or gr|
00004080  65 61 74 65 72 29 2c 20  6f 72 20 77 69 6c 6c 20  |eater), or will |
00004090  74 65 72 6d 69 6e 61 74  65 20 74 68 65 0d 11 b2  |terminate the...|
000040a0  4f f4 20 73 74 72 69 6e  67 20 75 6e 64 65 72 20  |O. string under |
000040b0  65 61 72 6c 69 65 72 20  76 65 72 73 69 6f 6e 73  |earlier versions|
000040c0  20 6f 66 20 74 68 65 20  77 69 6d 70 2e 20 54 68  | of the wimp. Th|
000040d0  69 73 20 61 6c 6c 6f 77  73 20 74 68 65 20 6e 65  |is allows the ne|
000040e0  77 20 69 6e 64 69 72 65  63 74 65 64 0d 11 bc 46  |w indirected...F|
000040f0  f4 20 6d 65 6e 75 20 74  69 74 6c 65 73 20 74 6f  |. menu titles to|
00004100  20 62 65 20 75 73 65 64  20 28 77 68 69 63 68 20  | be used (which |
00004110  77 65 72 65 20 69 6e 74  72 6f 64 75 63 65 64 20  |were introduced |
00004120  77 69 74 68 20 52 49 53  43 20 4f 53 20 33 2e 31  |with RISC OS 3.1|
00004130  29 2e 0d 11 c6 07 20 20  3a 0d 11 d0 23 49 6e 64  |).....  :...#Ind|
00004140  69 72 65 63 74 4d 65 6e  75 54 65 78 74 4f 66 66  |irectMenuTextOff|
00004150  73 65 74 50 6f 69 6e 74  65 72 3d 30 0d 11 da 4e  |setPointer=0...N|
00004160  f4 20 54 68 69 73 20 70  6f 69 6e 74 73 20 74 6f  |. This points to|
00004170  20 61 20 70 6f 6f 6c 20  74 6f 20 62 65 20 75 73  | a pool to be us|
00004180  65 64 20 62 79 20 61 6c  6c 20 6d 65 6e 75 73 20  |ed by all menus |
00004190  66 6f 72 20 74 68 65 69  72 20 69 6e 64 69 72 65  |for their indire|
000041a0  63 74 65 64 20 74 65 78  74 2e 0d 11 e4 07 20 20  |cted text.....  |
000041b0  3a 0d 11 ee 0d 4d 25 3d  49 42 4d 65 6e 75 0d 11  |:....M%=IBMenu..|
000041c0  f8 49 54 69 74 6c 65 24  3d 22 49 63 6f 6e 20 46  |.ITitle$="Icon F|
000041d0  6c 61 67 73 22 3a de 20  49 42 4d 65 6e 75 54 69  |lags":. IBMenuTi|
000041e0  74 6c 65 20 a9 28 54 69  74 6c 65 24 29 2b 31 3a  |tle .(Title$)+1:|
000041f0  24 49 42 4d 65 6e 75 54  69 74 6c 65 3d 54 69 74  |$IBMenuTitle=Tit|
00004200  6c 65 24 2b bd 31 33 0d  12 02 1a f2 4d 65 6e 75  |le$+.13.....Menu|
00004210  49 6e 69 74 28 49 42 4d  65 6e 75 54 69 74 6c 65  |Init(IBMenuTitle|
00004220  29 0d 12 0c 1c f2 4d 65  6e 75 49 74 65 6d 28 22  |).....MenuItem("|
00004230  49 6e 66 6f 22 2c 30 2c  49 6e 66 6f 29 0d 12 16  |Info",0,Info)...|
00004240  1c f2 4d 65 6e 75 49 74  65 6d 28 22 51 75 69 74  |..MenuItem("Quit|
00004250  22 2c 31 32 38 2c 2d 31  29 0d 12 20 07 20 20 3a  |",128,-1).. .  :|
00004260  0d 12 2a 0f 4d 25 3d 4d  61 69 6e 4d 65 6e 75 0d  |..*.M%=MainMenu.|
00004270  12 34 4d 54 69 74 6c 65  24 3d 22 49 63 6f 6e 20  |.4MTitle$="Icon |
00004280  46 6c 61 67 73 22 3a de  20 4d 61 69 6e 4d 65 6e  |Flags":. MainMen|
00004290  75 54 69 74 6c 65 20 a9  28 54 69 74 6c 65 24 29  |uTitle .(Title$)|
000042a0  2b 32 3a 24 4d 61 69 6e  4d 65 6e 75 54 69 74 6c  |+2:$MainMenuTitl|
000042b0  65 3d 54 69 74 6c 65 24  2b bd 31 33 0d 12 3e 1c  |e=Title$+.13..>.|
000042c0  f2 4d 65 6e 75 49 6e 69  74 28 4d 61 69 6e 4d 65  |.MenuInit(MainMe|
000042d0  6e 75 54 69 74 6c 65 29  0d 12 48 1c f2 4d 65 6e  |nuTitle)..H..Men|
000042e0  75 49 74 65 6d 28 22 49  6e 66 6f 22 2c 32 2c 49  |uItem("Info",2,I|
000042f0  6e 66 6f 29 0d 12 52 22  f2 4d 65 6e 75 49 74 65  |nfo)..R".MenuIte|
00004300  6d 28 22 53 70 79 20 6f  6e 20 69 63 6f 6e 73 22  |m("Spy on icons"|
00004310  2c 30 2c 2d 31 29 0d 12  5c 26 f2 4d 65 6e 75 49  |,0,-1)..\&.MenuI|
00004320  74 65 6d 28 22 57 69 6e  64 6f 77 20 70 6f 73 69  |tem("Window posi|
00004330  74 69 6f 6e 22 2c 32 2c  4c 6f 63 29 0d 12 66 25  |tion",2,Loc)..f%|
00004340  f2 4d 65 6e 75 49 74 65  6d 28 22 53 61 76 65 20  |.MenuItem("Save |
00004350  73 65 74 74 69 6e 67 73  22 2c 31 32 38 2c 2d 31  |settings",128,-1|
00004360  29 0d 12 70 05 e1 0d 12  7a 05 3a 0d 12 84 0f dd  |)..p....z.:.....|
00004370  20 f2 4d 61 6b 65 4d 65  6e 75 0d 12 8e 17 e7 20  | .MakeMenu..... |
00004380  4d 65 6e 75 58 3c 30 20  8c 20 4d 65 6e 75 58 3d  |MenuX<0 . MenuX=|
00004390  30 0d 12 98 2a e7 20 4d  65 6e 75 59 3c 31 38 34  |0...*. MenuY<184|
000043a0  20 8c 20 4d 65 6e 75 59  3d 31 38 34 3a f4 20 66  | . MenuY=184:. f|
000043b0  6f 72 20 69 63 6f 6e 20  62 61 72 0d 12 a2 37 c8  |or icon bar...7.|
000043c0  99 20 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |. "Wimp_CreateMe|
000043d0  6e 75 22 2c 2c 4d 25 2c  4d 65 6e 75 58 2d 28 28  |nu",,M%,MenuX-((|
000043e0  33 36 2b 4d 25 21 31 36  29 2f 32 29 2c 4d 65 6e  |36+M%!16)/2),Men|
000043f0  75 59 0d 12 ac 05 e1 0d  12 b6 05 3a 0d 12 c0 1a  |uY.........:....|
00004400  dd 20 f2 4d 65 6e 75 49  6e 69 74 28 4d 65 6e 75  |. .MenuInit(Menu|
00004410  54 69 74 6c 65 29 0d 12  ca 11 e7 20 77 69 6d 70  |Title)..... wimp|
00004420  3e 3d 33 31 30 20 8c 0d  12 d4 37 20 20 41 3d a7  |>=310 ....7  A=.|
00004430  24 4d 65 6e 75 54 69 74  6c 65 2c 22 7c 22 29 3a  |$MenuTitle,"|"):|
00004440  e7 20 41 3c 3e 30 20 8c  20 3f 28 4d 65 6e 75 54  |. A<>0 . ?(MenuT|
00004450  69 74 6c 65 2b 28 41 2d  31 29 29 3d 33 32 0d 12  |itle+(A-1))=32..|
00004460  de 1b 20 20 4d 65 6e 75  4d 61 78 3d a9 28 24 4d  |..  MenuMax=.($M|
00004470  65 6e 75 54 69 74 6c 65  29 0d 12 e8 14 20 20 4d  |enuTitle)....  M|
00004480  25 21 30 3d 4d 65 6e 75  54 69 74 6c 65 0d 12 f2  |%!0=MenuTitle...|
00004490  05 cc 0d 12 fc 37 20 20  41 3d a7 24 4d 65 6e 75  |.....7  A=.$Menu|
000044a0  54 69 74 6c 65 2c 22 7c  22 29 3a e7 20 41 3c 3e  |Title,"|"):. A<>|
000044b0  30 20 8c 20 3f 28 4d 65  6e 75 54 69 74 6c 65 2b  |0 . ?(MenuTitle+|
000044c0  28 41 2d 31 29 29 3d 31  33 0d 13 06 20 20 20 4d  |(A-1))=13...   M|
000044d0  65 6e 75 4d 61 78 3d a9  28 c0 24 4d 65 6e 75 54  |enuMax=.(.$MenuT|
000044e0  69 74 6c 65 2c 31 32 29  29 0d 13 10 19 20 20 24  |itle,12))....  $|
000044f0  4d 25 3d c0 24 4d 65 6e  75 54 69 74 6c 65 2c 31  |M%=.$MenuTitle,1|
00004500  32 29 0d 13 1a 05 cd 0d  13 24 24 4d 25 3f 31 32  |2).......$$M%?12|
00004510  3d 37 3a 4d 25 3f 31 33  3d 32 3a 4d 25 3f 31 34  |=7:M%?13=2:M%?14|
00004520  3d 31 31 3a 4d 25 3f 31  35 3d 30 0d 13 2e 14 4d  |=11:M%?15=0....M|
00004530  25 21 31 36 3d 4d 65 6e  75 4d 61 78 2a 31 36 0d  |%!16=MenuMax*16.|
00004540  13 38 14 4d 25 21 32 30  3d 34 34 3a 4d 25 21 32  |.8.M%!20=44:M%!2|
00004550  34 3d 30 0d 13 42 0c 50  25 3d 4d 25 2b 32 38 0d  |4=0..B.P%=M%+28.|
00004560  13 4c 05 e1 0d 13 56 05  3a 0d 13 60 21 dd 20 f2  |.L....V.:..`!. .|
00004570  4d 65 6e 75 49 74 65 6d  28 54 65 78 74 24 2c 46  |MenuItem(Text$,F|
00004580  6c 61 67 73 2c 4c 69 6e  6b 29 0d 13 6a 4b f4 20  |lags,Link)..jK. |
00004590  46 6c 61 67 73 3a 20 31  2d 74 69 63 6b 65 64 2c  |Flags: 1-ticked,|
000045a0  20 32 2d 64 61 73 68 65  64 20 6c 69 6e 65 2c 20  | 2-dashed line, |
000045b0  34 2d 77 72 69 74 65 61  62 6c 65 2c 20 38 2d 6d  |4-writeable, 8-m|
000045c0  65 73 73 61 67 65 2c 20  31 32 38 2d 6c 61 73 74  |essage, 128-last|
000045d0  20 69 74 65 6d 0d 13 74  31 f4 20 4c 69 6e 6b 3a  | item..t1. Link:|
000045e0  20 6d 65 6e 75 20 6f 72  20 77 69 6e 64 6f 77 20  | menu or window |
000045f0  68 61 6e 64 6c 65 20 66  6f 72 20 73 75 62 2d 70  |handle for sub-p|
00004600  6f 69 6e 74 65 72 0d 13  7e 18 50 25 21 30 3d 46  |ointer..~.P%!0=F|
00004610  6c 61 67 73 3a 50 25 21  34 3d 4c 69 6e 6b 0d 13  |lags:P%!4=Link..|
00004620  88 14 e7 20 a9 28 54 65  78 74 24 29 3c 3d 31 32  |... .(Text$)<=12|
00004630  20 8c 0d 13 92 25 20 20  50 25 21 38 3d 26 30 37  | ....%  P%!8=&07|
00004640  30 30 33 30 32 31 3a f4  20 4e 6f 74 20 69 6e 64  |003021:. Not ind|
00004650  69 72 65 63 74 65 64 0d  13 9c 14 20 20 24 28 50  |irected....  $(P|
00004660  25 2b 31 32 29 3d 54 65  78 74 24 0d 13 a6 05 cc  |%+12)=Text$.....|
00004670  0d 13 b0 21 20 20 50 25  21 38 3d 26 30 37 30 30  |...!  P%!8=&0700|
00004680  33 31 32 31 3a f4 20 49  6e 64 69 72 65 63 74 65  |3121:. Indirecte|
00004690  64 0d 13 ba 3a 20 20 50  25 21 31 32 3d 49 6e 64  |d...:  P%!12=Ind|
000046a0  69 72 65 63 74 4d 65 6e  75 54 65 78 74 2b 49 6e  |irectMenuText+In|
000046b0  64 69 72 65 63 74 4d 65  6e 75 54 65 78 74 4f 66  |directMenuTextOf|
000046c0  66 73 65 74 50 6f 69 6e  74 65 72 0d 13 c4 15 20  |fsetPointer.... |
000046d0  20 50 25 21 31 36 3d 30  3a 50 25 21 32 30 3d 30  | P%!16=0:P%!20=0|
000046e0  0d 13 ce 41 20 20 24 28  49 6e 64 69 72 65 63 74  |...A  $(Indirect|
000046f0  4d 65 6e 75 54 65 78 74  2b 49 6e 64 69 72 65 63  |MenuText+Indirec|
00004700  74 4d 65 6e 75 54 65 78  74 4f 66 66 73 65 74 50  |tMenuTextOffsetP|
00004710  6f 69 6e 74 65 72 29 3d  54 65 78 74 24 2b bd 31  |ointer)=Text$+.1|
00004720  33 0d 13 d8 2f 20 20 49  6e 64 69 72 65 63 74 4d  |3.../  IndirectM|
00004730  65 6e 75 54 65 78 74 4f  66 66 73 65 74 50 6f 69  |enuTextOffsetPoi|
00004740  6e 74 65 72 2b 3d a9 28  54 65 78 74 24 29 2b 31  |nter+=.(Text$)+1|
00004750  0d 13 e2 82 20 20 e7 20  49 6e 64 69 72 65 63 74  |....  . Indirect|
00004760  4d 65 6e 75 54 65 78 74  4f 66 66 73 65 74 50 6f  |MenuTextOffsetPo|
00004770  69 6e 74 65 72 3e 49 6e  64 4d 65 6e 75 4d 61 78  |inter>IndMenuMax|
00004780  20 8c 20 85 20 30 2c 22  54 68 65 20 69 6e 64 69  | . . 0,"The indi|
00004790  72 65 63 74 20 6d 65 6e  75 20 74 65 78 74 20 62  |rect menu text b|
000047a0  75 66 66 65 72 20 68 61  73 20 6f 76 65 72 66 6c  |uffer has overfl|
000047b0  6f 77 65 64 2e 20 50 6c  65 61 73 65 20 61 6c 6c  |owed. Please all|
000047c0  6f 63 61 74 65 20 6d 6f  72 65 20 73 70 61 63 65  |ocate more space|
000047d0  2e 22 0d 13 ec 05 cd 0d  13 f6 0a 50 25 2b 3d 32  |.".........P%+=2|
000047e0  34 0d 14 00 3e e7 20 4d  65 6e 75 4d 61 78 3c a9  |4...>. MenuMax<.|
000047f0  28 54 65 78 74 24 29 20  8c 20 4d 65 6e 75 4d 61  |(Text$) . MenuMa|
00004800  78 3d a9 28 54 65 78 74  24 29 3a 4d 25 21 31 36  |x=.(Text$):M%!16|
00004810  3d 28 4d 65 6e 75 4d 61  78 2b 31 29 2a 31 36 0d  |=(MenuMax+1)*16.|
00004820  14 0a 41 e7 20 28 46 6c  61 67 73 3d 31 32 38 29  |..A. (Flags=128)|
00004830  20 80 20 28 77 69 6d 70  3e 3d 33 31 30 29 20 8c  | . (wimp>=310) .|
00004840  20 4d 25 21 32 38 3d 28  28 28 4d 25 21 32 38 29  | M%!28=(((M%!28)|
00004850  20 80 20 ac 20 32 35 36  29 20 82 20 32 35 36 29  | . . 256) . 256)|
00004860  0d 14 14 37 20 20 f4 20  49 6e 64 69 72 65 63 74  |...7  . Indirect|
00004870  65 64 20 6d 65 6e 75 20  74 69 74 6c 65 73 20 66  |ed menu titles f|
00004880  6f 72 20 52 49 53 43 20  4f 53 20 33 2e 31 20 75  |or RISC OS 3.1 u|
00004890  70 77 61 72 64 73 2e 0d  14 1e 05 e1 0d 14 28 05  |pwards........(.|
000048a0  3a 0d 14 32 4f f4 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |:..2O. ---------|
000048b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000048f0  0d 14 3c 29 f4 20 52 65  73 70 6f 6e 73 65 73 20  |..<). Responses |
00004900  74 6f 20 69 6e 63 6f 6d  69 6e 67 20 77 69 6d 70  |to incoming wimp|
00004910  20 6d 65 73 73 61 67 65  73 0d 14 46 4f f4 20 2d  | messages..FO. -|
00004920  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004960  2d 2d 2d 2d 2d 2d 2d 2d  0d 14 50 05 3a 0d 14 5a  |--------..P.:..Z|
00004970  18 dd 20 f2 53 61 76 65  44 65 73 6b 74 6f 70 28  |.. .SaveDesktop(|
00004980  46 69 6c 65 29 0d 14 64  07 ea 20 85 0d 14 6e 47  |File)..d.. ...nG|
00004990  ee 20 85 20 ea 20 42 6c  6f 63 6b 21 31 32 3d 42  |. . . Block!12=B|
000049a0  6c 6f 63 6b 21 38 3a c8  99 20 22 57 69 6d 70 5f  |lock!8:.. "Wimp_|
000049b0  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 39 2c  |SendMessage",19,|
000049c0  42 6c 6f 63 6b 2c 42 6c  6f 63 6b 21 34 3a f7 20  |Block,Block!4:. |
000049d0  85 3a e1 0d 14 78 49 f4  20 54 68 65 20 61 62 6f  |.:...xI. The abo|
000049e0  76 65 20 6c 69 6e 65 20  61 63 6b 6e 6f 77 6c 65  |ve line acknowle|
000049f0  64 67 65 73 20 74 68 65  20 6d 65 73 73 61 67 65  |dges the message|
00004a00  20 69 66 20 61 6e 20 65  72 72 6f 72 20 6f 63 63  | if an error occ|
00004a10  75 72 73 2c 20 74 68 65  72 65 62 79 0d 14 82 20  |urs, thereby... |
00004a20  f4 20 61 62 6f 72 74 69  6e 67 20 74 68 65 20 64  |. aborting the d|
00004a30  65 73 6b 74 6f 70 20 73  61 76 65 2e 0d 14 8c 2b  |esktop save....+|
00004a40  d5 23 46 69 6c 65 2c 22  52 75 6e 20 22 2b 4f 75  |.#File,"Run "+Ou|
00004a50  72 50 61 74 68 4e 61 6d  65 24 2b 4f 75 72 46 69  |rPathName$+OurFi|
00004a60  6c 65 4e 61 6d 65 24 0d  14 96 05 e1 0d 14 a0 05  |leName$.........|
00004a70  3a 0d 14 aa 0b dd 20 f2  48 65 6c 70 0d 14 b4 34  |:..... .Help...4|
00004a80  42 6c 6f 63 6b 21 31 32  3d 42 6c 6f 63 6b 21 38  |Block!12=Block!8|
00004a90  3a 42 6c 6f 63 6b 21 31  36 3d 26 35 30 33 3a 48  |:Block!16=&503:H|
00004aa0  65 6c 70 49 6e 66 6f 3d  42 6c 6f 63 6b 2b 32 30  |elpInfo=Block+20|
00004ab0  0d 14 be 07 20 20 3a 0d  14 c8 30 f4 20 42 6c 6f  |....  :...0. Blo|
00004ac0  63 6b 21 33 32 20 67 69  76 65 73 20 77 69 6e 64  |ck!32 gives wind|
00004ad0  6f 77 2c 20 42 6c 6f 63  6b 21 33 36 20 67 69 76  |ow, Block!36 giv|
00004ae0  65 73 20 69 63 6f 6e 0d  14 d2 07 20 20 3a 0d 14  |es icon....  :..|
00004af0  dc 11 c8 8e 20 42 6c 6f  63 6b 21 33 32 20 ca 0d  |.... Block!32 ..|
00004b00  14 e6 30 20 20 c9 20 2d  32 3a f2 53 65 6e 64 28  |..0  . -2:.Send(|
00004b10  22 54 68 69 73 20 69 73  20 74 68 65 20 49 63 6f  |"This is the Ico|
00004b20  6e 20 46 6c 61 67 73 20  69 63 6f 6e 2e 22 29 0d  |n Flags icon.").|
00004b30  14 f0 3d 20 20 20 20 20  20 20 20 20 20 f2 53 65  |..=          .Se|
00004b40  6e 64 28 22 43 6c 69 63  6b 20 4d 45 4e 55 20 66  |nd("Click MENU f|
00004b50  6f 72 20 69 6e 66 6f 72  6d 61 74 69 6f 6e 20 6f  |or information o|
00004b60  72 20 74 6f 20 71 75 69  74 2e 22 29 0d 14 fa 42  |r to quit.")...B|
00004b70  20 20 20 20 20 20 20 20  20 20 f2 53 65 6e 64 28  |          .Send(|
00004b80  22 43 6c 69 63 6b 20 53  45 4c 45 43 54 20 74 6f  |"Click SELECT to|
00004b90  20 6f 70 65 6e 20 74 68  65 20 49 63 6f 6e 20 46  | open the Icon F|
00004ba0  6c 61 67 73 20 77 69 6e  64 6f 77 2e 22 29 0d 15  |lags window.")..|
00004bb0  04 10 20 20 c9 20 53 70  79 43 61 6c 63 3a 0d 15  |..  . SpyCalc:..|
00004bc0  0e 15 20 20 20 20 c8 8e  20 42 6c 6f 63 6b 21 33  |..    .. Block!3|
00004bd0  36 20 ca 0d 15 18 5f 20  20 20 20 20 20 c9 20 30  |6 ...._      . 0|
00004be0  2c 31 2c 32 2c 33 2c 34  2c 35 3a f2 53 65 6e 64  |,1,2,3,4,5:.Send|
00004bf0  28 22 54 68 69 73 20 61  72 65 61 20 73 68 6f 77  |("This area show|
00004c00  73 20 74 68 65 20 77 69  6e 64 6f 77 20 61 6e 64  |s the window and|
00004c10  20 69 63 6f 6e 20 68 61  6e 64 6c 65 73 20 75 6e  | icon handles un|
00004c20  64 65 72 20 74 68 65 20  70 6f 69 6e 74 65 72 2e  |der the pointer.|
00004c30  22 29 0d 15 22 69 20 20  20 20 20 20 c9 20 36 2c  |").."i      . 6,|
00004c40  37 2c 38 2c 39 2c 31 30  2c 31 31 3a f2 53 65 6e  |7,8,9,10,11:.Sen|
00004c50  64 28 22 54 68 69 73 20  61 72 65 61 20 73 68 6f  |d("This area sho|
00004c60  77 73 20 74 68 65 20 6d  69 6e 69 6d 75 6d 20 63  |ws the minimum c|
00004c70  6f 6f 72 64 69 6e 61 74  65 73 20 6f 66 20 74 68  |oordinates of th|
00004c80  65 20 69 63 6f 6e 20 75  6e 64 65 72 20 74 68 65  |e icon under the|
00004c90  20 70 6f 69 6e 74 65 72  2e 22 29 0d 15 2c 6d 20  | pointer.")..,m |
00004ca0  20 20 20 20 20 c9 20 31  32 2c 31 33 2c 31 34 2c  |     . 12,13,14,|
00004cb0  31 35 2c 31 36 2c 31 37  3a f2 53 65 6e 64 28 22  |15,16,17:.Send("|
00004cc0  54 68 69 73 20 61 72 65  61 20 73 68 6f 77 73 20  |This area shows |
00004cd0  74 68 65 20 6d 61 78 69  6d 75 6d 20 63 6f 6f 72  |the maximum coor|
00004ce0  64 69 6e 61 74 65 73 20  6f 66 20 74 68 65 20 69  |dinates of the i|
00004cf0  63 6f 6e 20 75 6e 64 65  72 20 74 68 65 20 70 6f  |con under the po|
00004d00  69 6e 74 65 72 2e 22 29  0d 15 36 1c 20 20 20 20  |inter.")..6.    |
00004d10  20 20 c9 20 31 38 2c 31  39 3a e7 20 53 70 79 69  |  . 18,19:. Spyi|
00004d20  6e 67 20 8c 0d 15 40 64  20 20 20 20 20 20 20 20  |ng ...@d        |
00004d30  20 20 20 20 20 20 20 20  20 20 20 f2 53 65 6e 64  |           .Send|
00004d40  28 22 54 68 69 73 20 61  72 65 61 20 73 68 6f 77  |("This area show|
00004d50  73 20 74 68 65 20 69 6e  64 69 76 69 64 75 61 6c  |s the individual|
00004d60  20 66 6c 61 67 73 20 66  6f 72 20 74 68 65 20 69  | flags for the i|
00004d70  63 6f 6e 20 75 6e 64 65  72 20 74 68 65 20 70 6f  |con under the po|
00004d80  69 6e 74 65 72 2e 22 29  0d 15 4a 16 20 20 20 20  |inter.")..J.    |
00004d90  20 20 20 20 20 20 20 20  20 20 20 20 20 cc 0d 15  |             ...|
00004da0  54 a3 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |T.              |
00004db0  20 20 20 20 20 f2 53 65  6e 64 28 22 43 6c 69 63  |     .Send("Clic|
00004dc0  6b 20 74 68 65 20 73 77  69 74 63 68 65 73 20 69  |k the switches i|
00004dd0  6e 20 74 68 69 73 20 61  72 65 61 20 74 6f 20 77  |n this area to w|
00004de0  6f 72 6b 20 6f 75 74 20  74 68 65 20 69 63 6f 6e  |ork out the icon|
00004df0  20 66 6c 61 67 73 2c 20  6f 72 20 65 6e 74 65 72  | flags, or enter|
00004e00  20 61 20 76 61 6c 75 65  20 69 6e 20 74 68 65 20  | a value in the |
00004e10  62 6f 78 20 61 6e 64 20  70 72 65 73 73 20 52 45  |box and press RE|
00004e20  54 55 52 4e 20 74 6f 20  66 69 6e 64 20 6f 75 74  |TURN to find out|
00004e30  20 77 68 61 74 20 69 74  20 6d 65 61 6e 73 2e 22  | what it means."|
00004e40  29 0d 15 5e 16 20 20 20  20 20 20 20 20 20 20 20  |)..^.           |
00004e50  20 20 20 20 20 20 cd 0d  15 68 4a 20 20 20 20 20  |      ...hJ     |
00004e60  20 c9 20 32 30 3a f2 53  65 6e 64 28 22 54 68 69  | . 20:.Send("Thi|
00004e70  73 20 73 77 69 74 63 68  20 69 73 20 73 65 6c 65  |s switch is sele|
00004e80  63 74 65 64 20 69 66 20  74 68 65 20 69 63 6f 6e  |cted if the icon|
00004e90  20 63 6f 6e 74 61 69 6e  73 20 74 65 78 74 2e 22  | contains text."|
00004ea0  29 0d 15 72 4e 20 20 20  20 20 20 c9 20 32 31 3a  |)..rN      . 21:|
00004eb0  f2 53 65 6e 64 28 22 54  68 69 73 20 73 77 69 74  |.Send("This swit|
00004ec0  63 68 20 69 73 20 73 65  6c 65 63 74 65 64 20 69  |ch is selected i|
00004ed0  66 20 74 68 65 20 69 63  6f 6e 20 63 6f 6e 74 61  |f the icon conta|
00004ee0  69 6e 73 20 61 20 73 70  72 69 74 65 2e 22 29 0d  |ins a sprite.").|
00004ef0  15 7c 49 20 20 20 20 20  20 c9 20 32 32 3a f2 53  |.|I      . 22:.S|
00004f00  65 6e 64 28 22 54 68 69  73 20 73 77 69 74 63 68  |end("This switch|
00004f10  20 69 73 20 73 65 6c 65  63 74 65 64 20 69 66 20  | is selected if |
00004f20  74 68 65 20 69 63 6f 6e  20 68 61 73 20 61 20 62  |the icon has a b|
00004f30  6f 72 64 65 72 2e 22 29  0d 15 86 54 20 20 20 20  |order.")...T    |
00004f40  20 20 c9 20 32 33 3a f2  53 65 6e 64 28 22 54 68  |  . 23:.Send("Th|
00004f50  69 73 20 73 77 69 74 63  68 20 69 73 20 73 65 6c  |is switch is sel|
00004f60  65 63 74 65 64 20 69 66  20 74 68 65 20 69 63 6f  |ected if the ico|
00004f70  6e 20 69 73 20 68 6f 72  69 7a 6f 6e 74 61 6c 6c  |n is horizontall|
00004f80  79 20 63 65 6e 74 72 65  64 2e 22 29 0d 15 90 52  |y centred.")...R|
00004f90  20 20 20 20 20 20 c9 20  32 34 3a f2 53 65 6e 64  |      . 24:.Send|
00004fa0  28 22 54 68 69 73 20 73  77 69 74 63 68 20 69 73  |("This switch is|
00004fb0  20 73 65 6c 65 63 74 65  64 20 69 66 20 74 68 65  | selected if the|
00004fc0  20 69 63 6f 6e 20 69 73  20 76 65 72 74 69 63 61  | icon is vertica|
00004fd0  6c 6c 79 20 63 65 6e 74  72 65 64 2e 22 29 0d 15  |lly centred.")..|
00004fe0  9a 54 20 20 20 20 20 20  c9 20 32 35 3a f2 53 65  |.T      . 25:.Se|
00004ff0  6e 64 28 22 54 68 69 73  20 73 77 69 74 63 68 20  |nd("This switch |
00005000  69 73 20 73 65 6c 65 63  74 65 64 20 69 66 20 74  |is selected if t|
00005010  68 65 20 69 63 6f 6e 20  68 61 73 20 61 20 66 69  |he icon has a fi|
00005020  6c 6c 65 64 20 62 61 63  6b 67 72 6f 75 6e 64 2e  |lled background.|
00005030  22 29 0d 15 a4 71 20 20  20 20 20 20 c9 20 32 36  |")...q      . 26|
00005040  3a f2 53 65 6e 64 28 22  54 68 69 73 20 73 77 69  |:.Send("This swi|
00005050  74 63 68 20 69 73 20 73  65 6c 65 63 74 65 64 20  |tch is selected |
00005060  69 66 20 74 68 65 20 69  63 6f 6e 20 63 6f 6e 74  |if the icon cont|
00005070  61 69 6e 73 20 61 6e 74  69 2d 61 6c 69 61 73 65  |ains anti-aliase|
00005080  64 20 74 65 78 74 20 64  72 61 77 6e 20 62 79 20  |d text drawn by |
00005090  74 68 65 20 66 6f 6e 74  20 6d 61 6e 61 67 65 72  |the font manager|
000050a0  2e 22 29 0d 15 ae 6f 20  20 20 20 20 20 c9 20 32  |.")...o      . 2|
000050b0  37 3a f2 53 65 6e 64 28  22 54 68 69 73 20 73 77  |7:.Send("This sw|
000050c0  69 74 63 68 20 69 73 20  73 65 6c 65 63 74 65 64  |itch is selected|
000050d0  20 69 66 20 74 68 65 20  69 63 6f 6e 20 6d 75 73  | if the icon mus|
000050e0  74 20 63 6c 65 61 72 20  69 74 73 20 62 61 63 6b  |t clear its back|
000050f0  67 72 6f 75 6e 64 20 77  68 65 6e 20 69 74 20 69  |ground when it i|
00005100  73 20 62 65 69 6e 67 20  75 70 64 61 74 65 64 2e  |s being updated.|
00005110  22 29 0d 15 b8 56 20 20  20 20 20 20 c9 20 32 38  |")...V      . 28|
00005120  3a f2 53 65 6e 64 28 22  54 68 69 73 20 73 77 69  |:.Send("This swi|
00005130  74 63 68 20 69 73 20 73  65 6c 65 63 74 65 64 20  |tch is selected |
00005140  69 66 20 74 68 65 20 69  63 6f 6e 27 73 20 63 6f  |if the icon's co|
00005150  6e 74 65 6e 74 73 20 61  72 65 20 69 6e 64 69 72  |ntents are indir|
00005160  65 63 74 65 64 2e 22 29  0d 15 c2 4f 20 20 20 20  |ected.")...O    |
00005170  20 20 c9 20 32 39 3a f2  53 65 6e 64 28 22 54 68  |  . 29:.Send("Th|
00005180  69 73 20 73 77 69 74 63  68 20 69 73 20 73 65 6c  |is switch is sel|
00005190  65 63 74 65 64 20 69 66  20 74 68 65 20 69 63 6f  |ected if the ico|
000051a0  6e 20 69 73 20 72 69 67  68 74 2d 6a 75 73 74 69  |n is right-justi|
000051b0  66 69 65 64 2e 22 29 0d  15 cc 81 20 20 20 20 20  |fied.")....     |
000051c0  20 c9 20 33 30 3a f2 53  65 6e 64 28 22 54 68 69  | . 30:.Send("Thi|
000051d0  73 20 73 77 69 74 63 68  20 69 73 20 73 65 6c 65  |s switch is sele|
000051e0  63 74 65 64 20 69 66 20  74 68 65 20 69 63 6f 6e  |cted if the icon|
000051f0  20 61 6c 6c 6f 77 73 20  74 68 65 20 41 44 4a 55  | allows the ADJU|
00005200  53 54 20 62 75 74 74 6f  6e 20 74 6f 20 6d 61 6b  |ST button to mak|
00005210  65 20 6d 75 6c 74 69 70  6c 65 20 73 65 6c 65 63  |e multiple selec|
00005220  74 69 6f 6e 73 20 69 6e  20 74 68 65 20 73 61 6d  |tions in the sam|
00005230  65 20 45 53 47 2e 22 29  0d 15 d6 5d 20 20 20 20  |e ESG.")...]    |
00005240  20 20 c9 20 33 31 3a f2  53 65 6e 64 28 22 54 68  |  . 31:.Send("Th|
00005250  69 73 20 73 77 69 74 63  68 20 69 73 20 73 65 6c  |is switch is sel|
00005260  65 63 74 65 64 20 69 66  20 74 68 65 20 69 63 6f  |ected if the ico|
00005270  6e 20 64 69 73 70 6c 61  79 73 20 69 74 73 20 73  |n displays its s|
00005280  70 72 69 74 65 20 61 74  20 68 61 6c 66 2d 73 69  |prite at half-si|
00005290  7a 65 2e 22 29 0d 15 e0  48 20 20 20 20 20 20 c9  |ze.")...H      .|
000052a0  20 33 32 3a f2 53 65 6e  64 28 22 54 68 69 73 20  | 32:.Send("This |
000052b0  73 77 69 74 63 68 20 69  73 20 73 65 6c 65 63 74  |switch is select|
000052c0  65 64 20 69 66 20 74 68  65 20 69 63 6f 6e 20 69  |ed if the icon i|
000052d0  73 20 73 65 6c 65 63 74  65 64 2e 22 29 0d 15 ea  |s selected.")...|
000052e0  41 20 20 20 20 20 20 c9  20 33 33 3a f2 53 65 6e  |A      . 33:.Sen|
000052f0  64 28 22 54 68 69 73 20  73 68 6f 77 73 20 74 68  |d("This shows th|
00005300  65 20 69 63 6f 6e 20 66  6c 61 67 73 20 69 6e 20  |e icon flags in |
00005310  68 65 78 61 64 65 63 69  6d 61 6c 2e 22 29 0d 15  |hexadecimal.")..|
00005320  f4 66 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.f              |
00005330  e7 20 ac 20 53 70 79 69  6e 67 20 8c 20 f2 53 65  |. . Spying . .Se|
00005340  6e 64 28 22 45 6e 74 65  72 20 61 20 76 61 6c 75  |nd("Enter a valu|
00005350  65 20 68 65 72 65 20 61  6e 64 20 70 72 65 73 73  |e here and press|
00005360  20 52 45 54 55 52 4e 20  74 6f 20 66 69 6e 64 20  | RETURN to find |
00005370  6f 75 74 20 77 68 61 74  20 69 74 20 6d 65 61 6e  |out what it mean|
00005380  73 2e 22 29 0d 15 fe 76  20 20 20 20 20 20 20 20  |s.")...v        |
00005390  20 20 20 20 20 20 e7 20  ac 20 53 70 79 69 6e 67  |      . . Spying|
000053a0  20 8c 20 f2 53 65 6e 64  28 22 59 6f 75 20 63 61  | . .Send("You ca|
000053b0  6e 20 64 72 61 67 20 74  68 69 73 20 66 69 67 75  |n drag this figu|
000053c0  72 65 20 6f 75 74 20 74  6f 20 61 6e 6f 74 68 65  |re out to anothe|
000053d0  72 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 6f 72  |r application or|
000053e0  20 74 6f 20 61 20 64 69  72 65 63 74 6f 72 79 20  | to a directory |
000053f0  64 69 73 70 6c 61 79 2e  22 29 0d 16 08 3f 20 20  |display.")...?  |
00005400  20 20 20 20 c9 20 33 34  3a f2 53 65 6e 64 28 22  |    . 34:.Send("|
00005410  54 68 69 73 20 73 68 6f  77 73 20 74 68 65 20 62  |This shows the b|
00005420  75 74 74 6f 6e 20 74 79  70 65 20 6f 66 20 74 68  |utton type of th|
00005430  65 20 69 63 6f 6e 2e 22  29 0d 16 12 3f 20 20 20  |e icon.")...?   |
00005440  20 20 20 c9 20 33 35 3a  f2 53 65 6e 64 28 22 54  |   . 35:.Send("T|
00005450  68 69 73 20 73 68 6f 77  73 20 74 68 65 20 62 75  |his shows the bu|
00005460  74 74 6f 6e 20 74 79 70  65 20 6f 66 20 74 68 65  |tton type of the|
00005470  20 69 63 6f 6e 2e 22 29  0d 16 1c 4e 20 20 20 20  | icon.")...N    |
00005480  20 20 20 20 20 20 20 20  20 20 e7 20 ac 20 53 70  |          . . Sp|
00005490  79 69 6e 67 20 8c 20 f2  53 65 6e 64 28 22 45 6e  |ying . .Send("En|
000054a0  74 65 72 20 61 20 6e 65  77 20 76 61 6c 75 65 20  |ter a new value |
000054b0  74 6f 20 75 70 64 61 74  65 20 74 68 65 20 66 6c  |to update the fl|
000054c0  61 67 73 2e 22 29 0d 16  26 4d 20 20 20 20 20 20  |ags.")..&M      |
000054d0  c9 20 33 36 3a f2 53 65  6e 64 28 22 54 68 69 73  |. 36:.Send("This|
000054e0  20 73 68 6f 77 73 20 74  68 65 20 65 78 63 6c 75  | shows the exclu|
000054f0  73 69 76 65 20 73 65 6c  65 63 74 69 6f 6e 20 67  |sive selection g|
00005500  72 6f 75 70 20 6f 66 20  74 68 65 20 69 63 6f 6e  |roup of the icon|
00005510  2e 22 29 0d 16 30 4d 20  20 20 20 20 20 c9 20 33  |.")..0M      . 3|
00005520  37 3a f2 53 65 6e 64 28  22 54 68 69 73 20 73 68  |7:.Send("This sh|
00005530  6f 77 73 20 74 68 65 20  65 78 63 6c 75 73 69 76  |ows the exclusiv|
00005540  65 20 73 65 6c 65 63 74  69 6f 6e 20 67 72 6f 75  |e selection grou|
00005550  70 20 6f 66 20 74 68 65  20 69 63 6f 6e 2e 22 29  |p of the icon.")|
00005560  0d 16 3a 4e 20 20 20 20  20 20 20 20 20 20 20 20  |..:N            |
00005570  20 20 e7 20 ac 20 53 70  79 69 6e 67 20 8c 20 f2  |  . . Spying . .|
00005580  53 65 6e 64 28 22 45 6e  74 65 72 20 61 20 6e 65  |Send("Enter a ne|
00005590  77 20 76 61 6c 75 65 20  74 6f 20 75 70 64 61 74  |w value to updat|
000055a0  65 20 74 68 65 20 66 6c  61 67 73 2e 22 29 0d 16  |e the flags.")..|
000055b0  44 4f 20 20 20 20 20 20  c9 20 33 38 3a f2 53 65  |DO      . 38:.Se|
000055c0  6e 64 28 22 54 68 69 73  20 73 68 6f 77 73 20 74  |nd("This shows t|
000055d0  68 65 20 69 63 6f 6e 27  73 20 66 6f 72 65 67 72  |he icon's foregr|
000055e0  6f 75 6e 64 20 63 6f 6c  6f 75 72 2c 20 69 66 20  |ound colour, if |
000055f0  69 74 20 68 61 73 20 6f  6e 65 2e 22 29 0d 16 4e  |it has one.")..N|
00005600  4f 20 20 20 20 20 20 c9  20 33 39 3a f2 53 65 6e  |O      . 39:.Sen|
00005610  64 28 22 54 68 69 73 20  73 68 6f 77 73 20 74 68  |d("This shows th|
00005620  65 20 69 63 6f 6e 27 73  20 66 6f 72 65 67 72 6f  |e icon's foregro|
00005630  75 6e 64 20 63 6f 6c 6f  75 72 2c 20 69 66 20 69  |und colour, if i|
00005640  74 20 68 61 73 20 6f 6e  65 2e 22 29 0d 16 58 72  |t has one.")..Xr|
00005650  20 20 20 20 20 20 20 20  20 20 20 20 20 20 e7 20  |              . |
00005660  ac 20 53 70 79 69 6e 67  20 8c 20 f2 53 65 6e 64  |. Spying . .Send|
00005670  28 22 43 6c 69 63 6b 20  53 45 4c 45 43 54 20 6f  |("Click SELECT o|
00005680  72 20 41 44 4a 55 53 54  20 74 6f 20 63 79 63 6c  |r ADJUST to cycl|
00005690  65 20 66 6f 72 77 61 72  64 73 20 6f 72 20 62 61  |e forwards or ba|
000056a0  63 6b 77 61 72 64 73 20  74 68 72 6f 75 67 68 20  |ckwards through |
000056b0  74 68 65 20 63 6f 6c 6f  75 72 73 2e 22 29 0d 16  |the colours.")..|
000056c0  62 4f 20 20 20 20 20 20  c9 20 34 30 3a f2 53 65  |bO      . 40:.Se|
000056d0  6e 64 28 22 54 68 69 73  20 73 68 6f 77 73 20 74  |nd("This shows t|
000056e0  68 65 20 69 63 6f 6e 27  73 20 62 61 63 6b 67 72  |he icon's backgr|
000056f0  6f 75 6e 64 20 63 6f 6c  6f 75 72 2c 20 69 66 20  |ound colour, if |
00005700  69 74 20 68 61 73 20 6f  6e 65 2e 22 29 0d 16 6c  |it has one.")..l|
00005710  4f 20 20 20 20 20 20 c9  20 34 31 3a f2 53 65 6e  |O      . 41:.Sen|
00005720  64 28 22 54 68 69 73 20  73 68 6f 77 73 20 74 68  |d("This shows th|
00005730  65 20 69 63 6f 6e 27 73  20 62 61 63 6b 67 72 6f  |e icon's backgro|
00005740  75 6e 64 20 63 6f 6c 6f  75 72 2c 20 69 66 20 69  |und colour, if i|
00005750  74 20 68 61 73 20 6f 6e  65 2e 22 29 0d 16 76 72  |t has one.")..vr|
00005760  20 20 20 20 20 20 20 20  20 20 20 20 20 20 e7 20  |              . |
00005770  ac 20 53 70 79 69 6e 67  20 8c 20 f2 53 65 6e 64  |. Spying . .Send|
00005780  28 22 43 6c 69 63 6b 20  53 45 4c 45 43 54 20 6f  |("Click SELECT o|
00005790  72 20 41 44 4a 55 53 54  20 74 6f 20 63 79 63 6c  |r ADJUST to cycl|
000057a0  65 20 66 6f 72 77 61 72  64 73 20 6f 72 20 62 61  |e forwards or ba|
000057b0  63 6b 77 61 72 64 73 20  74 68 72 6f 75 67 68 20  |ckwards through |
000057c0  74 68 65 20 63 6f 6c 6f  75 72 73 2e 22 29 0d 16  |the colours.")..|
000057d0  80 4c 20 20 20 20 20 20  c9 20 34 32 3a f2 53 65  |.L      . 42:.Se|
000057e0  6e 64 28 22 49 66 20 74  68 65 20 69 63 6f 6e 20  |nd("If the icon |
000057f0  75 73 65 73 20 61 20 66  6f 6e 74 2c 20 74 68 69  |uses a font, thi|
00005800  73 20 73 68 6f 77 73 20  74 68 65 20 66 6f 6e 74  |s shows the font|
00005810  20 68 61 6e 64 6c 65 2e  22 29 0d 16 8a 4c 20 20  | handle.")...L  |
00005820  20 20 20 20 c9 20 34 33  3a f2 53 65 6e 64 28 22  |    . 43:.Send("|
00005830  49 66 20 74 68 65 20 69  63 6f 6e 20 75 73 65 73  |If the icon uses|
00005840  20 61 20 66 6f 6e 74 2c  20 74 68 69 73 20 73 68  | a font, this sh|
00005850  6f 77 73 20 74 68 65 20  66 6f 6e 74 20 68 61 6e  |ows the font han|
00005860  64 6c 65 2e 22 29 0d 16  94 4e 20 20 20 20 20 20  |dle.")...N      |
00005870  20 20 20 20 20 20 20 20  e7 20 ac 20 53 70 79 69  |        . . Spyi|
00005880  6e 67 20 8c 20 f2 53 65  6e 64 28 22 45 6e 74 65  |ng . .Send("Ente|
00005890  72 20 61 20 6e 65 77 20  76 61 6c 75 65 20 74 6f  |r a new value to|
000058a0  20 75 70 64 61 74 65 20  74 68 65 20 66 6c 61 67  | update the flag|
000058b0  73 2e 22 29 0d 16 9e 38  20 20 20 20 20 20 7f 20  |s.")...8      . |
000058c0  f2 53 65 6e 64 28 22 54  68 69 73 20 69 73 20 74  |.Send("This is t|
000058d0  68 65 20 49 63 6f 6e 20  46 6c 61 67 73 20 6d 61  |he Icon Flags ma|
000058e0  69 6e 20 77 69 6e 64 6f  77 2e 22 29 0d 16 a8 4a  |in window.")...J|
000058f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005900  f2 53 65 6e 64 28 22 59  6f 75 20 63 61 6e 20 73  |.Send("You can s|
00005910  70 79 20 6f 6e 20 69 63  6f 6e 73 20 6f 72 20 63  |py on icons or c|
00005920  61 6c 63 75 6c 61 74 65  20 69 63 6f 6e 20 66 6c  |alculate icon fl|
00005930  61 67 73 2e 22 29 0d 16  b2 09 20 20 20 20 cb 0d  |ags.")....    ..|
00005940  16 bc 48 20 20 c9 20 49  6e 66 6f 3a f2 53 65 6e  |..H  . Info:.Sen|
00005950  64 28 22 54 68 69 73 20  77 69 6e 64 6f 77 20 64  |d("This window d|
00005960  69 73 70 6c 61 79 73 20  69 6e 66 6f 72 6d 61 74  |isplays informat|
00005970  69 6f 6e 20 61 62 6f 75  74 20 49 63 6f 6e 20 46  |ion about Icon F|
00005980  6c 61 67 73 2e 22 29 0d  16 c6 5b 20 20 20 20 20  |lags.")...[     |
00005990  20 20 20 20 20 20 20 f2  53 65 6e 64 28 22 49 63  |       .Send("Ic|
000059a0  6f 6e 20 46 6c 61 67 73  20 69 73 20 61 20 6d 65  |on Flags is a me|
000059b0  6d 62 65 72 20 6f 66 20  74 68 65 20 4f 6d 6e 69  |mber of the Omni|
000059c0  44 65 73 6b 20 53 75 69  74 65 20 6f 66 20 64 65  |Desk Suite of de|
000059d0  73 6b 74 6f 70 20 75 74  69 6c 69 74 69 65 73 2e  |sktop utilities.|
000059e0  22 29 0d 16 d0 0c 20 20  c9 20 4c 6f 63 3a 0d 16  |")....  . Loc:..|
000059f0  da 0d 20 20 20 c8 8e 20  b9 20 ca 0d 16 e4 6d 20  |..   .. . ....m |
00005a00  20 20 20 20 c9 20 28 28  42 6c 6f 63 6b 21 33 36  |    . ((Block!36|
00005a10  29 3c 36 29 3a f2 53 65  6e 64 28 22 54 68 69 73  |)<6):.Send("This|
00005a20  20 77 69 6e 64 6f 77 20  6c 65 74 73 20 79 6f 75  | window lets you|
00005a30  20 73 6e 61 70 20 74 68  65 20 6d 61 67 6e 69 66  | snap the magnif|
00005a40  69 65 72 20 77 69 6e 64  6f 77 20 74 6f 20 61 6e  |ier window to an|
00005a50  20 69 6e 76 69 73 62 6c  65 20 73 63 72 65 65 6e  | invisble screen|
00005a60  20 67 72 69 64 2e 22 29  0d 16 ee 9d 20 20 20 20  | grid.")....    |
00005a70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005a80  20 20 20 20 20 f2 53 65  6e 64 28 22 54 68 65 20  |     .Send("The |
00005a90  73 65 63 6f 6e 64 20 70  6f 73 69 74 69 6f 6e 20  |second position |
00005aa0  75 70 20 70 75 74 73 20  74 68 65 20 77 69 6e 64  |up puts the wind|
00005ab0  6f 77 20 6a 75 73 74 20  61 62 6f 76 65 20 74 68  |ow just above th|
00005ac0  65 20 69 63 6f 6e 2d 62  61 72 2c 20 61 6e 64 20  |e icon-bar, and |
00005ad0  69 73 20 74 68 65 72 65  66 6f 72 65 20 6e 6f 74  |is therefore not|
00005ae0  20 65 76 65 6e 6c 79 20  73 70 61 63 65 64 20 77  | evenly spaced w|
00005af0  69 74 68 20 74 68 65 20  6f 74 68 65 72 20 72 6f  |ith the other ro|
00005b00  77 73 2e 22 29 0d 16 f8  87 20 20 20 20 20 7f 20  |ws.")....     . |
00005b10  f2 53 65 6e 64 28 22 43  6c 69 63 6b 20 53 45 4c  |.Send("Click SEL|
00005b20  45 43 54 20 6f 6e 20 74  68 65 20 70 6f 73 69 74  |ECT on the posit|
00005b30  69 6f 6e 20 79 6f 75 20  77 61 6e 74 20 74 68 65  |ion you want the|
00005b40  20 77 69 6e 64 6f 77 20  74 6f 20 73 6e 61 70 20  | window to snap |
00005b50  74 6f 2c 20 6f 72 20 41  44 4a 55 53 54 20 6f 6e  |to, or ADJUST on|
00005b60  20 74 68 65 20 77 69 6e  64 6f 77 20 69 63 6f 6e  | the window icon|
00005b70  20 74 6f 20 74 75 72 6e  20 74 68 65 20 73 6e 61  | to turn the sna|
00005b80  70 70 69 6e 67 20 6f 66  66 2e 22 29 0d 17 02 75  |pping off.")...u|
00005b90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 f2  |               .|
00005ba0  53 65 6e 64 28 22 49 66  20 73 6e 61 70 70 69 6e  |Send("If snappin|
00005bb0  67 20 69 73 20 6f 6e 2c  20 74 68 65 20 77 69 6e  |g is on, the win|
00005bc0  64 6f 77 20 77 69 6c 6c  20 6f 70 65 6e 20 61 74  |dow will open at|
00005bd0  20 74 68 65 20 61 70 70  72 6f 70 72 69 61 74 65  | the appropriate|
00005be0  20 70 6f 73 69 74 69 6f  6e 20 77 68 65 6e 20 79  | position when y|
00005bf0  6f 75 20 63 68 61 6e 67  65 20 6d 6f 64 65 2e 22  |ou change mode."|
00005c00  29 0d 17 0c 08 20 20 20  cb 0d 17 16 05 7f 0d 17  |)....   ........|
00005c10  20 13 20 20 e7 20 77 69  6d 70 3e 3d 32 31 37 20  | .  . wimp>=217 |
00005c20  8c 0d 17 2a 31 20 20 20  20 4d 65 6e 75 48 65 6c  |...*1    MenuHel|
00005c30  70 21 30 3d 2d 31 3a 4d  65 6e 75 48 65 6c 70 21  |p!0=-1:MenuHelp!|
00005c40  34 3d 2d 31 3a 4d 65 6e  75 48 65 6c 70 21 38 3d  |4=-1:MenuHelp!8=|
00005c50  2d 31 0d 17 34 3b 20 20  20 20 c8 99 20 22 57 69  |-1..4;    .. "Wi|
00005c60  6d 70 5f 47 65 74 4d 65  6e 75 53 74 61 74 65 22  |mp_GetMenuState"|
00005c70  2c 31 2c 4d 65 6e 75 48  65 6c 70 2c 42 6c 6f 63  |,1,MenuHelp,Bloc|
00005c80  6b 21 33 32 2c 42 6c 6f  63 6b 21 33 36 0d 17 3e  |k!32,Block!36..>|
00005c90  0f 20 20 20 20 c8 8e 20  4d 25 20 ca 0d 17 48 13  |.    .. M% ...H.|
00005ca0  20 20 20 20 20 20 c9 20  49 42 4d 65 6e 75 3a 0d  |      . IBMenu:.|
00005cb0  17 52 1d 20 20 20 20 20  20 20 20 e7 20 4d 65 6e  |.R.        . Men|
00005cc0  75 48 65 6c 70 21 34 3d  2d 31 20 8c 0d 17 5c 1d  |uHelp!4=-1 ...\.|
00005cd0  20 20 20 20 20 20 20 20  20 20 c8 8e 20 4d 65 6e  |          .. Men|
00005ce0  75 48 65 6c 70 21 30 20  ca 0d 17 66 58 20 20 20  |uHelp!0 ...fX   |
00005cf0  20 20 20 20 20 20 20 20  20 c9 20 30 3a f2 53 65  |         . 0:.Se|
00005d00  6e 64 28 22 4d 6f 76 65  20 74 68 65 20 70 6f 69  |nd("Move the poi|
00005d10  6e 74 65 72 20 72 69 67  68 74 20 74 6f 20 73 65  |nter right to se|
00005d20  65 20 69 6e 66 6f 72 6d  61 74 69 6f 6e 20 61 62  |e information ab|
00005d30  6f 75 74 20 49 63 6f 6e  20 46 6c 61 67 73 2e 22  |out Icon Flags."|
00005d40  29 0d 17 70 3d 20 20 20  20 20 20 20 20 20 20 20  |)..p=           |
00005d50  20 c9 20 31 3a f2 53 65  6e 64 28 22 43 6c 69 63  | . 1:.Send("Clic|
00005d60  6b 20 53 45 4c 45 43 54  20 74 6f 20 71 75 69 74  |k SELECT to quit|
00005d70  20 49 63 6f 6e 20 46 6c  61 67 73 2e 22 29 0d 17  | Icon Flags.")..|
00005d80  7a 40 20 20 20 20 20 20  20 20 20 20 20 20 7f 20  |z@            . |
00005d90  f2 53 65 6e 64 28 22 54  68 69 73 20 69 73 20 74  |.Send("This is t|
00005da0  68 65 20 49 63 6f 6e 20  46 6c 61 67 73 20 69 63  |he Icon Flags ic|
00005db0  6f 6e 2d 62 61 72 20 6d  65 6e 75 2e 22 29 0d 17  |on-bar menu.")..|
00005dc0  84 0f 20 20 20 20 20 20  20 20 20 20 cb 0d 17 8e  |..          ....|
00005dd0  0d 20 20 20 20 20 20 20  20 cd 0d 17 98 15 20 20  |.        .....  |
00005de0  20 20 20 20 c9 20 4d 61  69 6e 4d 65 6e 75 3a 0d  |    . MainMenu:.|
00005df0  17 a2 57 20 20 20 20 20  20 20 20 44 69 72 65 63  |..W        Direc|
00005e00  74 69 6f 6e 24 3d 22 72  69 67 68 74 22 3a e7 20  |tion$="right":. |
00005e10  77 69 6d 70 3e 3d 33 31  30 20 80 20 bd 28 4d 61  |wimp>=310 . .(Ma|
00005e20  69 6e 4d 65 6e 75 54 69  74 6c 65 3f 30 29 3d 22  |inMenuTitle?0)="|
00005e30  5c 22 20 8c 20 44 69 72  65 63 74 69 6f 6e 24 3d  |\" . Direction$=|
00005e40  22 6c 65 66 74 22 0d 17  ac 1b 20 20 20 20 20 20  |"left"....      |
00005e50  20 20 c8 8e 20 4d 65 6e  75 48 65 6c 70 21 30 20  |  .. MenuHelp!0 |
00005e60  ca 0d 17 b6 5f 20 20 20  20 20 20 20 20 20 20 c9  |...._          .|
00005e70  20 30 3a f2 53 65 6e 64  28 22 4d 6f 76 65 20 74  | 0:.Send("Move t|
00005e80  68 65 20 70 6f 69 6e 74  65 72 20 22 2b 44 69 72  |he pointer "+Dir|
00005e90  65 63 74 69 6f 6e 24 2b  22 20 74 6f 20 73 65 65  |ection$+" to see|
00005ea0  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 61 62 6f  | information abo|
00005eb0  75 74 20 49 63 6f 6e 20  46 6c 61 67 73 2e 22 29  |ut Icon Flags.")|
00005ec0  0d 17 c0 1c 20 20 20 20  20 20 20 20 20 20 c9 20  |....          . |
00005ed0  31 3a e7 20 53 70 79 69  6e 67 20 8c 0d 17 ca 5e  |1:. Spying ....^|
00005ee0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005ef0  20 20 20 f2 53 65 6e 64  28 22 43 6c 69 63 6b 20  |   .Send("Click |
00005f00  53 45 4c 45 43 54 20 6f  72 20 41 44 4a 55 53 54  |SELECT or ADJUST|
00005f10  20 74 6f 20 73 74 6f 70  20 73 70 79 69 6e 67 20  | to stop spying |
00005f20  61 6e 64 20 77 6f 72 6b  20 6f 75 74 20 69 63 6f  |and work out ico|
00005f30  6e 20 66 6c 61 67 73 2e  22 29 0d 17 d4 16 20 20  |n flags.")....  |
00005f40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 cc  |               .|
00005f50  0d 17 de 6b 20 20 20 20  20 20 20 20 20 20 20 20  |...k            |
00005f60  20 20 20 20 20 20 20 f2  53 65 6e 64 28 22 43 6c  |       .Send("Cl|
00005f70  69 63 6b 20 53 45 4c 45  43 54 20 6f 72 20 41 44  |ick SELECT or AD|
00005f80  4a 55 53 54 20 74 6f 20  73 70 79 20 6f 6e 20 69  |JUST to spy on i|
00005f90  63 6f 6e 73 20 79 6f 75  20 70 6f 69 6e 74 20 74  |cons you point t|
00005fa0  6f 20 77 69 74 68 20 74  68 65 20 6d 6f 75 73 65  |o with the mouse|
00005fb0  20 70 6f 69 6e 74 65 72  2e 22 29 0d 17 e8 16 20  | pointer.").... |
00005fc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005fd0  cd 0d 17 f2 76 20 20 20  20 20 20 20 20 20 20 c9  |....v          .|
00005fe0  20 32 3a f2 53 65 6e 64  28 22 4d 6f 76 65 20 74  | 2:.Send("Move t|
00005ff0  68 65 20 70 6f 69 6e 74  65 72 20 22 2b 44 69 72  |he pointer "+Dir|
00006000  65 63 74 69 6f 6e 24 2b  22 20 74 6f 20 73 65 74  |ection$+" to set|
00006010  20 74 68 65 20 70 6f 73  69 74 69 6f 6e 20 6f 66  | the position of|
00006020  20 74 68 65 20 49 63 6f  6e 20 46 6c 61 67 73 20  | the Icon Flags |
00006030  77 69 6e 64 6f 77 20 6f  6e 20 74 68 65 20 73 63  |window on the sc|
00006040  72 65 65 6e 2e 22 29 0d  17 fc 6b 20 20 20 20 20  |reen.")...k     |
00006050  20 20 20 20 20 c9 20 33  3a f2 53 65 6e 64 28 22  |     . 3:.Send("|
00006060  43 6c 69 63 6b 20 53 45  4c 45 43 54 20 6f 72 20  |Click SELECT or |
00006070  41 44 4a 55 53 54 20 74  6f 20 73 61 76 65 20 74  |ADJUST to save t|
00006080  68 65 20 49 63 6f 6e 20  46 6c 61 67 73 20 77 69  |he Icon Flags wi|
00006090  6e 64 6f 77 20 70 6f 73  69 74 69 6f 6e 20 61 6e  |ndow position an|
000060a0  64 20 73 70 79 69 6e 67  20 73 74 61 74 75 73 2e  |d spying status.|
000060b0  22 29 0d 18 06 3a 20 20  20 20 20 20 20 20 20 20  |")...:          |
000060c0  7f 20 f2 53 65 6e 64 28  22 54 68 69 73 20 69 73  |. .Send("This is|
000060d0  20 74 68 65 20 49 63 6f  6e 20 46 6c 61 67 73 20  | the Icon Flags |
000060e0  6d 61 69 6e 20 6d 65 6e  75 2e 22 29 0d 18 10 0d  |main menu.")....|
000060f0  20 20 20 20 20 20 20 20  cb 0d 18 1a 09 20 20 20  |        .....   |
00006100  20 cb 0d 18 24 07 20 20  cd 0d 18 2e 05 cb 0d 18  | ...$.  ........|
00006110  38 07 20 20 3a 0d 18 42  0f 3f 48 65 6c 70 49 6e  |8.  :..B.?HelpIn|
00006120  66 6f 3d 30 0d 18 4c 24  42 6c 6f 63 6b 21 30 3d  |fo=0..L$Block!0=|
00006130  28 48 65 6c 70 49 6e 66  6f 2b 34 2d 42 6c 6f 63  |(HelpInfo+4-Bloc|
00006140  6b 29 20 80 20 ac 20 33  0d 18 56 2a c8 99 20 22  |k) . . 3..V*.. "|
00006150  57 69 6d 70 5f 53 65 6e  64 4d 65 73 73 61 67 65  |Wimp_SendMessage|
00006160  22 2c 31 37 2c 42 6c 6f  63 6b 2c 42 6c 6f 63 6b  |",17,Block,Block|
00006170  21 34 0d 18 60 05 e1 0d  18 6a 05 3a 0d 18 74 1a  |!4..`....j.:..t.|
00006180  dd 20 a4 4f 6d 6e 69 48  65 6c 70 4d 65 73 73 61  |. .OmniHelpMessa|
00006190  67 65 28 41 24 29 0d 18  7e 3a e7 20 41 24 3d 22  |ge(A$)..~:. A$="|
000061a0  43 4c 49 43 4b 22 20 8c  20 3d c0 22 6f 70 65 6e  |CLICK" . =."open|
000061b0  20 74 68 65 20 49 63 6f  6e 20 46 6c 61 67 73 20  | the Icon Flags |
000061c0  77 69 6e 64 6f 77 2e 22  2c 37 36 29 2b bd 31 33  |window.",76)+.13|
000061d0  0d 18 88 1e e7 20 41 24  3d 22 44 52 41 47 22 20  |..... A$="DRAG" |
000061e0  8c 20 3d c0 22 22 2c 37  36 29 2b bd 31 33 0d 18  |. =."",76)+.13..|
000061f0  92 07 3d 22 22 0d 18 9c  05 3a 0d 18 a6 12 dd 20  |..=""....:..... |
00006200  f2 53 65 6e 64 28 54 65  78 74 24 29 0d 18 b0 18  |.Send(Text$)....|
00006210  24 48 65 6c 70 49 6e 66  6f 3d 54 65 78 74 24 2b  |$HelpInfo=Text$+|
00006220  22 7c 4d 22 0d 18 ba 18  48 65 6c 70 49 6e 66 6f  |"|M"....HelpInfo|
00006230  2b 3d a9 28 54 65 78 74  24 29 2b 32 0d 18 c4 05  |+=.(Text$)+2....|
00006240  e1 0d 18 ce 05 3a 0d 18  d8 16 dd 20 f2 4f 6d 6e  |.....:..... .Omn|
00006250  69 44 65 73 6b 43 61 6c  6c 69 6e 67 0d 18 e2 14  |iDeskCalling....|
00006260  e7 20 4f 6d 6e 69 44 65  73 6b 3d 30 20 8c 20 e1  |. OmniDesk=0 . .|
00006270  0d 18 ec 49 f4 20 54 68  69 73 20 66 69 72 73 74  |...I. This first|
00006280  20 6c 69 6e 65 20 69 73  20 66 6f 72 20 69 66 20  | line is for if |
00006290  61 20 62 72 6f 61 64 63  61 73 74 20 6d 65 73 73  |a broadcast mess|
000062a0  61 67 65 20 69 73 20 72  65 63 65 69 76 65 64 20  |age is received |
000062b0  77 68 69 63 68 20 77 61  73 0d 18 f6 41 f4 20 69  |which was...A. i|
000062c0  6e 74 65 6e 64 65 64 20  66 6f 72 20 61 20 74 72  |ntended for a tr|
000062d0  61 6e 73 69 65 6e 74 20  63 6f 70 79 20 6f 66 20  |ansient copy of |
000062e0  74 68 65 20 75 74 69 6c  69 74 79 2e 20 41 20 73  |the utility. A s|
000062f0  74 61 6e 64 2d 61 6c 6f  6e 65 0d 19 00 3f f4 20  |tand-alone...?. |
00006300  69 6e 73 74 61 6e 74 69  61 74 69 6f 6e 20 6f 66  |instantiation of|
00006310  20 74 68 65 20 75 74 69  6c 69 74 79 20 73 68 6f  | the utility sho|
00006320  75 6c 64 20 69 67 6e 6f  72 65 20 73 75 63 68 20  |uld ignore such |
00006330  6d 65 73 73 61 67 65 73  2e 0d 19 0a 11 c8 8e 20  |messages....... |
00006340  42 6c 6f 63 6b 21 32 30  20 ca 0d 19 14 2e 20 20  |Block!20 .....  |
00006350  c9 20 34 3a f2 4f 70 65  6e 28 53 70 79 43 61 6c  |. 4:.Open(SpyCal|
00006360  63 2c b9 2c 58 50 6f 73  69 74 69 6f 6e 2c 59 50  |c,.,XPosition,YP|
00006370  6f 73 69 74 69 6f 6e 29  0d 19 1e 05 cb 0d 19 28  |osition).......(|
00006380  05 e1 0d 19 32 05 3a 0d  19 3c 11 dd 20 f2 4d 6f  |....2.:..<.. .Mo|
00006390  64 65 43 68 61 6e 67 65  0d 19 46 12 44 6f 4d 6f  |deChange..F.DoMo|
000063a0  64 65 43 68 61 6e 67 65  3d b9 0d 19 50 3e e7 20  |deChange=...P>. |
000063b0  4f 6d 6e 69 44 65 73 6b  3d 30 20 8c 20 f2 55 70  |OmniDesk=0 . .Up|
000063c0  64 61 74 65 49 63 6f 6e  46 6f 72 4d 6f 64 65 28  |dateIconForMode(|
000063d0  22 21 49 63 6f 6e 46 6c  61 67 73 22 2c 2d 32 2c  |"!IconFlags",-2,|
000063e0  49 63 6f 6e 42 61 72 29  0d 19 5a 05 e1 0d 19 64  |IconBar)..Z....d|
000063f0  05 3a 0d 19 6e 4f f4 20  2d 2d 2d 2d 2d 2d 2d 2d  |.:..nO. --------|
00006400  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00006440  2d 0d 19 78 38 f4 20 47  65 6e 65 72 61 6c 20 6e  |-..x8. General n|
00006450  6f 6e 2d 73 70 65 63 69  66 69 63 20 75 73 65 66  |on-specific usef|
00006460  75 6c 20 72 6f 75 74 69  6e 65 73 20 28 6d 6f 73  |ul routines (mos|
00006470  74 6c 79 20 77 69 6d 70  29 0d 19 82 4f f4 20 2d  |tly wimp)...O. -|
00006480  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000064c0  2d 2d 2d 2d 2d 2d 2d 2d  0d 19 8c 05 3a 0d 19 96  |--------....:...|
000064d0  20 dd 20 f2 55 70 64 61  74 65 49 63 6f 6e 28 57  | . .UpdateIcon(W|
000064e0  6e 64 77 2c 49 63 6e 2c  54 78 74 24 29 0d 19 a0  |ndw,Icn,Txt$)...|
000064f0  3a 42 6c 6f 63 6b 21 30  3d 57 6e 64 77 3a 42 6c  |:Block!0=Wndw:Bl|
00006500  6f 63 6b 21 34 3d 49 63  6e 3a c8 99 20 22 57 69  |ock!4=Icn:.. "Wi|
00006510  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00006520  2c 2c 42 6c 6f 63 6b 0d  19 aa 1c e7 20 a9 28 54  |,,Block..... .(T|
00006530  78 74 24 29 3e 28 42 6c  6f 63 6b 21 33 36 29 2d  |xt$)>(Block!36)-|
00006540  31 20 8c 0d 19 b4 26 20  20 e7 20 28 28 42 6c 6f  |1 ....&  . ((Blo|
00006550  63 6b 21 32 34 29 20 80  20 28 31 3c 3c 39 29 29  |ck!24) . (1<<9))|
00006560  3d 28 31 3c 3c 39 29 20  8c 0d 19 be 19 20 20 20  |=(1<<9) .....   |
00006570  20 f4 20 52 69 67 68 74  2d 6a 75 73 74 69 66 69  | . Right-justifi|
00006580  65 64 0d 19 c8 24 20 20  20 20 54 78 74 24 3d 22  |ed...$    Txt$="|
00006590  88 22 2b c2 54 78 74 24  2c 28 42 6c 6f 63 6b 21  |."+.Txt$,(Block!|
000065a0  33 36 29 2d 32 29 0d 19  d2 07 20 20 cc 0d 19 dc  |36)-2)....  ....|
000065b0  23 20 20 20 20 f4 20 4c  65 66 74 2d 6a 75 73 74  |#    . Left-just|
000065c0  69 66 69 65 64 20 6f 72  20 63 65 6e 74 72 65 64  |ified or centred|
000065d0  0d 19 e6 2b 20 20 20 20  54 78 74 24 3d c0 54 78  |...+    Txt$=.Tx|
000065e0  74 24 2c 28 42 6c 6f 63  6b 21 33 36 29 2d 31 29  |t$,(Block!36)-1)|
000065f0  3a c2 54 78 74 24 29 3d  22 89 22 0d 19 f0 07 20  |:.Txt$)=".".... |
00006600  20 cd 0d 19 fa 05 cd 0d  1a 04 46 f4 20 5e 20 45  | .........F. ^ E|
00006610  6e 73 75 72 65 73 20 74  68 65 20 74 65 78 74 20  |nsures the text |
00006620  63 61 6e 27 74 20 6f 76  65 72 66 6c 6f 77 20 74  |can't overflow t|
00006630  68 65 20 6d 61 78 69 6d  75 6d 20 73 70 61 63 65  |he maximum space|
00006640  20 69 6e 20 74 68 65 20  69 63 6f 6e 2e 0d 1a 0e  | in the icon....|
00006650  19 e7 20 24 28 42 6c 6f  63 6b 21 32 38 29 3c 3e  |.. $(Block!28)<>|
00006660  54 78 74 24 20 8c 0d 1a  18 2b 20 20 24 28 42 6c  |Txt$ ....+  $(Bl|
00006670  6f 63 6b 21 32 38 29 3d  54 78 74 24 3a 42 6c 6f  |ock!28)=Txt$:Blo|
00006680  63 6b 21 38 3d 30 3a 42  6c 6f 63 6b 21 31 32 3d  |ck!8=0:Block!12=|
00006690  30 0d 1a 22 23 20 20 c8  99 20 22 57 69 6d 70 5f  |0.."#  .. "Wimp_|
000066a0  53 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 42  |SetIconState",,B|
000066b0  6c 6f 63 6b 0d 1a 2c 05  cd 0d 1a 36 25 c8 99 20  |lock..,....6%.. |
000066c0  22 57 69 6d 70 5f 47 65  74 43 61 72 65 74 50 6f  |"Wimp_GetCaretPo|
000066d0  73 69 74 69 6f 6e 22 2c  2c 42 6c 6f 63 6b 0d 1a  |sition",,Block..|
000066e0  40 22 e7 20 42 6c 6f 63  6b 21 30 3d 57 6e 64 77  |@". Block!0=Wndw|
000066f0  20 80 20 42 6c 6f 63 6b  21 34 3d 49 63 6e 20 8c  | . Block!4=Icn .|
00006700  0d 1a 4a 3c 20 20 f4 20  49 66 20 74 68 69 73 20  |..J<  . If this |
00006710  69 63 6f 6e 20 6f 77 6e  73 20 74 68 65 20 63 61  |icon owns the ca|
00006720  72 65 74 2c 20 74 68 65  6e 20 70 75 74 20 69 74  |ret, then put it|
00006730  20 61 74 20 74 68 65 20  65 6e 64 2e 0d 1a 54 38  | at the end...T8|
00006740  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 74 43 61  |  .. "Wimp_SetCa|
00006750  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 57 6e 64  |retPosition",Wnd|
00006760  77 2c 49 63 6e 2c 30 2c  30 2c 2d 31 2c a9 28 54  |w,Icn,0,0,-1,.(T|
00006770  78 74 24 29 0d 1a 5e 05  cd 0d 1a 68 05 e1 0d 1a  |xt$)..^....h....|
00006780  72 05 3a 0d 1a 7c 2b dd  20 f2 55 70 64 61 74 65  |r.:..|+. .Update|
00006790  49 63 6f 6e 43 6f 6c 6f  75 72 28 57 6e 64 77 2c  |IconColour(Wndw,|
000067a0  49 63 6e 2c 46 43 6f 6c  2c 42 43 6f 6c 29 0d 1a  |Icn,FCol,BCol)..|
000067b0  86 1e f4 20 43 68 61 6e  67 65 20 61 6e 20 69 63  |... Change an ic|
000067c0  6f 6e 27 73 20 63 6f 6c  6f 75 72 73 0d 1a 90 3a  |on's colours...:|
000067d0  42 6c 6f 63 6b 21 30 3d  57 6e 64 77 3a 42 6c 6f  |Block!0=Wndw:Blo|
000067e0  63 6b 21 34 3d 49 63 6e  3a c8 99 20 22 57 69 6d  |ck!4=Icn:.. "Wim|
000067f0  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00006800  2c 42 6c 6f 63 6b 0d 1a  9a 3b e7 20 28 28 28 42  |,Block...;. (((B|
00006810  6c 6f 63 6b 3f 32 37 29  3e 3e 34 29 3d 42 43 6f  |lock?27)>>4)=BCo|
00006820  6c 29 20 80 20 28 28 28  42 6c 6f 63 6b 3f 32 37  |l) . (((Block?27|
00006830  29 20 83 20 31 36 29 3d  46 43 6f 6c 29 20 8c 20  |) . 16)=FCol) . |
00006840  e1 0d 1a a4 27 20 20 f4  20 5e 20 53 61 6d 65 20  |....'  . ^ Same |
00006850  63 6f 6c 6f 75 72 2c 20  73 6f 20 64 6f 6e 27 74  |colour, so don't|
00006860  20 63 68 61 6e 67 65 2e  0d 1a ae 3a 42 6c 6f 63  | change....:Bloc|
00006870  6b 21 31 32 3d 28 25 31  31 31 31 31 31 31 31 3c  |k!12=(%11111111<|
00006880  3c 32 34 29 3a 42 6c 6f  63 6b 21 38 3d 28 42 43  |<24):Block!8=(BC|
00006890  6f 6c 3c 3c 32 38 29 2b  28 46 43 6f 6c 3c 3c 32  |ol<<28)+(FCol<<2|
000068a0  34 29 0d 1a b8 21 c8 99  20 22 57 69 6d 70 5f 53  |4)...!.. "Wimp_S|
000068b0  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 42 6c  |etIconState",,Bl|
000068c0  6f 63 6b 0d 1a c2 05 e1  0d 1a cc 05 3a 0d 1a d6  |ock.........:...|
000068d0  29 dd 20 f2 55 70 64 61  74 65 53 65 6c 65 63 74  |). .UpdateSelect|
000068e0  65 64 46 6c 61 67 28 57  6e 64 77 2c 49 63 6e 2c  |edFlag(Wndw,Icn,|
000068f0  53 74 61 74 65 29 0d 1a  e0 31 f4 20 55 73 65 20  |State)...1. Use |
00006900  53 74 61 74 65 3d 54 52  55 45 20 74 6f 20 6d 61  |State=TRUE to ma|
00006910  6b 65 20 69 63 6f 6e 20  62 65 63 6f 6d 65 20 73  |ke icon become s|
00006920  65 6c 65 63 74 65 64 0d  1a ea 3a 42 6c 6f 63 6b  |elected...:Block|
00006930  21 30 3d 57 6e 64 77 3a  42 6c 6f 63 6b 21 34 3d  |!0=Wndw:Block!4=|
00006940  49 63 6e 3a c8 99 20 22  57 69 6d 70 5f 47 65 74  |Icn:.. "Wimp_Get|
00006950  49 63 6f 6e 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |IconState",,Bloc|
00006960  6b 0d 1a f4 2f e7 20 28  28 42 6c 6f 63 6b 21 32  |k.../. ((Block!2|
00006970  34 29 20 80 20 28 31 3c  3c 32 31 29 29 3d 28 28  |4) . (1<<21))=((|
00006980  2d 53 74 61 74 65 29 3c  3c 32 31 29 20 8c 20 e1  |-State)<<21) . .|
00006990  0d 1a fe 40 42 6c 6f 63  6b 21 31 32 3d 28 31 3c  |...@Block!12=(1<|
000069a0  3c 32 31 29 3a e7 20 53  74 61 74 65 20 8c 20 42  |<21):. State . B|
000069b0  6c 6f 63 6b 21 38 3d 28  31 3c 3c 32 31 29 20 8b  |lock!8=(1<<21) .|
000069c0  20 42 6c 6f 63 6b 21 38  3d 28 30 3c 3c 32 31 29  | Block!8=(0<<21)|
000069d0  0d 1b 08 21 c8 99 20 22  57 69 6d 70 5f 53 65 74  |...!.. "Wimp_Set|
000069e0  49 63 6f 6e 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |IconState",,Bloc|
000069f0  6b 0d 1b 12 05 e1 0d 1b  1c 05 3a 0d 1b 26 27 dd  |k.........:..&'.|
00006a00  20 f2 55 70 64 61 74 65  53 68 61 64 65 64 46 6c  | .UpdateShadedFl|
00006a10  61 67 28 57 6e 64 77 2c  49 63 6e 2c 53 74 61 74  |ag(Wndw,Icn,Stat|
00006a20  65 29 0d 1b 30 2f f4 20  55 73 65 20 53 74 61 74  |e)..0/. Use Stat|
00006a30  65 3d 54 52 55 45 20 74  6f 20 6d 61 6b 65 20 69  |e=TRUE to make i|
00006a40  63 6f 6e 20 62 65 63 6f  6d 65 20 73 68 61 64 65  |con become shade|
00006a50  64 0d 1b 3a 3a 42 6c 6f  63 6b 21 30 3d 57 6e 64  |d..::Block!0=Wnd|
00006a60  77 3a 42 6c 6f 63 6b 21  34 3d 49 63 6e 3a c8 99  |w:Block!4=Icn:..|
00006a70  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
00006a80  61 74 65 22 2c 2c 42 6c  6f 63 6b 0d 1b 44 2f e7  |ate",,Block..D/.|
00006a90  20 28 28 42 6c 6f 63 6b  21 32 34 29 20 80 20 28  | ((Block!24) . (|
00006aa0  31 3c 3c 32 32 29 29 3d  28 28 2d 53 74 61 74 65  |1<<22))=((-State|
00006ab0  29 3c 3c 32 32 29 20 8c  20 e1 0d 1b 4e 40 42 6c  |)<<22) . ...N@Bl|
00006ac0  6f 63 6b 21 31 32 3d 28  31 3c 3c 32 32 29 3a e7  |ock!12=(1<<22):.|
00006ad0  20 53 74 61 74 65 20 8c  20 42 6c 6f 63 6b 21 38  | State . Block!8|
00006ae0  3d 28 31 3c 3c 32 32 29  20 8b 20 42 6c 6f 63 6b  |=(1<<22) . Block|
00006af0  21 38 3d 28 30 3c 3c 32  32 29 0d 1b 58 21 c8 99  |!8=(0<<22)..X!..|
00006b00  20 22 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  | "Wimp_SetIconSt|
00006b10  61 74 65 22 2c 2c 42 6c  6f 63 6b 0d 1b 62 05 e1  |ate",,Block..b..|
00006b20  0d 1b 6c 05 3a 0d 1b 76  1e dd 20 a4 53 65 6c 65  |..l.:..v.. .Sele|
00006b30  63 74 65 64 53 74 61 74  65 28 57 6e 64 77 2c 49  |ctedState(Wndw,I|
00006b40  63 6e 29 0d 1b 80 3a 42  6c 6f 63 6b 21 30 3d 57  |cn)...:Block!0=W|
00006b50  6e 64 77 3a 42 6c 6f 63  6b 21 34 3d 49 63 6e 3a  |ndw:Block!4=Icn:|
00006b60  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
00006b70  53 74 61 74 65 22 2c 2c  42 6c 6f 63 6b 0d 1b 8a  |State",,Block...|
00006b80  29 e7 20 28 28 42 6c 6f  63 6b 21 32 34 29 20 80  |). ((Block!24) .|
00006b90  20 28 31 3c 3c 32 31 29  29 3d 28 31 3c 3c 32 31  | (1<<21))=(1<<21|
00006ba0  29 20 8c 20 3d b9 0d 1b  94 06 3d a3 0d 1b 9e 05  |) . =.....=.....|
00006bb0  3a 0d 1b a8 1c dd 20 a4  53 68 61 64 65 64 53 74  |:..... .ShadedSt|
00006bc0  61 74 65 28 57 6e 64 77  2c 49 63 6e 29 0d 1b b2  |ate(Wndw,Icn)...|
00006bd0  3a 42 6c 6f 63 6b 21 30  3d 57 6e 64 77 3a 42 6c  |:Block!0=Wndw:Bl|
00006be0  6f 63 6b 21 34 3d 49 63  6e 3a c8 99 20 22 57 69  |ock!4=Icn:.. "Wi|
00006bf0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00006c00  2c 2c 42 6c 6f 63 6b 0d  1b bc 29 e7 20 28 28 42  |,,Block...). ((B|
00006c10  6c 6f 63 6b 21 32 34 29  20 80 20 28 31 3c 3c 32  |lock!24) . (1<<2|
00006c20  32 29 29 3d 28 31 3c 3c  32 32 29 20 8c 20 3d b9  |2))=(1<<22) . =.|
00006c30  0d 1b c6 06 3d a3 0d 1b  d0 05 3a 0d 1b da 16 dd  |....=.....:.....|
00006c40  20 a4 4f 70 65 6e 53 74  61 74 65 28 57 6e 64 77  | .OpenState(Wndw|
00006c50  29 0d 1b e4 35 f4 20 52  65 74 75 72 6e 73 20 54  |)...5. Returns T|
00006c60  52 55 45 20 69 66 20 77  69 6e 64 6f 77 20 69 73  |RUE if window is|
00006c70  20 6f 70 65 6e 3b 20 66  61 6c 73 65 20 6f 74 68  | open; false oth|
00006c80  65 72 77 69 73 65 0d 1b  ee 30 42 6c 6f 63 6b 21  |erwise...0Block!|
00006c90  30 3d 57 6e 64 77 3a c8  99 20 22 57 69 6d 70 5f  |0=Wndw:.. "Wimp_|
00006ca0  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
00006cb0  2c 42 6c 6f 63 6b 0d 1b  f8 29 e7 20 28 28 42 6c  |,Block...). ((Bl|
00006cc0  6f 63 6b 21 33 32 29 20  80 20 28 31 3c 3c 31 36  |ock!32) . (1<<16|
00006cd0  29 29 3d 28 31 3c 3c 31  36 29 20 8c 20 3d b9 0d  |))=(1<<16) . =..|
00006ce0  1c 02 06 3d a3 0d 1c 0c  05 3a 0d 1c 16 21 dd 20  |...=.....:...!. |
00006cf0  f2 53 68 61 64 65 4d 65  6e 75 28 4d 65 6e 75 2c  |.ShadeMenu(Menu,|
00006d00  49 74 65 6d 2c 53 74 61  74 65 29 0d 1c 20 50 21  |Item,State).. P!|
00006d10  28 4d 65 6e 75 2b 32 38  2b 28 32 34 2a 49 74 65  |(Menu+28+(24*Ite|
00006d20  6d 29 2b 38 29 3d 28 21  28 4d 65 6e 75 2b 32 38  |m)+8)=(!(Menu+28|
00006d30  2b 28 32 34 2a 49 74 65  6d 29 2b 38 29 20 80 20  |+(24*Item)+8) . |
00006d40  ac 20 28 31 3c 3c 32 32  29 29 20 82 20 28 28 2d  |. (1<<22)) . ((-|
00006d50  53 74 61 74 65 29 3c 3c  32 32 29 0d 1c 2a 05 e1  |State)<<22)..*..|
00006d60  0d 1c 34 05 3a 0d 1c 3e  20 dd 20 f2 54 69 63 6b  |..4.:..> . .Tick|
00006d70  4d 65 6e 75 28 4d 65 6e  75 2c 49 74 65 6d 2c 53  |Menu(Menu,Item,S|
00006d80  74 61 74 65 29 0d 1c 48  40 21 28 4d 65 6e 75 2b  |tate)..H@!(Menu+|
00006d90  32 38 2b 28 32 34 2a 49  74 65 6d 29 29 3d 28 21  |28+(24*Item))=(!|
00006da0  28 4d 65 6e 75 2b 32 38  2b 28 32 34 2a 49 74 65  |(Menu+28+(24*Ite|
00006db0  6d 29 29 20 80 20 ac 20  31 29 20 82 20 28 2d 53  |m)) . . 1) . (-S|
00006dc0  74 61 74 65 29 0d 1c 52  05 e1 0d 1c 5c 05 3a 0d  |tate)..R....\.:.|
00006dd0  1c 66 1c dd 20 a4 4d 65  6e 75 53 68 61 64 65 64  |.f.. .MenuShaded|
00006de0  28 4d 65 6e 75 2c 49 74  65 6d 29 0d 1c 70 35 e7  |(Menu,Item)..p5.|
00006df0  20 28 21 28 4d 65 6e 75  2b 32 38 2b 28 32 34 2a  | (!(Menu+28+(24*|
00006e00  49 74 65 6d 29 2b 38 29  20 80 20 28 31 3c 3c 32  |Item)+8) . (1<<2|
00006e10  32 29 29 3d 28 31 3c 3c  32 32 29 20 8c 20 3d b9  |2))=(1<<22) . =.|
00006e20  0d 1c 7a 06 3d a3 0d 1c  84 05 3a 0d 1c 8e 1c dd  |..z.=.....:.....|
00006e30  20 a4 4d 65 6e 75 54 69  63 6b 65 64 28 4d 65 6e  | .MenuTicked(Men|
00006e40  75 2c 49 74 65 6d 29 0d  1c 98 27 e7 20 28 21 28  |u,Item)...'. (!(|
00006e50  4d 65 6e 75 2b 32 38 2b  28 32 34 2a 49 74 65 6d  |Menu+28+(24*Item|
00006e60  29 29 20 80 20 31 29 3d  31 20 8c 20 3d b9 0d 1c  |)) . 1)=1 . =...|
00006e70  a2 06 3d a3 0d 1c ac 05  3a 0d 1c b6 19 dd 20 a4  |..=.....:..... .|
00006e80  52 65 61 64 49 63 6f 6e  28 57 6e 64 77 2c 49 63  |ReadIcon(Wndw,Ic|
00006e90  6e 29 0d 1c c0 20 f4 20  52 65 61 64 20 6e 75 6d  |n)... . Read num|
00006ea0  65 72 69 63 20 76 61 6c  75 65 20 6f 66 20 69 63  |eric value of ic|
00006eb0  6f 6e 0d 1c ca 3a 42 6c  6f 63 6b 21 30 3d 57 6e  |on...:Block!0=Wn|
00006ec0  64 77 3a 42 6c 6f 63 6b  21 34 3d 49 63 6e 3a c8  |dw:Block!4=Icn:.|
00006ed0  99 20 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |. "Wimp_GetIconS|
00006ee0  74 61 74 65 22 2c 2c 42  6c 6f 63 6b 0d 1c d4 13  |tate",,Block....|
00006ef0  3d bb 28 24 28 42 6c 6f  63 6b 21 32 38 29 29 0d  |=.($(Block!28)).|
00006f00  1c de 05 3a 0d 1c e8 1c  dd 20 a4 52 65 61 64 49  |...:..... .ReadI|
00006f10  63 6f 6e 53 74 72 28 57  6e 64 77 2c 49 63 6e 29  |conStr(Wndw,Icn)|
00006f20  0d 1c f2 1f f4 20 52 65  61 64 20 73 74 72 69 6e  |..... Read strin|
00006f30  67 20 76 61 6c 75 65 20  6f 66 20 69 63 6f 6e 0d  |g value of icon.|
00006f40  1c fc 3a 42 6c 6f 63 6b  21 30 3d 57 6e 64 77 3a  |..:Block!0=Wndw:|
00006f50  42 6c 6f 63 6b 21 34 3d  49 63 6e 3a c8 99 20 22  |Block!4=Icn:.. "|
00006f60  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
00006f70  65 22 2c 2c 42 6c 6f 63  6b 0d 1d 06 10 3d 24 28  |e",,Block....=$(|
00006f80  42 6c 6f 63 6b 21 32 38  29 0d 1d 10 05 3a 0d 1d  |Block!28)....:..|
00006f90  1a 1a dd 20 a4 4d 6f 64  65 49 6e 66 6f 28 76 61  |... .ModeInfo(va|
00006fa0  72 24 2c 6d 6f 64 65 29  0d 1d 24 29 f4 20 55 73  |r$,mode)..$). Us|
00006fb0  65 20 6d 6f 64 65 3d 2d  31 20 66 6f 72 20 63 75  |e mode=-1 for cu|
00006fc0  72 72 65 6e 74 20 73 63  72 65 65 6e 20 6d 6f 64  |rrent screen mod|
00006fd0  65 0d 1d 2e 0d c8 8e 20  76 61 72 24 20 ca 0d 1d  |e...... var$ ...|
00006fe0  38 3a 20 20 c9 20 22 58  50 69 78 65 6c 73 22 3a  |8:  . "XPixels":|
00006ff0  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
00007000  61 72 69 61 62 6c 65 22  2c 6d 6f 64 65 2c 31 31  |ariable",mode,11|
00007010  20 b8 20 2c 2c 76 61 72  0d 1d 42 3a 20 20 c9 20  | . ,,var..B:  . |
00007020  22 59 50 69 78 65 6c 73  22 3a c8 99 20 22 4f 53  |"YPixels":.. "OS|
00007030  5f 52 65 61 64 4d 6f 64  65 56 61 72 69 61 62 6c  |_ReadModeVariabl|
00007040  65 22 2c 6d 6f 64 65 2c  31 32 20 b8 20 2c 2c 76  |e",mode,12 . ,,v|
00007050  61 72 0d 1d 4c 36 20 20  c9 20 22 4e 43 6f 6c 22  |ar..L6  . "NCol"|
00007060  3a c8 99 20 22 4f 53 5f  52 65 61 64 4d 6f 64 65  |:.. "OS_ReadMode|
00007070  56 61 72 69 61 62 6c 65  22 2c 6d 6f 64 65 2c 33  |Variable",mode,3|
00007080  20 b8 20 2c 2c 76 61 72  0d 1d 56 3c 20 20 c9 20  | . ,,var..V<  . |
00007090  22 58 45 69 67 46 61 63  74 6f 72 22 3a c8 99 20  |"XEigFactor":.. |
000070a0  22 4f 53 5f 52 65 61 64  4d 6f 64 65 56 61 72 69  |"OS_ReadModeVari|
000070b0  61 62 6c 65 22 2c 6d 6f  64 65 2c 34 20 b8 20 2c  |able",mode,4 . ,|
000070c0  2c 76 61 72 0d 1d 60 3c  20 20 c9 20 22 59 45 69  |,var..`<  . "YEi|
000070d0  67 46 61 63 74 6f 72 22  3a c8 99 20 22 4f 53 5f  |gFactor":.. "OS_|
000070e0  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
000070f0  22 2c 6d 6f 64 65 2c 35  20 b8 20 2c 2c 76 61 72  |",mode,5 . ,,var|
00007100  0d 1d 6a 3f 20 20 c9 20  22 42 50 50 22 3a c8 99  |..j?  . "BPP":..|
00007110  20 22 4f 53 5f 52 65 61  64 4d 6f 64 65 56 61 72  | "OS_ReadModeVar|
00007120  69 61 62 6c 65 22 2c 6d  6f 64 65 2c 39 20 b8 20  |iable",mode,9 . |
00007130  2c 2c 76 61 72 3a 76 61  72 3d 32 5e 76 61 72 0d  |,,var:var=2^var.|
00007140  1d 74 36 20 20 7f 20 76  61 72 3d 2d 31 3a f4 20  |.t6  . var=-1:. |
00007150  46 61 6c 6c 2d 74 68 72  6f 75 67 68 20 66 6f 72  |Fall-through for|
00007160  20 61 20 66 61 75 6c 74  79 20 69 6e 70 75 74 20  | a faulty input |
00007170  76 61 6c 75 65 0d 1d 7e  05 cb 0d 1d 88 08 3d 76  |value..~......=v|
00007180  61 72 0d 1d 92 05 3a 0d  1d 9c 2b dd 20 f2 55 70  |ar....:...+. .Up|
00007190  64 61 74 65 49 63 6f 6e  46 6f 72 4d 6f 64 65 28  |dateIconForMode(|
000071a0  41 70 70 6e 61 6d 65 24  2c 57 6e 64 77 2c 49 63  |Appname$,Wndw,Ic|
000071b0  6e 29 0d 1d a6 4e f4 20  54 68 69 73 20 70 72 6f  |n)...N. This pro|
000071c0  63 65 64 75 72 65 20 72  65 71 75 69 72 65 73 20  |cedure requires |
000071d0  74 68 61 74 20 41 4c 4c  20 74 68 65 20 69 63 6f  |that ALL the ico|
000071e0  6e 20 73 70 72 69 74 65  73 20 61 72 65 20 64 65  |n sprites are de|
000071f0  66 69 6e 65 64 20 69 6e  20 6d 6f 64 65 20 32 30  |fined in mode 20|
00007200  0d 1d b0 4e f4 20 6f 72  20 6d 6f 64 65 20 32 37  |...N. or mode 27|
00007210  20 28 77 68 69 63 68 20  69 73 20 65 71 75 69 76  | (which is equiv|
00007220  61 6c 65 6e 74 29 20 77  69 74 68 20 61 20 6d 61  |alent) with a ma|
00007230  73 6b 20 62 75 74 20 6e  6f 20 70 61 6c 65 74 74  |sk but no palett|
00007240  65 2e 20 54 68 65 79 20  73 68 6f 75 6c 64 0d 1d  |e. They should..|
00007250  ba 4e f4 20 73 74 69 6c  6c 20 61 70 70 65 61 72  |.N. still appear|
00007260  20 74 6f 20 68 61 76 65  20 74 68 65 20 65 78 70  | to have the exp|
00007270  65 63 74 65 64 20 72 65  73 6f 6c 75 74 69 6f 6e  |ected resolution|
00007280  73 20 61 6e 64 20 6e 75  6d 62 65 72 20 6f 66 20  |s and number of |
00007290  63 6f 6c 6f 75 72 73 2c  20 69 2e 65 0d 1d c4 4e  |colours, i.e...N|
000072a0  f4 20 21 53 70 72 69 74  65 73 32 33 3a 20 74 77  |. !Sprites23: tw|
000072b0  6f 20 63 6f 6c 6f 75 72  73 2c 20 68 69 67 68 20  |o colours, high |
000072c0  72 65 73 6f 6c 75 74 69  6f 6e 2c 20 21 53 70 72  |resolution, !Spr|
000072d0  69 74 65 73 20 28 61 63  74 75 61 6c 6c 79 20 21  |ites (actually !|
000072e0  53 70 72 69 74 65 73 32  34 29 0d 1d ce 4c f4 20  |Sprites24)...L. |
000072f0  61 74 20 6d 6f 64 65 20  31 32 20 72 65 73 6f 6c  |at mode 12 resol|
00007300  75 74 69 6f 6e 20 28 64  6f 75 62 6c 65 20 68 65  |ution (double he|
00007310  69 67 68 74 20 70 69 78  65 6c 73 29 20 69 6e 20  |ight pixels) in |
00007320  31 36 20 63 6f 6c 6f 75  72 73 2c 20 61 6e 64 20  |16 colours, and |
00007330  6e 6f 72 6d 61 6c 0d 1d  d8 4c f4 20 6d 6f 64 65  |normal...L. mode|
00007340  20 32 30 20 72 65 73 6f  6c 75 74 69 6f 6e 2c 20  | 20 resolution, |
00007350  31 36 20 63 6f 6c 6f 75  72 73 20 66 6f 72 20 74  |16 colours for t|
00007360  68 65 20 21 53 70 72 69  74 65 73 32 32 20 69 63  |he !Sprites22 ic|
00007370  6f 6e 2e 20 49 66 20 74  68 69 73 20 69 73 20 6e  |on. If this is n|
00007380  6f 74 0d 1d e2 49 f4 20  61 64 68 65 72 65 64 20  |ot...I. adhered |
00007390  74 6f 2c 20 74 68 65 6e  20 6d 65 6d 6f 72 79 20  |to, then memory |
000073a0  73 68 6f 72 74 61 67 65  20 65 72 72 6f 72 73 20  |shortage errors |
000073b0  6d 61 79 20 6f 63 63 75  72 20 6f 6e 20 61 20 6d  |may occur on a m|
000073c0  6f 64 65 20 63 68 61 6e  67 65 2e 0d 1d ec 13 45  |ode change.....E|
000073d0  78 74 65 6e 73 69 6f 6e  24 3d 22 32 34 22 0d 1d  |xtension$="24"..|
000073e0  f6 24 e7 20 a4 4d 6f 64  65 49 6e 66 6f 28 22 59  |.$. .ModeInfo("Y|
000073f0  45 69 67 46 61 63 74 6f  72 22 2c 2d 31 29 3c 32  |EigFactor",-1)<2|
00007400  20 8c 0d 1e 00 20 20 20  e7 20 a4 4d 6f 64 65 49  | ....   . .ModeI|
00007410  6e 66 6f 28 22 4e 43 6f  6c 22 2c 2d 31 29 3e 32  |nfo("NCol",-1)>2|
00007420  20 8c 0d 1e 0a 17 20 20  20 20 45 78 74 65 6e 73  | .....    Extens|
00007430  69 6f 6e 24 3d 22 32 32  22 0d 1e 14 07 20 20 cc  |ion$="22"....  .|
00007440  0d 1e 1e 17 20 20 20 20  45 78 74 65 6e 73 69 6f  |....    Extensio|
00007450  6e 24 3d 22 32 33 22 0d  1e 28 07 20 20 cd 0d 1e  |n$="23"..(.  ...|
00007460  32 05 cd 0d 1e 3c 2a c8  99 20 22 57 69 6d 70 5f  |2....<*.. "Wimp_|
00007470  42 61 73 65 4f 66 53 70  72 69 74 65 73 22 20 b8  |BaseOfSprites" .|
00007480  20 2c 69 63 6f 6e 73 70  72 69 74 65 25 0d 1e 46  | ,iconsprite%..F|
00007490  45 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |E.. "OS_SpriteOp|
000074a0  22 2c 32 35 36 2b 32 35  2c 69 63 6f 6e 73 70 72  |",256+25,iconspr|
000074b0  69 74 65 25 2c 41 70 70  6e 61 6d 65 24 3a f4 20  |ite%,Appname$:. |
000074c0  44 65 6c 65 74 65 20 69  63 6f 6e 20 73 70 72 69  |Delete icon spri|
000074d0  74 65 0d 1e 50 3d f4 20  54 68 65 20 66 6f 6c 6c  |te..P=. The foll|
000074e0  6f 77 69 6e 67 20 74 68  72 65 65 20 6c 69 6e 65  |owing three line|
000074f0  73 20 61 73 73 75 6d 65  20 61 20 6d 61 73 6b 20  |s assume a mask |
00007500  62 75 74 20 6e 6f 20 70  61 6c 65 74 74 65 3a 0d  |but no palette:.|
00007510  1e 5a 62 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |.Zb.. "OS_Sprite|
00007520  4f 70 22 2c 32 35 36 2b  34 30 2c 53 70 72 69 74  |Op",256+40,Sprit|
00007530  65 73 2c 41 70 70 6e 61  6d 65 24 2b 45 78 74 65  |es,Appname$+Exte|
00007540  6e 73 69 6f 6e 24 20 b8  20 2c 2c 2c 77 2c 68 2c  |nsion$ . ,,,w,h,|
00007550  2c 6d 6f 64 65 3a f4 20  47 65 74 20 69 6e 66 6f  |,mode:. Get info|
00007560  20 61 62 6f 75 74 20 6e  65 77 20 73 70 72 69 74  | about new sprit|
00007570  65 0d 1e 64 5c c8 99 20  22 4f 53 5f 53 70 72 69  |e..d\.. "OS_Spri|
00007580  74 65 4f 70 22 2c 32 35  36 2b 31 35 2c 69 63 6f  |teOp",256+15,ico|
00007590  6e 73 70 72 69 74 65 25  2c 41 70 70 6e 61 6d 65  |nsprite%,Appname|
000075a0  24 2c 30 2c 77 2c 68 2c  6d 6f 64 65 3a f4 20 43  |$,0,w,h,mode:. C|
000075b0  72 65 61 74 65 20 72 65  70 6c 61 63 65 6d 65 6e  |reate replacemen|
000075c0  74 20 69 63 6f 6e 20 73  70 72 69 74 65 0d 1e 6e  |t icon sprite..n|
000075d0  3e c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |>.. "OS_SpriteOp|
000075e0  22 2c 32 35 36 2b 32 39  2c 69 63 6f 6e 73 70 72  |",256+29,iconspr|
000075f0  69 74 65 25 2c 41 70 70  6e 61 6d 65 24 3a f4 20  |ite%,Appname$:. |
00007600  43 72 65 61 74 65 20 6d  61 73 6b 0d 1e 78 07 20  |Create mask..x. |
00007610  20 3a 0d 1e 82 2d f4 20  50 61 69 6e 74 20 73 70  | :...-. Paint sp|
00007620  72 69 74 65 20 6d 61 73  6b 20 69 6e 74 6f 20 69  |rite mask into i|
00007630  63 6f 6e 73 70 72 69 74  65 20 6d 61 73 6b 3a 0d  |consprite mask:.|
00007640  1e 8c 51 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |..Q.. "OS_Sprite|
00007650  4f 70 22 2c 32 35 36 2b  36 31 2c 69 63 6f 6e 73  |Op",256+61,icons|
00007660  70 72 69 74 65 25 2c 41  70 70 6e 61 6d 65 24 2c  |prite%,Appname$,|
00007670  30 20 b8 20 72 30 2c 72  31 2c 72 32 2c 72 33 3a  |0 . r0,r1,r2,r3:|
00007680  f4 20 4f 75 74 70 75 74  20 74 6f 20 6d 61 73 6b  |. Output to mask|
00007690  0d 1e 96 55 c8 99 20 22  4f 53 5f 53 70 72 69 74  |...U.. "OS_Sprit|
000076a0  65 4f 70 22 2c 32 35 36  2b 34 39 2c 53 70 72 69  |eOp",256+49,Spri|
000076b0  74 65 73 2c 41 70 70 6e  61 6d 65 24 2b 45 78 74  |tes,Appname$+Ext|
000076c0  65 6e 73 69 6f 6e 24 2c  30 2c 30 3a f4 20 50 61  |ension$,0,0:. Pa|
000076d0  69 6e 74 20 6d 61 73 6b  20 66 72 6f 6d 20 53 70  |int mask from Sp|
000076e0  72 69 74 65 73 0d 1e a0  37 e6 20 34 2c 31 32 38  |rites...7. 4,128|
000076f0  3a da 3a f4 20 49 6e 76  65 72 74 20 74 6f 20 6d  |:.:. Invert to m|
00007700  61 6b 65 20 6d 61 73 6b  20 74 68 65 20 72 69 67  |ake mask the rig|
00007710  68 74 20 77 61 79 20 72  6f 75 6e 64 0d 1e aa 36  |ht way round...6|
00007720  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
00007730  2c 72 30 2c 72 31 2c 72  32 2c 72 33 3a f4 20 52  |,r0,r1,r2,r3:. R|
00007740  65 73 65 74 20 73 63 72  65 65 6e 20 6f 75 74 70  |eset screen outp|
00007750  75 74 0d 1e b4 07 20 20  3a 0d 1e be 23 f4 20 50  |ut....  :...#. P|
00007760  61 69 6e 74 20 73 70 72  69 74 65 20 69 6e 74 6f  |aint sprite into|
00007770  20 69 63 6f 6e 73 70 72  69 74 65 3a 0d 1e c8 5c  | iconsprite:...\|
00007780  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
00007790  2c 32 35 36 2b 36 30 2c  69 63 6f 6e 73 70 72 69  |,256+60,iconspri|
000077a0  74 65 25 2c 41 70 70 6e  61 6d 65 24 2c 30 20 b8  |te%,Appname$,0 .|
000077b0  20 72 30 2c 72 31 2c 72  32 2c 72 33 3a f4 20 4f  | r0,r1,r2,r3:. O|
000077c0  75 74 70 75 74 20 74 6f  20 6e 65 77 20 69 63 6f  |utput to new ico|
000077d0  6e 20 73 70 72 69 74 65  0d 1e d2 57 c8 99 20 22  |n sprite...W.. "|
000077e0  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 32 35 36  |OS_SpriteOp",256|
000077f0  2b 33 34 2c 53 70 72 69  74 65 73 2c 41 70 70 6e  |+34,Sprites,Appn|
00007800  61 6d 65 24 2b 45 78 74  65 6e 73 69 6f 6e 24 2c  |ame$+Extension$,|
00007810  30 2c 30 2c 38 3a f4 20  50 61 69 6e 74 20 63 6f  |0,0,8:. Paint co|
00007820  70 79 20 66 72 6f 6d 20  53 70 72 69 74 65 73 0d  |py from Sprites.|
00007830  1e dc 36 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |..6.. "OS_Sprite|
00007840  4f 70 22 2c 72 30 2c 72  31 2c 72 32 2c 72 33 3a  |Op",r0,r1,r2,r3:|
00007850  f4 20 52 65 73 65 74 20  73 63 72 65 65 6e 20 6f  |. Reset screen o|
00007860  75 74 70 75 74 0d 1e e6  3a 42 6c 6f 63 6b 21 30  |utput...:Block!0|
00007870  3d 57 6e 64 77 3a 42 6c  6f 63 6b 21 34 3d 49 63  |=Wndw:Block!4=Ic|
00007880  6e 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |n:.. "Wimp_GetIc|
00007890  6f 6e 53 74 61 74 65 22  2c 2c 42 6c 6f 63 6b 0d  |onState",,Block.|
000078a0  1e f0 45 42 6c 6f 63 6b  21 38 3d 30 3a 42 6c 6f  |..EBlock!8=0:Blo|
000078b0  63 6b 21 31 32 3d 30 3a  c8 99 20 22 57 69 6d 70  |ck!12=0:.. "Wimp|
000078c0  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
000078d0  42 6c 6f 63 6b 3a f4 20  52 65 2d 70 6c 6f 74 20  |Block:. Re-plot |
000078e0  69 63 6f 6e 0d 1e fa 05  e1 0d 1f 04 05 3a 0d 1f  |icon.........:..|
000078f0  0e d8 dd 20 a4 43 72 65  61 74 65 57 69 6e 64 6f  |... .CreateWindo|
00007900  77 28 6d 69 6e 58 2c 6d  69 6e 59 2c 6d 61 78 58  |w(minX,minY,maxX|
00007910  2c 6d 61 78 59 2c 58 6f  66 66 73 65 74 2c 59 6f  |,maxY,Xoffset,Yo|
00007920  66 66 73 65 74 2c 48 61  6e 64 6c 65 2c 46 6c 61  |ffset,Handle,Fla|
00007930  67 73 2c 54 69 74 6c 65  43 6f 6c 2c 54 69 74 6c  |gs,TitleCol,Titl|
00007940  65 42 61 63 6b 43 6f 6c  2c 57 6f 72 6b 43 6f 6c  |eBackCol,WorkCol|
00007950  2c 57 6f 72 6b 42 61 63  6b 43 6f 6c 2c 53 63 72  |,WorkBackCol,Scr|
00007960  6f 6c 6c 43 6f 6c 2c 53  6c 69 64 65 72 43 6f 6c  |ollCol,SliderCol|
00007970  2c 49 6e 70 75 74 43 6f  6c 2c 57 6d 69 6e 58 2c  |,InputCol,WminX,|
00007980  57 6d 69 6e 59 2c 57 6d  61 78 58 2c 57 6d 61 78  |WminY,WmaxX,Wmax|
00007990  59 2c 54 69 74 6c 65 46  6c 61 67 73 2c 57 62 75  |Y,TitleFlags,Wbu|
000079a0  74 74 6f 6e 2c 53 70 72  69 74 65 50 6f 69 6e 74  |tton,SpritePoint|
000079b0  2c 4d 69 6e 57 2c 4d 69  6e 48 2c 54 69 74 6c 65  |,MinW,MinH,Title|
000079c0  44 61 74 61 24 29 0d 1f  18 5a 42 6c 6f 63 6b 21  |Data$)...ZBlock!|
000079d0  30 3d 6d 69 6e 58 3a 42  6c 6f 63 6b 21 34 3d 6d  |0=minX:Block!4=m|
000079e0  69 6e 59 3a 42 6c 6f 63  6b 21 38 3d 6d 61 78 58  |inY:Block!8=maxX|
000079f0  3a 42 6c 6f 63 6b 21 31  32 3d 6d 61 78 59 3a 42  |:Block!12=maxY:B|
00007a00  6c 6f 63 6b 21 31 36 3d  58 6f 66 66 73 65 74 3a  |lock!16=Xoffset:|
00007a10  42 6c 6f 63 6b 21 32 30  3d 59 6f 66 66 73 65 74  |Block!20=Yoffset|
00007a20  0d 1f 22 22 42 6c 6f 63  6b 21 32 34 3d 48 61 6e  |..""Block!24=Han|
00007a30  64 6c 65 3a 42 6c 6f 63  6b 21 32 38 3d 46 6c 61  |dle:Block!28=Fla|
00007a40  67 73 0d 1f 2c 51 42 6c  6f 63 6b 3f 33 32 3d 54  |gs..,QBlock?32=T|
00007a50  69 74 6c 65 43 6f 6c 3a  42 6c 6f 63 6b 3f 33 33  |itleCol:Block?33|
00007a60  3d 54 69 74 6c 65 42 61  63 6b 43 6f 6c 3a 42 6c  |=TitleBackCol:Bl|
00007a70  6f 63 6b 3f 33 34 3d 57  6f 72 6b 43 6f 6c 3a 42  |ock?34=WorkCol:B|
00007a80  6c 6f 63 6b 3f 33 35 3d  57 6f 72 6b 42 61 63 6b  |lock?35=WorkBack|
00007a90  43 6f 6c 0d 1f 36 46 42  6c 6f 63 6b 3f 33 36 3d  |Col..6FBlock?36=|
00007aa0  53 63 72 6f 6c 6c 43 6f  6c 3a 42 6c 6f 63 6b 3f  |ScrollCol:Block?|
00007ab0  33 37 3d 53 6c 69 64 65  72 43 6f 6c 3a 42 6c 6f  |37=SliderCol:Blo|
00007ac0  63 6b 3f 33 38 3d 49 6e  70 75 74 43 6f 6c 3a 42  |ck?38=InputCol:B|
00007ad0  6c 6f 63 6b 3f 33 39 3d  30 0d 1f 40 3f 42 6c 6f  |lock?39=0..@?Blo|
00007ae0  63 6b 21 34 30 3d 57 6d  69 6e 58 3a 42 6c 6f 63  |ck!40=WminX:Bloc|
00007af0  6b 21 34 34 3d 57 6d 69  6e 59 3a 42 6c 6f 63 6b  |k!44=WminY:Block|
00007b00  21 34 38 3d 57 6d 61 78  58 3a 42 6c 6f 63 6b 21  |!48=WmaxX:Block!|
00007b10  35 32 3d 57 6d 61 78 59  0d 1f 4a 3d 42 6c 6f 63  |52=WmaxY..J=Bloc|
00007b20  6b 21 35 36 3d 54 69 74  6c 65 46 6c 61 67 73 3a  |k!56=TitleFlags:|
00007b30  42 6c 6f 63 6b 21 36 30  3d 57 62 75 74 74 6f 6e  |Block!60=Wbutton|
00007b40  3a 42 6c 6f 63 6b 21 36  34 3d 53 70 72 69 74 65  |:Block!64=Sprite|
00007b50  50 6f 69 6e 74 0d 1f 54  5f 42 6c 6f 63 6b 21 36  |Point..T_Block!6|
00007b60  38 3d 28 4d 69 6e 48 3c  3c 31 35 29 2b 4d 69 6e  |8=(MinH<<15)+Min|
00007b70  57 20 3a 3a 3a 3a 3a 3a  3a 3a 3a 3a 3a 3a 20 f4  |W :::::::::::: .|
00007b80  20 30 2c 30 20 73 65 74  73 20 74 68 65 20 6d 69  | 0,0 sets the mi|
00007b90  6e 69 6d 75 6d 20 77 69  6e 64 6f 77 20 77 69 74  |nimum window wit|
00007ba0  68 20 74 6f 20 74 68 65  20 74 69 74 6c 65 20 77  |h to the title w|
00007bb0  69 64 74 68 0d 1f 5e 3e  24 28 42 6c 6f 63 6b 2b  |idth..^>$(Block+|
00007bc0  37 32 29 3d 54 69 74 6c  65 44 61 74 61 24 3a 42  |72)=TitleData$:B|
00007bd0  6c 6f 63 6b 21 38 34 3d  30 20 3a 3a 3a 20 f4 20  |lock!84=0 ::: . |
00007be0  4e 6f 20 69 63 6f 6e 73  20 69 6e 69 74 69 61 6c  |No icons initial|
00007bf0  6c 79 0d 1f 68 30 c8 99  20 22 57 69 6d 70 5f 43  |ly..h0.. "Wimp_C|
00007c00  72 65 61 74 65 57 69 6e  64 6f 77 22 2c 2c 42 6c  |reateWindow",,Bl|
00007c10  6f 63 6b 20 b8 20 57 69  6e 64 6f 77 48 61 6e 64  |ock . WindowHand|
00007c20  6c 65 0d 1f 72 11 3d 57  69 6e 64 6f 77 48 61 6e  |le..r.=WindowHan|
00007c30  64 6c 65 0d 1f 7c 05 3a  0d 1f 86 42 dd 20 a4 43  |dle..|.:...B. .C|
00007c40  72 65 61 74 65 49 63 6f  6e 28 57 69 6e 64 6f 77  |reateIcon(Window|
00007c50  48 61 6e 64 6c 65 2c 6d  69 6e 58 2c 6d 69 6e 59  |Handle,minX,minY|
00007c60  2c 6d 61 78 58 2c 6d 61  78 59 2c 46 6c 61 67 73  |,maxX,maxY,Flags|
00007c70  2c 49 63 6f 6e 44 61 74  61 29 0d 1f 90 18 42 6c  |,IconData)....Bl|
00007c80  6f 63 6b 21 30 3d 57 69  6e 64 6f 77 48 61 6e 64  |ock!0=WindowHand|
00007c90  6c 65 0d 1f 9a 48 42 6c  6f 63 6b 21 34 3d 6d 69  |le...HBlock!4=mi|
00007ca0  6e 58 3a 42 6c 6f 63 6b  21 38 3d 6d 69 6e 59 3a  |nX:Block!8=minY:|
00007cb0  42 6c 6f 63 6b 21 31 32  3d 6d 61 78 58 3a 42 6c  |Block!12=maxX:Bl|
00007cc0  6f 63 6b 21 31 36 3d 6d  61 78 59 3a 42 6c 6f 63  |ock!16=maxY:Bloc|
00007cd0  6b 21 32 30 3d 46 6c 61  67 73 0d 1f a4 3f 42 6c  |k!20=Flags...?Bl|
00007ce0  6f 63 6b 21 32 34 3d 49  63 6f 6e 44 61 74 61 21  |ock!24=IconData!|
00007cf0  30 3a 42 6c 6f 63 6b 21  32 38 3d 49 63 6f 6e 44  |0:Block!28=IconD|
00007d00  61 74 61 21 34 3a 42 6c  6f 63 6b 21 33 32 3d 49  |ata!4:Block!32=I|
00007d10  63 6f 6e 44 61 74 61 21  38 0d 1f ae 2c c8 99 20  |conData!8...,.. |
00007d20  22 57 69 6d 70 5f 43 72  65 61 74 65 49 63 6f 6e  |"Wimp_CreateIcon|
00007d30  22 2c 2c 42 6c 6f 63 6b  20 b8 20 49 63 6f 6e 48  |",,Block . IconH|
00007d40  61 6e 64 6c 65 0d 1f b8  0f 3d 49 63 6f 6e 48 61  |andle....=IconHa|
00007d50  6e 64 6c 65 0d 1f c2 05  3a 0d 1f cc 11 dd 20 f2  |ndle....:..... .|
00007d60  49 6e 69 74 69 61 6c 69  73 65 0d 1f d6 2d 41 70  |Initialise...-Ap|
00007d70  70 53 69 7a 65 3d 93 2d  26 38 30 30 30 3a 4d 69  |pSize=.-&8000:Mi|
00007d80  6e 53 69 7a 65 3d 41 70  70 53 69 7a 65 3a 53 6c  |nSize=AppSize:Sl|
00007d90  6f 74 45 6e 64 3d 93 0d  1f e0 05 e1 0d 1f ea 05  |otEnd=..........|
00007da0  3a 0d 1f f4 1f dd 20 a4  41 6c 6c 6f 63 61 74 65  |:..... .Allocate|
00007db0  4d 65 6d 6f 72 79 28 52  65 71 75 69 72 65 64 29  |Memory(Required)|
00007dc0  0d 1f fe 1a 53 6c 6f 74  53 69 7a 65 3d a4 53 6c  |....SlotSize=.Sl|
00007dd0  6f 74 53 69 7a 65 28 2d  31 29 0d 20 08 92 e7 20  |otSize(-1). ... |
00007de0  53 6c 6f 74 53 69 7a 65  3c 52 65 71 75 69 72 65  |SlotSize<Require|
00007df0  64 20 8c 20 4e 65 77 53  69 7a 65 3d a4 53 6c 6f  |d . NewSize=.Slo|
00007e00  74 53 69 7a 65 28 52 65  71 75 69 72 65 64 29 3a  |tSize(Required):|
00007e10  e7 20 4e 65 77 53 69 7a  65 3c 52 65 71 75 69 72  |. NewSize<Requir|
00007e20  65 64 20 8c 20 53 6c 6f  74 53 69 7a 65 3d a4 53  |ed . SlotSize=.S|
00007e30  6c 6f 74 53 69 7a 65 28  41 70 70 53 69 7a 65 29  |lotSize(AppSize)|
00007e40  3a 3d 30 3a f4 20 52 65  74 75 72 6e 73 2c 20 69  |:=0:. Returns, i|
00007e50  6e 64 69 63 61 74 69 6e  67 20 6d 65 6d 6f 72 79  |ndicating memory|
00007e60  20 6e 6f 74 20 63 6c 61  69 6d 65 64 0d 20 12 36  | not claimed. .6|
00007e70  e7 20 53 6c 6f 74 53 69  7a 65 3e 52 65 71 75 69  |. SlotSize>Requi|
00007e80  72 65 64 20 8c 20 53 6c  6f 74 53 69 7a 65 3d a4  |red . SlotSize=.|
00007e90  53 6c 6f 74 53 69 7a 65  28 52 65 71 75 69 72 65  |SlotSize(Require|
00007ea0  64 29 0d 20 1c 2a 3d 53  6c 6f 74 53 69 7a 65 3a  |d). .*=SlotSize:|
00007eb0  f4 20 52 65 74 75 72 6e  73 20 77 69 74 68 20 62  |. Returns with b|
00007ec0  79 74 65 73 20 63 6c 61  69 6d 65 64 0d 20 26 05  |ytes claimed. &.|
00007ed0  3a 0d 20 30 16 dd 20 a4  53 6c 6f 74 53 69 7a 65  |:. 0.. .SlotSize|
00007ee0  28 42 79 74 65 73 29 0d  20 3a 27 c8 99 20 22 57  |(Bytes). :'.. "W|
00007ef0  69 6d 70 5f 53 6c 6f 74  53 69 7a 65 22 2c 42 79  |imp_SlotSize",By|
00007f00  74 65 73 2c 2d 31 20 b8  20 42 79 74 65 73 0d 20  |tes,-1 . Bytes. |
00007f10  44 0a 3d 42 79 74 65 73  0d 20 4e 05 3a 0d 20 58  |D.=Bytes. N.:. X|
00007f20  17 dd 20 f2 4d 69 6e 69  6d 69 73 65 57 69 6d 70  |.. .MinimiseWimp|
00007f30  53 6c 6f 74 0d 20 62 22  64 75 6d 6d 79 3d a4 41  |Slot. b"dummy=.A|
00007f40  6c 6c 6f 63 61 74 65 4d  65 6d 6f 72 79 28 4d 69  |llocateMemory(Mi|
00007f50  6e 53 69 7a 65 29 0d 20  6c 05 e1 0d 20 76 05 3a  |nSize). l... v.:|
00007f60  0d 20 80 22 dd 20 f2 43  6c 6f 73 65 46 69 6c 65  |. .". .CloseFile|
00007f70  49 66 50 6f 73 73 28 46  69 6c 65 48 61 6e 64 6c  |IfPoss(FileHandl|
00007f80  65 29 0d 20 8a 07 ea 20  85 0d 20 94 26 ee 20 85  |e). ... .. .&. .|
00007f90  20 ea 20 f7 20 85 3a e1  3a f4 20 55 6e 61 62 6c  | . . .:.:. Unabl|
00007fa0  65 20 74 6f 20 63 6c 6f  73 65 20 66 69 6c 65 0d  |e to close file.|
00007fb0  20 9e 10 d9 23 46 69 6c  65 48 61 6e 64 6c 65 0d  | ...#FileHandle.|
00007fc0  20 a8 05 e1 0d 20 b2 05  3a 0d 20 bc 1e dd 20 a4  | .... ..:. ... .|
00007fd0  46 69 6e 64 46 69 6c 65  53 69 7a 65 28 46 69 6c  |FindFileSize(Fil|
00007fe0  65 4e 61 6d 65 24 29 0d  20 c6 20 e7 20 46 69 6c  |eName$). . . Fil|
00007ff0  65 4e 61 6d 65 24 3d 22  3c 57 69 6d 70 24 53 63  |eName$="<Wimp$Sc|
00008000  72 61 70 3e 22 20 8c 0d  20 d0 3a 20 20 c8 99 20  |rap>" .. .:  .. |
00008010  22 4f 53 5f 46 69 6c 65  22 2c 31 35 2c 46 69 6c  |"OS_File",15,Fil|
00008020  65 4e 61 6d 65 24 2c 2c  2c 46 69 6c 65 4e 61 6d  |eName$,,,FileNam|
00008030  65 24 20 b8 20 2c 2c 2c  2c 46 69 6c 65 53 69 7a  |e$ . ,,,,FileSiz|
00008040  65 0d 20 da 05 cc 0d 20  e4 34 20 20 4e 3d 2d 31  |e. .... .4  N=-1|
00008050  3a f5 3a 4e 2b 3d 31 3a  fd 20 c1 46 69 6c 65 4e  |:.:N+=1:. .FileN|
00008060  61 6d 65 24 2c a9 28 46  69 6c 65 4e 61 6d 65 24  |ame$,.(FileName$|
00008070  29 2d 4e 2c 31 29 3d 22  2e 22 0d 20 ee 42 20 20  |)-N,1)=".". .B  |
00008080  50 61 74 68 4e 61 6d 65  24 3d c0 46 69 6c 65 4e  |PathName$=.FileN|
00008090  61 6d 65 24 2c a9 28 46  69 6c 65 4e 61 6d 65 24  |ame$,.(FileName$|
000080a0  29 2d 4e 29 3a 4c 65 61  66 4e 61 6d 65 24 3d c2  |)-N):LeafName$=.|
000080b0  46 69 6c 65 4e 61 6d 65  24 2c 4e 29 0d 20 f8 3a  |FileName$,N). .:|
000080c0  20 20 c8 99 20 22 4f 53  5f 46 69 6c 65 22 2c 31  |  .. "OS_File",1|
000080d0  33 2c 4c 65 61 66 4e 61  6d 65 24 2c 2c 2c 50 61  |3,LeafName$,,,Pa|
000080e0  74 68 4e 61 6d 65 24 20  b8 20 2c 2c 2c 2c 46 69  |thName$ . ,,,,Fi|
000080f0  6c 65 53 69 7a 65 0d 21  02 05 cd 0d 21 0c 0d 3d  |leSize.!....!..=|
00008100  46 69 6c 65 53 69 7a 65  0d 21 16 05 3a 0d 21 20  |FileSize.!..:.! |
00008110  10 dd 20 a4 4e 65 78 74  45 6e 74 72 79 0d 21 2a  |.. .NextEntry.!*|
00008120  48 f4 20 47 65 74 73 20  6e 65 78 74 20 65 6e 74  |H. Gets next ent|
00008130  72 79 20 28 63 72 65 61  74 65 64 20 62 79 20 42  |ry (created by B|
00008140  50 55 54 23 44 61 74 61  2c 41 24 29 20 66 72 6f  |PUT#Data,A$) fro|
00008150  6d 20 61 20 66 69 6c 65  20 61 73 20 61 20 73 74  |m a file as a st|
00008160  72 69 6e 67 2e 0d 21 34  1c f4 20 55 73 65 20 61  |ring..!4.. Use a|
00008170  73 20 41 24 3d 46 4e 4e  65 78 74 45 6e 74 72 79  |s A$=FNNextEntry|
00008180  2e 0d 21 3e 07 ea 20 85  0d 21 48 26 ee 20 85 20  |..!>.. ..!H&. . |
00008190  ea 20 f7 20 85 3a 3d 22  22 3a f4 20 45 72 72 6f  |. . .:="":. Erro|
000081a0  72 20 72 65 61 64 69 6e  67 20 66 69 6c 65 0d 21  |r reading file.!|
000081b0  52 0e 4e 45 24 3d be 23  44 61 74 61 0d 21 5c 12  |R.NE$=.#Data.!\.|
000081c0  c8 95 20 c0 4e 45 24 2c  31 29 3d 22 7c 22 0d 21  |.. .NE$,1)="|".!|
000081d0  66 10 20 20 4e 45 24 3d  be 23 44 61 74 61 0d 21  |f.  NE$=.#Data.!|
000081e0  70 05 ce 0d 21 7a 08 3d  4e 45 24 0d 21 84 05 3a  |p...!z.=NE$.!..:|
000081f0  0d 21 8e 47 dd 20 f2 44  72 61 67 42 6f 78 28 57  |.!.G. .DragBox(W|
00008200  69 6e 64 6f 77 48 61 6e  64 6c 65 2c 49 63 6f 6e  |indowHandle,Icon|
00008210  48 61 6e 64 6c 65 2c 44  72 61 67 54 79 70 65 2c  |Handle,DragType,|
00008220  53 70 72 69 74 65 41 72  65 61 2c 53 70 72 69 74  |SpriteArea,Sprit|
00008230  65 4e 61 6d 65 24 29 0d  21 98 38 42 6c 6f 63 6b  |eName$).!.8Block|
00008240  21 30 3d 57 69 6e 64 6f  77 48 61 6e 64 6c 65 3a  |!0=WindowHandle:|
00008250  c8 99 20 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |.. "Wimp_GetWind|
00008260  6f 77 53 74 61 74 65 22  2c 2c 42 6c 6f 63 6b 0d  |owState",,Block.|
00008270  21 a2 20 77 6d 69 6e 78  3d 42 6c 6f 63 6b 21 34  |!. wminx=Block!4|
00008280  3a 77 6d 61 78 79 3d 42  6c 6f 63 6b 21 31 36 0d  |:wmaxy=Block!16.|
00008290  21 ac 49 42 6c 6f 63 6b  21 30 3d 57 69 6e 64 6f  |!.IBlock!0=Windo|
000082a0  77 48 61 6e 64 6c 65 3a  42 6c 6f 63 6b 21 34 3d  |wHandle:Block!4=|
000082b0  49 63 6f 6e 48 61 6e 64  6c 65 3a c8 99 20 22 57  |IconHandle:.. "W|
000082c0  69 6d 70 5f 47 65 74 49  63 6f 6e 53 74 61 74 65  |imp_GetIconState|
000082d0  22 2c 2c 42 6c 6f 63 6b  0d 21 b6 3e 69 6d 69 6e  |",,Block.!.>imin|
000082e0  78 3d 42 6c 6f 63 6b 21  38 3a 69 6d 69 6e 79 3d  |x=Block!8:iminy=|
000082f0  42 6c 6f 63 6b 21 31 32  3a 69 6d 61 78 78 3d 42  |Block!12:imaxx=B|
00008300  6c 6f 63 6b 21 31 36 3a  69 6d 61 78 79 3d 42 6c  |lock!16:imaxy=Bl|
00008310  6f 63 6b 21 32 30 0d 21  c0 29 42 6c 6f 63 6b 21  |ock!20.!.)Block!|
00008320  30 3d 57 69 6e 64 6f 77  48 61 6e 64 6c 65 3a 42  |0=WindowHandle:B|
00008330  6c 6f 63 6b 21 34 3d 44  72 61 67 54 79 70 65 0d  |lock!4=DragType.|
00008340  21 ca 19 42 6c 6f 63 6b  21 38 3d 28 77 6d 69 6e  |!..Block!8=(wmin|
00008350  78 2b 69 6d 69 6e 78 29  0d 21 d4 1a 42 6c 6f 63  |x+iminx).!..Bloc|
00008360  6b 21 31 32 3d 28 77 6d  61 78 79 2b 69 6d 69 6e  |k!12=(wmaxy+imin|
00008370  79 29 0d 21 de 1a 42 6c  6f 63 6b 21 31 36 3d 28  |y).!..Block!16=(|
00008380  77 6d 69 6e 78 2b 69 6d  61 78 78 29 0d 21 e8 1a  |wminx+imaxx).!..|
00008390  42 6c 6f 63 6b 21 32 30  3d 28 77 6d 61 78 79 2b  |Block!20=(wmaxy+|
000083a0  69 6d 61 78 79 29 0d 21  f2 19 42 6c 6f 63 6b 21  |imaxy).!..Block!|
000083b0  32 34 3d 31 3a 42 6c 6f  63 6b 21 32 38 3d 31 0d  |24=1:Block!28=1.|
000083c0  21 fc 47 42 6c 6f 63 6b  21 33 32 3d 28 a4 4d 6f  |!.GBlock!32=(.Mo|
000083d0  64 65 49 6e 66 6f 28 22  58 70 69 78 65 6c 73 22  |deInfo("Xpixels"|
000083e0  2c 2d 31 29 2b 31 29 2a  28 32 5e a4 4d 6f 64 65  |,-1)+1)*(2^.Mode|
000083f0  49 6e 66 6f 28 22 58 45  69 67 46 61 63 74 6f 72  |Info("XEigFactor|
00008400  22 2c 2d 31 29 29 0d 22  06 47 42 6c 6f 63 6b 21  |",-1)).".GBlock!|
00008410  33 36 3d 28 a4 4d 6f 64  65 49 6e 66 6f 28 22 59  |36=(.ModeInfo("Y|
00008420  70 69 78 65 6c 73 22 2c  2d 31 29 2b 31 29 2a 28  |pixels",-1)+1)*(|
00008430  32 5e a4 4d 6f 64 65 49  6e 66 6f 28 22 59 45 69  |2^.ModeInfo("YEi|
00008440  67 46 61 63 74 6f 72 22  2c 2d 31 29 29 0d 22 10  |gFactor",-1)).".|
00008450  13 e7 20 44 72 61 67 41  53 70 72 69 74 65 20 8c  |.. DragASprite .|
00008460  0d 22 1a 45 20 20 c8 99  20 22 44 72 61 67 41 53  |.".E  .. "DragAS|
00008470  70 72 69 74 65 5f 53 74  61 72 74 22 2c 25 31 30  |prite_Start",%10|
00008480  30 30 30 31 30 31 2c 53  70 72 69 74 65 41 72 65  |000101,SpriteAre|
00008490  61 2c 53 70 72 69 74 65  4e 61 6d 65 24 2c 42 6c  |a,SpriteName$,Bl|
000084a0  6f 63 6b 2b 38 0d 22 24  05 cc 0d 22 2e 1e 20 20  |ock+8."$..."..  |
000084b0  c8 99 20 22 57 69 6d 70  5f 44 72 61 67 42 6f 78  |.. "Wimp_DragBox|
000084c0  22 2c 2c 42 6c 6f 63 6b  0d 22 38 05 cd 0d 22 42  |",,Block."8..."B|
000084d0  05 e1 0d 22 4c 05 3a 0d  22 56 4f f4 20 2d 2d 2d  |..."L.:."VO. ---|
000084e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00008520  2d 2d 2d 2d 2d 2d 0d 22  60 2f f4 20 52 6f 75 74  |------."`/. Rout|
00008530  69 6e 65 73 20 63 6f 6d  6d 6f 6e 20 74 6f 20 74  |ines common to t|
00008540  68 65 20 4f 6d 6e 69 44  65 73 6b 20 75 74 69 6c  |he OmniDesk util|
00008550  69 74 69 65 73 0d 22 6a  4f f4 20 2d 2d 2d 2d 2d  |ities."jO. -----|
00008560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000085a0  2d 2d 2d 2d 0d 22 74 05  3a 0d 22 7e 18 dd 20 f2  |----."t.:."~.. .|
000085b0  44 65 63 6c 61 72 65 54  6f 4f 6d 6e 69 44 65 73  |DeclareToOmniDes|
000085c0  6b 0d 22 88 2f 42 6c 6f  63 6b 21 30 3d 32 30 38  |k."./Block!0=208|
000085d0  3a 42 6c 6f 63 6b 21 31  32 3d 30 3a 42 6c 6f 63  |:Block!12=0:Bloc|
000085e0  6b 21 31 36 3d 55 74 69  6c 44 65 63 6c 61 72 65  |k!16=UtilDeclare|
000085f0  0d 22 92 11 42 6c 6f 63  6b 21 32 30 3d 54 61 73  |."..Block!20=Tas|
00008600  6b 0d 22 9c 19 24 28 42  6c 6f 63 6b 2b 32 34 29  |k."..$(Block+24)|
00008610  3d 54 61 73 6b 6e 61 6d  65 24 0d 22 a6 1c 24 28  |=Taskname$."..$(|
00008620  42 6c 6f 63 6b 2b 34 34  29 3d 4f 75 72 46 69 6c  |Block+44)=OurFil|
00008630  65 4e 61 6d 65 24 0d 22  b0 29 24 28 42 6c 6f 63  |eName$.".)$(Bloc|
00008640  6b 2b 35 35 29 3d a4 4f  6d 6e 69 48 65 6c 70 4d  |k+55)=.OmniHelpM|
00008650  65 73 73 61 67 65 28 22  43 4c 49 43 4b 22 29 0d  |essage("CLICK").|
00008660  22 ba 29 24 28 42 6c 6f  63 6b 2b 31 33 32 29 3d  |".)$(Block+132)=|
00008670  a4 4f 6d 6e 69 48 65 6c  70 4d 65 73 73 61 67 65  |.OmniHelpMessage|
00008680  28 22 44 52 41 47 22 29  0d 22 c4 2b c8 99 20 22  |("DRAG").".+.. "|
00008690  57 69 6d 70 5f 53 65 6e  64 4d 65 73 73 61 67 65  |Wimp_SendMessage|
000086a0  22 2c 31 37 2c 42 6c 6f  63 6b 2c 4f 6d 6e 69 44  |",17,Block,OmniD|
000086b0  65 73 6b 0d 22 ce 05 e1  0d 22 d8 05 3a 0d 22 e2  |esk."...."..:.".|
000086c0  11 dd 20 f2 53 61 79 47  6f 6f 64 62 79 65 0d 22  |.. .SayGoodbye."|
000086d0  ec 13 e7 20 4f 6d 6e 69  44 65 73 6b 3c 3e 30 20  |... OmniDesk<>0 |
000086e0  8c 0d 22 f6 31 20 20 42  6c 6f 63 6b 21 30 3d 32  |..".1  Block!0=2|
000086f0  34 3a 42 6c 6f 63 6b 21  31 32 3d 30 3a 42 6c 6f  |4:Block!12=0:Blo|
00008700  63 6b 21 31 36 3d 55 74  69 6c 51 75 69 74 74 69  |ck!16=UtilQuitti|
00008710  6e 67 0d 23 00 13 20 20  42 6c 6f 63 6b 21 32 30  |ng.#..  Block!20|
00008720  3d 54 61 73 6b 0d 23 0a  2d 20 20 c8 99 20 22 57  |=Task.#.-  .. "W|
00008730  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
00008740  2c 31 37 2c 42 6c 6f 63  6b 2c 4f 6d 6e 69 44 65  |,17,Block,OmniDe|
00008750  73 6b 0d 23 14 05 cd 0d  23 1e 21 c8 99 20 22 49  |sk.#....#.!.. "I|
00008760  6e 74 65 72 66 61 63 65  5f 43 6c 6f 73 65 44 6f  |nterface_CloseDo|
00008770  77 6e 22 2c 54 61 73 6b  0d 23 28 26 c8 99 20 22  |wn",Task.#(&.. "|
00008780  57 69 6d 70 5f 43 6c 6f  73 65 44 6f 77 6e 22 2c  |Wimp_CloseDown",|
00008790  54 61 73 6b 2c 26 34 42  35 33 34 31 35 34 0d 23  |Task,&4B534154.#|
000087a0  32 05 e1 0d 23 3c 05 3a  0d 23 46 18 dd 20 a4 52  |2...#<.:.#F.. .R|
000087b0  65 61 64 53 74 61 72 74  75 70 53 74 72 69 6e 67  |eadStartupString|
000087c0  0d 23 50 4d f4 20 52 65  74 75 72 6e 73 20 74 61  |.#PM. Returns ta|
000087d0  73 6b 20 68 61 6e 64 6c  65 20 6f 66 20 4f 6d 6e  |sk handle of Omn|
000087e0  69 44 65 73 6b 20 28 77  68 69 63 68 20 69 73 20  |iDesk (which is |
000087f0  70 61 73 73 65 64 20 69  6e 20 74 68 65 20 63 6f  |passed in the co|
00008800  6d 6d 61 6e 64 20 73 74  72 69 6e 67 29 0d 23 5a  |mmand string).#Z|
00008810  26 f4 20 6f 72 20 30 20  69 66 20 6e 6f 74 20 73  |&. or 0 if not s|
00008820  74 61 72 74 65 64 20 62  79 20 4f 6d 6e 69 44 65  |tarted by OmniDe|
00008830  73 6b 2e 0d 23 64 1d c8  99 20 22 4f 53 5f 47 65  |sk..#d... "OS_Ge|
00008840  74 45 6e 76 22 20 b8 20  43 6f 6d 6d 61 6e 64 24  |tEnv" . Command$|
00008850  0d 23 6e 1b 41 3d a7 43  6f 6d 6d 61 6e 64 24 2c  |.#n.A=.Command$,|
00008860  22 2d 53 74 61 72 74 75  70 22 29 0d 23 78 16 e7  |"-Startup").#x..|
00008870  20 41 3c 3e 30 20 8c 20  53 74 61 72 74 75 70 3d  | A<>0 . Startup=|
00008880  b9 0d 23 82 18 41 3d a7  43 6f 6d 6d 61 6e 64 24  |..#..A=.Command$|
00008890  2c 22 2d 45 78 69 74 22  29 0d 23 8c 13 e7 20 41  |,"-Exit").#... A|
000088a0  3c 3e 30 20 8c 20 45 78  69 74 3d b9 0d 23 96 1c  |<>0 . Exit=..#..|
000088b0  41 3d a7 43 6f 6d 6d 61  6e 64 24 2c 22 2d 4f 6d  |A=.Command$,"-Om|
000088c0  6e 69 44 65 73 6b 22 29  0d 23 a0 0e e7 20 41 3d  |niDesk").#... A=|
000088d0  30 20 8c 20 3d 30 0d 23  aa 16 3d bb 28 c1 43 6f  |0 . =0.#..=.(.Co|
000088e0  6d 6d 61 6e 64 24 2c 41  2b 39 29 29 0d 23 b4 05  |mmand$,A+9)).#..|
000088f0  3a 0d 23 be 20 dd 20 a4  52 65 61 64 57 69 6e 64  |:.#. . .ReadWind|
00008900  6f 77 4c 6f 63 61 74 69  6f 6e 28 41 78 69 73 24  |owLocation(Axis$|
00008910  29 0d 23 c8 48 f4 20 52  65 61 64 73 20 77 68 69  |).#.H. Reads whi|
00008920  63 68 20 72 61 64 69 6f  20 69 63 6f 6e 20 28 69  |ch radio icon (i|
00008930  66 20 61 6e 79 29 20 69  73 20 73 65 6c 65 63 74  |f any) is select|
00008940  65 64 20 69 6e 20 74 68  65 20 57 69 6e 64 6f 77  |ed in the Window|
00008950  20 50 6f 73 69 74 69 6f  6e 0d 23 d2 48 f4 20 73  | Position.#.H. s|
00008960  65 6c 65 63 74 6f 72 20  77 69 6e 64 6f 77 20 61  |elector window a|
00008970  6e 64 20 72 65 74 75 72  6e 73 20 74 68 65 20 61  |nd returns the a|
00008980  78 69 73 20 63 6f 6f 72  64 69 6e 61 74 65 20 28  |xis coordinate (|
00008990  74 77 6f 20 63 61 6c 6c  73 20 6e 65 65 64 65 64  |two calls needed|
000089a0  29 0d 23 dc 25 f4 20 6f  72 20 2d 31 20 66 6f 72  |).#.%. or -1 for|
000089b0  20 6e 6f 20 70 6f 73 69  74 69 6f 6e 20 73 65 6c  | no position sel|
000089c0  65 63 74 65 64 2e 0d 23  e6 3f 49 63 6f 6e 3d 35  |ected..#.?Icon=5|
000089d0  3a f5 3a 49 63 6f 6e 2b  3d 31 3a fd 20 28 a4 53  |:.:Icon+=1:. (.S|
000089e0  65 6c 65 63 74 65 64 53  74 61 74 65 28 4c 6f 63  |electedState(Loc|
000089f0  2c 49 63 6f 6e 29 3d b9  29 20 84 20 28 49 63 6f  |,Icon)=.) . (Ico|
00008a00  6e 3d 33 31 29 0d 23 f0  2a e7 20 49 63 6f 6e 3d  |n=31).#.*. Icon=|
00008a10  33 31 20 8c 20 3d 2d 31  3a f4 20 41 6c 6c 20 69  |31 . =-1:. All i|
00008a20  63 6f 6e 73 20 64 65 73  65 6c 65 63 74 65 64 0d  |cons deselected.|
00008a30  23 fa 34 4c 6f 63 61 74  69 6f 6e 3d 2d 31 3a 49  |#.4Location=-1:I|
00008a40  63 6f 6e 2d 3d 36 3a f4  20 42 72 69 6e 67 20 69  |con-=6:. Bring i|
00008a50  63 6f 6e 20 69 6e 74 6f  20 72 61 6e 67 65 20 30  |con into range 0|
00008a60  2d 31 34 0d 24 04 0e c8  8e 20 41 78 69 73 24 20  |-14.$.... Axis$ |
00008a70  ca 0d 24 0e 21 20 20 c9  20 22 58 22 2c 22 78 22  |..$.!  . "X","x"|
00008a80  3a 4c 6f 63 61 74 69 6f  6e 3d 49 63 6f 6e 20 81  |:Location=Icon .|
00008a90  20 35 0d 24 18 25 20 20  c9 20 22 59 22 2c 22 79  | 5.$.%  . "Y","y|
00008aa0  22 3a 4c 6f 63 61 74 69  6f 6e 3d 34 2d 28 49 63  |":Location=4-(Ic|
00008ab0  6f 6e 20 83 20 35 29 0d  24 22 05 cb 0d 24 2c 0d  |on . 5).$"...$,.|
00008ac0  3d 4c 6f 63 61 74 69 6f  6e 0d 24 36 05 3a 0d 24  |=Location.$6.:.$|
00008ad0  40 17 dd 20 f2 43 6c 65  61 6e 55 70 4c 6f 63 57  |@.. .CleanUpLocW|
00008ae0  69 6e 64 6f 77 0d 24 4a  4f f4 20 4d 61 6b 65 73  |indow.$JO. Makes|
00008af0  20 73 75 72 65 20 74 68  61 74 20 6e 6f 6e 65 20  | sure that none |
00008b00  6f 66 20 74 68 65 20 27  77 69 6e 64 6f 77 27 20  |of the 'window' |
00008b10  69 63 6f 6e 73 20 69 6e  20 74 68 65 20 4c 6f 63  |icons in the Loc|
00008b20  20 77 69 6e 64 6f 77 20  69 73 20 73 65 6c 65 63  | window is selec|
00008b30  74 65 64 2e 0d 24 54 09  4e 3d 35 3a f5 0d 24 5e  |ted..$T.N=5:..$^|
00008b40  27 4e 2b 3d 31 3a fd 20  4e 3d 33 30 20 84 20 a4  |'N+=1:. N=30 . .|
00008b50  53 65 6c 65 63 74 65 64  53 74 61 74 65 28 4c 6f  |SelectedState(Lo|
00008b60  63 2c 4e 29 0d 24 68 20  f2 55 70 64 61 74 65 53  |c,N).$h .UpdateS|
00008b70  65 6c 65 63 74 65 64 46  6c 61 67 28 4c 6f 63 2c  |electedFlag(Loc,|
00008b80  4e 2c a3 29 0d 24 72 05  e1 0d 24 7c 05 3a 0d 24  |N,.).$r...$|.:.$|
00008b90  86 4f f4 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.O. ------------|
00008ba0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00008bd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 24 90  |-------------.$.|
00008be0  2c f4 20 53 70 65 63 69  61 6c 20 72 6f 75 74 69  |,. Special routi|
00008bf0  6e 65 73 20 66 6f 72 20  74 68 69 73 20 70 72 6f  |nes for this pro|
00008c00  67 72 61 6d 20 6f 6e 6c  79 0d 24 9a 4f f4 20 2d  |gram only.$.O. -|
00008c10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00008c50  2d 2d 2d 2d 2d 2d 2d 2d  0d 24 a4 05 3a 0d 24 ae  |--------.$..:.$.|
00008c60  1e dd 20 f2 43 6c 65 61  72 53 70 79 43 61 6c 63  |.. .ClearSpyCalc|
00008c70  57 69 6e 64 6f 77 28 53  70 79 29 0d 24 b8 08 f7  |Window(Spy).$...|
00008c80  20 2b 31 0d 24 c2 24 dc  20 34 2c 35 2c 31 30 2c  | +1.$.$. 4,5,10,|
00008c90  31 31 2c 31 36 2c 31 37  2c 33 35 2c 33 37 2c 33  |11,16,17,35,37,3|
00008ca0  39 2c 34 31 2c 34 33 0d  24 cc 0e e3 20 4e 3d 31  |9,41,43.$... N=1|
00008cb0  20 b8 20 31 31 0d 24 d6  29 20 20 f3 20 49 63 6f  | . 11.$.)  . Ico|
00008cc0  6e 3a f2 55 70 64 61 74  65 49 63 6f 6e 28 53 70  |n:.UpdateIcon(Sp|
00008cd0  79 43 61 6c 63 2c 49 63  6f 6e 2c 22 22 29 0d 24  |yCalc,Icon,"").$|
00008ce0  e0 05 ed 0d 24 ea 0d e7  20 ac 20 53 70 79 20 8c  |....$... . Spy .|
00008cf0  0d 24 f4 21 20 20 f2 55  70 64 61 74 65 49 63 6f  |.$.!  .UpdateIco|
00008d00  6e 28 53 70 79 43 61 6c  63 2c 33 39 2c 22 37 22  |n(SpyCalc,39,"7"|
00008d10  29 0d 24 fe 1f 20 20 f2  43 6f 6c 6f 75 72 49 63  |).$..  .ColourIc|
00008d20  6f 6e 28 53 70 79 43 61  6c 63 2c 33 39 2c 37 29  |on(SpyCalc,39,7)|
00008d30  0d 25 08 21 20 20 f2 55  70 64 61 74 65 49 63 6f  |.%.!  .UpdateIco|
00008d40  6e 28 53 70 79 43 61 6c  63 2c 34 31 2c 22 31 22  |n(SpyCalc,41,"1"|
00008d50  29 0d 25 12 1f 20 20 f2  43 6f 6c 6f 75 72 49 63  |).%..  .ColourIc|
00008d60  6f 6e 28 53 70 79 43 61  6c 63 2c 34 31 2c 31 29  |on(SpyCalc,41,1)|
00008d70  0d 25 1c 21 20 20 f2 55  70 64 61 74 65 49 63 6f  |.%.!  .UpdateIco|
00008d80  6e 28 53 70 79 43 61 6c  63 2c 33 35 2c 22 30 22  |n(SpyCalc,35,"0"|
00008d90  29 0d 25 26 21 20 20 f2  55 70 64 61 74 65 49 63  |).%&!  .UpdateIc|
00008da0  6f 6e 28 53 70 79 43 61  6c 63 2c 33 37 2c 22 30  |on(SpyCalc,37,"0|
00008db0  22 29 0d 25 30 05 cc 0d  25 3a 1f 20 20 f2 43 6f  |").%0...%:.  .Co|
00008dc0  6c 6f 75 72 49 63 6f 6e  28 53 70 79 43 61 6c 63  |lourIcon(SpyCalc|
00008dd0  2c 33 39 2c 31 29 0d 25  44 1f 20 20 f2 43 6f 6c  |,39,1).%D.  .Col|
00008de0  6f 75 72 49 63 6f 6e 28  53 70 79 43 61 6c 63 2c  |ourIcon(SpyCalc,|
00008df0  34 31 2c 31 29 0d 25 4e  05 cd 0d 25 58 0f e3 20  |41,1).%N...%X.. |
00008e00  4e 3d 32 30 20 b8 20 33  32 0d 25 62 3d 20 20 42  |N=20 . 32.%b=  B|
00008e10  6c 6f 63 6b 21 30 3d 53  70 79 43 61 6c 63 3a 42  |lock!0=SpyCalc:B|
00008e20  6c 6f 63 6b 21 34 3d 4e  3a c8 99 20 22 57 69 6d  |lock!4=N:.. "Wim|
00008e30  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00008e40  2c 42 6c 6f 63 6b 0d 25  6c 26 20 20 42 6c 6f 63  |,Block.%l&  Bloc|
00008e50  6b 21 38 3d 28 30 3c 3c  32 31 29 3a 42 6c 6f 63  |k!8=(0<<21):Bloc|
00008e60  6b 21 31 32 3d 28 31 3c  3c 32 31 29 0d 25 76 32  |k!12=(1<<21).%v2|
00008e70  20 20 e7 20 53 70 79 20  8c 20 42 6c 6f 63 6b 21  |  . Spy . Block!|
00008e80  38 2b 3d 28 30 3c 3c 31  32 29 3a 8b 20 42 6c 6f  |8+=(0<<12):. Blo|
00008e90  63 6b 21 38 2b 3d 28 31  31 3c 3c 31 32 29 0d 25  |ck!8+=(11<<12).%|
00008ea0  80 19 20 20 42 6c 6f 63  6b 21 31 32 2b 3d 28 32  |..  Block!12+=(2|
00008eb0  35 35 3c 3c 31 32 29 0d  25 8a 23 20 20 c8 99 20  |55<<12).%.#  .. |
00008ec0  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
00008ed0  74 65 22 2c 2c 42 6c 6f  63 6b 0d 25 94 05 ed 0d  |te",,Block.%....|
00008ee0  25 9e 27 f2 55 70 64 61  74 65 49 63 6f 6e 28 53  |%.'.UpdateIcon(S|
00008ef0  70 79 43 61 6c 63 2c 33  33 2c 22 26 31 37 30 30  |pyCalc,33,"&1700|
00008f00  30 30 30 30 22 29 0d 25  a8 13 e3 20 4e 3d 33 33  |0000").%... N=33|
00008f10  20 b8 20 34 33 20 88 20  32 0d 25 b2 3d 20 20 42  | . 43 . 2.%.=  B|
00008f20  6c 6f 63 6b 21 30 3d 53  70 79 43 61 6c 63 3a 42  |lock!0=SpyCalc:B|
00008f30  6c 6f 63 6b 21 34 3d 4e  3a c8 99 20 22 57 69 6d  |lock!4=N:.. "Wim|
00008f40  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00008f50  2c 42 6c 6f 63 6b 0d 25  bc 0d 20 20 e7 20 53 70  |,Block.%..  . Sp|
00008f60  79 20 8c 0d 25 c6 17 20  20 20 20 42 6c 6f 63 6b  |y ..%..    Block|
00008f70  21 38 3d 28 30 3c 3c 31  32 29 0d 25 d0 07 20 20  |!8=(0<<12).%..  |
00008f80  cc 0d 25 da 1b 20 20 20  20 e7 20 28 4e 3d 33 39  |..%..    . (N=39|
00008f90  29 20 84 20 28 4e 3d 34  31 29 20 8c 0d 25 e4 19  |) . (N=41) ..%..|
00008fa0  20 20 20 20 20 20 42 6c  6f 63 6b 21 38 3d 28 32  |      Block!8=(2|
00008fb0  3c 3c 31 32 29 0d 25 ee  09 20 20 20 20 cc 0d 25  |<<12).%..    ..%|
00008fc0  f8 1a 20 20 20 20 20 20  42 6c 6f 63 6b 21 38 3d  |..      Block!8=|
00008fd0  28 31 35 3c 3c 31 32 29  0d 26 02 23 20 20 20 20  |(15<<12).&.#    |
00008fe0  20 20 e7 20 4e 3d 33 33  20 8c 20 42 6c 6f 63 6b  |  . N=33 . Block|
00008ff0  21 38 3d 28 31 34 3c 3c  31 32 29 0d 26 0c 09 20  |!8=(14<<12).&.. |
00009000  20 20 20 cd 0d 26 16 07  20 20 cd 0d 26 20 18 20  |   ..&..  ..& . |
00009010  20 42 6c 6f 63 6b 21 31  32 3d 28 32 35 35 3c 3c  | Block!12=(255<<|
00009020  31 32 29 0d 26 2a 23 20  20 c8 99 20 22 57 69 6d  |12).&*#  .. "Wim|
00009030  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00009040  2c 42 6c 6f 63 6b 0d 26  34 05 ed 0d 26 3e 05 e1  |,Block.&4...&>..|
00009050  0d 26 48 05 3a 0d 26 52  1e dd 20 f2 44 6f 53 70  |.&H.:.&R.. .DoSp|
00009060  79 28 f8 20 4f 6c 64 57  69 6e 2c f8 20 4f 6c 64  |y(. OldWin,. Old|
00009070  49 63 29 0d 26 5c 23 c8  99 20 22 57 69 6d 70 5f  |Ic).&\#.. "Wimp_|
00009080  47 65 74 50 6f 69 6e 74  65 72 49 6e 66 6f 22 2c  |GetPointerInfo",|
00009090  2c 42 6c 6f 63 6b 0d 26  66 1c 57 69 6e 3d 42 6c  |,Block.&f.Win=Bl|
000090a0  6f 63 6b 21 31 32 3a 49  63 3d 42 6c 6f 63 6b 21  |ock!12:Ic=Block!|
000090b0  31 36 0d 26 70 48 e7 20  57 69 6e 3d 2d 31 20 8c  |16.&pH. Win=-1 .|
000090c0  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  | .UpdateIcon(Spy|
000090d0  43 61 6c 63 2c 34 2c 22  22 29 20 8b 20 f2 55 70  |Calc,4,"") . .Up|
000090e0  64 61 74 65 49 63 6f 6e  28 53 70 79 43 61 6c 63  |dateIcon(SpyCalc|
000090f0  2c 34 2c c3 28 57 69 6e  29 29 0d 26 7a 46 e7 20  |,4,.(Win)).&zF. |
00009100  49 63 3d 2d 31 20 8c 20  f2 55 70 64 61 74 65 49  |Ic=-1 . .UpdateI|
00009110  63 6f 6e 28 53 70 79 43  61 6c 63 2c 35 2c 22 22  |con(SpyCalc,5,""|
00009120  29 20 8b 20 f2 55 70 64  61 74 65 49 63 6f 6e 28  |) . .UpdateIcon(|
00009130  53 70 79 43 61 6c 63 2c  35 2c c3 28 49 63 29 29  |SpyCalc,5,.(Ic))|
00009140  0d 26 84 23 e7 20 28 57  69 6e 3d 4f 6c 64 57 69  |.&.#. (Win=OldWi|
00009150  6e 29 20 80 20 28 49 63  3d 4f 6c 64 49 63 29 20  |n) . (Ic=OldIc) |
00009160  8c 20 e1 0d 26 8e 34 f4  20 5e 20 44 6f 6e 27 74  |. ..&.4. ^ Don't|
00009170  20 75 70 64 61 74 65 20  74 68 65 20 72 65 73 74  | update the rest|
00009180  20 62 65 63 61 75 73 65  20 69 74 27 73 20 74 68  | because it's th|
00009190  65 20 73 61 6d 65 2e 0d  26 98 17 4f 6c 64 57 69  |e same..&..OldWi|
000091a0  6e 3d 57 69 6e 3a 4f 6c  64 49 63 3d 49 63 0d 26  |n=Win:OldIc=Ic.&|
000091b0  a2 36 e7 20 28 28 57 69  6e 3e 30 29 20 84 20 28  |.6. ((Win>0) . (|
000091c0  28 57 69 6e 3d 2d 32 29  20 80 20 28 77 69 6d 70  |(Win=-2) . (wimp|
000091d0  3e 3d 33 30 30 29 29 29  20 80 20 28 49 63 3e 3d  |>=300))) . (Ic>=|
000091e0  30 29 20 8c 0d 26 ac 46  20 20 49 53 70 79 42 6c  |0) ..&.F  ISpyBl|
000091f0  6f 63 6b 21 30 3d 57 69  6e 3a 49 53 70 79 42 6c  |ock!0=Win:ISpyBl|
00009200  6f 63 6b 21 34 3d 49 63  3a c8 99 20 22 57 69 6d  |ock!4=Ic:.. "Wim|
00009210  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00009220  2c 49 53 70 79 42 6c 6f  63 6b 0d 26 b6 28 20 20  |,ISpyBlock.&.(  |
00009230  6d 69 6e 58 3d 49 53 70  79 42 6c 6f 63 6b 21 38  |minX=ISpyBlock!8|
00009240  3a 6d 69 6e 59 3d 49 53  70 79 42 6c 6f 63 6b 21  |:minY=ISpyBlock!|
00009250  31 32 0d 26 c0 29 20 20  6d 61 78 58 3d 49 53 70  |12.&.)  maxX=ISp|
00009260  79 42 6c 6f 63 6b 21 31  36 3a 6d 61 78 59 3d 49  |yBlock!16:maxY=I|
00009270  53 70 79 42 6c 6f 63 6b  21 32 30 0d 26 ca 45 20  |SpyBlock!20.&.E |
00009280  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  | .UpdateIcon(Spy|
00009290  43 61 6c 63 2c 31 30 2c  c3 28 6d 69 6e 58 29 29  |Calc,10,.(minX))|
000092a0  3a f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  |:.UpdateIcon(Spy|
000092b0  43 61 6c 63 2c 31 31 2c  c3 28 6d 69 6e 59 29 29  |Calc,11,.(minY))|
000092c0  0d 26 d4 45 20 20 f2 55  70 64 61 74 65 49 63 6f  |.&.E  .UpdateIco|
000092d0  6e 28 53 70 79 43 61 6c  63 2c 31 36 2c c3 28 6d  |n(SpyCalc,16,.(m|
000092e0  61 78 58 29 29 3a f2 55  70 64 61 74 65 49 63 6f  |axX)):.UpdateIco|
000092f0  6e 28 53 70 79 43 61 6c  63 2c 31 37 2c c3 28 6d  |n(SpyCalc,17,.(m|
00009300  61 78 59 29 29 0d 26 de  40 20 20 f2 55 70 64 61  |axY)).&.@  .Upda|
00009310  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
00009320  35 2c c3 28 28 49 53 70  79 42 6c 6f 63 6b 3f 32  |5,.((ISpyBlock?2|
00009330  35 29 3e 3e 34 29 29 3a  f4 20 42 75 74 74 6f 6e  |5)>>4)):. Button|
00009340  20 74 79 70 65 0d 26 e8  3a 20 20 f2 55 70 64 61  | type.&.:  .Upda|
00009350  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
00009360  37 2c c3 28 28 49 53 70  79 42 6c 6f 63 6b 3f 32  |7,.((ISpyBlock?2|
00009370  36 29 20 83 20 33 32 29  29 3a f4 20 45 53 47 0d  |6) . 32)):. ESG.|
00009380  26 f2 2a 20 20 e7 20 28  28 49 53 70 79 42 6c 6f  |&.*  . ((ISpyBlo|
00009390  63 6b 21 32 34 29 20 80  20 28 31 3c 3c 36 29 29  |ck!24) . (1<<6))|
000093a0  3d 28 31 3c 3c 36 29 20  8c 0d 26 fc 14 20 20 20  |=(1<<6) ..&..   |
000093b0  20 f4 20 46 6f 6e 74 73  20 75 73 65 64 0d 27 06  | . Fonts used.'.|
000093c0  2a 20 20 20 20 f2 55 70  64 61 74 65 49 63 6f 6e  |*    .UpdateIcon|
000093d0  28 53 70 79 43 61 6c 63  2c 33 39 2c 22 22 29 3a  |(SpyCalc,39,""):|
000093e0  f4 20 46 20 63 6f 6c 0d  27 10 21 20 20 20 20 f2  |. F col.'.!    .|
000093f0  43 6f 6c 6f 75 72 49 63  6f 6e 28 53 70 79 43 61  |ColourIcon(SpyCa|
00009400  6c 63 2c 33 39 2c 31 29  0d 27 1a 2a 20 20 20 20  |lc,39,1).'.*    |
00009410  f2 55 70 64 61 74 65 49  63 6f 6e 28 53 70 79 43  |.UpdateIcon(SpyC|
00009420  61 6c 63 2c 34 31 2c 22  22 29 3a f4 20 42 20 63  |alc,41,""):. B c|
00009430  6f 6c 0d 27 24 21 20 20  20 20 f2 43 6f 6c 6f 75  |ol.'$!    .Colou|
00009440  72 49 63 6f 6e 28 53 70  79 43 61 6c 63 2c 34 31  |rIcon(SpyCalc,41|
00009450  2c 31 29 0d 27 2e 36 20  20 20 20 f2 55 70 64 61  |,1).'.6    .Upda|
00009460  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 34  |teIcon(SpyCalc,4|
00009470  33 2c c3 28 49 53 70 79  42 6c 6f 63 6b 3f 32 37  |3,.(ISpyBlock?27|
00009480  29 29 3a f4 20 46 6f 6e  74 0d 27 38 07 20 20 cc  |)):. Font.'8.  .|
00009490  0d 27 42 22 20 20 20 20  f4 20 4e 6f 20 66 6f 6e  |.'B"    . No fon|
000094a0  74 73 3a 20 6e 6f 72 6d  61 6c 20 63 6f 6c 6f 75  |ts: normal colou|
000094b0  72 73 0d 27 4c 37 20 20  20 20 46 63 6f 6c 3d 28  |rs.'L7    Fcol=(|
000094c0  49 53 70 79 42 6c 6f 63  6b 3f 32 37 29 20 83 20  |ISpyBlock?27) . |
000094d0  31 36 3a 42 63 6f 6c 3d  28 49 53 70 79 42 6c 6f  |16:Bcol=(ISpyBlo|
000094e0  63 6b 3f 32 37 29 3e 3e  34 0d 27 56 2f 20 20 20  |ck?27)>>4.'V/   |
000094f0  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 70 79  | .UpdateIcon(Spy|
00009500  43 61 6c 63 2c 33 39 2c  c3 28 46 63 6f 6c 29 29  |Calc,39,.(Fcol))|
00009510  3a f4 20 46 20 63 6f 6c  0d 27 60 24 20 20 20 20  |:. F col.'`$    |
00009520  f2 43 6f 6c 6f 75 72 49  63 6f 6e 28 53 70 79 43  |.ColourIcon(SpyC|
00009530  61 6c 63 2c 33 39 2c 46  63 6f 6c 29 0d 27 6a 2f  |alc,39,Fcol).'j/|
00009540  20 20 20 20 f2 55 70 64  61 74 65 49 63 6f 6e 28  |    .UpdateIcon(|
00009550  53 70 79 43 61 6c 63 2c  34 31 2c c3 28 42 63 6f  |SpyCalc,41,.(Bco|
00009560  6c 29 29 3a f4 20 42 20  63 6f 6c 0d 27 74 24 20  |l)):. B col.'t$ |
00009570  20 20 20 f2 43 6f 6c 6f  75 72 49 63 6f 6e 28 53  |   .ColourIcon(S|
00009580  70 79 43 61 6c 63 2c 34  31 2c 42 63 6f 6c 29 0d  |pyCalc,41,Bcol).|
00009590  27 7e 29 20 20 20 20 f2  55 70 64 61 74 65 49 63  |'~)    .UpdateIc|
000095a0  6f 6e 28 53 70 79 43 61  6c 63 2c 34 33 2c 22 22  |on(SpyCalc,43,""|
000095b0  29 3a f4 20 46 6f 6e 74  0d 27 88 07 20 20 cd 0d  |):. Font.'..  ..|
000095c0  27 92 23 20 20 f2 55 70  64 61 74 65 53 77 69 74  |'.#  .UpdateSwit|
000095d0  63 68 65 73 28 49 53 70  79 42 6c 6f 63 6b 21 32  |ches(ISpyBlock!2|
000095e0  34 29 0d 27 9c 2e 20 20  f2 55 70 64 61 74 65 49  |4).'..  .UpdateI|
000095f0  63 6f 6e 28 53 70 79 43  61 6c 63 2c 33 33 2c 22  |con(SpyCalc,33,"|
00009600  26 22 2b c3 7e a4 49 63  6f 6e 46 6c 61 67 73 29  |&"+.~.IconFlags)|
00009610  0d 27 a6 05 cc 0d 27 b0  0a 20 20 f7 20 2b 31 0d  |.'....'..  . +1.|
00009620  27 ba 22 20 20 dc 20 31  30 2c 31 31 2c 31 36 2c  |'."  . 10,11,16,|
00009630  31 37 2c 33 35 2c 33 37  2c 33 39 2c 34 31 2c 34  |17,35,37,39,41,4|
00009640  33 0d 27 c4 0f 20 20 e3  20 4e 3d 31 20 b8 20 39  |3.'..  . N=1 . 9|
00009650  0d 27 ce 2b 20 20 20 20  f3 20 49 63 6f 6e 3a f2  |.'.+    . Icon:.|
00009660  55 70 64 61 74 65 49 63  6f 6e 28 53 70 79 43 61  |UpdateIcon(SpyCa|
00009670  6c 63 2c 49 63 6f 6e 2c  22 22 29 0d 27 d8 07 20  |lc,Icon,"").'.. |
00009680  20 ed 0d 27 e2 11 20 20  e3 20 4e 3d 32 30 20 b8  | ..'..  . N=20 .|
00009690  20 33 32 0d 27 ec 28 20  20 20 20 f2 55 70 64 61  | 32.'.(    .Upda|
000096a0  74 65 53 65 6c 65 63 74  65 64 46 6c 61 67 28 53  |teSelectedFlag(S|
000096b0  70 79 43 61 6c 63 2c 4e  2c a3 29 0d 27 f6 07 20  |pyCalc,N,.).'.. |
000096c0  20 ed 0d 28 00 1f 20 20  f2 43 6f 6c 6f 75 72 49  | ..(..  .ColourI|
000096d0  63 6f 6e 28 53 70 79 43  61 6c 63 2c 33 39 2c 31  |con(SpyCalc,39,1|
000096e0  29 0d 28 0a 1f 20 20 f2  43 6f 6c 6f 75 72 49 63  |).(..  .ColourIc|
000096f0  6f 6e 28 53 70 79 43 61  6c 63 2c 34 31 2c 31 29  |on(SpyCalc,41,1)|
00009700  0d 28 14 2e 20 20 f2 55  70 64 61 74 65 49 63 6f  |.(..  .UpdateIco|
00009710  6e 28 53 70 79 43 61 6c  63 2c 33 33 2c 22 26 22  |n(SpyCalc,33,"&"|
00009720  2b c3 7e a4 49 63 6f 6e  46 6c 61 67 73 29 0d 28  |+.~.IconFlags).(|
00009730  1e 05 cd 0d 28 28 05 e1  0d 28 32 05 3a 0d 28 3c  |....((...(2.:.(<|
00009740  20 dd 20 f2 55 70 64 61  74 65 53 77 69 74 63 68  | . .UpdateSwitch|
00009750  65 73 28 49 63 6f 6e 46  6c 61 67 73 29 0d 28 46  |es(IconFlags).(F|
00009760  0f e3 20 4e 3d 32 30 20  b8 20 33 31 0d 28 50 4a  |.. N=20 . 31.(PJ|
00009770  20 20 f2 55 70 64 61 74  65 53 65 6c 65 63 74 65  |  .UpdateSelecte|
00009780  64 46 6c 61 67 28 53 70  79 43 61 6c 63 2c 4e 2c  |dFlag(SpyCalc,N,|
00009790  28 49 63 6f 6e 46 6c 61  67 73 20 80 20 28 31 3c  |(IconFlags . (1<|
000097a0  3c 28 4e 2d 32 30 29 29  29 3d 28 31 3c 3c 28 4e  |<(N-20)))=(1<<(N|
000097b0  2d 32 30 29 29 29 0d 28  5a 05 ed 0d 28 64 41 f2  |-20))).(Z...(dA.|
000097c0  55 70 64 61 74 65 53 65  6c 65 63 74 65 64 46 6c  |UpdateSelectedFl|
000097d0  61 67 28 53 70 79 43 61  6c 63 2c 33 32 2c 28 49  |ag(SpyCalc,32,(I|
000097e0  63 6f 6e 46 6c 61 67 73  20 80 20 28 31 3c 3c 32  |conFlags . (1<<2|
000097f0  31 29 29 3d 28 31 3c 3c  32 31 29 29 0d 28 6e 05  |1))=(1<<21)).(n.|
00009800  e1 0d 28 78 05 3a 0d 28  82 1e dd 20 f2 55 70 64  |..(x.:.(... .Upd|
00009810  61 74 65 4f 74 68 65 72  73 28 49 63 6f 6e 46 6c  |ateOthers(IconFl|
00009820  61 67 73 29 0d 28 8c 42  f2 55 70 64 61 74 65 49  |ags).(.B.UpdateI|
00009830  63 6f 6e 28 53 70 79 43  61 6c 63 2c 33 35 2c c3  |con(SpyCalc,35,.|
00009840  28 28 49 63 6f 6e 46 6c  61 67 73 3e 3e 3e 31 32  |((IconFlags>>>12|
00009850  29 20 83 20 31 36 29 29  3a f4 20 42 75 74 74 6f  |) . 16)):. Butto|
00009860  6e 20 74 79 70 65 0d 28  96 3a f2 55 70 64 61 74  |n type.(.:.Updat|
00009870  65 49 63 6f 6e 28 53 70  79 43 61 6c 63 2c 33 37  |eIcon(SpyCalc,37|
00009880  2c c3 28 28 49 63 6f 6e  46 6c 61 67 73 3e 3e 3e  |,.((IconFlags>>>|
00009890  31 36 29 20 83 20 33 32  29 29 3a f4 20 45 53 47  |16) . 32)):. ESG|
000098a0  0d 28 a0 23 e7 20 28 49  63 6f 6e 46 6c 61 67 73  |.(.#. (IconFlags|
000098b0  20 80 20 28 31 3c 3c 36  29 29 3d 28 31 3c 3c 36  | . (1<<6))=(1<<6|
000098c0  29 20 8c 0d 28 aa 12 20  20 f4 20 46 6f 6e 74 73  |) ..(..  . Fonts|
000098d0  20 75 73 65 64 0d 28 b4  28 20 20 f2 55 70 64 61  | used.(.(  .Upda|
000098e0  74 65 49 63 6f 6e 28 53  70 79 43 61 6c 63 2c 33  |teIcon(SpyCalc,3|
000098f0  39 2c 22 22 29 3a f4 20  46 20 63 6f 6c 0d 28 be  |9,""):. F col.(.|
00009900  1f 20 20 f2 43 6f 6c 6f  75 72 49 63 6f 6e 28 53  |.  .ColourIcon(S|
00009910  70 79 43 61 6c 63 2c 33  39 2c 31 29 0d 28 c8 28  |pyCalc,39,1).(.(|
00009920  20 20 f2 55 70 64 61 74  65 49 63 6f 6e 28 53 70  |  .UpdateIcon(Sp|
00009930  79 43 61 6c 63 2c 34 31  2c 22 22 29 3a f4 20 42  |yCalc,41,""):. B|
00009940  20 63 6f 6c 0d 28 d2 1f  20 20 f2 43 6f 6c 6f 75  | col.(..  .Colou|
00009950  72 49 63 6f 6e 28 53 70  79 43 61 6c 63 2c 34 31  |rIcon(SpyCalc,41|
00009960  2c 31 29 0d 28 dc 3e 20  20 f2 55 70 64 61 74 65  |,1).(.>  .Update|
00009970  49 63 6f 6e 28 53 70 79  43 61 6c 63 2c 34 33 2c  |Icon(SpyCalc,43,|
00009980  c3 28 28 49 63 6f 6e 46  6c 61 67 73 3e 3e 3e 32  |.((IconFlags>>>2|
00009990  34 29 20 83 20 32 35 36  29 29 3a f4 20 46 6f 6e  |4) . 256)):. Fon|
000099a0  74 0d 28 e6 05 cc 0d 28  f0 20 20 20 f4 20 4e 6f  |t.(....(.   . No|
000099b0  20 66 6f 6e 74 73 3a 20  6e 6f 72 6d 61 6c 20 63  | fonts: normal c|
000099c0  6f 6c 6f 75 72 73 0d 28  fa 3b 20 20 46 63 6f 6c  |olours.(.;  Fcol|
000099d0  3d 28 49 63 6f 6e 46 6c  61 67 73 3e 3e 3e 32 34  |=(IconFlags>>>24|
000099e0  29 20 83 20 31 36 3a 42  63 6f 6c 3d 28 49 63 6f  |) . 16:Bcol=(Ico|
000099f0  6e 46 6c 61 67 73 3e 3e  3e 32 38 29 20 83 20 31  |nFlags>>>28) . 1|
00009a00  36 0d 29 04 2d 20 20 f2  55 70 64 61 74 65 49 63  |6.).-  .UpdateIc|
00009a10  6f 6e 28 53 70 79 43 61  6c 63 2c 33 39 2c c3 28  |on(SpyCalc,39,.(|
00009a20  46 63 6f 6c 29 29 3a f4  20 46 20 63 6f 6c 0d 29  |Fcol)):. F col.)|
00009a30  0e 22 20 20 f2 43 6f 6c  6f 75 72 49 63 6f 6e 28  |."  .ColourIcon(|
00009a40  53 70 79 43 61 6c 63 2c  33 39 2c 46 63 6f 6c 29  |SpyCalc,39,Fcol)|
00009a50  0d 29 18 2d 20 20 f2 55  70 64 61 74 65 49 63 6f  |.).-  .UpdateIco|
00009a60  6e 28 53 70 79 43 61 6c  63 2c 34 31 2c c3 28 42  |n(SpyCalc,41,.(B|
00009a70  63 6f 6c 29 29 3a f4 20  42 20 63 6f 6c 0d 29 22  |col)):. B col.)"|
00009a80  22 20 20 f2 43 6f 6c 6f  75 72 49 63 6f 6e 28 53  |"  .ColourIcon(S|
00009a90  70 79 43 61 6c 63 2c 34  31 2c 42 63 6f 6c 29 0d  |pyCalc,41,Bcol).|
00009aa0  29 2c 27 20 20 f2 55 70  64 61 74 65 49 63 6f 6e  |),'  .UpdateIcon|
00009ab0  28 53 70 79 43 61 6c 63  2c 34 33 2c 22 22 29 3a  |(SpyCalc,43,""):|
00009ac0  f4 20 46 6f 6e 74 0d 29  36 05 cd 0d 29 40 05 e1  |. Font.)6...)@..|
00009ad0  0d 29 4a 05 3a 0d 29 54  10 dd 20 a4 49 63 6f 6e  |.)J.:.)T.. .Icon|
00009ae0  46 6c 61 67 73 0d 29 5e  0f 49 63 6f 6e 46 6c 61  |Flags.)^.IconFla|
00009af0  67 73 3d 30 0d 29 68 0f  e3 20 4e 3d 32 30 20 b8  |gs=0.)h.. N=20 .|
00009b00  20 33 31 0d 29 72 3a 20  20 e7 20 a4 53 65 6c 65  | 31.)r:  . .Sele|
00009b10  63 74 65 64 53 74 61 74  65 28 53 70 79 43 61 6c  |ctedState(SpyCal|
00009b20  63 2c 4e 29 20 8c 20 49  63 6f 6e 46 6c 61 67 73  |c,N) . IconFlags|
00009b30  2b 3d 28 31 3c 3c 28 4e  2d 32 30 29 29 0d 29 7c  |+=(1<<(N-20)).)||
00009b40  05 ed 0d 29 86 35 e7 20  a4 53 65 6c 65 63 74 65  |...).5. .Selecte|
00009b50  64 53 74 61 74 65 28 53  70 79 43 61 6c 63 2c 33  |dState(SpyCalc,3|
00009b60  32 29 20 8c 20 49 63 6f  6e 46 6c 61 67 73 2b 3d  |2) . IconFlags+=|
00009b70  28 31 3c 3c 32 31 29 0d  29 90 38 49 63 6f 6e 46  |(1<<21).).8IconF|
00009b80  6c 61 67 73 2b 3d 28 a4  52 65 61 64 49 63 6f 6e  |lags+=(.ReadIcon|
00009b90  28 53 70 79 43 61 6c 63  2c 33 35 29 3c 3c 31 32  |(SpyCalc,35)<<12|
00009ba0  29 3a f4 20 42 75 74 74  6f 6e 20 74 79 70 65 0d  |):. Button type.|
00009bb0  29 9a 30 49 63 6f 6e 46  6c 61 67 73 2b 3d 28 a4  |).0IconFlags+=(.|
00009bc0  52 65 61 64 49 63 6f 6e  28 53 70 79 43 61 6c 63  |ReadIcon(SpyCalc|
00009bd0  2c 33 37 29 3c 3c 31 36  29 3a f4 20 45 53 47 0d  |,37)<<16):. ESG.|
00009be0  29 a4 24 e7 20 a4 52 65  61 64 49 63 6f 6e 53 74  |).$. .ReadIconSt|
00009bf0  72 28 53 70 79 43 61 6c  63 2c 34 33 29 3c 3e 22  |r(SpyCalc,43)<>"|
00009c00  22 20 8c 0d 29 ae 2c 20  20 49 63 6f 6e 46 6c 61  |" ..).,  IconFla|
00009c10  67 73 2b 3d 28 a4 52 65  61 64 49 63 6f 6e 28 53  |gs+=(.ReadIcon(S|
00009c20  70 79 43 61 6c 63 2c 34  33 29 3c 3c 32 34 29 0d  |pyCalc,43)<<24).|
00009c30  29 b8 05 cc 0d 29 c2 2c  20 20 49 63 6f 6e 46 6c  |)....).,  IconFl|
00009c40  61 67 73 2b 3d 28 a4 52  65 61 64 49 63 6f 6e 28  |ags+=(.ReadIcon(|
00009c50  53 70 79 43 61 6c 63 2c  33 39 29 3c 3c 32 34 29  |SpyCalc,39)<<24)|
00009c60  0d 29 cc 2c 20 20 49 63  6f 6e 46 6c 61 67 73 2b  |.).,  IconFlags+|
00009c70  3d 28 a4 52 65 61 64 49  63 6f 6e 28 53 70 79 43  |=(.ReadIcon(SpyC|
00009c80  61 6c 63 2c 34 31 29 3c  3c 32 38 29 0d 29 d6 05  |alc,41)<<28).)..|
00009c90  cd 0d 29 e0 0e 3d 49 63  6f 6e 46 6c 61 67 73 0d  |..)..=IconFlags.|
00009ca0  29 ea 05 3a 0d 29 f4 1f  dd 20 f2 43 6f 6c 6f 75  |)..:.)... .Colou|
00009cb0  72 49 63 6f 6e 28 57 6e  64 77 2c 49 63 6e 2c 43  |rIcon(Wndw,Icn,C|
00009cc0  6f 6c 29 0d 29 fe 23 f4  20 43 68 61 6e 67 65 20  |ol).).#. Change |
00009cd0  62 61 63 6b 67 72 6f 75  6e 64 20 6f 66 20 61 6e  |background of an|
00009ce0  20 69 63 6f 6e 2e 0d 2a  08 3a 42 6c 6f 63 6b 21  | icon..*.:Block!|
00009cf0  30 3d 57 6e 64 77 3a 42  6c 6f 63 6b 21 34 3d 49  |0=Wndw:Block!4=I|
00009d00  63 6e 3a c8 99 20 22 57  69 6d 70 5f 47 65 74 49  |cn:.. "Wimp_GetI|
00009d10  63 6f 6e 53 74 61 74 65  22 2c 2c 42 6c 6f 63 6b  |conState",,Block|
00009d20  0d 2a 12 3d e7 20 28 28  42 6c 6f 63 6b 3f 32 37  |.*.=. ((Block?27|
00009d30  29 3e 3e 34 29 3d 43 6f  6c 20 8c 20 e1 3a f4 20  |)>>4)=Col . .:. |
00009d40  53 61 6d 65 20 63 6f 6c  6f 75 72 2c 20 73 6f 20  |Same colour, so |
00009d50  64 6f 6e 27 74 20 63 68  61 6e 67 65 2e 0d 2a 1c  |don't change..*.|
00009d60  2e 42 6c 6f 63 6b 21 31  32 3d 28 25 31 31 31 31  |.Block!12=(%1111|
00009d70  31 31 31 31 3c 3c 32 34  29 3a 42 6c 6f 63 6b 21  |1111<<24):Block!|
00009d80  38 3d 28 43 6f 6c 3c 3c  32 38 29 0d 2a 26 3f f4  |8=(Col<<28).*&?.|
00009d90  20 43 68 61 6e 67 65 20  66 6f 72 65 67 72 6f 75  | Change foregrou|
00009da0  6e 64 20 74 6f 20 62 6c  61 63 6b 2f 77 68 69 74  |nd to black/whit|
00009db0  65 20 61 63 63 6f 72 64  69 6e 67 20 74 6f 20 62  |e according to b|
00009dc0  61 63 6b 67 72 6f 75 6e  64 3a 0d 2a 30 0c c8 8e  |ackground:.*0...|
00009dd0  20 43 6f 6c 20 ca 0d 2a  3a 26 20 20 c9 20 34 2c  | Col ..*:&  . 4,|
00009de0  35 2c 36 2c 37 2c 31 31  2c 31 33 3a 42 6c 6f 63  |5,6,7,11,13:Bloc|
00009df0  6b 21 38 2b 3d 28 30 3c  3c 32 34 29 0d 2a 44 1c  |k!8+=(0<<24).*D.|
00009e00  20 20 c9 20 38 3a 42 6c  6f 63 6b 3f 31 31 3d 25  |  . 8:Block?11=%|
00009e10  31 30 30 30 30 30 30 31  0d 2a 4e 18 20 20 7f 20  |10000001.*N.  . |
00009e20  42 6c 6f 63 6b 21 38 2b  3d 28 37 3c 3c 32 34 29  |Block!8+=(7<<24)|
00009e30  0d 2a 58 05 cb 0d 2a 62  21 c8 99 20 22 57 69 6d  |.*X...*b!.. "Wim|
00009e40  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00009e50  2c 42 6c 6f 63 6b 0d 2a  6c 05 e1 0d 2a 76 05 3a  |,Block.*l...*v.:|
00009e60  0d 2a 80 13 dd 20 a4 53  61 76 65 53 65 74 74 69  |.*... .SaveSetti|
00009e70  6e 67 73 0d 2a 8a 07 ea  20 85 0d 2a 94 3c ee 20  |ngs.*... ..*.<. |
00009e80  85 20 ea 20 f7 20 85 3a  f2 43 6c 6f 73 65 46 69  |. . . .:.CloseFi|
00009e90  6c 65 49 66 50 6f 73 73  28 44 61 74 61 29 3a 3d  |leIfPoss(Data):=|
00009ea0  a3 3a f4 20 45 72 72 6f  72 20 77 72 69 74 69 6e  |.:. Error writin|
00009eb0  67 20 66 69 6c 65 0d 2a  9e 07 20 20 3a 0d 2a a8  |g file.*..  :.*.|
00009ec0  29 20 20 44 61 74 61 3d  ae 20 28 22 3c 49 63 6f  |)  Data=. ("<Ico|
00009ed0  6e 46 6c 61 67 73 24 44  69 72 3e 2e 53 65 74 74  |nFlags$Dir>.Sett|
00009ee0  69 6e 67 73 22 29 0d 2a  b2 3f 20 20 d5 23 44 61  |ings").*.?  .#Da|
00009ef0  74 61 2c 22 7c 20 58 20  61 6e 64 20 59 20 67 72  |ta,"| X and Y gr|
00009f00  69 64 20 63 6f 6f 72 64  69 6e 61 74 65 73 20 6f  |id coordinates o|
00009f10  66 20 49 63 6f 6e 20 46  6c 61 67 73 20 77 69 6e  |f Icon Flags win|
00009f20  64 6f 77 3a 22 0d 2a bc  19 20 20 d5 23 44 61 74  |dow:".*..  .#Dat|
00009f30  61 2c c3 28 58 50 6f 73  69 74 69 6f 6e 29 0d 2a  |a,.(XPosition).*|
00009f40  c6 19 20 20 d5 23 44 61  74 61 2c c3 28 59 50 6f  |..  .#Data,.(YPo|
00009f50  73 69 74 69 6f 6e 29 0d  2a d0 3e 20 20 d5 23 44  |sition).*.>  .#D|
00009f60  61 74 61 2c 22 7c 20 53  70 79 69 6e 67 20 61 74  |ata,"| Spying at|
00009f70  20 73 74 61 72 74 75 70  20 28 2d 31 20 66 6f 72  | startup (-1 for|
00009f80  20 54 52 55 45 3b 20 30  20 66 6f 72 20 46 41 4c  | TRUE; 0 for FAL|
00009f90  53 45 29 3a 22 0d 2a da  16 20 20 d5 23 44 61 74  |SE):".*..  .#Dat|
00009fa0  61 2c c3 28 53 70 79 69  6e 67 29 0d 2a e4 0c 20  |a,.(Spying).*.. |
00009fb0  20 d9 23 44 61 74 61 0d  2a ee 30 20 20 ff 28 22  | .#Data.*.0  .("|
00009fc0  53 65 74 74 79 70 65 20  3c 49 63 6f 6e 46 6c 61  |Settype <IconFla|
00009fd0  67 73 24 44 69 72 3e 2e  53 65 74 74 69 6e 67 73  |gs$Dir>.Settings|
00009fe0  20 54 65 78 74 22 29 0d  2a f8 07 20 20 3a 0d 2b  | Text").*..  :.+|
00009ff0  02 06 3d b9 0d 2b 0c 05  3a 0d 2b 16 13 dd 20 a4  |..=..+..:.+... .|
0000a000  4c 6f 61 64 53 65 74 74  69 6e 67 73 0d 2b 20 07  |LoadSettings.+ .|
0000a010  ea 20 85 0d 2b 2a 4f ee  20 85 20 ea 20 f7 20 85  |. ..+*O. . . . .|
0000a020  3a f2 43 6c 6f 73 65 46  69 6c 65 49 66 50 6f 73  |:.CloseFileIfPos|
0000a030  73 28 44 61 74 61 29 3a  3d a3 3a f4 20 27 53 65  |s(Data):=.:. 'Se|
0000a040  74 74 69 6e 67 73 27 20  66 69 6c 65 20 69 73 20  |ttings' file is |
0000a050  64 61 6d 61 67 65 64 20  6f 72 20 6d 69 73 73 69  |damaged or missi|
0000a060  6e 67 0d 2b 34 07 20 20  3a 0d 2b 3e 27 20 20 44  |ng.+4.  :.+>'  D|
0000a070  61 74 61 3d 8e 20 22 3c  49 63 6f 6e 46 6c 61 67  |ata=. "<IconFlag|
0000a080  73 24 44 69 72 3e 2e 53  65 74 74 69 6e 67 73 22  |s$Dir>.Settings"|
0000a090  0d 2b 48 1d 20 20 58 50  6f 73 69 74 69 6f 6e 3d  |.+H.  XPosition=|
0000a0a0  bb 28 a4 4e 65 78 74 45  6e 74 72 79 29 0d 2b 52  |.(.NextEntry).+R|
0000a0b0  1d 20 20 59 50 6f 73 69  74 69 6f 6e 3d bb 28 a4  |.  YPosition=.(.|
0000a0c0  4e 65 78 74 45 6e 74 72  79 29 0d 2b 5c 1a 20 20  |NextEntry).+\.  |
0000a0d0  53 70 79 69 6e 67 3d bb  28 a4 4e 65 78 74 45 6e  |Spying=.(.NextEn|
0000a0e0  74 72 79 29 0d 2b 66 0c  20 20 d9 23 44 61 74 61  |try).+f.  .#Data|
0000a0f0  0d 2b 70 07 20 20 3a 0d  2b 7a 62 20 20 e7 20 58  |.+p.  :.+zb  . X|
0000a100  50 6f 73 69 74 69 6f 6e  3c 3e 2d 31 20 80 20 59  |Position<>-1 . Y|
0000a110  50 6f 73 69 74 69 6f 6e  3c 3e 2d 31 20 8c 20 f2  |Position<>-1 . .|
0000a120  55 70 64 61 74 65 53 65  6c 65 63 74 65 64 46 6c  |UpdateSelectedFl|
0000a130  61 67 28 4c 6f 63 2c 36  2b 28 28 35 2a 58 50 6f  |ag(Loc,6+((5*XPo|
0000a140  73 69 74 69 6f 6e 29 2b  28 34 2d 59 50 6f 73 69  |sition)+(4-YPosi|
0000a150  74 69 6f 6e 29 29 2c b9  29 0d 2b 84 22 20 20 f2  |tion)),.).+."  .|
0000a160  54 69 63 6b 4d 65 6e 75  28 4d 61 69 6e 4d 65 6e  |TickMenu(MainMen|
0000a170  75 2c 31 2c 53 70 79 69  6e 67 29 0d 2b 8e 07 20  |u,1,Spying).+.. |
0000a180  20 3a 0d 2b 98 06 3d b9  0d 2b a2 05 3a 0d 2b ac  | :.+..=..+..:.+.|
0000a190  16 dd 20 f2 44 65 66 61  75 6c 74 53 65 74 74 69  |.. .DefaultSetti|
0000a1a0  6e 67 73 0d 2b b6 1b 58  50 6f 73 69 74 69 6f 6e  |ngs.+..XPosition|
0000a1b0  3d 34 3a 59 50 6f 73 69  74 69 6f 6e 3d 32 0d 2b  |=4:YPosition=2.+|
0000a1c0  c0 3e f2 55 70 64 61 74  65 53 65 6c 65 63 74 65  |.>.UpdateSelecte|
0000a1d0  64 46 6c 61 67 28 4c 6f  63 2c 36 2b 28 28 35 2a  |dFlag(Loc,6+((5*|
0000a1e0  58 50 6f 73 69 74 69 6f  6e 29 2b 28 34 2d 59 50  |XPosition)+(4-YP|
0000a1f0  6f 73 69 74 69 6f 6e 29  29 2c b9 29 0d 2b ca 0c  |osition)),.).+..|
0000a200  53 70 79 69 6e 67 3d b9  0d 2b d4 20 f2 54 69 63  |Spying=..+. .Tic|
0000a210  6b 4d 65 6e 75 28 4d 61  69 6e 4d 65 6e 75 2c 31  |kMenu(MainMenu,1|
0000a220  2c 53 70 79 69 6e 67 29  0d 2b de 05 e1 0d 2b e8  |,Spying).+....+.|
0000a230  05 3a 0d 2b f2 12 dd 20  f2 52 41 4d 54 72 61 6e  |.:.+... .RAMTran|
0000a240  73 6d 69 74 0d 2b fc 41  4f 74 68 65 72 54 61 73  |smit.+.AOtherTas|
0000a250  6b 48 61 6e 64 6c 65 3d  42 6c 6f 63 6b 21 34 3a  |kHandle=Block!4:|
0000a260  4d 79 52 65 66 3d 42 6c  6f 63 6b 21 38 3a 54 72  |MyRef=Block!8:Tr|
0000a270  61 6e 73 6d 69 74 42 75  66 66 65 72 3d 42 6c 6f  |ansmitBuffer=Blo|
0000a280  63 6b 21 32 30 0d 2c 06  4f c8 99 20 22 57 69 6d  |ck!20.,.O.. "Wim|
0000a290  70 5f 54 72 61 6e 73 66  65 72 42 6c 6f 63 6b 22  |p_TransferBlock"|
0000a2a0  2c 54 61 73 6b 2c 54 72  61 6e 73 6d 69 73 73 69  |,Task,Transmissi|
0000a2b0  6f 6e 2c 4f 74 68 65 72  54 61 73 6b 48 61 6e 64  |on,OtherTaskHand|
0000a2c0  6c 65 2c 54 72 61 6e 73  6d 69 74 42 75 66 66 65  |le,TransmitBuffe|
0000a2d0  72 2c 31 30 0d 2c 10 28  42 6c 6f 63 6b 21 30 3d  |r,10.,.(Block!0=|
0000a2e0  32 38 3a 42 6c 6f 63 6b  21 31 36 3d 37 3a f4 20  |28:Block!16=7:. |
0000a2f0  52 41 4d 20 54 72 61 6e  73 6d 69 74 0d 2c 1a 2a  |RAM Transmit.,.*|
0000a300  42 6c 6f 63 6b 21 31 32  3d 4d 79 52 65 66 3a 42  |Block!12=MyRef:B|
0000a310  6c 6f 63 6b 21 32 30 3d  54 72 61 6e 73 6d 69 74  |lock!20=Transmit|
0000a320  42 75 66 66 65 72 0d 2c  24 1d 42 6c 6f 63 6b 21  |Buffer.,$.Block!|
0000a330  32 34 3d a9 28 24 54 72  61 6e 73 6d 69 73 73 69  |24=.($Transmissi|
0000a340  6f 6e 29 0d 2c 2e 32 c8  99 20 22 57 69 6d 70 5f  |on).,.2.. "Wimp_|
0000a350  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
0000a360  42 6c 6f 63 6b 2c 4f 74  68 65 72 54 61 73 6b 48  |Block,OtherTaskH|
0000a370  61 6e 64 6c 65 0d 2c 38  10 44 72 61 67 67 69 6e  |andle.,8.Draggin|
0000a380  67 24 3d 22 22 0d 2c 42  05 e1 0d 2c 4c 05 3a 0d  |g$="".,B...,L.:.|
0000a390  2c 56 18 dd 20 f2 57 69  6d 70 53 63 72 61 70 54  |,V.. .WimpScrapT|
0000a3a0  72 61 6e 73 6d 69 74 0d  2c 60 29 4f 74 68 65 72  |ransmit.,`)Other|
0000a3b0  54 61 73 6b 48 61 6e 64  6c 65 3d 42 6c 6f 63 6b  |TaskHandle=Block|
0000a3c0  21 34 3a 4d 79 52 65 66  3d 42 6c 6f 63 6b 21 38  |!4:MyRef=Block!8|
0000a3d0  0d 2c 6a 32 53 61 76 65  46 69 6c 65 6e 61 6d 65  |.,j2SaveFilename|
0000a3e0  24 3d c0 24 28 42 6c 6f  63 6b 2b 34 34 29 2c a7  |$=.$(Block+44),.|
0000a3f0  24 28 42 6c 6f 63 6b 2b  34 34 29 2c bd 30 29 2d  |$(Block+44),.0)-|
0000a400  31 29 0d 2c 74 07 ea 20  85 0d 2c 7e 41 ee 20 85  |1).,t.. ..,~A. .|
0000a410  20 ea 20 f7 20 85 3a 85  20 39 39 39 39 2c 22 41  | . . .:. 9999,"A|
0000a420  6e 20 65 72 72 6f 72 20  68 61 73 20 6f 63 63 75  |n error has occu|
0000a430  72 72 65 64 20 64 75 72  69 6e 67 20 74 72 61 6e  |rred during tran|
0000a440  73 6d 69 73 73 69 6f 6e  2e 22 0d 2c 88 18 44 61  |smission.".,..Da|
0000a450  74 61 3d ae 20 53 61 76  65 46 69 6c 65 6e 61 6d  |ta=. SaveFilenam|
0000a460  65 24 0d 2c 92 1a d5 23  44 61 74 61 2c 24 28 54  |e$.,...#Data,$(T|
0000a470  72 61 6e 73 6d 69 73 73  69 6f 6e 29 0d 2c 9c 0a  |ransmission).,..|
0000a480  d9 23 44 61 74 61 0d 2c  a6 27 ff 28 22 53 65 74  |.#Data.,.'.("Set|
0000a490  54 79 70 65 20 22 2b 53  61 76 65 46 69 6c 65 6e  |Type "+SaveFilen|
0000a4a0  61 6d 65 24 2b 22 20 54  65 78 74 22 29 0d 2c b0  |ame$+" Text").,.|
0000a4b0  54 42 6c 6f 63 6b 21 30  3d 28 34 34 2b a9 28 53  |TBlock!0=(44+.(S|
0000a4c0  61 76 65 46 69 6c 65 6e  61 6d 65 24 29 29 3a 42  |aveFilename$)):B|
0000a4d0  6c 6f 63 6b 21 30 3d 28  42 6c 6f 63 6b 21 30 29  |lock!0=(Block!0)|
0000a4e0  2b 28 34 2d 28 28 42 6c  6f 63 6b 21 30 29 20 83  |+(4-((Block!0) .|
0000a4f0  20 34 29 29 3a f4 20 57  6f 72 64 20 61 6c 69 67  | 4)):. Word alig|
0000a500  6e 0d 2c ba 28 42 6c 6f  63 6b 21 31 32 3d 4d 79  |n.,.(Block!12=My|
0000a510  52 65 66 3a 42 6c 6f 63  6b 21 31 36 3d 33 3a f4  |Ref:Block!16=3:.|
0000a520  20 44 61 74 61 4c 6f 61  64 0d 2c c4 33 42 6c 6f  | DataLoad.,.3Blo|
0000a530  63 6b 21 32 30 3d 44 72  61 67 67 65 64 54 6f 57  |ck!20=DraggedToW|
0000a540  69 6e 64 6f 77 3a 42 6c  6f 63 6b 21 32 34 3d 44  |indow:Block!24=D|
0000a550  72 61 67 67 65 64 54 6f  49 63 6f 6e 0d 2c ce 2b  |raggedToIcon.,.+|
0000a560  42 6c 6f 63 6b 21 32 38  3d 44 72 61 67 67 65 64  |Block!28=Dragged|
0000a570  54 6f 58 3a 42 6c 6f 63  6b 21 33 32 3d 44 72 61  |ToX:Block!32=Dra|
0000a580  67 67 65 64 54 6f 59 0d  2c d8 2a 42 6c 6f 63 6b  |ggedToY.,.*Block|
0000a590  21 33 36 3d 31 30 3a f4  20 4e 65 76 65 72 20 6d  |!36=10:. Never m|
0000a5a0  6f 72 65 20 74 68 61 6e  20 31 30 20 62 79 74 65  |ore than 10 byte|
0000a5b0  73 0d 2c e2 24 42 6c 6f  63 6b 21 34 30 3d 26 46  |s.,.$Block!40=&F|
0000a5c0  46 46 3a f4 20 46 69 6c  65 74 79 70 65 20 6f 66  |FF:. Filetype of|
0000a5d0  20 54 65 78 74 0d 2c ec  2d 24 28 42 6c 6f 63 6b  | Text.,.-$(Block|
0000a5e0  2b 34 34 29 3d 53 61 76  65 46 69 6c 65 6e 61 6d  |+44)=SaveFilenam|
0000a5f0  65 24 2b bd 30 3a 44 72  61 67 67 69 6e 67 24 3d  |e$+.0:Dragging$=|
0000a600  22 22 0d 2c f6 32 c8 99  20 22 57 69 6d 70 5f 53  |"".,.2.. "Wimp_S|
0000a610  65 6e 64 4d 65 73 73 61  67 65 22 2c 31 38 2c 42  |endMessage",18,B|
0000a620  6c 6f 63 6b 2c 4f 74 68  65 72 54 61 73 6b 48 61  |lock,OtherTaskHa|
0000a630  6e 64 6c 65 0d 2d 00 05  e1 0d 2d 0a 05 3a 0d 2d  |ndle.-....-..:.-|
0000a640  14 19 dd 20 a4 4d 61 6b  65 44 72 61 67 67 69 6e  |... .MakeDraggin|
0000a650  67 53 70 72 69 74 65 0d  2d 1e 07 ea 20 85 0d 2d  |gSprite.-... ..-|
0000a660  28 31 ee 20 85 20 ea 20  c8 99 20 22 4f 53 5f 53  |(1. . . .. "OS_S|
0000a670  70 72 69 74 65 4f 70 22  2c 72 30 2c 72 31 2c 72  |priteOp",r0,r1,r|
0000a680  32 2c 72 33 3a f7 20 85  3a 85 20 9f 2c f6 24 0d  |2,r3:. .:. .,.$.|
0000a690  2d 32 26 53 63 61 6c 69  6e 67 3d a4 4d 6f 64 65  |-2&Scaling=.Mode|
0000a6a0  49 6e 66 6f 28 22 59 45  69 67 46 61 63 74 6f 72  |Info("YEigFactor|
0000a6b0  22 2c 2d 31 29 0d 2d 3c  12 e7 20 53 63 61 6c 69  |",-1).-<.. Scali|
0000a6c0  6e 67 3c 3d 31 20 8c 0d  2d 46 18 20 20 4e 61 6d  |ng<=1 ..-F.  Nam|
0000a6d0  65 24 3d 22 66 6c 61 67  73 5f 68 69 67 68 22 0d  |e$="flags_high".|
0000a6e0  2d 50 39 20 20 c8 99 20  22 4f 53 5f 53 70 72 69  |-P9  .. "OS_Spri|
0000a6f0  74 65 4f 70 22 2c 32 35  36 2b 36 30 2c 53 70 72  |teOp",256+60,Spr|
0000a700  69 74 65 73 2c 4e 61 6d  65 24 20 b8 20 72 30 2c  |ites,Name$ . r0,|
0000a710  72 31 2c 72 32 2c 72 33  0d 2d 5a 36 20 20 c8 99  |r1,r2,r3.-Z6  ..|
0000a720  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 32  | "OS_SpriteOp",2|
0000a730  35 36 2b 33 34 2c 53 70  72 69 74 65 73 2c 22 64  |56+34,Sprites,"d|
0000a740  72 61 67 68 69 67 68 22  2c 30 2c 30 2c 38 0d 2d  |raghigh",0,0,8.-|
0000a750  64 05 cc 0d 2d 6e 17 20  20 4e 61 6d 65 24 3d 22  |d...-n.  Name$="|
0000a760  66 6c 61 67 73 5f 6c 6f  77 22 0d 2d 78 39 20 20  |flags_low".-x9  |
0000a770  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
0000a780  2c 32 35 36 2b 36 30 2c  53 70 72 69 74 65 73 2c  |,256+60,Sprites,|
0000a790  4e 61 6d 65 24 20 b8 20  72 30 2c 72 31 2c 72 32  |Name$ . r0,r1,r2|
0000a7a0  2c 72 33 0d 2d 82 35 20  20 c8 99 20 22 4f 53 5f  |,r3.-.5  .. "OS_|
0000a7b0  53 70 72 69 74 65 4f 70  22 2c 32 35 36 2b 33 34  |SpriteOp",256+34|
0000a7c0  2c 53 70 72 69 74 65 73  2c 22 64 72 61 67 6c 6f  |,Sprites,"draglo|
0000a7d0  77 22 2c 30 2c 30 2c 38  0d 2d 8c 05 cd 0d 2d 96  |w",0,0,8.-....-.|
0000a7e0  19 c8 99 20 22 57 69 6d  70 5f 53 65 74 43 6f 6c  |... "Wimp_SetCol|
0000a7f0  6f 75 72 22 2c 37 0d 2d  a0 29 ef 35 3a ec 20 28  |our",7.-.).5:. (|
0000a800  31 36 30 2d 28 31 36 2a  a9 28 24 54 72 61 6e 73  |160-(16*.($Trans|
0000a810  6d 69 73 73 69 6f 6e 29  29 29 2f 32 2c 33 36 0d  |mission)))/2,36.|
0000a820  2d aa 2b ef 20 32 33 2c  31 37 2c 37 2c 36 2c 38  |-.+. 23,17,7,6,8|
0000a830  3b 38 3b 30 3b 3a f4 20  53 69 6e 67 6c 65 2d 68  |;8;0;:. Single-h|
0000a840  65 69 67 68 74 20 74 65  78 74 0d 2d b4 3b e7 20  |eight text.-.;. |
0000a850  53 63 61 6c 69 6e 67 3c  3d 31 20 8c 20 ef 20 32  |Scaling<=1 . . 2|
0000a860  33 2c 31 37 2c 37 2c 36  2c 38 3b 31 36 3b 30 3b  |3,17,7,6,8;16;0;|
0000a870  3a f4 20 44 6f 75 62 6c  65 2d 68 65 69 67 68 74  |:. Double-height|
0000a880  20 74 65 78 74 0d 2d be  13 f1 20 24 54 72 61 6e  | text.-... $Tran|
0000a890  73 6d 69 73 73 69 6f 6e  0d 2d c8 20 c8 99 20 22  |smission.-. .. "|
0000a8a0  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 72 30 2c  |OS_SpriteOp",r0,|
0000a8b0  72 31 2c 72 32 2c 72 33  0d 2d d2 0a 3d 4e 61 6d  |r1,r2,r3.-..=Nam|
0000a8c0  65 24 0d ff                                       |e$..|
0000a8c4