Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199312.adf » !OmniDesk_OmniDesk » !FormSizer/!RunImage

!FormSizer/!RunImage

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

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

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

� >!RunImage for Form Sizer
:
?VersionNumber$="1�03 (15 July 1993)":Taskname$="Form�Sizer"
(Exit=�:Startup=�:Done=�
2DoModeChange=�
<:
F,� Block 256,MenuHelp 16,TempHelpBlock 40
P/IndMenuMax=64:� IndirectMenuText IndMenuMax
ZD� Templates 1632,InfoInd 190,LocInd 592,StatsInd 320,SaveInd 352
d� IBMenu 76,MainMenu 148
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 FormSizer$RISCOS 3
�7*RMEnsure UtilityModule 3.00 Set FormSizer$RISCOS 2
�Zș "XOS_ReadVarVal","FormSizer$RISCOS",Block,256,0,0 � ,,len:Block?len=13:wimp$=$Block
�� wimp$<>"3" � wimp$="2"
�*Unset FormSizer$RISCOS
�:
!*Set FormSizer$SpriteDrag Yes
:*RMEnsure DragASprite 0.00 Set FormSizer$SpriteDrag No
Qș "XOS_ReadVarVal","FormSizer$SpriteDrag",Block,256,0,0 � ,,len:Block?len=13
"2� $Block="Yes" � DragASprite=�:� DragASprite=�
,*Unset FormSizer$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,"<FormSizer$Dir>.Sprites" � ,,len
|�� Sprites len+16:!Sprites=len+16:Sprites!4=0:Sprites!8=16:Sprites!12=16:ș "OS_SpriteOp",256+10,Sprites,"<FormSizer$Dir>.Sprites"
�:
�� wimp$="3" �
�  � messagelist% 44
�/  messagelist%!0=&502:messagelist%!4=&400C1
�:  messagelist%!8=UtilOpen:messagelist%!12=UtilQuitting
�3  messagelist%!16=UtilReside:messagelist%!20=10
�)  messagelist%!24=4:messagelist%!28=3
�;  messagelist%!32=2:messagelist%!36=1:messagelist%!40=0
�K  ș "Wimp_Initialise",300,&4B534154,Taskname$,messagelist% � wimp,Task
��
�>  ș "Wimp_Initialise",200,&4B534154,Taskname$ � wimp,Task
��
�:
"ș "Interface_Initialise",Task
:
7ș "Wimp_OpenTemplate",,"<FormSizer$Dir>.Templates"
&Eș "Wimp_LoadTemplate",,Templates,InfoInd,InfoInd+190,-1,"Info",0
0,ș "Wimp_CreateWindow",,Templates � Info
:\ș "Wimp_LoadTemplate",,Templates,LocInd,LocInd+592,-1,"WindowXY",0:Templates!64=Sprites
D+ș "Wimp_CreateWindow",,Templates � Loc
NEș "Wimp_LoadTemplate",,Templates,SaveInd,SaveInd+352,-1,"Save",0
X,ș "Wimp_CreateWindow",,Templates � Save
b<� It is important that the Stats window is defined last:
lHș "Wimp_LoadTemplate",,Templates,StatsInd,StatsInd+320,-1,"Stats",0
v-ș "Wimp_CreateWindow",,Templates � Stats
�ș "Wimp_CloseTemplate"
�:
��BuildMenus
�:
�� 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)="!FormSizer"+�13
�+  ș "Wimp_CreateIcon",,Block � IconBar
��
�:
��Initialise
&� OmniDesk<>0 � �DeclareToOmniDesk
R� Startup � Done=�:� '-Startup' parameter means 'declare and die immediately'.
:
 &�UpdateIcon(Info,3,VersionNumber$)
*6�ModeChange:� To update icon-bar icon if necessary
4�CleanUpLocWindow
>:
H'�MinimiseWimpSlot:�ClearStatsWindow
R:
\5MyRef=-1:� Just an arbitrary value to start with.
f:
pLoadFileError=�
zReadError=�(�LoadSettings)
�:
�� � �Error
��� ReadError � ReadError=�:�DefaultSettings:� 9999,"An error occurred whilst reading the settings file. Default settings will therefore be used."
�:
�)ș "OS_ReadMonotonicTime" � polltime%
�:
�� Main program loop
��
�@  ș "Wimp_PollIdle",%1100000110000,Block,polltime% � Reason
�&  ș "Interface_Poll",Reason,,Task
�4  ș "Interface_PreProcessKey",Reason,Block,Task
�  Ȏ Reason �
�3    � 0 : ș "OS_ReadMonotonicTime" � polltime%
L             polltime%+=100:� Do a Wimp_Poll approximately once a second
Z             � DoModeChange � � �OpenState(Stats) � �Open(Stats,�,XPosition,YPosition)
    � 1 : �Redraw
$)    � 2 : ș "Wimp_OpenWindow",,Block
.*    � 3 : ș "Wimp_CloseWindow",,Block
8              � Exit � Done=�
B    � 6 : �MouseButton
L    � 7 : �DragFinished
V    � 8 : �KeyPressed
`    � 9 : �DecodeMenu
j$    � 17,18,19 : �RecieveMessage
t  �
~
� Done
��SayGoodbye
�!ș "Interface_CloseDown",Task
�&ș "Wimp_CloseDown",Task,&4B534154
��
�:
�� �Error
�Click=0:Block!0=�:Ȏ � �
�  � 9999:� Custom error
�    $(Block+4)=�$+�0
�?    ș "Wimp_ReportError",Block,17,"Notice from Form Sizer"
�  
�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:ș "Interface_CloseDown",Task:ș "Wimp_CloseDown",Task,&4B534154:�
�
(:
2.� �Open(WindowHandle,TopOfStack,across,up)
<Block!0=WindowHandle
F#ș "Wimp_GetWindowState",,Block
PJ� (across<>-1) � (across<>-1) � �DecideWindowPosition(Block,across,up)
Z� TopOfStack � Block!28=-1
dș "Wimp_OpenWindow",,Block
n�
x:
�� �Close(WindowHandle)
�Block!0=WindowHandle
�#ș "Wimp_GetWindowState",,Block
� ș "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
6&TB=((Block!16)-top)/(2^YEigFactor)
@(VS=((Block!12)-right)/(2^XEigFactor)
J%HS=(bot-(Block!8))/(2^YEigFactor)
T&LP=(left-(Block!4))/(2^XEigFactor)
^K� LP is Left Pixel: normally present, but not if window is transparent.
h%width=(right-left)/(2^XEigFactor)
r#height=(top-bot)/(2^YEigFactor)
|Ȏ across �
�  � 0:x=LP
�,  � 1:x=LP+((Xpixels+1)-(width+LP+VS))/4
�,  � 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)
0Block!12=x+width:Block!4=x
:Block!16=y+height:Block!8=y
D�
N:
XO� -------------------------------------------------------------------------
b� Wimp poll routines
lO� -------------------------------------------------------------------------
v:
�
� �Redraw
�� DoModeChange �
�d  � Re-opening windows need an extra wimp_poll to happen after the mode change in order to work:
�>  � �OpenState(Stats) � �Open(Stats,�,XPosition,YPosition)
�  DoModeChange=�
��
�(ș "Wimp_RedrawWindow",,Block � flag
�ȕ flag
�*  ș "Interface_Render3dWindow",,Block
�*  ș "Wimp_GetRectangle",,Block � flag
��
��
�:
� �RecieveMessage
Ȏ Block!16 �
  � 0 : Done=�
 6  � 1 : � A task is trying to save a file into us.
*U           � We must tell it to use <Wimp$Scrap> because RAM transfer is too much
4;           � like hard work for a utility of this size.
>"           � Block!12<>MyRef �
HY             � Ignore the message if the user has dragged our save file back into us.
R7             Block!0=60:Block!12=Block!8:Block!16=2
\:             Block!36=-1:$(Block+44)="<Wimp$Scrap>"+�0
f7             ș "Wimp_SendMessage",17,Block,Block!4
p           �
zF  � 2 : � We're saving out to another application or to the filer.
�J           � We've just received acknowledgement to go ahead and save.
�Z           FileName$="":N=44:ȕ ((Block?N)>=32) � (N<256):FileName$+=�(Block?N):N+=1:�
��           � � �SaveStatsToFile(TemplatesFileName$,FileName$) � �DeleteWimpScrap:� 9999,"An error occurred whilst saving the file."
�Q           Block!12=Block!8:Block!16=3:ș "Wimp_SendMessage",17,Block,Block!4
�I           MyRef=-1:� Invalidate once again, until our next save out.
�,           � FileName$<>"<Wimp$Scrap>" �
�.             �UpdateIcon(Save,2,FileName$)
�2             � Put full filename into save box
�           �
�+  � 3 : � File dragged into application
�            �MinimiseWimpSlot
�Z           FileName$="":N=44:ȕ ((Block?N)>=32) � (N<256):FileName$+=�(Block?N):N+=1:�
�2           FileType=Block!40:FileSize=Block!36
	+           TemplatesFileName$=FileName$
	g           � TemplatesFileName$="<Wimp$Scrap>" � TemplatesFileName$="No filename - direct transfer"
	C           LoadFileError=�LoadFile(FileSize,FileType,FileName$)
	$<           � FileName$="<Wimp$Scrap>" � �DeleteWimpScrap
	.*           Block!12=Block!8:Block!16=4
	8E           Block!36=-1:Block!40=FileType:$(Block+44)=FileName$+�0
	B5           ș "Wimp_SendMessage",17,Block,Block!4
	L            �ClearStatsWindow
	V"           �CheckLoadFileError
	`>           �EvaluateTemplateStatistics(TemplatesFileName$)
	jI           � � �OpenState(Stats) � �Open(Stats,�,XPosition,YPosition)
	tN  � 4 : � We have saved the Stats file, and are receiving acknowledgement.
	~M           � We don't need to actually do anything except close the menu.
	�'           ș "Wimp_CreateMenu",,-1
	�1  � 10: � OmniDesk=0 � �SaveDesktop(Block!20)
	�E           � Only save if we have not been started up by OmniDesk
	�  � &502 : �Help
	�  � &400C1 : �ModeChange
	�=  � UtilOpen : � $(Block+24)=Taskname$ � �OmniDeskCalling
	�&  � UtilQuitting : � OmniDesk<>0 �
	�8                        � Block!20=OmniDesk � Done=�
	�                      �
	�  � UtilReside : Exit=�
	��
	��
:

� �DeleteWimpScrap
� �
� � � � �:�
(<� We may receive try to delete a non-existant Wimp$Scrap
2@� file if the receiving task did not recognise the filetype.
<�("Delete <Wimp$Scrap>")
F�
P:
Z� �MouseButton
d1MouseX=Block!0:MouseY=Block!4:Buttons=Block!8
n!Window=Block!12:Icon=Block!16
xȎ Window �
�"  � -2:� Icon bar icon clicked
�    Ȏ Buttons �
�      � 1 : � Adjust
�      � 2 : � Menu
�9        M%=IBMenu:MenuX=MouseX:MenuY=MouseY:�MakeMenu
�      � 4 : � Select
�.        �Open(Stats,�,XPosition,YPosition)
�	    �
�
  � Stats
�    Ȏ 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
,       : � Select, Adjust
6'        � (Icon=12) � (Buttons<8) �
@%          � Base (Dec/Hex) button
J.          ș "Interface_SlabButton",,Block
T          Hex=� Hex
^O          � Hex � �UpdateIcon(Stats,12,"Hex") � �UpdateIcon(Stats,12,"Dec")
h9          � � �MenuShaded(MainMenu,3) � �UpdateHexDec
rP          � The shaded state of the menu item indicates whether any template
|E          � definitions are currently loaded: unshaded means yes.
�S          Block!8=0:Block!12=Stats:Block!16=12:ș "Interface_SlabButton",,Block
�
        �
�	    �
�0  � Loc � Buttons<8:� Reposition main window
�    � Icon>=6 �
�,      XPosition=�ReadWindowLocation("X")
�,      YPosition=�ReadWindowLocation("Y")
�B      � �OpenState(Stats) � �Open(Stats,�,XPosition,YPosition)
�	    �
�  � Save
�    Ȏ Icon �
�      � 1:� File icon
�        � Buttons>=8 �
          � DragASprite �
P            � The following lines delete the file icon from the save window,
N            � giving the impression that you are actually dragging it out.
&:            � It will be replaced in PROCDragFinished.
0D            Block!0=Save:Block!4=1:ș "Wimp_GetIconState",,Block
:,            SaveBoxDragFile$=$(Block!32)
D4            Block!8=0:Block!12=0:$(Block!32)=�13
N-            ș "Wimp_SetIconState",,Block
X          �
b-          �DragBox(Save,1,5,1,"file_fff")
l
        �
v      � 3:� OK icon
�*        � (Buttons<8) � (Buttons<>2) �
�.          ș "Interface_SlabButton",,Block
�5          � Buttons<>1 � ș "Wimp_CreateMenu",,-1
�?          A$=�ReadIconStr(Save,2):� A$="" � A$="Statistics"
�$          �UpdateIcon(Save,2,A$)
��          � �A$,".")=0 � Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block:� 9999,"To save, drag the icon to a directory display."
��          � � �SaveStatsToFile(TemplatesFileName$,A$) � �DeleteWimpScrap:Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block:� 9999,"An error occurred whilst saving the file."
�Q          Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block
�
        �
�	    �
��
��
�:

� �DragFinished

� DragASprite �

  ș "DragASprite_Stop"

 ?  � The following lines replace the sprite in the save box.

*:  Block!0=Save:Block!4=1:ș "Wimp_GetIconState",,Block

47  Block!8=0:Block!12=0:$(Block!32)=SaveBoxDragFile$

>#  ș "Wimp_SetIconState",,Block

H�

R#ș "Wimp_GetPointerInfo",,Block

\.� Block!12=-1 � �:� Dragged to background.

fYDraggedToX=Block!0:DraggedToY=Block!4:DraggedToWindow=Block!12:DraggedToIcon=Block!16

p%� Find out leaf name in save box:

z3Dragging$=�ReadIconStr(Save,2):len=�(Dragging$)

�>N=-1:�:N+=1:� (�Dragging$,�(Dragging$)-N,1)=".") � (N=len)

�%� N<len � Dragging$=�Dragging$,N)

�I� Dragging$="" � Dragging$="Statistics":�UpdateIcon(Save,2,Dragging$)

�0� OK - Let's begin an inter-application save

�MyRef=0

�4Block!0=256:Block!12=MyRef:Block!16=1:� DataSave

�[Block!20=DraggedToWindow:Block!24=DraggedToIcon:Block!28=DraggedToX:Block!32=DraggedToY

�6Block!36=-1:� No idea what the size is going to be

�$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 �
.
  � Save:
8    � Character=13 �
BM      Block!8=4:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block
L;      A$=�ReadIconStr(Save,2):� A$="" � A$="Statistics"
V       �UpdateIcon(Save,2,A$)
`�      � �A$,".")=0 � Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block:� 9999,"To save, drag the icon to a directory display."
j�      � � �SaveStatsToFile(TemplatesFileName$,A$) � �DeleteWimpScrap:Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block:� 9999,"An error occurred whilst saving the file."
tM      Block!8=0:Block!12=Save:Block!16=3:ș "Interface_SlabButton",,Block
~"      ș "Wimp_CreateMenu",,-1
�	    �
�(      ș "Wimp_ProcessKey",Character
�	    �
�  
�&    ș "Wimp_ProcessKey",Character
��
��
�:
�� �DecodeMenu
�*Sub0=Block!0:Sub1=Block!4:Sub2=Block!8
�CloseMenu=�
�Ȏ M% �
  � IBMenu:

    Ȏ Sub0 �

      � 0
+        ș "Wimp_GetPointerInfo",,Block
(<        ș "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
2        CloseMenu=�
<
      � 1
F        Done=�
P	    �
Z  � MainMenu:
d    Ȏ Sub0 �
n
      � 0
x+        ș "Wimp_GetPointerInfo",,Block
�<        ș "Wimp_CreateMenu",,Info,Block!0-24,Block!4+24
�        CloseMenu=�
�
      � 1
�/        �MinimiseWimpSlot:�ClearStatsWindow
�
      � 2
�+        ș "Wimp_GetPointerInfo",,Block
�;        ș "Wimp_CreateMenu",,Loc,Block!0-24,Block!4+24
�        CloseMenu=�
�
      � 3
�+        ș "Wimp_GetPointerInfo",,Block
�=        ș "Wimp_CreateMenu",,Save,Block!0-146,Block!4+60
�        CloseMenu=�
�
      � 4
\        � � �SaveSettings � � 9999,"An error occurred whilst writing the settings file."
	    �
�
"#ș "Wimp_GetPointerInfo",,Block
,3� ((Block!8 � 1)=1) � (� CloseMenu) � �MakeMenu
6�
@:
JO� -------------------------------------------------------------------------
T� Menu routines
^O� -------------------------------------------------------------------------
h:
r� �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$="Form Sizer":� IBMenuTitle �(Title$)+1:$IBMenuTitle=Title$+�13
��MenuInit(IBMenuTitle)
��MenuItem("Info",0,Info)
�MenuItem("Quit",128,-1)
  :
M%=MainMenu
&MTitle$="Form Sizer":� MainMenuTitle �(Title$)+2:$MainMenuTitle=Title$+�13
0�MenuInit(MainMenuTitle)
:�MenuItem("Info",2,Info)
D&�MenuItem("Clear statistics",0,-1)
N&�MenuItem("Window position",2,Loc)
X'�MenuItem("Save statistics",0,Save)
b%�MenuItem("Save settings",128,-1)
l�
v:
�� �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
4M%!20=44:M%!24=0
>P%=M%+28
H�
R:
\!� �MenuItem(Text$,Flags,Link)
fK� Flags: 1-ticked, 2-dashed line, 4-writeable, 8-message, 128-last item
p1� Link: menu or window handle for sub-pointer
zP%!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.
�
$:
.O� -------------------------------------------------------------------------
8)� Responses to incoming wimp messages
BO� -------------------------------------------------------------------------
L:
V� �SaveDesktop(File)
`� �
jG� � � Block!12=Block!8:ș "Wimp_SendMessage",19,Block,Block!4:� �:�
tI� 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 Form Sizer icon.")
�=          �Send("Click MENU for information or to quit.")
�L          �Send("Click SELECT to open the templates statistics window.")
  � Stats:

    Ȏ Block!36 �
K      � -1:�Send("This is the Form Sizer templates statistics window.")
1              �Send("All numbers are bytes.")
(8              �Send("Click MENU for the main menu.")
2]      � 0,1,2:�Send("This area displays the filename of the currently loaded templates.")
<]      � 3,4:�Send("This area displays information about the currently loaded templates.")
Fm      � 5,6:�Send("This line shows the amount of memory needed to store the largest window in the file.")
P�               �Send("If a block of memory of this size is reserved, then the windows can in turn be loaded into it, created and their definitions discarded.")
Zr      � 7,8:�Send("This line shows the amount of memory needed to store all the indirected data in the file.")
d�               �Send("If a block of memory of this size is reserved, then the data can be loaded into it sequentially, as all indirected data must be retained.")
n]      � 9:�Send("This column shows the internal identifiers of the windows in the file.")
x�      � 10:�Send("This column shows the sizes of the blocks that need to be reserved in order to store the definitions of each individual window.")
��      � 11:�Send("This column shows the sizes of the blocks that need to be reserved in order to store each individual set of indirected data.")
��      � 12:�Send("Clicking on this button will toggle it between 'Dec' and 'Hex', and the numeric contents of the window will switch between decimal and hexadecimal.")
�h              �Send("The setting also affects the numeric output in the templates statistics file.")
�*      � 13:� �MenuShaded(MainMenu,3) �
��                �Send("This area will display specific information about the windows in whatever templates file you drag into Form Sizer.")
�              �
�a                �Send("This area displays information about the currently loaded templates.")
�              �
�      
�        � (Block!36)>=14 �
�&          Icon=((Block!36)-14) � 3
�)          � �MenuShaded(MainMenu,3) �
��            �Send("This area will display specific information about the windows in whatever templates file you drag into Form Sizer.")
          �
            Ȏ Icon �
e              � 0:�Send("This column shows the internal identifiers of the windows in the file.")
"n              � 1:TempHelpBlock!0=Stats:TempHelpBlock!4=(Block!36)-1:ș "Wimp_GetIconState",,TempHelpBlock
,�                     �Send("This is the amount of space needed to store the window definition of the '"+$(TempHelpBlock+28)+"' window.")
6n              � 2:TempHelpBlock!0=Stats:TempHelpBlock!4=(Block!36)-2:ș "Wimp_GetIconState",,TempHelpBlock
@�                     �Send("This is the amount of space needed to store the indirected data of the '"+$(TempHelpBlock+28)+"' window.")
J            �
T          �
^
        �
h	    �
rH  � Info:�Send("This window displays information about Form Sizer.")
|[            �Send("Form Sizer 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.")
�   �
� � Save:
�   Ȏ Block!36 �
�     � 0:�Send("Drag the file icon to a filer window or to another application which can accept text files, or enter a filename and click OK (or press RETURN) to save.")
�m     � 1:�Send("Drag this icon to a filer window or to another application which can accept text files.")
�     � 2:�Send("Enter a filename here and click OK (or press RETURN) to save, or drag the file icon to a filer window or to another application which can accept text files.")
��     � 3:�Send("Click OK (or press RETURN) to save the file, or drag the file icon to a filer window or to another application which can accept text files.")
,      �Send("This is the Save window.")
�               �Send("The file saved will contain detailed information on the contents of the windows and icons in the currently loaded templates file.")
   �
&
0  � wimp>=217 �
:1    MenuHelp!0=-1:MenuHelp!4=-1:MenuHelp!8=-1
D;    ș "Wimp_GetMenuState",1,MenuHelp,Block!32,Block!36
N    Ȏ M% �
X      � IBMenu:
b        � MenuHelp!4=-1 �
l          Ȏ MenuHelp!0 �
vX            � 0:�Send("Move the pointer right to see information about Form Sizer.")
�=            � 1:�Send("Click SELECT to quit Form Sizer.")
�@             �Send("This is the Form Sizer 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 Form Sizer.")
�-          � 1:� �MenuShaded(MainMenu,1) �
��                   �Send("When you have loaded some templates into Form Sizer, this option will clear them and reset the statistics window, thereby freeing a small amount of memory for other tasks.")
�                 �
�                   �Send("Click SELECT or ADJUST to clear the currently loaded templates and reset the Form Sizer statistics window.")
�X                   �Send("This will free a small amount of memory for other tasks.")
                 �
v          � 2:�Send("Move the pointer "+Direction$+" to set the position of the Form Sizer window on the screen.")
-          � 3:� �MenuShaded(MainMenu,3) �
 �                   �Send("When you have loaded some templates into Form Sizer, this option will allow you to save detailed information about the templates in the form of a text file.")
*                 �
4�                   �Send("Move the pointer "+Direction$+" to save some detailed information about the currently loaded templates in the form of a text file.")
>                 �
H}          � 4:�Send("Click SELECT or ADJUST to save the Form Sizer window position and the decimal/hexadecimal setting.")
R:           �Send("This is the Form Sizer main menu.")
\
        �
f	    �
p  �
z�
�  :
�?HelpInfo=0
�$Block!0=(HelpInfo+4-Block) � � 3
�*ș "Wimp_SendMessage",17,Block,Block!4
��
�:
�� �OmniHelpMessage(A$)
�D� A$="CLICK" � =�"open the templates statistics window.",76)+�13
�S� A$="DRAG" � =�"Drag a templates file here to display its statistics.",76)+�13
�=""
�:
�� �Send(Text$)
�$HelpInfo=Text$+"|M"
HelpInfo+=�(Text$)+2
�
:
$� �OmniDeskCalling
.� OmniDesk=0 � �
8I� This first line is for if a broadcast message is received which was
BA� intended for a transient copy of the utility. A stand-alone
L?� instantiation of the utility should ignore such messages.
VȎ Block!20 �
`,  � 4:�Open(Stats,�,XPosition,YPosition)
j(  � 2:TemplatesFileName$=$(Block+52)
te         � TemplatesFileName$="<Wimp$Scrap>" � TemplatesFileName$="No filename - direct transfer"
~C         LoadFileError=�LoadFile(Block!44,Block!48,$(Block+52))
�T         Block!0=20:Block!16=UtilAckLoad:ș "Wimp_SendMessage",17,Block,OmniDesk
�         �ClearStatsWindow
�          �CheckLoadFileError
�<         �EvaluateTemplateStatistics(TemplatesFileName$)
�G         � � �OpenState(Stats) � �Open(Stats,�,XPosition,YPosition)
��
��
�:
�� �ModeChange
�DoModeChange=�
�>� OmniDesk=0 � �UpdateIconForMode("!FormSizer",-2,IconBar)
��
:

O� -------------------------------------------------------------------------
8� General non-specific useful routines (mostly wimp)
O� -------------------------------------------------------------------------
(:
2 � �UpdateIcon(Wndw,Icn,Txt$)
<:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
F� �(Txt$)>(Block!36)-1 �
P&  � ((Block!24) � (1<<9))=(1<<9) �
Z    � Right-justified
d$    Txt$="�"+�Txt$,(Block!36)-2)
n  �
x#    � 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
��
�%ș "Wimp_GetCaretPosition",,Block
�"� Block!0=Wndw � Block!4=Icn �
�<  � If this icon owns the caret, then put it at the end.
�8  ș "Wimp_SetCaretPosition",Wndw,Icn,0,0,-1,�(Txt$)
��
�
:
+� �UpdateIconColour(Wndw,Icn,FCol,BCol)
"� Change an icon's colours
,:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
6;� (((Block?27)>>4)=BCol) � (((Block?27) � 16)=FCol) � �
@'  � ^ Same colour, so don't change.
J:Block!12=(%11111111<<24):Block!8=(BCol<<28)+(FCol<<24)
T!ș "Wimp_SetIconState",,Block
^�
h:
r)� �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)
�/� Use State=TRUE to make icon become shaded
�:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
�/� ((Block!24) � (1<<22))=((-State)<<22) � �
�@Block!12=(1<<22):� State � Block!8=(1<<22) � Block!8=(0<<22)
�!ș "Wimp_SetIconState",,Block
��
:
� �SelectedState(Wndw,Icn)
:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
&)� ((Block!24) � (1<<21))=(1<<21) � =�
0=�
::
D� �ShadedState(Wndw,Icn)
N:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
X)� ((Block!24) � (1<<22))=(1<<22) � =�
b=�
l:
v� �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)
��
�:
� � �TickMenu(Menu,Item,State)
�@!(Menu+28+(24*Item))=(!(Menu+28+(24*Item)) � � 1) � (-State)
��
�:
� �MenuShaded(Menu,Item)
5� (!(Menu+28+(24*Item)+8) � (1<<22))=(1<<22) � =�
=�
 :
*� �MenuTicked(Menu,Item)
4'� (!(Menu+28+(24*Item)) � 1)=1 � =�
>=�
H:
R� �ReadIcon(Wndw,Icn)
\ � Read numeric value of icon
f:Block!0=Wndw:Block!4=Icn:ș "Wimp_GetIconState",,Block
p=�($(Block!28))
z:
�� �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$ �
�:  � "XPixels":ș "OS_ReadModeVariable",mode,11 � ,,var
�:  � "YPixels":ș "OS_ReadModeVariable",mode,12 � ,,var
�6  � "NCol":ș "OS_ReadModeVariable",mode,3 � ,,var
�<  � "XEigFactor":ș "OS_ReadModeVariable",mode,4 � ,,var
�<  � "YEigFactor":ș "OS_ReadModeVariable",mode,5 � ,,var
?  � "BPP":ș "OS_ReadModeVariable",mode,9 � ,,var:var=2^var
6   var=-1:� Fall-through for a faulty input value
�
$=var
.:
8+� �UpdateIconForMode(Appname$,Wndw,Icn)
BN� This procedure requires that ALL the icon sprites are defined in mode 20
LN� or mode 27 (which is equivalent) with a mask but no palette. They should
VN� still appear to have the expected resolutions and number of colours, i.e
`N� !Sprites23: two colours, high resolution, !Sprites (actually !Sprites24)
jL� at mode 12 resolution (double height pixels) in 16 colours, and normal
tL� 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"
�  �
��
�*ș "Wimp_BaseOfSprites" � ,iconsprite%
�Eș "OS_SpriteOp",256+25,iconsprite%,Appname$:� Delete icon sprite
�=� The following three lines assume a mask but no palette:
�bș "OS_SpriteOp",256+40,Sprites,Appname$+Extension$ � ,,,w,h,,mode:� Get info about new sprite
\ș "OS_SpriteOp",256+15,iconsprite%,Appname$,0,w,h,mode:� Create replacement icon sprite

>ș "OS_SpriteOp",256+29,iconsprite%,Appname$:� Create mask
  :
-� Paint sprite mask into iconsprite mask:
(Qș "OS_SpriteOp",256+61,iconsprite%,Appname$,0 � r0,r1,r2,r3:� Output to mask
2Uș "OS_SpriteOp",256+49,Sprites,Appname$+Extension$,0,0:� Paint mask from Sprites
<7� 4,128:�:� Invert to make mask the right way round
F6ș "OS_SpriteOp",r0,r1,r2,r3:� Reset screen output
P  :
Z#� Paint sprite into iconsprite:
d\ș "OS_SpriteOp",256+60,iconsprite%,Appname$,0 � r0,r1,r2,r3:� Output to new icon sprite
nWș "OS_SpriteOp",256+34,Sprites,Appname$+Extension$,0,0,8:� Paint copy from Sprites
x6ș "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
�FBlock?36=ScrollCol:Block?37=SliderCol:Block?38=InputCol:Block?39=0
�?Block!40=WminX:Block!44=WminY:Block!48=WmaxX:Block!52=WmaxY
�=Block!56=TitleFlags:Block!60=Wbutton:Block!64=SpritePoint
�_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
0ș "Wimp_CreateWindow",,Block � WindowHandle
=WindowHandle
:
"� �Initialise
,-AppSize=�-&8000:MinSize=AppSize:SlotEnd=�
6�
@:
J� �AllocateMemory(Required)
TSlotSize=�SlotSize(-1)
^�� SlotSize<Required � NewSize=�SlotSize(Required):� NewSize<Required � SlotSize=�SlotSize(AppSize):=0:� Returns, indicating memory not claimed
h6� SlotSize>Required � SlotSize=�SlotSize(Required)
r*=SlotSize:� Returns with bytes claimed
|:
�� �SlotSize(Bytes)
�'ș "Wimp_SlotSize",Bytes,-1 � Bytes
�
=Bytes
�:
�� �MinimiseWimpSlot
�"dummy=�AllocateMemory(MinSize)
��
�:
�"� �CloseFileIfPoss(FileHandle)
�� �
�&� � � � �:�:� Unable to close file
��#FileHandle
��
 :
 � �FindFileSize(FileName$)
  � FileName$="<Wimp$Scrap>" �
 &:  ș "OS_File",15,FileName$,,,FileName$ � ,,,,FileSize
 0�
 :4  N=-1:�:N+=1:� �FileName$,�(FileName$)-N,1)="."
 DB  PathName$=�FileName$,�(FileName$)-N):LeafName$=�FileName$,N)
 N:  ș "OS_File",13,LeafName$,,,PathName$ � ,,,,FileSize
 X�
 b
=FileSize
 l:
 v� �NextEntry
 �H� Gets next entry (created by BPUT#Data,A$) from a file as a string.
 �� Use as A$=FNNextEntry.
 �� �
 �&� � � � �:="":� Error reading file
 �NE$=�#Data
 �ȕ �NE$,1)="|"
 �  NE$=�#Data
 ��
 �=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)
!4Block!16=(wminx+imaxx)
!>Block!20=(wmaxy+imaxy)
!HBlock!24=1:Block!28=1
!RGBlock!32=(�ModeInfo("Xpixels",-1)+1)*(2^�ModeInfo("XEigFactor",-1))
!\GBlock!36=(�ModeInfo("Ypixels",-1)+1)*(2^�ModeInfo("YEigFactor",-1))
!f� DragASprite �
!pE  ș "DragASprite_Start",%10000101,SpriteArea,SpriteName$,Block+8
!z�
!�  ș "Wimp_DragBox",,Block
!��
!��
!�:
!�O� -------------------------------------------------------------------------
!�/� Routines common to the OmniDesk utilities
!�O� -------------------------------------------------------------------------
!�:
!�� �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
"$�
".:
"8� �SayGoodbye
"B� OmniDesk=0 � �
"L/Block!0=24:Block!12=0:Block!16=UtilQuitting
"VBlock!20=Task
"`+ș "Wimp_SendMessage",17,Block,OmniDesk
"j�
"t:
"~� �ReadStartupString
"�M� Returns task handle of OmniDesk (which is passed in the command string)
"�&� or 0 if not started by OmniDesk.
"�ș "OS_GetEnv" � Command$
"�A=�Command$,"-Startup")
"�� 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
#24Location=-1:Icon-=6:� Bring icon into range 0-14
#<Ȏ Axis$ �
#F!  � "X","x":Location=Icon � 5
#P%  � "Y","y":Location=4-(Icon � 5)
#Z�
#d
=Location
#n:
#x� �CleanUpLocWindow
#�O� Makes sure that none of the 'window' icons in the Loc window is selected.
#�	N=5:�
#�'N+=1:� N=30 � �SelectedState(Loc,N)
#� �UpdateSelectedFlag(Loc,N,�)
#��
#�:
#�O� -------------------------------------------------------------------------
#�,� Special routines for this program only
#�O� -------------------------------------------------------------------------
#�:
#�,� �LoadFile(FileSize,FileType,FileName$)
#�� �
#�� � � � �:=1:� Error
$0� FileType<>&FEC � =2:� Not a template file.
$�MinimiseWimpSlot
$5� FileSize=-1 � FileSize=�FindFileSize(FileName$)
$".� �AllocateMemory(FileSize+AppSize)=0 � =3
$,'ș "OS_File",16,FileName$,SlotEnd,0
$6=0
$@:
$J2� �SaveStatsToFile(TemplatesFileName$,Output$)
$T� �
$^<� � � � �:�CloseFileIfPoss(File):=�:� Error writing file
$h  :
$r  File=� (Output$)
$|<  T%=SlotEnd:T%+=16:LargestWindowSize=0:LargestIndSize=0
$�1  �#File,"Template file: "+TemplatesFileName$
$�  ȕ (T%!0)<>0
$�    � T%!8<>1 �
$�,      � A value of 1 refers to a window.
$�=      � (If not 1, then we don't know what it refers to.)
$�;      � We don't know what this record's talking about,
$�       � so skip to the next.
$�?      T%+=24:� Increment by the size of one template record
$�	    �
$�3      �#File,�10+"Window identifier: "+$(T%+12)
$�%      �#File,"~~~~~~~~~~~~~~~~~~"
$�+      Data=SlotEnd+(T%!0):DataSize=T%!4
$�      � Hex �
%9        �#File,"Window block size: "+"&"+�~(DataSize)
%      �
%4        �#File,"Window block size: "+�(DataSize)
%&      �
%0C      � DataSize>LargestWindowSize � LargestWindowSize=DataSize
%:      Icons=Data!84
%D#      I%=Data+88:� Icon pointer
%N3      MaxSize=0:� Indirect data size for window
%X)      � ((Data!56) � (1<<8))=(1<<8) �
%b%        � Title bar is indirected
%l?        Valid$="":� (Data!76)>=0 � Valid$=$(Data+(Data!76))
%v9        Size=Data!80:� Valid$<>"" � Size+=�(Valid$)+1
%�        MaxSize+=Size
%�@        �#File,"Window title (indirect): "+$(Data+(Data!72))
%�D        � Valid$<>"" � �#File,"Title validation string: "+Valid$
%�      �
%�        � Direct title
%�3        �#File,"Window title: "+�$(Data+72),12)
%�      �
%�5      �#File,"Number of icons defined: "+�(Icons)
%�      � Icons>0 �
%�        �#File,"Icon:"
%�        � N=1 � Icons
%�2          Indirect=(((I%!16) � (1<<8))=(1<<8))
%�.          Text=(((I%!16) � (1<<0))=(1<<0))
&0          Sprite=(((I%!16) � (1<<1))=(1<<1))
&\          Description$=�4-(�(�(N-1)))," ")+�(N-1)+": ":Description2$="":Description3$=""
&          � Indirect �
& 6            � Count indirect icons, ignore others.
&*)            Description$+="Indirect "
&4            � Text �
&>S              � Treat indirect text+sprite and text-only icons in the same way:
&HA              Valid$="":� (I%!24)>=0 � Valid$=$(Data+(I%!24))
&R=              Size=I%!28:� Valid$<>"" � Size+=�(Valid$)+1
&\              MaxSize+=Size
&f'              Description$+="text "
&p6              � Sprite � Description$+="+ sprite "
&z&              Description$+="icon"
&��              � $(Data+(I%!20))<>"" � Description2$=�6," ")+"Text buffer contents: "+$(Data+(I%!20)) � Description2$=�6," ")+"(Empty)"
&�\              � Valid$<>"" � Description3$=�6," ")+"Validation buffer contents: "+Valid$
&�            �
&�              � Sprite �
&�/                � Indirect sprite-only icon
&�                Size=I%!28
&�!                MaxSize+=Size
&�/                Description$+="sprite icon"
&Ԏ                � Size>0 � � $(Data+(I%!20))<>"" � Description2$=�6," ")+"Sprite name: "+$(Data+(I%!20)) � Description2$=�6," ")+"(Empty)"
&�              �
&�F                � Indirect non-text, non-sprite icons are ignored.
&�=                Description$+="non-text, non-sprite icon"
&�              �
'            �
'          �
'Y            � Ignore direct icons, except for outputting some information about them.
'$            � Text �
'.'              Description$+="Text "
'8              � Sprite �
'B-                Description$+="+ sprite "
'L�                � �$(I%+20),12)<>"" � Description2$=�6," ")+"Text and sprite name: "+�$(I%+20),12) � Description2$=�6," ")+"(Empty)"
'V              �
'`|                � �$(I%+20),12)<>"" � Description2$=�6," ")+"Contents: "+�$(I%+20),12) � Description2$=�6," ")+"(Empty)"
'j              �
't&              Description$+="icon"
'~            �
'�              � Sprite �
'�/                Description$+="Sprite icon"
'�                � �$(I%+20),12)<>"" � Description2$=�6," ")+"Sprite name: "+�$(I%+20),12) � Description2$=�6," ")+"(Empty)"
'�              �
'�=                Description$+="Non-text, non-sprite icon"
'�              �
'�            �
'�          �
'�!          �#File,Description$
'�8          � Description2$<>"" � �#File,Description2$
'�8          � Description3$<>"" � �#File,Description3$
'�>          I%+=32:� Increment by the size of one icon block
(        � N
(
      �
(      � Hex �
(Y        �#File,"Size of block required to hold all indirected data: "+"&"+�~(MaxSize)
((      �
(2T        �#File,"Size of block required to hold all indirected data: "+�(MaxSize)
(<      �
(FN      LargestIndSize+=MaxSize:� Add this window's indirect space to total.
(P?      T%+=24:� Increment by the size of one template record
(Z	    �
(d  �
(n
  � Hex �
(xk    �#File,�10+"Size of block required to hold global template definitions: "+"&"+�~(LargestWindowSize)
(�d    �#File,"Size of block required to hold all indirected data:         "+"&"+�~(LargestIndSize)
(�  �
(�f    �#File,�10+"Size of block required to hold global template definitions: "+�(LargestWindowSize)
(�_    �#File,"Size of block required to hold all indirected data:         "+�(LargestIndSize)
(�  �
(�  �#File
(�#  �("Settype "+Output$+" Text")
(�  :
(�=�
(�:
(�� �CheckLoadFileError
(�Ȏ LoadFileError �
(�F  � 1:� 9999,"An error occurred whilst reading the template file."
)=  � 2:� 9999,"Form Sizer can only handle template files."
)K  � 3:� 9999,"Unable to claim enough memory to load the template file."
)   � We're alright.
)"�
),�
)6:
)@� �ClearStatsWindow
)JOpen=�OpenState(Stats)
)TOBlock!0=Stats:ș "Wimp_GetWindowState",,Block:ș "Wimp_DeleteWindow",,Block
)^,� N=0 � 12 � 4:Templates!N=Block!(N+4):�
)hE� Update template window's position with actual window's position
)r-ș "Wimp_CreateWindow",,Templates � Stats
)|B�UpdateIcon(Stats,2,"Drag a templates file into this window.")
)�+� N=6 � 8 � 2:�UpdateIcon(Stats,N,""):�
)�� N=14 � 16
)�;  Block!0=Stats:Block!4=N:ș "Wimp_GetIconState",,Block
)�!  ș "Wimp_DeleteIcon",,Block
)�  $(Block+28)=""+�13
)�1  Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
)�+  � Blank out these non-indirect icons.
)��
)�!� Open � �Open(Stats,�,-1,-1)
)��ShadeMenu(MainMenu,1,�)
)��ShadeMenu(MainMenu,3,�)
)��
)�:
*� �UpdateHexDec
*� N=6 � 8 � 2
*   A=�(�ReadIconStr(Stats,N))
*&H  � Hex � �UpdateIcon(Stats,N,"&"+�~(A)) � �UpdateIcon(Stats,N,�(A))
*0�
*:$� M=14 � (11+(3*RowCounter)) � 3
*D  � N=1 � 2
*N?    Block!0=Stats:Block!4=M+N:ș "Wimp_GetIconState",,Block
*X    A=�($(Block+28))
*b8    � Hex � $(Block+28)="&"+�~(A) � $(Block+28)=�(A)
*lO    ș "Wimp_DeleteIcon",,Block:Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
*vF    ș "Wimp_ForceRedraw",Stats,Block!8,Block!12,Block!16,Block!20
*�  �
*��
*��
*�:
*�5� �EvaluateTemplateStatistics(TemplatesFileName$)
*�:T%=SlotEnd:T%+=16:LargestWindowSize=0:LargestIndSize=0
*�RowCounter=0:BaseIcon=14
*�+�UpdateIcon(Stats,2,TemplatesFileName$)
*�ȕ (T%!0)<>0
*�  � T%!8<>1 �
*�*    � A value of 1 refers to a window.
*�;    � (If not 1, then we don't know what it refers to.)
*�9    � We don't know what this record's talking about,
+    � so skip to the next.
+=    T%+=24:� Increment by the size of one template record
+  �
+     � RowCounter=0 �
+*S      RowCounter+=1:� The icons for the first row are defined in the templates.
+4	    �
+>I      � Amend work area size and size of bounding icons within Stats:
+HJ      Block!0=-16:Block!4=-542-(48*RowCounter):Block!8=702:Block!12=16
+R)      ș "Wimp_SetExtent",Stats,Block
+\      � N=4 � 13 � 9
+fA        Block!0=Stats:Block!4=N:ș "Wimp_GetIconState",,Block
+p4        Block!12-=48:ș "Wimp_DeleteIcon",,Block
+z7        Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
+�      �
+�4      � Now create extra rows of icons in Stats.
+�6      � We just copy the icons from the row above.
+�      � N=0 � 2
+�J        Block!0=Stats:Block!4=BaseIcon+N:ș "Wimp_GetIconState",,Block
+�>        Block!12-=48:Block!20-=48:� Copy icon down one row
+�7        Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
+�      �
+�#      RowCounter+=1:BaseIcon+=3
+�	    �
+�	    :
+�D    Block!0=Stats:Block!4=BaseIcon:ș "Wimp_GetIconState",,Block
+�#    ș "Wimp_DeleteIcon",,Block
,)    $(Block+28)=$(T%+12):� Identifier
,3    Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
,	    :
,$)    Data=SlotEnd+(T%!0):DataSize=T%!4
,.	    :
,8F    Block!0=Stats:Block!4=BaseIcon+1:ș "Wimp_GetIconState",,Block
,B#    ș "Wimp_DeleteIcon",,Block
,LY    � Hex � $(Block+28)="&"+�~(DataSize) � $(Block+28)=�(DataSize):� Window data size
,V3    Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
,`	    :
,jA    � DataSize>LargestWindowSize � LargestWindowSize=DataSize
,t    Icons=Data!84
,~!    I%=Data+88:� Icon pointer
,�1    MaxSize=0:� Indirect data size for window
,�'    � ((Data!56) � (1<<8))=(1<<8) �
,�#      � Title bar is indirected
,�=      Valid$="":� (Data!76)>=0 � Valid$=$(Data+(Data!76))
,�7      Size=Data!80:� Valid$<>"" � Size+=�(Valid$)+1
,�      MaxSize+=Size
,�	    �
,�    � Icons>0 �
,�      � N=1 � Icons
,�0        Indirect=(((I%!16) � (1<<8))=(1<<8))
,�,        Text=(((I%!16) � (1<<0))=(1<<0))
,�.        Sprite=(((I%!16) � (1<<1))=(1<<1))
-        � Indirect �
-
4          � Count indirect icons, ignore others.
-          � Text �
-Q            � Treat indirect text+sprite and text-only icons in the same way:
-(?            Valid$="":� (I%!24)>=0 � Valid$=$(Data+(I%!24))
-2;            Size=I%!28:� Valid$<>"" � Size+=�(Valid$)+1
-<            MaxSize+=Size
-F          �
-P            � Sprite �
-Z-              � Indirect sprite-only icon
-d              Size=I%!28
-n              MaxSize+=Size
-x            �
-�D              � Indirect non-text, non-sprite icons are ignored.
-�            �
-�          �
-�
        �
-�<        I%+=32:� Increment by the size of one icon block
-�
      � N
-�	    �
-�	    :
-�F    Block!0=Stats:Block!4=BaseIcon+2:ș "Wimp_GetIconState",,Block
-�#    ș "Wimp_DeleteIcon",,Block
-�`    � Hex � $(Block+28)="&"+�~(MaxSize) � $(Block+28)=�(MaxSize):� Indirected icon data size
-�3    Block!4=Stats:ș "Wimp_CreateIcon",,Block+4
-�	    :
.L    LargestIndSize+=MaxSize:� Add this window's indirect space to total.
.=    T%+=24:� Increment by the size of one template record
.  �
."�
.,f� Hex � �UpdateIcon(Stats,6,"&"+�~(LargestWindowSize)) � �UpdateIcon(Stats,6,�(LargestWindowSize))
.6`� Hex � �UpdateIcon(Stats,8,"&"+�~(LargestIndSize)) � �UpdateIcon(Stats,8,�(LargestIndSize))
.@  :
.J�ShadeMenu(MainMenu,1,�)
.T�ShadeMenu(MainMenu,3,�)
.^  :
.hStatsOpen=�
.r%� �OpenState(Stats) � StatsOpen=�
.|1Block!0=Stats:ș "Wimp_GetWindowState",,Block
.�Block!8-=(48*RowCounter)
.�&� Block!8<0 � Block!16+=(-Block!8)
.�<ș "Wimp_OpenWindow",,Block:ș "Wimp_CloseWindow",,Block
.�+� ^ Needed to establish new dimensions.
.�4� StatsOpen � �Open(Stats,�,XPosition,YPosition)
.��
.�:
.�� �SaveSettings
.�� �
.�<� � � � �:�CloseFileIfPoss(Data):=�:� Error writing file
.�  :
.�)  Data=� ("<FormSizer$Dir>.Settings")
.�?  �#Data,"| X and Y grid coordinates of Form Sizer window:"
/  �#Data,�(XPosition)
/  �#Data,�(YPosition)
/M  �#Data,"| Number base of output (-1 for hexadecimal or 0 for decimal):"
/&  �#Data,�(Hex)
/0  �#Data
/:0  �("Settype <FormSizer$Dir>.Settings Text")
/D  :
/N=�
/X:
/b� �LoadSettings
/l� �
/vO� � � � �:�CloseFileIfPoss(Data):=�:� 'Settings' file is damaged or missing
/�  :
/�'  Data=� "<FormSizer$Dir>.Settings"
/�  XPosition=�(�NextEntry)
/�  YPosition=�(�NextEntry)
/�  Hex=�(�NextEntry)
/�  �#Data
/�  :
/�b  � XPosition<>-1 � YPosition<>-1 � �UpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),�)
/�G  � Hex � �UpdateIcon(Stats,12,"Hex") � �UpdateIcon(Stats,12,"Dec")
/�  :
/�=�
/�:
/�� �DefaultSettings
0XPosition=3:YPosition=3
0>�UpdateSelectedFlag(Loc,6+((5*XPosition)+(4-YPosition)),�)
0	Hex=�
0 E� Hex � �UpdateIcon(Stats,12,"Hex") � �UpdateIcon(Stats,12,"Dec")
0*�
�
00000000  0d 00 0a 1f f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  20 66 6f 72 20 46 6f 72  6d 20 53 69 7a 65 72 0d  | for Form Sizer.|
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 33 20 28 31 35  |umber$="1.03 (15|
00000040  20 4a 75 6c 79 20 31 39  39 33 29 22 3a 54 61 73  | July 1993)":Tas|
00000050  6b 6e 61 6d 65 24 3d 22  46 6f 72 6d a0 53 69 7a  |kname$="Form.Siz|
00000060  65 72 22 0d 00 28 1b 45  78 69 74 3d a3 3a 53 74  |er"..(.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  2c de 20 42 6c 6f 63 6b  |..<.:..F,. Block|
000000a0  20 32 35 36 2c 4d 65 6e  75 48 65 6c 70 20 31 36  | 256,MenuHelp 16|
000000b0  2c 54 65 6d 70 48 65 6c  70 42 6c 6f 63 6b 20 34  |,TempHelpBlock 4|
000000c0  30 0d 00 50 2f 49 6e 64  4d 65 6e 75 4d 61 78 3d  |0..P/IndMenuMax=|
000000d0  36 34 3a de 20 49 6e 64  69 72 65 63 74 4d 65 6e  |64:. IndirectMen|
000000e0  75 54 65 78 74 20 49 6e  64 4d 65 6e 75 4d 61 78  |uText IndMenuMax|
000000f0  0d 00 5a 44 de 20 54 65  6d 70 6c 61 74 65 73 20  |..ZD. Templates |
00000100  31 36 33 32 2c 49 6e 66  6f 49 6e 64 20 31 39 30  |1632,InfoInd 190|
00000110  2c 4c 6f 63 49 6e 64 20  35 39 32 2c 53 74 61 74  |,LocInd 592,Stat|
00000120  73 49 6e 64 20 33 32 30  2c 53 61 76 65 49 6e 64  |sInd 320,SaveInd|
00000130  20 33 35 32 0d 00 64 1c  de 20 49 42 4d 65 6e 75  | 352..d.. IBMenu|
00000140  20 37 36 2c 4d 61 69 6e  4d 65 6e 75 20 31 34 38  | 76,MainMenu 148|
00000150  0d 00 6e 05 3a 0d 00 78  2a f4 20 4d 65 73 73 61  |..n.:..x*. Messa|
00000160  67 65 73 20 75 73 65 64  20 62 79 20 74 68 65 20  |ges used by the |
00000170  4f 6d 6e 69 44 65 73 6b  20 73 75 69 74 65 3a 0d  |OmniDesk suite:.|
00000180  00 82 5f 55 74 69 6c 44  65 63 6c 61 72 65 3d 26  |.._UtilDeclare=&|
00000190  38 32 35 43 30 3a 55 74  69 6c 4f 70 65 6e 3d 26  |825C0:UtilOpen=&|
000001a0  38 32 35 43 31 3a 55 74  69 6c 51 75 69 74 74 69  |825C1:UtilQuitti|
000001b0  6e 67 3d 26 38 32 35 43  32 3a 55 74 69 6c 52 65  |ng=&825C2:UtilRe|
000001c0  73 69 64 65 3d 26 38 32  35 43 33 3a 55 74 69 6c  |side=&825C3:Util|
000001d0  41 63 6b 4c 6f 61 64 3d  26 38 32 35 43 34 0d 00  |AckLoad=&825C4..|
000001e0  8c 2b f4 20 54 68 65 73  65 20 61 72 65 20 6f 66  |.+. These are of|
000001f0  66 69 63 69 61 6c 20 41  63 6f 72 6e 20 61 6c 6c  |ficial Acorn all|
00000200  6f 63 61 74 69 6f 6e 73  2e 0d 00 96 05 3a 0d 00  |ocations.....:..|
00000210  a0 6e ee 20 85 20 42 6c  6f 63 6b 21 30 3d 9f 3a  |.n. . Block!0=.:|
00000220  24 28 42 6c 6f 63 6b 2b  34 29 3d f6 24 2b 22 20  |$(Block+4)=.$+" |
00000230  28 69 6e 74 65 72 6e 61  6c 20 65 72 72 6f 72 20  |(internal error |
00000240  63 6f 64 65 20 22 2b c3  28 9e 29 2b 22 29 22 2b  |code "+.(.)+")"+|
00000250  bd 30 3a c8 99 20 22 57  69 6d 70 5f 52 65 70 6f  |.0:.. "Wimp_Repo|
00000260  72 74 45 72 72 6f 72 22  2c 42 6c 6f 63 6b 2c 31  |rtError",Block,1|
00000270  2c 54 61 73 6b 6e 61 6d  65 24 3a e0 0d 00 aa 05  |,Taskname$:.....|
00000280  3a 0d 00 b4 3f 4f 6d 6e  69 44 65 73 6b 3d a4 52  |:...?OmniDesk=.R|
00000290  65 61 64 53 74 61 72 74  75 70 53 74 72 69 6e 67  |eadStartupString|
000002a0  3a f4 20 41 6c 73 6f 20  61 73 73 69 67 6e 73 20  |:. Also assigns |
000002b0  45 78 69 74 20 61 6e 64  20 53 74 61 72 74 75 70  |Exit and Startup|
000002c0  0d 00 be 05 3a 0d 00 c8  1b 2a 53 65 74 20 46 6f  |....:....*Set Fo|
000002d0  72 6d 53 69 7a 65 72 24  52 49 53 43 4f 53 20 33  |rmSizer$RISCOS 3|
000002e0  0d 00 d2 37 2a 52 4d 45  6e 73 75 72 65 20 55 74  |...7*RMEnsure Ut|
000002f0  69 6c 69 74 79 4d 6f 64  75 6c 65 20 33 2e 30 30  |ilityModule 3.00|
00000300  20 53 65 74 20 46 6f 72  6d 53 69 7a 65 72 24 52  | Set FormSizer$R|
00000310  49 53 43 4f 53 20 32 0d  00 dc 5a c8 99 20 22 58  |ISCOS 2...Z.. "X|
00000320  4f 53 5f 52 65 61 64 56  61 72 56 61 6c 22 2c 22  |OS_ReadVarVal","|
00000330  46 6f 72 6d 53 69 7a 65  72 24 52 49 53 43 4f 53  |FormSizer$RISCOS|
00000340  22 2c 42 6c 6f 63 6b 2c  32 35 36 2c 30 2c 30 20  |",Block,256,0,0 |
00000350  b8 20 2c 2c 6c 65 6e 3a  42 6c 6f 63 6b 3f 6c 65  |. ,,len:Block?le|
00000360  6e 3d 31 33 3a 77 69 6d  70 24 3d 24 42 6c 6f 63  |n=13:wimp$=$Bloc|
00000370  6b 0d 00 e6 1c e7 20 77  69 6d 70 24 3c 3e 22 33  |k..... wimp$<>"3|
00000380  22 20 8c 20 77 69 6d 70  24 3d 22 32 22 0d 00 f0  |" . wimp$="2"...|
00000390  1b 2a 55 6e 73 65 74 20  46 6f 72 6d 53 69 7a 65  |.*Unset FormSize|
000003a0  72 24 52 49 53 43 4f 53  0d 00 fa 05 3a 0d 01 04  |r$RISCOS....:...|
000003b0  21 2a 53 65 74 20 46 6f  72 6d 53 69 7a 65 72 24  |!*Set FormSizer$|
000003c0  53 70 72 69 74 65 44 72  61 67 20 59 65 73 0d 01  |SpriteDrag Yes..|
000003d0  0e 3a 2a 52 4d 45 6e 73  75 72 65 20 44 72 61 67  |.:*RMEnsure Drag|
000003e0  41 53 70 72 69 74 65 20  30 2e 30 30 20 53 65 74  |ASprite 0.00 Set|
000003f0  20 46 6f 72 6d 53 69 7a  65 72 24 53 70 72 69 74  | FormSizer$Sprit|
00000400  65 44 72 61 67 20 4e 6f  0d 01 18 51 c8 99 20 22  |eDrag No...Q.. "|
00000410  58 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |XOS_ReadVarVal",|
00000420  22 46 6f 72 6d 53 69 7a  65 72 24 53 70 72 69 74  |"FormSizer$Sprit|
00000430  65 44 72 61 67 22 2c 42  6c 6f 63 6b 2c 32 35 36  |eDrag",Block,256|
00000440  2c 30 2c 30 20 b8 20 2c  2c 6c 65 6e 3a 42 6c 6f  |,0,0 . ,,len:Blo|
00000450  63 6b 3f 6c 65 6e 3d 31  33 0d 01 22 32 e7 20 24  |ck?len=13.."2. $|
00000460  42 6c 6f 63 6b 3d 22 59  65 73 22 20 8c 20 44 72  |Block="Yes" . Dr|
00000470  61 67 41 53 70 72 69 74  65 3d b9 3a 8b 20 44 72  |agASprite=.:. Dr|
00000480  61 67 41 53 70 72 69 74  65 3d a3 0d 01 2c 1f 2a  |agASprite=...,.*|
00000490  55 6e 73 65 74 20 46 6f  72 6d 53 69 7a 65 72 24  |Unset FormSizer$|
000004a0  53 70 72 69 74 65 44 72  61 67 0d 01 36 05 3a 0d  |SpriteDrag..6.:.|
000004b0  01 40 59 c8 99 20 22 58  4f 53 5f 52 65 61 64 56  |.@Y.. "XOS_ReadV|
000004c0  61 72 56 61 6c 22 2c 22  4f 62 65 79 24 44 69 72  |arVal","Obey$Dir|
000004d0  22 2c 42 6c 6f 63 6b 2c  32 35 36 2c 30 2c 30 20  |",Block,256,0,0 |
000004e0  b8 20 2c 2c 6c 65 6e 3a  42 6c 6f 63 6b 3f 6c 65  |. ,,len:Block?le|
000004f0  6e 3d 31 33 3a 4f 75 72  46 69 6c 65 4e 61 6d 65  |n=13:OurFileName|
00000500  24 3d 24 42 6c 6f 63 6b  0d 01 4a 38 4e 3d 2d 31  |$=$Block..J8N=-1|
00000510  3a f5 3a 4e 2b 3d 31 3a  fd 20 c1 4f 75 72 46 69  |:.:N+=1:. .OurFi|
00000520  6c 65 4e 61 6d 65 24 2c  a9 28 4f 75 72 46 69 6c  |leName$,.(OurFil|
00000530  65 4e 61 6d 65 24 29 2d  4e 2c 31 29 3d 22 2e 22  |eName$)-N,1)="."|
00000540  0d 01 54 4f 4f 75 72 50  61 74 68 4e 61 6d 65 24  |..TOOurPathName$|
00000550  3d c0 4f 75 72 46 69 6c  65 4e 61 6d 65 24 2c a9  |=.OurFileName$,.|
00000560  28 4f 75 72 46 69 6c 65  4e 61 6d 65 24 29 2d 4e  |(OurFileName$)-N|
00000570  29 3a 4f 75 72 46 69 6c  65 4e 61 6d 65 24 3d c2  |):OurFileName$=.|
00000580  4f 75 72 46 69 6c 65 4e  61 6d 65 24 2c 4e 29 0d  |OurFileName$,N).|
00000590  01 5e 05 3a 0d 01 68 5e  f4 20 52 65 61 64 20 73  |.^.:..h^. Read s|
000005a0  69 7a 65 20 6f 66 20 73  70 72 69 74 65 20 66 69  |ize of sprite fi|
000005b0  6c 65 20 61 6e 64 20 6c  6f 61 64 20 69 74 2e 20  |le and load it. |
000005c0  57 65 20 6e 65 65 64 20  74 6f 20 44 49 4d 20 31  |We need to DIM 1|
000005d0  36 20 62 79 74 65 73 20  6d 6f 72 65 20 74 68 61  |6 bytes more tha|
000005e0  6e 20 74 68 65 20 66 69  6c 65 27 73 20 73 69 7a  |n the file's siz|
000005f0  65 2e 0d 01 72 3a c8 99  20 22 4f 53 5f 46 53 43  |e...r:.. "OS_FSC|
00000600  6f 6e 74 72 6f 6c 22 2c  32 38 2c 22 3c 46 6f 72  |ontrol",28,"<For|
00000610  6d 53 69 7a 65 72 24 44  69 72 3e 2e 53 70 72 69  |mSizer$Dir>.Spri|
00000620  74 65 73 22 20 b8 20 2c  2c 6c 65 6e 0d 01 7c 85  |tes" . ,,len..|.|
00000630  de 20 53 70 72 69 74 65  73 20 6c 65 6e 2b 31 36  |. Sprites len+16|
00000640  3a 21 53 70 72 69 74 65  73 3d 6c 65 6e 2b 31 36  |:!Sprites=len+16|
00000650  3a 53 70 72 69 74 65 73  21 34 3d 30 3a 53 70 72  |:Sprites!4=0:Spr|
00000660  69 74 65 73 21 38 3d 31  36 3a 53 70 72 69 74 65  |ites!8=16:Sprite|
00000670  73 21 31 32 3d 31 36 3a  c8 99 20 22 4f 53 5f 53  |s!12=16:.. "OS_S|
00000680  70 72 69 74 65 4f 70 22  2c 32 35 36 2b 31 30 2c  |priteOp",256+10,|
00000690  53 70 72 69 74 65 73 2c  22 3c 46 6f 72 6d 53 69  |Sprites,"<FormSi|
000006a0  7a 65 72 24 44 69 72 3e  2e 53 70 72 69 74 65 73  |zer$Dir>.Sprites|
000006b0  22 0d 01 86 05 3a 0d 01  90 11 e7 20 77 69 6d 70  |"....:..... wimp|
000006c0  24 3d 22 33 22 20 8c 0d  01 9a 17 20 20 de 20 6d  |$="3" .....  . m|
000006d0  65 73 73 61 67 65 6c 69  73 74 25 20 34 34 0d 01  |essagelist% 44..|
000006e0  a4 2f 20 20 6d 65 73 73  61 67 65 6c 69 73 74 25  |./  messagelist%|
000006f0  21 30 3d 26 35 30 32 3a  6d 65 73 73 61 67 65 6c  |!0=&502:messagel|
00000700  69 73 74 25 21 34 3d 26  34 30 30 43 31 0d 01 ae  |ist%!4=&400C1...|
00000710  3a 20 20 6d 65 73 73 61  67 65 6c 69 73 74 25 21  |:  messagelist%!|
00000720  38 3d 55 74 69 6c 4f 70  65 6e 3a 6d 65 73 73 61  |8=UtilOpen:messa|
00000730  67 65 6c 69 73 74 25 21  31 32 3d 55 74 69 6c 51  |gelist%!12=UtilQ|
00000740  75 69 74 74 69 6e 67 0d  01 b8 33 20 20 6d 65 73  |uitting...3  mes|
00000750  73 61 67 65 6c 69 73 74  25 21 31 36 3d 55 74 69  |sagelist%!16=Uti|
00000760  6c 52 65 73 69 64 65 3a  6d 65 73 73 61 67 65 6c  |lReside:messagel|
00000770  69 73 74 25 21 32 30 3d  31 30 0d 01 c2 29 20 20  |ist%!20=10...)  |
00000780  6d 65 73 73 61 67 65 6c  69 73 74 25 21 32 34 3d  |messagelist%!24=|
00000790  34 3a 6d 65 73 73 61 67  65 6c 69 73 74 25 21 32  |4:messagelist%!2|
000007a0  38 3d 33 0d 01 cc 3b 20  20 6d 65 73 73 61 67 65  |8=3...;  message|
000007b0  6c 69 73 74 25 21 33 32  3d 32 3a 6d 65 73 73 61  |list%!32=2:messa|
000007c0  67 65 6c 69 73 74 25 21  33 36 3d 31 3a 6d 65 73  |gelist%!36=1:mes|
000007d0  73 61 67 65 6c 69 73 74  25 21 34 30 3d 30 0d 01  |sagelist%!40=0..|
000007e0  d6 4b 20 20 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |.K  .. "Wimp_Ini|
000007f0  74 69 61 6c 69 73 65 22  2c 33 30 30 2c 26 34 42  |tialise",300,&4B|
00000800  35 33 34 31 35 34 2c 54  61 73 6b 6e 61 6d 65 24  |534154,Taskname$|
00000810  2c 6d 65 73 73 61 67 65  6c 69 73 74 25 20 b8 20  |,messagelist% . |
00000820  77 69 6d 70 2c 54 61 73  6b 0d 01 e0 05 cc 0d 01  |wimp,Task.......|
00000830  ea 3e 20 20 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |.>  .. "Wimp_Ini|
00000840  74 69 61 6c 69 73 65 22  2c 32 30 30 2c 26 34 42  |tialise",200,&4B|
00000850  35 33 34 31 35 34 2c 54  61 73 6b 6e 61 6d 65 24  |534154,Taskname$|
00000860  20 b8 20 77 69 6d 70 2c  54 61 73 6b 0d 01 f4 05  | . wimp,Task....|
00000870  cd 0d 01 fe 05 3a 0d 02  08 22 c8 99 20 22 49 6e  |.....:...".. "In|
00000880  74 65 72 66 61 63 65 5f  49 6e 69 74 69 61 6c 69  |terface_Initiali|
00000890  73 65 22 2c 54 61 73 6b  0d 02 12 05 3a 0d 02 1c  |se",Task....:...|
000008a0  37 c8 99 20 22 57 69 6d  70 5f 4f 70 65 6e 54 65  |7.. "Wimp_OpenTe|
000008b0  6d 70 6c 61 74 65 22 2c  2c 22 3c 46 6f 72 6d 53  |mplate",,"<FormS|
000008c0  69 7a 65 72 24 44 69 72  3e 2e 54 65 6d 70 6c 61  |izer$Dir>.Templa|
000008d0  74 65 73 22 0d 02 26 45  c8 99 20 22 57 69 6d 70  |tes"..&E.. "Wimp|
000008e0  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
000008f0  54 65 6d 70 6c 61 74 65  73 2c 49 6e 66 6f 49 6e  |Templates,InfoIn|
00000900  64 2c 49 6e 66 6f 49 6e  64 2b 31 39 30 2c 2d 31  |d,InfoInd+190,-1|
00000910  2c 22 49 6e 66 6f 22 2c  30 0d 02 30 2c c8 99 20  |,"Info",0..0,.. |
00000920  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00000930  6f 77 22 2c 2c 54 65 6d  70 6c 61 74 65 73 20 b8  |ow",,Templates .|
00000940  20 49 6e 66 6f 0d 02 3a  5c c8 99 20 22 57 69 6d  | Info..:\.. "Wim|
00000950  70 5f 4c 6f 61 64 54 65  6d 70 6c 61 74 65 22 2c  |p_LoadTemplate",|
00000960  2c 54 65 6d 70 6c 61 74  65 73 2c 4c 6f 63 49 6e  |,Templates,LocIn|
00000970  64 2c 4c 6f 63 49 6e 64  2b 35 39 32 2c 2d 31 2c  |d,LocInd+592,-1,|
00000980  22 57 69 6e 64 6f 77 58  59 22 2c 30 3a 54 65 6d  |"WindowXY",0:Tem|
00000990  70 6c 61 74 65 73 21 36  34 3d 53 70 72 69 74 65  |plates!64=Sprite|
000009a0  73 0d 02 44 2b c8 99 20  22 57 69 6d 70 5f 43 72  |s..D+.. "Wimp_Cr|
000009b0  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 54 65 6d  |eateWindow",,Tem|
000009c0  70 6c 61 74 65 73 20 b8  20 4c 6f 63 0d 02 4e 45  |plates . Loc..NE|
000009d0  c8 99 20 22 57 69 6d 70  5f 4c 6f 61 64 54 65 6d  |.. "Wimp_LoadTem|
000009e0  70 6c 61 74 65 22 2c 2c  54 65 6d 70 6c 61 74 65  |plate",,Template|
000009f0  73 2c 53 61 76 65 49 6e  64 2c 53 61 76 65 49 6e  |s,SaveInd,SaveIn|
00000a00  64 2b 33 35 32 2c 2d 31  2c 22 53 61 76 65 22 2c  |d+352,-1,"Save",|
00000a10  30 0d 02 58 2c c8 99 20  22 57 69 6d 70 5f 43 72  |0..X,.. "Wimp_Cr|
00000a20  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 54 65 6d  |eateWindow",,Tem|
00000a30  70 6c 61 74 65 73 20 b8  20 53 61 76 65 0d 02 62  |plates . Save..b|
00000a40  3c f4 20 49 74 20 69 73  20 69 6d 70 6f 72 74 61  |<. It is importa|
00000a50  6e 74 20 74 68 61 74 20  74 68 65 20 53 74 61 74  |nt that the Stat|
00000a60  73 20 77 69 6e 64 6f 77  20 69 73 20 64 65 66 69  |s window is defi|
00000a70  6e 65 64 20 6c 61 73 74  3a 0d 02 6c 48 c8 99 20  |ned last:..lH.. |
00000a80  22 57 69 6d 70 5f 4c 6f  61 64 54 65 6d 70 6c 61  |"Wimp_LoadTempla|
00000a90  74 65 22 2c 2c 54 65 6d  70 6c 61 74 65 73 2c 53  |te",,Templates,S|
00000aa0  74 61 74 73 49 6e 64 2c  53 74 61 74 73 49 6e 64  |tatsInd,StatsInd|
00000ab0  2b 33 32 30 2c 2d 31 2c  22 53 74 61 74 73 22 2c  |+320,-1,"Stats",|
00000ac0  30 0d 02 76 2d c8 99 20  22 57 69 6d 70 5f 43 72  |0..v-.. "Wimp_Cr|
00000ad0  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 54 65 6d  |eateWindow",,Tem|
00000ae0  70 6c 61 74 65 73 20 b8  20 53 74 61 74 73 0d 02  |plates . Stats..|
00000af0  80 1b c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |.... "Wimp_Close|
00000b00  54 65 6d 70 6c 61 74 65  22 0d 02 8a 05 3a 0d 02  |Template"....:..|
00000b10  94 0f f2 42 75 69 6c 64  4d 65 6e 75 73 0d 02 9e  |...BuildMenus...|
00000b20  05 3a 0d 02 a8 12 e7 20  4f 6d 6e 69 44 65 73 6b  |.:..... OmniDesk|
00000b30  3d 30 20 8c 0d 02 b2 20  20 20 f4 20 50 75 74 20  |=0 ....   . Put |
00000b40  49 63 6f 6e 20 6f 6e 20  74 68 65 20 69 63 6f 6e  |Icon on the icon|
00000b50  2d 62 61 72 0d 02 bc 10  20 20 42 6c 6f 63 6b 21  |-bar....  Block!|
00000b60  30 3d 2d 31 0d 02 c6 31  20 20 42 6c 6f 63 6b 21  |0=-1...1  Block!|
00000b70  34 3d 30 3a 42 6c 6f 63  6b 21 38 3d 30 3a 42 6c  |4=0:Block!8=0:Bl|
00000b80  6f 63 6b 21 31 32 3d 36  38 3a 42 6c 6f 63 6b 21  |ock!12=68:Block!|
00000b90  31 36 3d 36 38 0d 02 d0  35 20 20 42 6c 6f 63 6b  |16=68...5  Block|
00000ba0  21 32 30 3d 26 31 37 30  30 33 30 30 32 3a 24 28  |!20=&17003002:$(|
00000bb0  42 6c 6f 63 6b 2b 32 34  29 3d 22 21 46 6f 72 6d  |Block+24)="!Form|
00000bc0  53 69 7a 65 72 22 2b bd  31 33 0d 02 da 2b 20 20  |Sizer"+.13...+  |
00000bd0  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 49  |.. "Wimp_CreateI|
00000be0  63 6f 6e 22 2c 2c 42 6c  6f 63 6b 20 b8 20 49 63  |con",,Block . Ic|
00000bf0  6f 6e 42 61 72 0d 02 e4  05 cd 0d 02 ee 05 3a 0d  |onBar.........:.|
00000c00  02 f8 0f f2 49 6e 69 74  69 61 6c 69 73 65 0d 03  |....Initialise..|
00000c10  02 26 e7 20 4f 6d 6e 69  44 65 73 6b 3c 3e 30 20  |.&. OmniDesk<>0 |
00000c20  8c 20 f2 44 65 63 6c 61  72 65 54 6f 4f 6d 6e 69  |. .DeclareToOmni|
00000c30  44 65 73 6b 0d 03 0c 52  e7 20 53 74 61 72 74 75  |Desk...R. Startu|
00000c40  70 20 8c 20 44 6f 6e 65  3d b9 3a f4 20 27 2d 53  |p . Done=.:. '-S|
00000c50  74 61 72 74 75 70 27 20  70 61 72 61 6d 65 74 65  |tartup' paramete|
00000c60  72 20 6d 65 61 6e 73 20  27 64 65 63 6c 61 72 65  |r means 'declare|
00000c70  20 61 6e 64 20 64 69 65  20 69 6d 6d 65 64 69 61  | and die immedia|
00000c80  74 65 6c 79 27 2e 0d 03  16 05 3a 0d 03 20 26 f2  |tely'.....:.. &.|
00000c90  55 70 64 61 74 65 49 63  6f 6e 28 49 6e 66 6f 2c  |UpdateIcon(Info,|
00000ca0  33 2c 56 65 72 73 69 6f  6e 4e 75 6d 62 65 72 24  |3,VersionNumber$|
00000cb0  29 0d 03 2a 36 f2 4d 6f  64 65 43 68 61 6e 67 65  |)..*6.ModeChange|
00000cc0  3a f4 20 54 6f 20 75 70  64 61 74 65 20 69 63 6f  |:. To update ico|
00000cd0  6e 2d 62 61 72 20 69 63  6f 6e 20 69 66 20 6e 65  |n-bar icon if ne|
00000ce0  63 65 73 73 61 72 79 0d  03 34 15 f2 43 6c 65 61  |cessary..4..Clea|
00000cf0  6e 55 70 4c 6f 63 57 69  6e 64 6f 77 0d 03 3e 05  |nUpLocWindow..>.|
00000d00  3a 0d 03 48 27 f2 4d 69  6e 69 6d 69 73 65 57 69  |:..H'.MinimiseWi|
00000d10  6d 70 53 6c 6f 74 3a f2  43 6c 65 61 72 53 74 61  |mpSlot:.ClearSta|
00000d20  74 73 57 69 6e 64 6f 77  0d 03 52 05 3a 0d 03 5c  |tsWindow..R.:..\|
00000d30  35 4d 79 52 65 66 3d 2d  31 3a f4 20 4a 75 73 74  |5MyRef=-1:. Just|
00000d40  20 61 6e 20 61 72 62 69  74 72 61 72 79 20 76 61  | an arbitrary va|
00000d50  6c 75 65 20 74 6f 20 73  74 61 72 74 20 77 69 74  |lue to start wit|
00000d60  68 2e 0d 03 66 05 3a 0d  03 70 13 4c 6f 61 64 46  |h...f.:..p.LoadF|
00000d70  69 6c 65 45 72 72 6f 72  3d a3 0d 03 7a 1e 52 65  |ileError=...z.Re|
00000d80  61 64 45 72 72 6f 72 3d  ac 28 a4 4c 6f 61 64 53  |adError=.(.LoadS|
00000d90  65 74 74 69 6e 67 73 29  0d 03 84 05 3a 0d 03 8e  |ettings)....:...|
00000da0  0e ee 20 85 20 f2 45 72  72 6f 72 0d 03 98 94 e7  |.. . .Error.....|
00000db0  20 52 65 61 64 45 72 72  6f 72 20 8c 20 52 65 61  | ReadError . Rea|
00000dc0  64 45 72 72 6f 72 3d a3  3a f2 44 65 66 61 75 6c  |dError=.:.Defaul|
00000dd0  74 53 65 74 74 69 6e 67  73 3a 85 20 39 39 39 39  |tSettings:. 9999|
00000de0  2c 22 41 6e 20 65 72 72  6f 72 20 6f 63 63 75 72  |,"An error occur|
00000df0  72 65 64 20 77 68 69 6c  73 74 20 72 65 61 64 69  |red whilst readi|
00000e00  6e 67 20 74 68 65 20 73  65 74 74 69 6e 67 73 20  |ng the settings |
00000e10  66 69 6c 65 2e 20 44 65  66 61 75 6c 74 20 73 65  |file. Default se|
00000e20  74 74 69 6e 67 73 20 77  69 6c 6c 20 74 68 65 72  |ttings will ther|
00000e30  65 66 6f 72 65 20 62 65  20 75 73 65 64 2e 22 0d  |efore be used.".|
00000e40  03 a2 05 3a 0d 03 ac 29  c8 99 20 22 4f 53 5f 52  |...:...).. "OS_R|
00000e50  65 61 64 4d 6f 6e 6f 74  6f 6e 69 63 54 69 6d 65  |eadMonotonicTime|
00000e60  22 20 b8 20 70 6f 6c 6c  74 69 6d 65 25 0d 03 b6  |" . polltime%...|
00000e70  05 3a 0d 03 c0 17 f4 20  4d 61 69 6e 20 70 72 6f  |.:..... Main pro|
00000e80  67 72 61 6d 20 6c 6f 6f  70 0d 03 ca 05 f5 0d 03  |gram loop.......|
00000e90  d4 40 20 20 c8 99 20 22  57 69 6d 70 5f 50 6f 6c  |.@  .. "Wimp_Pol|
00000ea0  6c 49 64 6c 65 22 2c 25  31 31 30 30 30 30 30 31  |lIdle",%11000001|
00000eb0  31 30 30 30 30 2c 42 6c  6f 63 6b 2c 70 6f 6c 6c  |10000,Block,poll|
00000ec0  74 69 6d 65 25 20 b8 20  52 65 61 73 6f 6e 0d 03  |time% . Reason..|
00000ed0  de 26 20 20 c8 99 20 22  49 6e 74 65 72 66 61 63  |.&  .. "Interfac|
00000ee0  65 5f 50 6f 6c 6c 22 2c  52 65 61 73 6f 6e 2c 2c  |e_Poll",Reason,,|
00000ef0  54 61 73 6b 0d 03 e8 34  20 20 c8 99 20 22 49 6e  |Task...4  .. "In|
00000f00  74 65 72 66 61 63 65 5f  50 72 65 50 72 6f 63 65  |terface_PreProce|
00000f10  73 73 4b 65 79 22 2c 52  65 61 73 6f 6e 2c 42 6c  |ssKey",Reason,Bl|
00000f20  6f 63 6b 2c 54 61 73 6b  0d 03 f2 11 20 20 c8 8e  |ock,Task....  ..|
00000f30  20 52 65 61 73 6f 6e 20  ca 0d 03 fc 33 20 20 20  | Reason ....3   |
00000f40  20 c9 20 30 20 3a 20 c8  99 20 22 4f 53 5f 52 65  | . 0 : .. "OS_Re|
00000f50  61 64 4d 6f 6e 6f 74 6f  6e 69 63 54 69 6d 65 22  |adMonotonicTime"|
00000f60  20 b8 20 70 6f 6c 6c 74  69 6d 65 25 0d 04 06 4c  | . polltime%...L|
00000f70  20 20 20 20 20 20 20 20  20 20 20 20 20 70 6f 6c  |             pol|
00000f80  6c 74 69 6d 65 25 2b 3d  31 30 30 3a f4 20 44 6f  |ltime%+=100:. Do|
00000f90  20 61 20 57 69 6d 70 5f  50 6f 6c 6c 20 61 70 70  | a Wimp_Poll app|
00000fa0  72 6f 78 69 6d 61 74 65  6c 79 20 6f 6e 63 65 20  |roximately once |
00000fb0  61 20 73 65 63 6f 6e 64  0d 04 10 5a 20 20 20 20  |a second...Z    |
00000fc0  20 20 20 20 20 20 20 20  20 e7 20 44 6f 4d 6f 64  |         . DoMod|
00000fd0  65 43 68 61 6e 67 65 20  8c 20 e7 20 a4 4f 70 65  |eChange . . .Ope|
00000fe0  6e 53 74 61 74 65 28 53  74 61 74 73 29 20 8c 20  |nState(Stats) . |
00000ff0  f2 4f 70 65 6e 28 53 74  61 74 73 2c a3 2c 58 50  |.Open(Stats,.,XP|
00001000  6f 73 69 74 69 6f 6e 2c  59 50 6f 73 69 74 69 6f  |osition,YPositio|
00001010  6e 29 0d 04 1a 15 20 20  20 20 c9 20 31 20 3a 20  |n)....    . 1 : |
00001020  f2 52 65 64 72 61 77 0d  04 24 29 20 20 20 20 c9  |.Redraw..$)    .|
00001030  20 32 20 3a 20 c8 99 20  22 57 69 6d 70 5f 4f 70  | 2 : .. "Wimp_Op|
00001040  65 6e 57 69 6e 64 6f 77  22 2c 2c 42 6c 6f 63 6b  |enWindow",,Block|
00001050  0d 04 2e 2a 20 20 20 20  c9 20 33 20 3a 20 c8 99  |...*    . 3 : ..|
00001060  20 22 57 69 6d 70 5f 43  6c 6f 73 65 57 69 6e 64  | "Wimp_CloseWind|
00001070  6f 77 22 2c 2c 42 6c 6f  63 6b 0d 04 38 20 20 20  |ow",,Block..8   |
00001080  20 20 20 20 20 20 20 20  20 20 20 e7 20 45 78 69  |           . Exi|
00001090  74 20 8c 20 44 6f 6e 65  3d b9 0d 04 42 1a 20 20  |t . Done=...B.  |
000010a0  20 20 c9 20 36 20 3a 20  f2 4d 6f 75 73 65 42 75  |  . 6 : .MouseBu|
000010b0  74 74 6f 6e 0d 04 4c 1b  20 20 20 20 c9 20 37 20  |tton..L.    . 7 |
000010c0  3a 20 f2 44 72 61 67 46  69 6e 69 73 68 65 64 0d  |: .DragFinished.|
000010d0  04 56 19 20 20 20 20 c9  20 38 20 3a 20 f2 4b 65  |.V.    . 8 : .Ke|
000010e0  79 50 72 65 73 73 65 64  0d 04 60 19 20 20 20 20  |yPressed..`.    |
000010f0  c9 20 39 20 3a 20 f2 44  65 63 6f 64 65 4d 65 6e  |. 9 : .DecodeMen|
00001100  75 0d 04 6a 24 20 20 20  20 c9 20 31 37 2c 31 38  |u..j$    . 17,18|
00001110  2c 31 39 20 3a 20 f2 52  65 63 69 65 76 65 4d 65  |,19 : .RecieveMe|
00001120  73 73 61 67 65 0d 04 74  07 20 20 cb 0d 04 7e 0a  |ssage..t.  ...~.|
00001130  fd 20 44 6f 6e 65 0d 04  88 0f f2 53 61 79 47 6f  |. Done.....SayGo|
00001140  6f 64 62 79 65 0d 04 92  21 c8 99 20 22 49 6e 74  |odbye...!.. "Int|
00001150  65 72 66 61 63 65 5f 43  6c 6f 73 65 44 6f 77 6e  |erface_CloseDown|
00001160  22 2c 54 61 73 6b 0d 04  9c 26 c8 99 20 22 57 69  |",Task...&.. "Wi|
00001170  6d 70 5f 43 6c 6f 73 65  44 6f 77 6e 22 2c 54 61  |mp_CloseDown",Ta|
00001180  73 6b 2c 26 34 42 35 33  34 31 35 34 0d 04 a6 05  |sk,&4B534154....|
00001190  e0 0d 04 b0 05 3a 0d 04  ba 0c dd 20 f2 45 72 72  |.....:..... .Err|
000011a0  6f 72 0d 04 c4 1c 43 6c  69 63 6b 3d 30 3a 42 6c  |or....Click=0:Bl|
000011b0  6f 63 6b 21 30 3d 9f 3a  c8 8e 20 9f 20 ca 0d 04  |ock!0=.:.. . ...|
000011c0  ce 1b 20 20 c9 20 39 39  39 39 3a f4 20 43 75 73  |..  . 9999:. Cus|
000011d0  74 6f 6d 20 65 72 72 6f  72 0d 04 d8 18 20 20 20  |tom error....   |
000011e0  20 24 28 42 6c 6f 63 6b  2b 34 29 3d f6 24 2b bd  | $(Block+4)=.$+.|
000011f0  30 0d 04 e2 3f 20 20 20  20 c8 99 20 22 57 69 6d  |0...?    .. "Wim|
00001200  70 5f 52 65 70 6f 72 74  45 72 72 6f 72 22 2c 42  |p_ReportError",B|
00001210  6c 6f 63 6b 2c 31 37 2c  22 4e 6f 74 69 63 65 20  |lock,17,"Notice |
00001220  66 72 6f 6d 20 46 6f 72  6d 20 53 69 7a 65 72 22  |from Form Sizer"|
00001230  0d 04 ec 07 20 20 7f 0d  04 f6 76 20 20 20 20 24  |....  ....v    $|
00001240  28 42 6c 6f 63 6b 2b 34  29 3d f6 24 2b 22 20 28  |(Block+4)=.$+" (|
00001250  69 6e 74 65 72 6e 61 6c  20 65 72 72 6f 72 20 63  |internal error c|
00001260  6f 64 65 20 22 2b c3 9e  2b 22 29 2e 20 43 6c 69  |ode "+..+"). Cli|
00001270  63 6b 20 6f 6e 20 4f 4b  20 74 6f 20 63 6f 6e 74  |ck on OK to cont|
00001280  69 6e 75 65 2c 20 6f 72  20 43 61 6e 63 65 6c 20  |inue, or Cancel |
00001290  74 6f 20 74 65 72 6d 69  6e 61 74 65 20 74 68 65  |to terminate the|
000012a0  20 70 72 6f 67 72 61 6d  2e 22 2b bd 30 0d 05 00  | program."+.0...|
000012b0  38 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 52 65  |8    .. "Wimp_Re|
000012c0  70 6f 72 74 45 72 72 6f  72 22 2c 42 6c 6f 63 6b  |portError",Block|
000012d0  2c 33 2c 54 61 73 6b 6e  61 6d 65 24 20 b8 20 2c  |,3,Taskname$ . ,|
000012e0  43 6c 69 63 6b 0d 05 0a  05 cb 0d 05 14 5e e7 20  |Click........^. |
000012f0  43 6c 69 63 6b 3d 32 20  8c 20 f2 53 61 79 47 6f  |Click=2 . .SayGo|
00001300  6f 64 62 79 65 3a c8 99  20 22 49 6e 74 65 72 66  |odbye:.. "Interf|
00001310  61 63 65 5f 43 6c 6f 73  65 44 6f 77 6e 22 2c 54  |ace_CloseDown",T|
00001320  61 73 6b 3a c8 99 20 22  57 69 6d 70 5f 43 6c 6f  |ask:.. "Wimp_Clo|
00001330  73 65 44 6f 77 6e 22 2c  54 61 73 6b 2c 26 34 42  |seDown",Task,&4B|
00001340  35 33 34 31 35 34 3a e0  0d 05 1e 05 e1 0d 05 28  |534154:........(|
00001350  05 3a 0d 05 32 2e dd 20  f2 4f 70 65 6e 28 57 69  |.:..2.. .Open(Wi|
00001360  6e 64 6f 77 48 61 6e 64  6c 65 2c 54 6f 70 4f 66  |ndowHandle,TopOf|
00001370  53 74 61 63 6b 2c 61 63  72 6f 73 73 2c 75 70 29  |Stack,across,up)|
00001380  0d 05 3c 18 42 6c 6f 63  6b 21 30 3d 57 69 6e 64  |..<.Block!0=Wind|
00001390  6f 77 48 61 6e 64 6c 65  0d 05 46 23 c8 99 20 22  |owHandle..F#.. "|
000013a0  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
000013b0  61 74 65 22 2c 2c 42 6c  6f 63 6b 0d 05 50 4a e7  |ate",,Block..PJ.|
000013c0  20 28 61 63 72 6f 73 73  3c 3e 2d 31 29 20 80 20  | (across<>-1) . |
000013d0  28 61 63 72 6f 73 73 3c  3e 2d 31 29 20 8c 20 f2  |(across<>-1) . .|
000013e0  44 65 63 69 64 65 57 69  6e 64 6f 77 50 6f 73 69  |DecideWindowPosi|
000013f0  74 69 6f 6e 28 42 6c 6f  63 6b 2c 61 63 72 6f 73  |tion(Block,acros|
00001400  73 2c 75 70 29 0d 05 5a  1e e7 20 54 6f 70 4f 66  |s,up)..Z.. TopOf|
00001410  53 74 61 63 6b 20 8c 20  42 6c 6f 63 6b 21 32 38  |Stack . Block!28|
00001420  3d 2d 31 0d 05 64 1f c8  99 20 22 57 69 6d 70 5f  |=-1..d... "Wimp_|
00001430  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 42 6c 6f  |OpenWindow",,Blo|
00001440  63 6b 0d 05 6e 05 e1 0d  05 78 05 3a 0d 05 82 1a  |ck..n....x.:....|
00001450  dd 20 f2 43 6c 6f 73 65  28 57 69 6e 64 6f 77 48  |. .Close(WindowH|
00001460  61 6e 64 6c 65 29 0d 05  8c 18 42 6c 6f 63 6b 21  |andle)....Block!|
00001470  30 3d 57 69 6e 64 6f 77  48 61 6e 64 6c 65 0d 05  |0=WindowHandle..|
00001480  96 23 c8 99 20 22 57 69  6d 70 5f 47 65 74 57 69  |.#.. "Wimp_GetWi|
00001490  6e 64 6f 77 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |ndowState",,Bloc|
000014a0  6b 0d 05 a0 20 c8 99 20  22 57 69 6d 70 5f 43 6c  |k... .. "Wimp_Cl|
000014b0  6f 73 65 57 69 6e 64 6f  77 22 2c 2c 42 6c 6f 63  |oseWindow",,Bloc|
000014c0  6b 0d 05 aa 05 e1 0d 05  b4 05 3a 0d 05 be 2c dd  |k.........:...,.|
000014d0  20 f2 44 65 63 69 64 65  57 69 6e 64 6f 77 50 6f  | .DecideWindowPo|
000014e0  73 69 74 69 6f 6e 28 42  6c 6f 63 6b 2c 61 63 72  |sition(Block,acr|
000014f0  6f 73 73 2c 75 70 29 0d  05 c8 4c f4 20 55 73 65  |oss,up)...L. Use|
00001500  20 6f 66 20 74 68 69 73  20 70 72 6f 63 65 64 75  | of this procedu|
00001510  72 65 20 6c 65 74 73 20  79 6f 75 20 6f 70 65 6e  |re lets you open|
00001520  20 77 69 6e 64 6f 77 73  20 6f 6e 20 61 6e 20 69  | windows on an i|
00001530  6e 76 69 73 69 62 6c 65  20 67 72 69 64 20 77 68  |nvisible grid wh|
00001540  69 63 68 0d 05 d2 49 f4  20 61 75 74 6f 6d 61 74  |ich...I. automat|
00001550  69 63 61 6c 6c 79 20 66  69 74 73 20 69 74 73 65  |ically fits itse|
00001560  6c 66 20 74 6f 20 74 68  65 20 73 63 72 65 65 6e  |lf to the screen|
00001570  20 6d 6f 64 65 20 69 6e  20 75 73 65 2e 20 54 68  | mode in use. Th|
00001580  65 72 65 20 61 72 65 20  66 69 76 65 0d 05 dc 4a  |ere are five...J|
00001590  f4 20 70 6f 73 69 74 69  6f 6e 73 20 61 63 72 6f  |. positions acro|
000015a0  73 73 20 28 6c 65 66 74  2c 20 6d 69 64 2d 6c 65  |ss (left, mid-le|
000015b0  66 74 2c 20 63 65 6e 74  72 65 2c 20 6d 69 64 2d  |ft, centre, mid-|
000015c0  72 69 67 68 74 2c 20 72  69 67 68 74 29 20 61 6e  |right, right) an|
000015d0  64 20 66 69 76 65 0d 05  e6 47 f4 20 70 6f 73 69  |d five...G. posi|
000015e0  74 69 6f 6e 73 20 75 70  20 28 62 6f 74 74 6f 6d  |tions up (bottom|
000015f0  20 6f 66 20 73 63 72 65  65 6e 2c 20 61 62 6f 76  | of screen, abov|
00001600  65 20 69 63 6f 6e 2d 62  61 72 2c 20 63 65 6e 74  |e icon-bar, cent|
00001610  72 65 20 6f 66 20 73 63  72 65 65 6e 2c 0d 05 f0  |re of screen,...|
00001620  2b f4 20 63 65 6e 74 72  65 20 74 6f 70 20 6f 66  |+. centre top of|
00001630  20 73 63 72 65 65 6e 2c  20 74 6f 70 20 6f 66 20  | screen, top of |
00001640  73 63 72 65 65 6e 29 2e  0d 05 fa 07 20 20 3a 0d  |screen).....  :.|
00001650  06 04 43 58 70 69 78 65  6c 73 3d a4 4d 6f 64 65  |..CXpixels=.Mode|
00001660  49 6e 66 6f 28 22 58 50  69 78 65 6c 73 22 2c 2d  |Info("XPixels",-|
00001670  31 29 3a 59 70 69 78 65  6c 73 3d a4 4d 6f 64 65  |1):Ypixels=.Mode|
00001680  49 6e 66 6f 28 22 59 50  69 78 65 6c 73 22 2c 2d  |Info("YPixels",-|
00001690  31 29 0d 06 0e 4f 58 45  69 67 46 61 63 74 6f 72  |1)...OXEigFactor|
000016a0  3d a4 4d 6f 64 65 49 6e  66 6f 28 22 58 45 69 67  |=.ModeInfo("XEig|
000016b0  46 61 63 74 6f 72 22 2c  2d 31 29 3a 59 45 69 67  |Factor",-1):YEig|
000016c0  46 61 63 74 6f 72 3d a4  4d 6f 64 65 49 6e 66 6f  |Factor=.ModeInfo|
000016d0  28 22 59 45 69 67 46 61  63 74 6f 72 22 2c 2d 31  |("YEigFactor",-1|
000016e0  29 0d 06 18 07 20 20 3a  0d 06 22 38 74 6f 70 3d  |)....  :.."8top=|
000016f0  42 6c 6f 63 6b 21 31 36  3a 72 69 67 68 74 3d 42  |Block!16:right=B|
00001700  6c 6f 63 6b 21 31 32 3a  62 6f 74 3d 42 6c 6f 63  |lock!12:bot=Bloc|
00001710  6b 21 38 3a 6c 65 66 74  3d 42 6c 6f 63 6b 21 34  |k!8:left=Block!4|
00001720  0d 06 2c 41 c8 99 20 22  57 69 6d 70 5f 4f 70 65  |..,A.. "Wimp_Ope|
00001730  6e 57 69 6e 64 6f 77 22  2c 2c 42 6c 6f 63 6b 3a  |nWindow",,Block:|
00001740  c8 99 20 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |.. "Wimp_GetWind|
00001750  6f 77 4f 75 74 6c 69 6e  65 22 2c 2c 42 6c 6f 63  |owOutline",,Bloc|
00001760  6b 0d 06 36 26 54 42 3d  28 28 42 6c 6f 63 6b 21  |k..6&TB=((Block!|
00001770  31 36 29 2d 74 6f 70 29  2f 28 32 5e 59 45 69 67  |16)-top)/(2^YEig|
00001780  46 61 63 74 6f 72 29 0d  06 40 28 56 53 3d 28 28  |Factor)..@(VS=((|
00001790  42 6c 6f 63 6b 21 31 32  29 2d 72 69 67 68 74 29  |Block!12)-right)|
000017a0  2f 28 32 5e 58 45 69 67  46 61 63 74 6f 72 29 0d  |/(2^XEigFactor).|
000017b0  06 4a 25 48 53 3d 28 62  6f 74 2d 28 42 6c 6f 63  |.J%HS=(bot-(Bloc|
000017c0  6b 21 38 29 29 2f 28 32  5e 59 45 69 67 46 61 63  |k!8))/(2^YEigFac|
000017d0  74 6f 72 29 0d 06 54 26  4c 50 3d 28 6c 65 66 74  |tor)..T&LP=(left|
000017e0  2d 28 42 6c 6f 63 6b 21  34 29 29 2f 28 32 5e 58  |-(Block!4))/(2^X|
000017f0  45 69 67 46 61 63 74 6f  72 29 0d 06 5e 4b f4 20  |EigFactor)..^K. |
00001800  4c 50 20 69 73 20 4c 65  66 74 20 50 69 78 65 6c  |LP is Left Pixel|
00001810  3a 20 6e 6f 72 6d 61 6c  6c 79 20 70 72 65 73 65  |: normally prese|
00001820  6e 74 2c 20 62 75 74 20  6e 6f 74 20 69 66 20 77  |nt, but not if w|
00001830  69 6e 64 6f 77 20 69 73  20 74 72 61 6e 73 70 61  |indow is transpa|
00001840  72 65 6e 74 2e 0d 06 68  25 77 69 64 74 68 3d 28  |rent...h%width=(|
00001850  72 69 67 68 74 2d 6c 65  66 74 29 2f 28 32 5e 58  |right-left)/(2^X|
00001860  45 69 67 46 61 63 74 6f  72 29 0d 06 72 23 68 65  |EigFactor)..r#he|
00001870  69 67 68 74 3d 28 74 6f  70 2d 62 6f 74 29 2f 28  |ight=(top-bot)/(|
00001880  32 5e 59 45 69 67 46 61  63 74 6f 72 29 0d 06 7c  |2^YEigFactor)..||
00001890  0f c8 8e 20 61 63 72 6f  73 73 20 ca 0d 06 86 0e  |... across .....|
000018a0  20 20 c9 20 30 3a 78 3d  4c 50 0d 06 90 2c 20 20  |  . 0:x=LP...,  |
000018b0  c9 20 31 3a 78 3d 4c 50  2b 28 28 58 70 69 78 65  |. 1:x=LP+((Xpixe|
000018c0  6c 73 2b 31 29 2d 28 77  69 64 74 68 2b 4c 50 2b  |ls+1)-(width+LP+|
000018d0  56 53 29 29 2f 34 0d 06  9a 2c 20 20 c9 20 32 3a  |VS))/4...,  . 2:|
000018e0  78 3d 4c 50 2b 28 28 58  70 69 78 65 6c 73 2b 31  |x=LP+((Xpixels+1|
000018f0  29 2d 28 77 69 64 74 68  2b 4c 50 2b 56 53 29 29  |)-(width+LP+VS))|
00001900  2f 32 0d 06 a4 32 20 20  c9 20 33 3a 78 3d 4c 50  |/2...2  . 3:x=LP|
00001910  2b 28 33 2a 28 28 28 58  70 69 78 65 6c 73 2b 31  |+(3*(((Xpixels+1|
00001920  29 2d 28 77 69 64 74 68  2b 4c 50 2b 56 53 29 29  |)-(width+LP+VS))|
00001930  2f 34 29 29 0d 06 ae 22  20 20 c9 20 34 3a 78 3d  |/4))..."  . 4:x=|
00001940  28 58 70 69 78 65 6c 73  2b 31 29 2d 28 77 69 64  |(Xpixels+1)-(wid|
00001950  74 68 2b 56 53 29 0d 06  b8 05 cb 0d 06 c2 0b c8  |th+VS)..........|
00001960  8e 20 75 70 20 ca 0d 06  cc 0e 20 20 c9 20 30 3a  |. up .....  . 0:|
00001970  79 3d 48 53 0d 06 d6 23  20 20 c9 20 31 3a 79 3d  |y=HS...#  . 1:y=|
00001980  48 53 2b 28 31 33 32 2f  28 32 5e 59 45 69 67 46  |HS+(132/(2^YEigF|
00001990  61 63 74 6f 72 29 29 0d  06 e0 2d 20 20 c9 20 32  |actor))...-  . 2|
000019a0  3a 79 3d 48 53 2b 28 28  59 70 69 78 65 6c 73 2b  |:y=HS+((Ypixels+|
000019b0  31 29 2d 28 68 65 69 67  68 74 2b 54 42 2b 48 53  |1)-(height+TB+HS|
000019c0  29 29 2f 32 0d 06 ea 33  20 20 c9 20 33 3a 79 3d  |))/2...3  . 3:y=|
000019d0  48 53 2b 28 33 2a 28 28  28 59 70 69 78 65 6c 73  |HS+(3*(((Ypixels|
000019e0  2b 31 29 2d 28 68 65 69  67 68 74 2b 54 42 2b 48  |+1)-(height+TB+H|
000019f0  53 29 29 2f 34 29 29 0d  06 f4 23 20 20 c9 20 34  |S))/4))...#  . 4|
00001a00  3a 79 3d 28 59 70 69 78  65 6c 73 2b 31 29 2d 28  |:y=(Ypixels+1)-(|
00001a10  68 65 69 67 68 74 2b 54  42 29 0d 06 fe 05 cb 0d  |height+TB)......|
00001a20  07 08 28 f4 20 41 62 6f  76 65 20 63 6f 6f 72 64  |..(. Above coord|
00001a30  69 6e 61 74 65 73 20 70  6f 73 69 74 69 6f 6e 20  |inates position |
00001a40  77 69 6e 64 6f 77 2e 0d  07 12 28 f4 20 4e 6f 77  |window....(. Now|
00001a50  20 63 6f 6e 76 65 72 74  20 74 6f 20 73 63 72 65  | convert to scre|
00001a60  65 6e 20 63 6f 6f 72 64  69 6e 61 74 65 73 3a 0d  |en coordinates:.|
00001a70  07 1c 29 78 3d 78 2a 28  32 5e 58 45 69 67 46 61  |..)x=x*(2^XEigFa|
00001a80  63 74 6f 72 29 3a 79 3d  79 2a 28 32 5e 59 45 69  |ctor):y=y*(2^YEi|
00001a90  67 46 61 63 74 6f 72 29  0d 07 26 3b 77 69 64 74  |gFactor)..&;widt|
00001aa0  68 3d 77 69 64 74 68 2a  28 32 5e 58 45 69 67 46  |h=width*(2^XEigF|
00001ab0  61 63 74 6f 72 29 3a 68  65 69 67 68 74 3d 68 65  |actor):height=he|
00001ac0  69 67 68 74 2a 28 32 5e  59 45 69 67 46 61 63 74  |ight*(2^YEigFact|
00001ad0  6f 72 29 0d 07 30 1e 42  6c 6f 63 6b 21 31 32 3d  |or)..0.Block!12=|
00001ae0  78 2b 77 69 64 74 68 3a  42 6c 6f 63 6b 21 34 3d  |x+width:Block!4=|
00001af0  78 0d 07 3a 1f 42 6c 6f  63 6b 21 31 36 3d 79 2b  |x..:.Block!16=y+|
00001b00  68 65 69 67 68 74 3a 42  6c 6f 63 6b 21 38 3d 79  |height:Block!8=y|
00001b10  0d 07 44 05 e1 0d 07 4e  05 3a 0d 07 58 4f f4 20  |..D....N.:..XO. |
00001b20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001b60  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 07 62 18 f4 20 57  |---------..b.. W|
00001b70  69 6d 70 20 70 6f 6c 6c  20 72 6f 75 74 69 6e 65  |imp poll routine|
00001b80  73 0d 07 6c 4f f4 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |s..lO. ---------|
00001b90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001bd0  0d 07 76 05 3a 0d 07 80  0d dd 20 f2 52 65 64 72  |..v.:..... .Redr|
00001be0  61 77 0d 07 8a 14 e7 20  44 6f 4d 6f 64 65 43 68  |aw..... DoModeCh|
00001bf0  61 6e 67 65 20 8c 0d 07  94 64 20 20 f4 20 52 65  |ange ....d  . Re|
00001c00  2d 6f 70 65 6e 69 6e 67  20 77 69 6e 64 6f 77 73  |-opening windows|
00001c10  20 6e 65 65 64 20 61 6e  20 65 78 74 72 61 20 77  | need an extra w|
00001c20  69 6d 70 5f 70 6f 6c 6c  20 74 6f 20 68 61 70 70  |imp_poll to happ|
00001c30  65 6e 20 61 66 74 65 72  20 74 68 65 20 6d 6f 64  |en after the mod|
00001c40  65 20 63 68 61 6e 67 65  20 69 6e 20 6f 72 64 65  |e change in orde|
00001c50  72 20 74 6f 20 77 6f 72  6b 3a 0d 07 9e 3e 20 20  |r to work:...>  |
00001c60  e7 20 a4 4f 70 65 6e 53  74 61 74 65 28 53 74 61  |. .OpenState(Sta|
00001c70  74 73 29 20 8c 20 f2 4f  70 65 6e 28 53 74 61 74  |ts) . .Open(Stat|
00001c80  73 2c a3 2c 58 50 6f 73  69 74 69 6f 6e 2c 59 50  |s,.,XPosition,YP|
00001c90  6f 73 69 74 69 6f 6e 29  0d 07 a8 14 20 20 44 6f  |osition)....  Do|
00001ca0  4d 6f 64 65 43 68 61 6e  67 65 3d a3 0d 07 b2 05  |ModeChange=.....|
00001cb0  cd 0d 07 bc 28 c8 99 20  22 57 69 6d 70 5f 52 65  |....(.. "Wimp_Re|
00001cc0  64 72 61 77 57 69 6e 64  6f 77 22 2c 2c 42 6c 6f  |drawWindow",,Blo|
00001cd0  63 6b 20 b8 20 66 6c 61  67 0d 07 c6 0b c8 95 20  |ck . flag...... |
00001ce0  66 6c 61 67 0d 07 d0 2a  20 20 c8 99 20 22 49 6e  |flag...*  .. "In|
00001cf0  74 65 72 66 61 63 65 5f  52 65 6e 64 65 72 33 64  |terface_Render3d|
00001d00  57 69 6e 64 6f 77 22 2c  2c 42 6c 6f 63 6b 0d 07  |Window",,Block..|
00001d10  da 2a 20 20 c8 99 20 22  57 69 6d 70 5f 47 65 74  |.*  .. "Wimp_Get|
00001d20  52 65 63 74 61 6e 67 6c  65 22 2c 2c 42 6c 6f 63  |Rectangle",,Bloc|
00001d30  6b 20 b8 20 66 6c 61 67  0d 07 e4 05 ce 0d 07 ee  |k . flag........|
00001d40  05 e1 0d 07 f8 05 3a 0d  08 02 15 dd 20 f2 52 65  |......:..... .Re|
00001d50  63 69 65 76 65 4d 65 73  73 61 67 65 0d 08 0c 11  |cieveMessage....|
00001d60  c8 8e 20 42 6c 6f 63 6b  21 31 36 20 ca 0d 08 16  |.. Block!16 ....|
00001d70  12 20 20 c9 20 30 20 3a  20 44 6f 6e 65 3d b9 0d  |.  . 0 : Done=..|
00001d80  08 20 36 20 20 c9 20 31  20 3a 20 f4 20 41 20 74  |. 6  . 1 : . A t|
00001d90  61 73 6b 20 69 73 20 74  72 79 69 6e 67 20 74 6f  |ask is trying to|
00001da0  20 73 61 76 65 20 61 20  66 69 6c 65 20 69 6e 74  | save a file int|
00001db0  6f 20 75 73 2e 0d 08 2a  55 20 20 20 20 20 20 20  |o us...*U       |
00001dc0  20 20 20 20 f4 20 57 65  20 6d 75 73 74 20 74 65  |    . We must te|
00001dd0  6c 6c 20 69 74 20 74 6f  20 75 73 65 20 3c 57 69  |ll it to use <Wi|
00001de0  6d 70 24 53 63 72 61 70  3e 20 62 65 63 61 75 73  |mp$Scrap> becaus|
00001df0  65 20 52 41 4d 20 74 72  61 6e 73 66 65 72 20 69  |e RAM transfer i|
00001e00  73 20 74 6f 6f 20 6d 75  63 68 0d 08 34 3b 20 20  |s too much..4;  |
00001e10  20 20 20 20 20 20 20 20  20 f4 20 6c 69 6b 65 20  |         . like |
00001e20  68 61 72 64 20 77 6f 72  6b 20 66 6f 72 20 61 20  |hard work for a |
00001e30  75 74 69 6c 69 74 79 20  6f 66 20 74 68 69 73 20  |utility of this |
00001e40  73 69 7a 65 2e 0d 08 3e  22 20 20 20 20 20 20 20  |size...>"       |
00001e50  20 20 20 20 e7 20 42 6c  6f 63 6b 21 31 32 3c 3e  |    . Block!12<>|
00001e60  4d 79 52 65 66 20 8c 0d  08 48 59 20 20 20 20 20  |MyRef ...HY     |
00001e70  20 20 20 20 20 20 20 20  f4 20 49 67 6e 6f 72 65  |        . Ignore|
00001e80  20 74 68 65 20 6d 65 73  73 61 67 65 20 69 66 20  | the message if |
00001e90  74 68 65 20 75 73 65 72  20 68 61 73 20 64 72 61  |the user has dra|
00001ea0  67 67 65 64 20 6f 75 72  20 73 61 76 65 20 66 69  |gged our save fi|
00001eb0  6c 65 20 62 61 63 6b 20  69 6e 74 6f 20 75 73 2e  |le back into us.|
00001ec0  0d 08 52 37 20 20 20 20  20 20 20 20 20 20 20 20  |..R7            |
00001ed0  20 42 6c 6f 63 6b 21 30  3d 36 30 3a 42 6c 6f 63  | Block!0=60:Bloc|
00001ee0  6b 21 31 32 3d 42 6c 6f  63 6b 21 38 3a 42 6c 6f  |k!12=Block!8:Blo|
00001ef0  63 6b 21 31 36 3d 32 0d  08 5c 3a 20 20 20 20 20  |ck!16=2..\:     |
00001f00  20 20 20 20 20 20 20 20  42 6c 6f 63 6b 21 33 36  |        Block!36|
00001f10  3d 2d 31 3a 24 28 42 6c  6f 63 6b 2b 34 34 29 3d  |=-1:$(Block+44)=|
00001f20  22 3c 57 69 6d 70 24 53  63 72 61 70 3e 22 2b bd  |"<Wimp$Scrap>"+.|
00001f30  30 0d 08 66 37 20 20 20  20 20 20 20 20 20 20 20  |0..f7           |
00001f40  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |  .. "Wimp_SendM|
00001f50  65 73 73 61 67 65 22 2c  31 37 2c 42 6c 6f 63 6b  |essage",17,Block|
00001f60  2c 42 6c 6f 63 6b 21 34  0d 08 70 10 20 20 20 20  |,Block!4..p.    |
00001f70  20 20 20 20 20 20 20 cd  0d 08 7a 46 20 20 c9 20  |       ...zF  . |
00001f80  32 20 3a 20 f4 20 57 65  27 72 65 20 73 61 76 69  |2 : . We're savi|
00001f90  6e 67 20 6f 75 74 20 74  6f 20 61 6e 6f 74 68 65  |ng out to anothe|
00001fa0  72 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 6f 72  |r application or|
00001fb0  20 74 6f 20 74 68 65 20  66 69 6c 65 72 2e 0d 08  | to the filer...|
00001fc0  84 4a 20 20 20 20 20 20  20 20 20 20 20 f4 20 57  |.J           . W|
00001fd0  65 27 76 65 20 6a 75 73  74 20 72 65 63 65 69 76  |e've just receiv|
00001fe0  65 64 20 61 63 6b 6e 6f  77 6c 65 64 67 65 6d 65  |ed acknowledgeme|
00001ff0  6e 74 20 74 6f 20 67 6f  20 61 68 65 61 64 20 61  |nt to go ahead a|
00002000  6e 64 20 73 61 76 65 2e  0d 08 8e 5a 20 20 20 20  |nd save....Z    |
00002010  20 20 20 20 20 20 20 46  69 6c 65 4e 61 6d 65 24  |       FileName$|
00002020  3d 22 22 3a 4e 3d 34 34  3a c8 95 20 28 28 42 6c  |="":N=44:.. ((Bl|
00002030  6f 63 6b 3f 4e 29 3e 3d  33 32 29 20 80 20 28 4e  |ock?N)>=32) . (N|
00002040  3c 32 35 36 29 3a 46 69  6c 65 4e 61 6d 65 24 2b  |<256):FileName$+|
00002050  3d bd 28 42 6c 6f 63 6b  3f 4e 29 3a 4e 2b 3d 31  |=.(Block?N):N+=1|
00002060  3a ce 0d 08 98 87 20 20  20 20 20 20 20 20 20 20  |:.....          |
00002070  20 e7 20 ac 20 a4 53 61  76 65 53 74 61 74 73 54  | . . .SaveStatsT|
00002080  6f 46 69 6c 65 28 54 65  6d 70 6c 61 74 65 73 46  |oFile(TemplatesF|
00002090  69 6c 65 4e 61 6d 65 24  2c 46 69 6c 65 4e 61 6d  |ileName$,FileNam|
000020a0  65 24 29 20 8c 20 f2 44  65 6c 65 74 65 57 69 6d  |e$) . .DeleteWim|
000020b0  70 53 63 72 61 70 3a 85  20 39 39 39 39 2c 22 41  |pScrap:. 9999,"A|
000020c0  6e 20 65 72 72 6f 72 20  6f 63 63 75 72 72 65 64  |n error occurred|
000020d0  20 77 68 69 6c 73 74 20  73 61 76 69 6e 67 20 74  | whilst saving t|
000020e0  68 65 20 66 69 6c 65 2e  22 0d 08 a2 51 20 20 20  |he file."...Q   |
000020f0  20 20 20 20 20 20 20 20  42 6c 6f 63 6b 21 31 32  |        Block!12|
00002100  3d 42 6c 6f 63 6b 21 38  3a 42 6c 6f 63 6b 21 31  |=Block!8:Block!1|
00002110  36 3d 33 3a c8 99 20 22  57 69 6d 70 5f 53 65 6e  |6=3:.. "Wimp_Sen|
00002120  64 4d 65 73 73 61 67 65  22 2c 31 37 2c 42 6c 6f  |dMessage",17,Blo|
00002130  63 6b 2c 42 6c 6f 63 6b  21 34 0d 08 ac 49 20 20  |ck,Block!4...I  |
00002140  20 20 20 20 20 20 20 20  20 4d 79 52 65 66 3d 2d  |         MyRef=-|
00002150  31 3a f4 20 49 6e 76 61  6c 69 64 61 74 65 20 6f  |1:. Invalidate o|
00002160  6e 63 65 20 61 67 61 69  6e 2c 20 75 6e 74 69 6c  |nce again, until|
00002170  20 6f 75 72 20 6e 65 78  74 20 73 61 76 65 20 6f  | our next save o|
00002180  75 74 2e 0d 08 b6 2c 20  20 20 20 20 20 20 20 20  |ut....,         |
00002190  20 20 e7 20 46 69 6c 65  4e 61 6d 65 24 3c 3e 22  |  . FileName$<>"|
000021a0  3c 57 69 6d 70 24 53 63  72 61 70 3e 22 20 8c 0d  |<Wimp$Scrap>" ..|
000021b0  08 c0 2e 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
000021c0  f2 55 70 64 61 74 65 49  63 6f 6e 28 53 61 76 65  |.UpdateIcon(Save|
000021d0  2c 32 2c 46 69 6c 65 4e  61 6d 65 24 29 0d 08 ca  |,2,FileName$)...|
000021e0  32 20 20 20 20 20 20 20  20 20 20 20 20 20 f4 20  |2             . |
000021f0  50 75 74 20 66 75 6c 6c  20 66 69 6c 65 6e 61 6d  |Put full filenam|
00002200  65 20 69 6e 74 6f 20 73  61 76 65 20 62 6f 78 0d  |e into save box.|
00002210  08 d4 10 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |...           ..|
00002220  08 de 2b 20 20 c9 20 33  20 3a 20 f4 20 46 69 6c  |..+  . 3 : . Fil|
00002230  65 20 64 72 61 67 67 65  64 20 69 6e 74 6f 20 61  |e dragged into a|
00002240  70 70 6c 69 63 61 74 69  6f 6e 0d 08 e8 20 20 20  |pplication...   |
00002250  20 20 20 20 20 20 20 20  20 f2 4d 69 6e 69 6d 69  |         .Minimi|
00002260  73 65 57 69 6d 70 53 6c  6f 74 0d 08 f2 5a 20 20  |seWimpSlot...Z  |
00002270  20 20 20 20 20 20 20 20  20 46 69 6c 65 4e 61 6d  |         FileNam|
00002280  65 24 3d 22 22 3a 4e 3d  34 34 3a c8 95 20 28 28  |e$="":N=44:.. ((|
00002290  42 6c 6f 63 6b 3f 4e 29  3e 3d 33 32 29 20 80 20  |Block?N)>=32) . |
000022a0  28 4e 3c 32 35 36 29 3a  46 69 6c 65 4e 61 6d 65  |(N<256):FileName|
000022b0  24 2b 3d bd 28 42 6c 6f  63 6b 3f 4e 29 3a 4e 2b  |$+=.(Block?N):N+|
000022c0  3d 31 3a ce 0d 08 fc 32  20 20 20 20 20 20 20 20  |=1:....2        |
000022d0  20 20 20 46 69 6c 65 54  79 70 65 3d 42 6c 6f 63  |   FileType=Bloc|
000022e0  6b 21 34 30 3a 46 69 6c  65 53 69 7a 65 3d 42 6c  |k!40:FileSize=Bl|
000022f0  6f 63 6b 21 33 36 0d 09  06 2b 20 20 20 20 20 20  |ock!36...+      |
00002300  20 20 20 20 20 54 65 6d  70 6c 61 74 65 73 46 69  |     TemplatesFi|
00002310  6c 65 4e 61 6d 65 24 3d  46 69 6c 65 4e 61 6d 65  |leName$=FileName|
00002320  24 0d 09 10 67 20 20 20  20 20 20 20 20 20 20 20  |$...g           |
00002330  e7 20 54 65 6d 70 6c 61  74 65 73 46 69 6c 65 4e  |. TemplatesFileN|
00002340  61 6d 65 24 3d 22 3c 57  69 6d 70 24 53 63 72 61  |ame$="<Wimp$Scra|
00002350  70 3e 22 20 8c 20 54 65  6d 70 6c 61 74 65 73 46  |p>" . TemplatesF|
00002360  69 6c 65 4e 61 6d 65 24  3d 22 4e 6f 20 66 69 6c  |ileName$="No fil|
00002370  65 6e 61 6d 65 20 2d 20  64 69 72 65 63 74 20 74  |ename - direct t|
00002380  72 61 6e 73 66 65 72 22  0d 09 1a 43 20 20 20 20  |ransfer"...C    |
00002390  20 20 20 20 20 20 20 4c  6f 61 64 46 69 6c 65 45  |       LoadFileE|
000023a0  72 72 6f 72 3d a4 4c 6f  61 64 46 69 6c 65 28 46  |rror=.LoadFile(F|
000023b0  69 6c 65 53 69 7a 65 2c  46 69 6c 65 54 79 70 65  |ileSize,FileType|
000023c0  2c 46 69 6c 65 4e 61 6d  65 24 29 0d 09 24 3c 20  |,FileName$)..$< |
000023d0  20 20 20 20 20 20 20 20  20 20 e7 20 46 69 6c 65  |          . File|
000023e0  4e 61 6d 65 24 3d 22 3c  57 69 6d 70 24 53 63 72  |Name$="<Wimp$Scr|
000023f0  61 70 3e 22 20 8c 20 f2  44 65 6c 65 74 65 57 69  |ap>" . .DeleteWi|
00002400  6d 70 53 63 72 61 70 0d  09 2e 2a 20 20 20 20 20  |mpScrap...*     |
00002410  20 20 20 20 20 20 42 6c  6f 63 6b 21 31 32 3d 42  |      Block!12=B|
00002420  6c 6f 63 6b 21 38 3a 42  6c 6f 63 6b 21 31 36 3d  |lock!8:Block!16=|
00002430  34 0d 09 38 45 20 20 20  20 20 20 20 20 20 20 20  |4..8E           |
00002440  42 6c 6f 63 6b 21 33 36  3d 2d 31 3a 42 6c 6f 63  |Block!36=-1:Bloc|
00002450  6b 21 34 30 3d 46 69 6c  65 54 79 70 65 3a 24 28  |k!40=FileType:$(|
00002460  42 6c 6f 63 6b 2b 34 34  29 3d 46 69 6c 65 4e 61  |Block+44)=FileNa|
00002470  6d 65 24 2b bd 30 0d 09  42 35 20 20 20 20 20 20  |me$+.0..B5      |
00002480  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 53 65  |     .. "Wimp_Se|
00002490  6e 64 4d 65 73 73 61 67  65 22 2c 31 37 2c 42 6c  |ndMessage",17,Bl|
000024a0  6f 63 6b 2c 42 6c 6f 63  6b 21 34 0d 09 4c 20 20  |ock,Block!4..L  |
000024b0  20 20 20 20 20 20 20 20  20 20 f2 43 6c 65 61 72  |          .Clear|
000024c0  53 74 61 74 73 57 69 6e  64 6f 77 0d 09 56 22 20  |StatsWindow..V" |
000024d0  20 20 20 20 20 20 20 20  20 20 f2 43 68 65 63 6b  |          .Check|
000024e0  4c 6f 61 64 46 69 6c 65  45 72 72 6f 72 0d 09 60  |LoadFileError..`|
000024f0  3e 20 20 20 20 20 20 20  20 20 20 20 f2 45 76 61  |>           .Eva|
00002500  6c 75 61 74 65 54 65 6d  70 6c 61 74 65 53 74 61  |luateTemplateSta|
00002510  74 69 73 74 69 63 73 28  54 65 6d 70 6c 61 74 65  |tistics(Template|
00002520  73 46 69 6c 65 4e 61 6d  65 24 29 0d 09 6a 49 20  |sFileName$)..jI |
00002530  20 20 20 20 20 20 20 20  20 20 e7 20 ac 20 a4 4f  |          . . .O|
00002540  70 65 6e 53 74 61 74 65  28 53 74 61 74 73 29 20  |penState(Stats) |
00002550  8c 20 f2 4f 70 65 6e 28  53 74 61 74 73 2c b9 2c  |. .Open(Stats,.,|
00002560  58 50 6f 73 69 74 69 6f  6e 2c 59 50 6f 73 69 74  |XPosition,YPosit|
00002570  69 6f 6e 29 0d 09 74 4e  20 20 c9 20 34 20 3a 20  |ion)..tN  . 4 : |
00002580  f4 20 57 65 20 68 61 76  65 20 73 61 76 65 64 20  |. We have saved |
00002590  74 68 65 20 53 74 61 74  73 20 66 69 6c 65 2c 20  |the Stats file, |
000025a0  61 6e 64 20 61 72 65 20  72 65 63 65 69 76 69 6e  |and are receivin|
000025b0  67 20 61 63 6b 6e 6f 77  6c 65 64 67 65 6d 65 6e  |g acknowledgemen|
000025c0  74 2e 0d 09 7e 4d 20 20  20 20 20 20 20 20 20 20  |t...~M          |
000025d0  20 f4 20 57 65 20 64 6f  6e 27 74 20 6e 65 65 64  | . We don't need|
000025e0  20 74 6f 20 61 63 74 75  61 6c 6c 79 20 64 6f 20  | to actually do |
000025f0  61 6e 79 74 68 69 6e 67  20 65 78 63 65 70 74 20  |anything except |
00002600  63 6c 6f 73 65 20 74 68  65 20 6d 65 6e 75 2e 0d  |close the menu..|
00002610  09 88 27 20 20 20 20 20  20 20 20 20 20 20 c8 99  |..'           ..|
00002620  20 22 57 69 6d 70 5f 43  72 65 61 74 65 4d 65 6e  | "Wimp_CreateMen|
00002630  75 22 2c 2c 2d 31 0d 09  92 31 20 20 c9 20 31 30  |u",,-1...1  . 10|
00002640  3a 20 e7 20 4f 6d 6e 69  44 65 73 6b 3d 30 20 8c  |: . OmniDesk=0 .|
00002650  20 f2 53 61 76 65 44 65  73 6b 74 6f 70 28 42 6c  | .SaveDesktop(Bl|
00002660  6f 63 6b 21 32 30 29 0d  09 9c 45 20 20 20 20 20  |ock!20)...E     |
00002670  20 20 20 20 20 20 f4 20  4f 6e 6c 79 20 73 61 76  |      . Only sav|
00002680  65 20 69 66 20 77 65 20  68 61 76 65 20 6e 6f 74  |e if we have not|
00002690  20 62 65 65 6e 20 73 74  61 72 74 65 64 20 75 70  | been started up|
000026a0  20 62 79 20 4f 6d 6e 69  44 65 73 6b 0d 09 a6 14  | by OmniDesk....|
000026b0  20 20 c9 20 26 35 30 32  20 3a 20 f2 48 65 6c 70  |  . &502 : .Help|
000026c0  0d 09 b0 1c 20 20 c9 20  26 34 30 30 43 31 20 3a  |....  . &400C1 :|
000026d0  20 f2 4d 6f 64 65 43 68  61 6e 67 65 0d 09 ba 3d  | .ModeChange...=|
000026e0  20 20 c9 20 55 74 69 6c  4f 70 65 6e 20 3a 20 e7  |  . UtilOpen : .|
000026f0  20 24 28 42 6c 6f 63 6b  2b 32 34 29 3d 54 61 73  | $(Block+24)=Tas|
00002700  6b 6e 61 6d 65 24 20 8c  20 f2 4f 6d 6e 69 44 65  |kname$ . .OmniDe|
00002710  73 6b 43 61 6c 6c 69 6e  67 0d 09 c4 26 20 20 c9  |skCalling...&  .|
00002720  20 55 74 69 6c 51 75 69  74 74 69 6e 67 20 3a 20  | UtilQuitting : |
00002730  e7 20 4f 6d 6e 69 44 65  73 6b 3c 3e 30 20 8c 0d  |. OmniDesk<>0 ..|
00002740  09 ce 38 20 20 20 20 20  20 20 20 20 20 20 20 20  |..8             |
00002750  20 20 20 20 20 20 20 20  20 20 20 e7 20 42 6c 6f  |           . Blo|
00002760  63 6b 21 32 30 3d 4f 6d  6e 69 44 65 73 6b 20 8c  |ck!20=OmniDesk .|
00002770  20 44 6f 6e 65 3d b9 0d  09 d8 1b 20 20 20 20 20  | Done=.....     |
00002780  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002790  20 cd 0d 09 e2 1b 20 20  c9 20 55 74 69 6c 52 65  | .....  . UtilRe|
000027a0  73 69 64 65 20 3a 20 45  78 69 74 3d a3 0d 09 ec  |side : Exit=....|
000027b0  05 cb 0d 09 f6 05 e1 0d  0a 00 05 3a 0d 0a 0a 16  |...........:....|
000027c0  dd 20 f2 44 65 6c 65 74  65 57 69 6d 70 53 63 72  |. .DeleteWimpScr|
000027d0  61 70 0d 0a 14 07 ea 20  85 0d 0a 1e 0f ee 20 85  |ap..... ...... .|
000027e0  20 ea 20 f7 20 85 3a e1  0d 0a 28 3c f4 20 57 65  | . . .:...(<. We|
000027f0  20 6d 61 79 20 72 65 63  65 69 76 65 20 74 72 79  | may receive try|
00002800  20 74 6f 20 64 65 6c 65  74 65 20 61 20 6e 6f 6e  | to delete a non|
00002810  2d 65 78 69 73 74 61 6e  74 20 57 69 6d 70 24 53  |-existant Wimp$S|
00002820  63 72 61 70 0d 0a 32 40  f4 20 66 69 6c 65 20 69  |crap..2@. file i|
00002830  66 20 74 68 65 20 72 65  63 65 69 76 69 6e 67 20  |f the receiving |
00002840  74 61 73 6b 20 64 69 64  20 6e 6f 74 20 72 65 63  |task did not rec|
00002850  6f 67 6e 69 73 65 20 74  68 65 20 66 69 6c 65 74  |ognise the filet|
00002860  79 70 65 2e 0d 0a 3c 1c  ff 28 22 44 65 6c 65 74  |ype...<..("Delet|
00002870  65 20 3c 57 69 6d 70 24  53 63 72 61 70 3e 22 29  |e <Wimp$Scrap>")|
00002880  0d 0a 46 05 e1 0d 0a 50  05 3a 0d 0a 5a 12 dd 20  |..F....P.:..Z.. |
00002890  f2 4d 6f 75 73 65 42 75  74 74 6f 6e 0d 0a 64 31  |.MouseButton..d1|
000028a0  4d 6f 75 73 65 58 3d 42  6c 6f 63 6b 21 30 3a 4d  |MouseX=Block!0:M|
000028b0  6f 75 73 65 59 3d 42 6c  6f 63 6b 21 34 3a 42 75  |ouseY=Block!4:Bu|
000028c0  74 74 6f 6e 73 3d 42 6c  6f 63 6b 21 38 0d 0a 6e  |ttons=Block!8..n|
000028d0  21 57 69 6e 64 6f 77 3d  42 6c 6f 63 6b 21 31 32  |!Window=Block!12|
000028e0  3a 49 63 6f 6e 3d 42 6c  6f 63 6b 21 31 36 0d 0a  |:Icon=Block!16..|
000028f0  78 0f c8 8e 20 57 69 6e  64 6f 77 20 ca 0d 0a 82  |x... Window ....|
00002900  22 20 20 c9 20 2d 32 3a  f4 20 49 63 6f 6e 20 62  |"  . -2:. Icon b|
00002910  61 72 20 69 63 6f 6e 20  63 6c 69 63 6b 65 64 0d  |ar icon clicked.|
00002920  0a 8c 14 20 20 20 20 c8  8e 20 42 75 74 74 6f 6e  |...    .. Button|
00002930  73 20 ca 0d 0a 96 18 20  20 20 20 20 20 c9 20 31  |s .....      . 1|
00002940  20 3a 20 f4 20 41 64 6a  75 73 74 0d 0a a0 16 20  | : . Adjust.... |
00002950  20 20 20 20 20 c9 20 32  20 3a 20 f4 20 4d 65 6e  |     . 2 : . Men|
00002960  75 0d 0a aa 39 20 20 20  20 20 20 20 20 4d 25 3d  |u...9        M%=|
00002970  49 42 4d 65 6e 75 3a 4d  65 6e 75 58 3d 4d 6f 75  |IBMenu:MenuX=Mou|
00002980  73 65 58 3a 4d 65 6e 75  59 3d 4d 6f 75 73 65 59  |seX:MenuY=MouseY|
00002990  3a f2 4d 61 6b 65 4d 65  6e 75 0d 0a b4 18 20 20  |:.MakeMenu....  |
000029a0  20 20 20 20 c9 20 34 20  3a 20 f4 20 53 65 6c 65  |    . 4 : . Sele|
000029b0  63 74 0d 0a be 2e 20 20  20 20 20 20 20 20 f2 4f  |ct....        .O|
000029c0  70 65 6e 28 53 74 61 74  73 2c b9 2c 58 50 6f 73  |pen(Stats,.,XPos|
000029d0  69 74 69 6f 6e 2c 59 50  6f 73 69 74 69 6f 6e 29  |ition,YPosition)|
000029e0  0d 0a c8 09 20 20 20 20  cb 0d 0a d2 0d 20 20 c9  |....    .....  .|
000029f0  20 53 74 61 74 73 0d 0a  dc 14 20 20 20 20 c8 8e  | Stats....    ..|
00002a00  20 42 75 74 74 6f 6e 73  20 ca 0d 0a e6 16 20 20  | Buttons .....  |
00002a10  20 20 20 20 c9 20 32 20  3a 20 f4 20 4d 65 6e 75  |    . 2 : . Menu|
00002a20  0d 0a f0 31 20 20 20 20  20 20 20 20 4d 25 3d 4d  |...1        M%=M|
00002a30  61 69 6e 4d 65 6e 75 3a  4d 65 6e 75 58 3d 4d 6f  |ainMenu:MenuX=Mo|
00002a40  75 73 65 58 3a 4d 65 6e  75 59 3d 4d 6f 75 73 65  |useX:MenuY=Mouse|
00002a50  59 0d 0a fa 19 20 20 20  20 20 20 20 20 e7 20 77  |Y....        . w|
00002a60  69 6d 70 3e 3d 33 31 30  20 8c 0d 0b 04 60 20 20  |imp>=310 ....`  |
00002a70  20 20 20 20 20 20 20 20  e7 20 c0 24 4d 61 69 6e  |        . .$Main|
00002a80  4d 65 6e 75 54 69 74 6c  65 2c 31 29 3d 22 5c 22  |MenuTitle,1)="\"|
00002a90  20 8c 20 24 4d 61 69 6e  4d 65 6e 75 54 69 74 6c  | . $MainMenuTitl|
00002aa0  65 3d c2 24 4d 61 69 6e  4d 65 6e 75 54 69 74 6c  |e=.$MainMenuTitl|
00002ab0  65 2c a9 28 24 4d 61 69  6e 4d 65 6e 75 54 69 74  |e,.($MainMenuTit|
00002ac0  6c 65 29 2d 31 29 2b bd  31 33 0d 0b 0e 43 20 20  |le)-1)+.13...C  |
00002ad0  20 20 20 20 20 20 20 20  e7 20 58 50 6f 73 69 74  |        . XPosit|
00002ae0  69 6f 6e 3d 34 20 8c 20  24 4d 61 69 6e 4d 65 6e  |ion=4 . $MainMen|
00002af0  75 54 69 74 6c 65 3d 22  5c 22 2b 24 4d 61 69 6e  |uTitle="\"+$Main|
00002b00  4d 65 6e 75 54 69 74 6c  65 2b bd 31 33 0d 0b 18  |MenuTitle+.13...|
00002b10  0d 20 20 20 20 20 20 20  20 cd 0d 0b 22 15 20 20  |.        ...".  |
00002b20  20 20 20 20 20 20 f2 4d  61 6b 65 4d 65 6e 75 0d  |      .MakeMenu.|
00002b30  0b 2c 1e 20 20 20 20 20  20 7f 20 3a 20 f4 20 53  |.,.      . : . S|
00002b40  65 6c 65 63 74 2c 20 41  64 6a 75 73 74 0d 0b 36  |elect, Adjust..6|
00002b50  27 20 20 20 20 20 20 20  20 e7 20 28 49 63 6f 6e  |'        . (Icon|
00002b60  3d 31 32 29 20 80 20 28  42 75 74 74 6f 6e 73 3c  |=12) . (Buttons<|
00002b70  38 29 20 8c 0d 0b 40 25  20 20 20 20 20 20 20 20  |8) ...@%        |
00002b80  20 20 f4 20 42 61 73 65  20 28 44 65 63 2f 48 65  |  . Base (Dec/He|
00002b90  78 29 20 62 75 74 74 6f  6e 0d 0b 4a 2e 20 20 20  |x) button..J.   |
00002ba0  20 20 20 20 20 20 20 c8  99 20 22 49 6e 74 65 72  |       .. "Inter|
00002bb0  66 61 63 65 5f 53 6c 61  62 42 75 74 74 6f 6e 22  |face_SlabButton"|
00002bc0  2c 2c 42 6c 6f 63 6b 0d  0b 54 17 20 20 20 20 20  |,,Block..T.     |
00002bd0  20 20 20 20 20 48 65 78  3d ac 20 48 65 78 0d 0b  |     Hex=. Hex..|
00002be0  5e 4f 20 20 20 20 20 20  20 20 20 20 e7 20 48 65  |^O          . He|
00002bf0  78 20 8c 20 f2 55 70 64  61 74 65 49 63 6f 6e 28  |x . .UpdateIcon(|
00002c00  53 74 61 74 73 2c 31 32  2c 22 48 65 78 22 29 20  |Stats,12,"Hex") |
00002c10  8b 20 f2 55 70 64 61 74  65 49 63 6f 6e 28 53 74  |. .UpdateIcon(St|
00002c20  61 74 73 2c 31 32 2c 22  44 65 63 22 29 0d 0b 68  |ats,12,"Dec")..h|
00002c30  39 20 20 20 20 20 20 20  20 20 20 e7 20 ac 20 a4  |9          . . .|
00002c40  4d 65 6e 75 53 68 61 64  65 64 28 4d 61 69 6e 4d  |MenuShaded(MainM|
00002c50  65 6e 75 2c 33 29 20 8c  20 f2 55 70 64 61 74 65  |enu,3) . .Update|
00002c60  48 65 78 44 65 63 0d 0b  72 50 20 20 20 20 20 20  |HexDec..rP      |
00002c70  20 20 20 20 f4 20 54 68  65 20 73 68 61 64 65 64  |    . The shaded|
00002c80  20 73 74 61 74 65 20 6f  66 20 74 68 65 20 6d 65  | state of the me|
00002c90  6e 75 20 69 74 65 6d 20  69 6e 64 69 63 61 74 65  |nu item indicate|
00002ca0  73 20 77 68 65 74 68 65  72 20 61 6e 79 20 74 65  |s whether any te|
00002cb0  6d 70 6c 61 74 65 0d 0b  7c 45 20 20 20 20 20 20  |mplate..|E      |
00002cc0  20 20 20 20 f4 20 64 65  66 69 6e 69 74 69 6f 6e  |    . definition|
00002cd0  73 20 61 72 65 20 63 75  72 72 65 6e 74 6c 79 20  |s are currently |
00002ce0  6c 6f 61 64 65 64 3a 20  75 6e 73 68 61 64 65 64  |loaded: unshaded|
00002cf0  20 6d 65 61 6e 73 20 79  65 73 2e 0d 0b 86 53 20  | means yes....S |
00002d00  20 20 20 20 20 20 20 20  20 42 6c 6f 63 6b 21 38  |         Block!8|
00002d10  3d 30 3a 42 6c 6f 63 6b  21 31 32 3d 53 74 61 74  |=0:Block!12=Stat|
00002d20  73 3a 42 6c 6f 63 6b 21  31 36 3d 31 32 3a c8 99  |s:Block!16=12:..|
00002d30  20 22 49 6e 74 65 72 66  61 63 65 5f 53 6c 61 62  | "Interface_Slab|
00002d40  42 75 74 74 6f 6e 22 2c  2c 42 6c 6f 63 6b 0d 0b  |Button",,Block..|
00002d50  90 0d 20 20 20 20 20 20  20 20 cd 0d 0b 9a 09 20  |..        ..... |
00002d60  20 20 20 cb 0d 0b a4 30  20 20 c9 20 4c 6f 63 20  |   ....0  . Loc |
00002d70  80 20 42 75 74 74 6f 6e  73 3c 38 3a f4 20 52 65  |. Buttons<8:. Re|
00002d80  70 6f 73 69 74 69 6f 6e  20 6d 61 69 6e 20 77 69  |position main wi|
00002d90  6e 64 6f 77 0d 0b ae 13  20 20 20 20 e7 20 49 63  |ndow....    . Ic|
00002da0  6f 6e 3e 3d 36 20 8c 0d  0b b8 2c 20 20 20 20 20  |on>=6 ....,     |
00002db0  20 58 50 6f 73 69 74 69  6f 6e 3d a4 52 65 61 64  | XPosition=.Read|
00002dc0  57 69 6e 64 6f 77 4c 6f  63 61 74 69 6f 6e 28 22  |WindowLocation("|
00002dd0  58 22 29 0d 0b c2 2c 20  20 20 20 20 20 59 50 6f  |X")...,      YPo|
00002de0  73 69 74 69 6f 6e 3d a4  52 65 61 64 57 69 6e 64  |sition=.ReadWind|
00002df0  6f 77 4c 6f 63 61 74 69  6f 6e 28 22 59 22 29 0d  |owLocation("Y").|
00002e00  0b cc 42 20 20 20 20 20  20 e7 20 a4 4f 70 65 6e  |..B      . .Open|
00002e10  53 74 61 74 65 28 53 74  61 74 73 29 20 8c 20 f2  |State(Stats) . .|
00002e20  4f 70 65 6e 28 53 74 61  74 73 2c a3 2c 58 50 6f  |Open(Stats,.,XPo|
00002e30  73 69 74 69 6f 6e 2c 59  50 6f 73 69 74 69 6f 6e  |sition,YPosition|
00002e40  29 0d 0b d6 09 20 20 20  20 cd 0d 0b e0 0c 20 20  |)....    .....  |
00002e50  c9 20 53 61 76 65 0d 0b  ea 11 20 20 20 20 c8 8e  |. Save....    ..|
00002e60  20 49 63 6f 6e 20 ca 0d  0b f4 19 20 20 20 20 20  | Icon .....     |
00002e70  20 c9 20 31 3a f4 20 46  69 6c 65 20 69 63 6f 6e  | . 1:. File icon|
00002e80  0d 0b fe 1a 20 20 20 20  20 20 20 20 e7 20 42 75  |....        . Bu|
00002e90  74 74 6f 6e 73 3e 3d 38  20 8c 0d 0c 08 1d 20 20  |ttons>=8 .....  |
00002ea0  20 20 20 20 20 20 20 20  e7 20 44 72 61 67 41 53  |        . DragAS|
00002eb0  70 72 69 74 65 20 8c 0d  0c 12 50 20 20 20 20 20  |prite ....P     |
00002ec0  20 20 20 20 20 20 20 f4  20 54 68 65 20 66 6f 6c  |       . The fol|
00002ed0  6c 6f 77 69 6e 67 20 6c  69 6e 65 73 20 64 65 6c  |lowing lines del|
00002ee0  65 74 65 20 74 68 65 20  66 69 6c 65 20 69 63 6f  |ete the file ico|
00002ef0  6e 20 66 72 6f 6d 20 74  68 65 20 73 61 76 65 20  |n from the save |
00002f00  77 69 6e 64 6f 77 2c 0d  0c 1c 4e 20 20 20 20 20  |window,...N     |
00002f10  20 20 20 20 20 20 20 f4  20 67 69 76 69 6e 67 20  |       . giving |
00002f20  74 68 65 20 69 6d 70 72  65 73 73 69 6f 6e 20 74  |the impression t|
00002f30  68 61 74 20 79 6f 75 20  61 72 65 20 61 63 74 75  |hat you are actu|
00002f40  61 6c 6c 79 20 64 72 61  67 67 69 6e 67 20 69 74  |ally dragging it|
00002f50  20 6f 75 74 2e 0d 0c 26  3a 20 20 20 20 20 20 20  | out...&:       |
00002f60  20 20 20 20 20 f4 20 49  74 20 77 69 6c 6c 20 62  |     . It will b|
00002f70  65 20 72 65 70 6c 61 63  65 64 20 69 6e 20 50 52  |e replaced in PR|
00002f80  4f 43 44 72 61 67 46 69  6e 69 73 68 65 64 2e 0d  |OCDragFinished..|
00002f90  0c 30 44 20 20 20 20 20  20 20 20 20 20 20 20 42  |.0D            B|
00002fa0  6c 6f 63 6b 21 30 3d 53  61 76 65 3a 42 6c 6f 63  |lock!0=Save:Bloc|
00002fb0  6b 21 34 3d 31 3a c8 99  20 22 57 69 6d 70 5f 47  |k!4=1:.. "Wimp_G|
00002fc0  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 42 6c  |etIconState",,Bl|
00002fd0  6f 63 6b 0d 0c 3a 2c 20  20 20 20 20 20 20 20 20  |ock..:,         |
00002fe0  20 20 20 53 61 76 65 42  6f 78 44 72 61 67 46 69  |   SaveBoxDragFi|
00002ff0  6c 65 24 3d 24 28 42 6c  6f 63 6b 21 33 32 29 0d  |le$=$(Block!32).|
00003000  0c 44 34 20 20 20 20 20  20 20 20 20 20 20 20 42  |.D4            B|
00003010  6c 6f 63 6b 21 38 3d 30  3a 42 6c 6f 63 6b 21 31  |lock!8=0:Block!1|
00003020  32 3d 30 3a 24 28 42 6c  6f 63 6b 21 33 32 29 3d  |2=0:$(Block!32)=|
00003030  bd 31 33 0d 0c 4e 2d 20  20 20 20 20 20 20 20 20  |.13..N-         |
00003040  20 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 49  |   .. "Wimp_SetI|
00003050  63 6f 6e 53 74 61 74 65  22 2c 2c 42 6c 6f 63 6b  |conState",,Block|
00003060  0d 0c 58 0f 20 20 20 20  20 20 20 20 20 20 cd 0d  |..X.          ..|
00003070  0c 62 2d 20 20 20 20 20  20 20 20 20 20 f2 44 72  |.b-          .Dr|
00003080  61 67 42 6f 78 28 53 61  76 65 2c 31 2c 35 2c 31  |agBox(Save,1,5,1|
00003090  2c 22 66 69 6c 65 5f 66  66 66 22 29 0d 0c 6c 0d  |,"file_fff")..l.|
000030a0  20 20 20 20 20 20 20 20  cd 0d 0c 76 17 20 20 20  |        ...v.   |
000030b0  20 20 20 c9 20 33 3a f4  20 4f 4b 20 69 63 6f 6e  |   . 3:. OK icon|
000030c0  0d 0c 80 2a 20 20 20 20  20 20 20 20 e7 20 28 42  |...*        . (B|
000030d0  75 74 74 6f 6e 73 3c 38  29 20 80 20 28 42 75 74  |uttons<8) . (But|
000030e0  74 6f 6e 73 3c 3e 32 29  20 8c 0d 0c 8a 2e 20 20  |tons<>2) .....  |
000030f0  20 20 20 20 20 20 20 20  c8 99 20 22 49 6e 74 65  |        .. "Inte|
00003100  72 66 61 63 65 5f 53 6c  61 62 42 75 74 74 6f 6e  |rface_SlabButton|
00003110  22 2c 2c 42 6c 6f 63 6b  0d 0c 94 35 20 20 20 20  |",,Block...5    |
00003120  20 20 20 20 20 20 e7 20  42 75 74 74 6f 6e 73 3c  |      . Buttons<|
00003130  3e 31 20 8c 20 c8 99 20  22 57 69 6d 70 5f 43 72  |>1 . .. "Wimp_Cr|
00003140  65 61 74 65 4d 65 6e 75  22 2c 2c 2d 31 0d 0c 9e  |eateMenu",,-1...|
00003150  3f 20 20 20 20 20 20 20  20 20 20 41 24 3d a4 52  |?          A$=.R|
00003160  65 61 64 49 63 6f 6e 53  74 72 28 53 61 76 65 2c  |eadIconStr(Save,|
00003170  32 29 3a e7 20 41 24 3d  22 22 20 8c 20 41 24 3d  |2):. A$="" . A$=|
00003180  22 53 74 61 74 69 73 74  69 63 73 22 0d 0c a8 24  |"Statistics"...$|
00003190  20 20 20 20 20 20 20 20  20 20 f2 55 70 64 61 74  |          .Updat|
000031a0  65 49 63 6f 6e 28 53 61  76 65 2c 32 2c 41 24 29  |eIcon(Save,2,A$)|
000031b0  0d 0c b2 98 20 20 20 20  20 20 20 20 20 20 e7 20  |....          . |
000031c0  a7 41 24 2c 22 2e 22 29  3d 30 20 8c 20 42 6c 6f  |.A$,".")=0 . Blo|
000031d0  63 6b 21 38 3d 30 3a 42  6c 6f 63 6b 21 31 32 3d  |ck!8=0:Block!12=|
000031e0  53 61 76 65 3a 42 6c 6f  63 6b 21 31 36 3d 33 3a  |Save:Block!16=3:|
000031f0  c8 99 20 22 49 6e 74 65  72 66 61 63 65 5f 53 6c  |.. "Interface_Sl|
00003200  61 62 42 75 74 74 6f 6e  22 2c 2c 42 6c 6f 63 6b  |abButton",,Block|
00003210  3a 85 20 39 39 39 39 2c  22 54 6f 20 73 61 76 65  |:. 9999,"To save|
00003220  2c 20 64 72 61 67 20 74  68 65 20 69 63 6f 6e 20  |, drag the icon |
00003230  74 6f 20 61 20 64 69 72  65 63 74 6f 72 79 20 64  |to a directory d|
00003240  69 73 70 6c 61 79 2e 22  0d 0c bc c3 20 20 20 20  |isplay."....    |
00003250  20 20 20 20 20 20 e7 20  ac 20 a4 53 61 76 65 53  |      . . .SaveS|
00003260  74 61 74 73 54 6f 46 69  6c 65 28 54 65 6d 70 6c  |tatsToFile(Templ|
00003270  61 74 65 73 46 69 6c 65  4e 61 6d 65 24 2c 41 24  |atesFileName$,A$|
00003280  29 20 8c 20 f2 44 65 6c  65 74 65 57 69 6d 70 53  |) . .DeleteWimpS|
00003290  63 72 61 70 3a 42 6c 6f  63 6b 21 38 3d 30 3a 42  |crap:Block!8=0:B|
000032a0  6c 6f 63 6b 21 31 32 3d  53 61 76 65 3a 42 6c 6f  |lock!12=Save:Blo|
000032b0  63 6b 21 31 36 3d 33 3a  c8 99 20 22 49 6e 74 65  |ck!16=3:.. "Inte|
000032c0  72 66 61 63 65 5f 53 6c  61 62 42 75 74 74 6f 6e  |rface_SlabButton|
000032d0  22 2c 2c 42 6c 6f 63 6b  3a 85 20 39 39 39 39 2c  |",,Block:. 9999,|
000032e0  22 41 6e 20 65 72 72 6f  72 20 6f 63 63 75 72 72  |"An error occurr|
000032f0  65 64 20 77 68 69 6c 73  74 20 73 61 76 69 6e 67  |ed whilst saving|
00003300  20 74 68 65 20 66 69 6c  65 2e 22 0d 0c c6 51 20  | the file."...Q |
00003310  20 20 20 20 20 20 20 20  20 42 6c 6f 63 6b 21 38  |         Block!8|
00003320  3d 30 3a 42 6c 6f 63 6b  21 31 32 3d 53 61 76 65  |=0:Block!12=Save|
00003330  3a 42 6c 6f 63 6b 21 31  36 3d 33 3a c8 99 20 22  |:Block!16=3:.. "|
00003340  49 6e 74 65 72 66 61 63  65 5f 53 6c 61 62 42 75  |Interface_SlabBu|
00003350  74 74 6f 6e 22 2c 2c 42  6c 6f 63 6b 0d 0c d0 0d  |tton",,Block....|
00003360  20 20 20 20 20 20 20 20  cd 0d 0c da 09 20 20 20  |        .....   |
00003370  20 cb 0d 0c e4 05 cb 0d  0c ee 05 e1 0d 0c f8 05  | ...............|
00003380  3a 0d 0d 02 13 dd 20 f2  44 72 61 67 46 69 6e 69  |:..... .DragFini|
00003390  73 68 65 64 0d 0d 0c 13  e7 20 44 72 61 67 41 53  |shed..... DragAS|
000033a0  70 72 69 74 65 20 8c 0d  0d 16 1b 20 20 c8 99 20  |prite .....  .. |
000033b0  22 44 72 61 67 41 53 70  72 69 74 65 5f 53 74 6f  |"DragASprite_Sto|
000033c0  70 22 0d 0d 20 3f 20 20  f4 20 54 68 65 20 66 6f  |p".. ?  . The fo|
000033d0  6c 6c 6f 77 69 6e 67 20  6c 69 6e 65 73 20 72 65  |llowing lines re|
000033e0  70 6c 61 63 65 20 74 68  65 20 73 70 72 69 74 65  |place the sprite|
000033f0  20 69 6e 20 74 68 65 20  73 61 76 65 20 62 6f 78  | in the save box|
00003400  2e 0d 0d 2a 3a 20 20 42  6c 6f 63 6b 21 30 3d 53  |...*:  Block!0=S|
00003410  61 76 65 3a 42 6c 6f 63  6b 21 34 3d 31 3a c8 99  |ave:Block!4=1:..|
00003420  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
00003430  61 74 65 22 2c 2c 42 6c  6f 63 6b 0d 0d 34 37 20  |ate",,Block..47 |
00003440  20 42 6c 6f 63 6b 21 38  3d 30 3a 42 6c 6f 63 6b  | Block!8=0:Block|
00003450  21 31 32 3d 30 3a 24 28  42 6c 6f 63 6b 21 33 32  |!12=0:$(Block!32|
00003460  29 3d 53 61 76 65 42 6f  78 44 72 61 67 46 69 6c  |)=SaveBoxDragFil|
00003470  65 24 0d 0d 3e 23 20 20  c8 99 20 22 57 69 6d 70  |e$..>#  .. "Wimp|
00003480  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
00003490  42 6c 6f 63 6b 0d 0d 48  05 cd 0d 0d 52 23 c8 99  |Block..H....R#..|
000034a0  20 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  | "Wimp_GetPointe|
000034b0  72 49 6e 66 6f 22 2c 2c  42 6c 6f 63 6b 0d 0d 5c  |rInfo",,Block..\|
000034c0  2e e7 20 42 6c 6f 63 6b  21 31 32 3d 2d 31 20 8c  |.. Block!12=-1 .|
000034d0  20 e1 3a f4 20 44 72 61  67 67 65 64 20 74 6f 20  | .:. Dragged to |
000034e0  62 61 63 6b 67 72 6f 75  6e 64 2e 0d 0d 66 59 44  |background...fYD|
000034f0  72 61 67 67 65 64 54 6f  58 3d 42 6c 6f 63 6b 21  |raggedToX=Block!|
00003500  30 3a 44 72 61 67 67 65  64 54 6f 59 3d 42 6c 6f  |0:DraggedToY=Blo|
00003510  63 6b 21 34 3a 44 72 61  67 67 65 64 54 6f 57 69  |ck!4:DraggedToWi|
00003520  6e 64 6f 77 3d 42 6c 6f  63 6b 21 31 32 3a 44 72  |ndow=Block!12:Dr|
00003530  61 67 67 65 64 54 6f 49  63 6f 6e 3d 42 6c 6f 63  |aggedToIcon=Bloc|
00003540  6b 21 31 36 0d 0d 70 25  f4 20 46 69 6e 64 20 6f  |k!16..p%. Find o|
00003550  75 74 20 6c 65 61 66 20  6e 61 6d 65 20 69 6e 20  |ut leaf name in |
00003560  73 61 76 65 20 62 6f 78  3a 0d 0d 7a 33 44 72 61  |save box:..z3Dra|
00003570  67 67 69 6e 67 24 3d a4  52 65 61 64 49 63 6f 6e  |gging$=.ReadIcon|
00003580  53 74 72 28 53 61 76 65  2c 32 29 3a 6c 65 6e 3d  |Str(Save,2):len=|
00003590  a9 28 44 72 61 67 67 69  6e 67 24 29 0d 0d 84 3e  |.(Dragging$)...>|
000035a0  4e 3d 2d 31 3a f5 3a 4e  2b 3d 31 3a fd 20 28 c1  |N=-1:.:N+=1:. (.|
000035b0  44 72 61 67 67 69 6e 67  24 2c a9 28 44 72 61 67  |Dragging$,.(Drag|
000035c0  67 69 6e 67 24 29 2d 4e  2c 31 29 3d 22 2e 22 29  |ging$)-N,1)=".")|
000035d0  20 84 20 28 4e 3d 6c 65  6e 29 0d 0d 8e 25 e7 20  | . (N=len)...%. |
000035e0  4e 3c 6c 65 6e 20 8c 20  44 72 61 67 67 69 6e 67  |N<len . Dragging|
000035f0  24 3d c2 44 72 61 67 67  69 6e 67 24 2c 4e 29 0d  |$=.Dragging$,N).|
00003600  0d 98 49 e7 20 44 72 61  67 67 69 6e 67 24 3d 22  |..I. Dragging$="|
00003610  22 20 8c 20 44 72 61 67  67 69 6e 67 24 3d 22 53  |" . Dragging$="S|
00003620  74 61 74 69 73 74 69 63  73 22 3a f2 55 70 64 61  |tatistics":.Upda|
00003630  74 65 49 63 6f 6e 28 53  61 76 65 2c 32 2c 44 72  |teIcon(Save,2,Dr|
00003640  61 67 67 69 6e 67 24 29  0d 0d a2 30 f4 20 4f 4b  |agging$)...0. OK|
00003650  20 2d 20 4c 65 74 27 73  20 62 65 67 69 6e 20 61  | - Let's begin a|
00003660  6e 20 69 6e 74 65 72 2d  61 70 70 6c 69 63 61 74  |n inter-applicat|
00003670  69 6f 6e 20 73 61 76 65  0d 0d ac 0b 4d 79 52 65  |ion save....MyRe|
00003680  66 3d 30 0d 0d b6 34 42  6c 6f 63 6b 21 30 3d 32  |f=0...4Block!0=2|
00003690  35 36 3a 42 6c 6f 63 6b  21 31 32 3d 4d 79 52 65  |56:Block!12=MyRe|
000036a0  66 3a 42 6c 6f 63 6b 21  31 36 3d 31 3a f4 20 44  |f:Block!16=1:. D|
000036b0  61 74 61 53 61 76 65 0d  0d c0 5b 42 6c 6f 63 6b  |ataSave...[Block|
000036c0  21 32 30 3d 44 72 61 67  67 65 64 54 6f 57 69 6e  |!20=DraggedToWin|
000036d0  64 6f 77 3a 42 6c 6f 63  6b 21 32 34 3d 44 72 61  |dow:Block!24=Dra|
000036e0  67 67 65 64 54 6f 49 63  6f 6e 3a 42 6c 6f 63 6b  |ggedToIcon:Block|
000036f0  21 32 38 3d 44 72 61 67  67 65 64 54 6f 58 3a 42  |!28=DraggedToX:B|
00003700  6c 6f 63 6b 21 33 32 3d  44 72 61 67 67 65 64 54  |lock!32=DraggedT|
00003710  6f 59 0d 0d ca 36 42 6c  6f 63 6b 21 33 36 3d 2d  |oY...6Block!36=-|
00003720  31 3a f4 20 4e 6f 20 69  64 65 61 20 77 68 61 74  |1:. No idea what|
00003730  20 74 68 65 20 73 69 7a  65 20 69 73 20 67 6f 69  | the size is goi|
00003740  6e 67 20 74 6f 20 62 65  0d 0d d4 24 42 6c 6f 63  |ng to be...$Bloc|
00003750  6b 21 34 30 3d 26 46 46  46 3a f4 20 46 69 6c 65  |k!40=&FFF:. File|
00003760  74 79 70 65 20 6f 66 20  54 65 78 74 0d 0d de 1c  |type of Text....|
00003770  24 28 42 6c 6f 63 6b 2b  34 34 29 3d 44 72 61 67  |$(Block+44)=Drag|
00003780  67 69 6e 67 24 2b bd 30  0d 0d e8 40 c8 99 20 22  |ging$+.0...@.. "|
00003790  57 69 6d 70 5f 53 65 6e  64 4d 65 73 73 61 67 65  |Wimp_SendMessage|
000037a0  22 2c 31 37 2c 42 6c 6f  63 6b 2c 44 72 61 67 67  |",17,Block,Dragg|
000037b0  65 64 54 6f 57 69 6e 64  6f 77 2c 44 72 61 67 67  |edToWindow,Dragg|
000037c0  65 64 54 6f 49 63 6f 6e  0d 0d f2 42 f4 20 44 72  |edToIcon...B. Dr|
000037d0  61 67 67 65 64 54 6f 49  63 6f 6e 20 69 6e 63 6c  |aggedToIcon incl|
000037e0  75 64 65 64 20 69 6e 20  63 61 73 65 20 44 72 61  |uded in case Dra|
000037f0  67 67 65 64 54 6f 57 69  6e 64 6f 77 3d 2d 32 20  |ggedToWindow=-2 |
00003800  28 69 63 6f 6e 20 62 61  72 29 0d 0d fc 05 e1 0d  |(icon bar)......|
00003810  0e 06 05 3a 0d 0e 10 11  dd 20 f2 4b 65 79 50 72  |...:..... .KeyPr|
00003820  65 73 73 65 64 0d 0e 1a  32 57 69 6e 64 6f 77 3d  |essed...2Window=|
00003830  42 6c 6f 63 6b 21 30 3a  49 63 6f 6e 3d 42 6c 6f  |Block!0:Icon=Blo|
00003840  63 6b 21 34 3a 43 68 61  72 61 63 74 65 72 3d 42  |ck!4:Character=B|
00003850  6c 6f 63 6b 21 32 34 0d  0e 24 0f c8 8e 20 57 69  |lock!24..$... Wi|
00003860  6e 64 6f 77 20 ca 0d 0e  2e 0d 20 20 c9 20 53 61  |ndow .....  . Sa|
00003870  76 65 3a 0d 0e 38 18 20  20 20 20 e7 20 43 68 61  |ve:..8.    . Cha|
00003880  72 61 63 74 65 72 3d 31  33 20 8c 0d 0e 42 4d 20  |racter=13 ...BM |
00003890  20 20 20 20 20 42 6c 6f  63 6b 21 38 3d 34 3a 42  |     Block!8=4:B|
000038a0  6c 6f 63 6b 21 31 32 3d  53 61 76 65 3a 42 6c 6f  |lock!12=Save:Blo|
000038b0  63 6b 21 31 36 3d 33 3a  c8 99 20 22 49 6e 74 65  |ck!16=3:.. "Inte|
000038c0  72 66 61 63 65 5f 53 6c  61 62 42 75 74 74 6f 6e  |rface_SlabButton|
000038d0  22 2c 2c 42 6c 6f 63 6b  0d 0e 4c 3b 20 20 20 20  |",,Block..L;    |
000038e0  20 20 41 24 3d a4 52 65  61 64 49 63 6f 6e 53 74  |  A$=.ReadIconSt|
000038f0  72 28 53 61 76 65 2c 32  29 3a e7 20 41 24 3d 22  |r(Save,2):. A$="|
00003900  22 20 8c 20 41 24 3d 22  53 74 61 74 69 73 74 69  |" . A$="Statisti|
00003910  63 73 22 0d 0e 56 20 20  20 20 20 20 20 f2 55 70  |cs"..V       .Up|
00003920  64 61 74 65 49 63 6f 6e  28 53 61 76 65 2c 32 2c  |dateIcon(Save,2,|
00003930  41 24 29 0d 0e 60 94 20  20 20 20 20 20 e7 20 a7  |A$)..`.      . .|
00003940  41 24 2c 22 2e 22 29 3d  30 20 8c 20 42 6c 6f 63  |A$,".")=0 . Bloc|
00003950  6b 21 38 3d 30 3a 42 6c  6f 63 6b 21 31 32 3d 53  |k!8=0:Block!12=S|
00003960  61 76 65 3a 42 6c 6f 63  6b 21 31 36 3d 33 3a c8  |ave:Block!16=3:.|
00003970  99 20 22 49 6e 74 65 72  66 61 63 65 5f 53 6c 61  |. "Interface_Sla|
00003980  62 42 75 74 74 6f 6e 22  2c 2c 42 6c 6f 63 6b 3a  |bButton",,Block:|
00003990  85 20 39 39 39 39 2c 22  54 6f 20 73 61 76 65 2c  |. 9999,"To save,|
000039a0  20 64 72 61 67 20 74 68  65 20 69 63 6f 6e 20 74  | drag the icon t|
000039b0  6f 20 61 20 64 69 72 65  63 74 6f 72 79 20 64 69  |o a directory di|
000039c0  73 70 6c 61 79 2e 22 0d  0e 6a bf 20 20 20 20 20  |splay."..j.     |
000039d0  20 e7 20 ac 20 a4 53 61  76 65 53 74 61 74 73 54  | . . .SaveStatsT|
000039e0  6f 46 69 6c 65 28 54 65  6d 70 6c 61 74 65 73 46  |oFile(TemplatesF|
000039f0  69 6c 65 4e 61 6d 65 24  2c 41 24 29 20 8c 20 f2  |ileName$,A$) . .|
00003a00  44 65 6c 65 74 65 57 69  6d 70 53 63 72 61 70 3a  |DeleteWimpScrap:|
00003a10  42 6c 6f 63 6b 21 38 3d  30 3a 42 6c 6f 63 6b 21  |Block!8=0:Block!|
00003a20  31 32 3d 53 61 76 65 3a  42 6c 6f 63 6b 21 31 36  |12=Save:Block!16|
00003a30  3d 33 3a c8 99 20 22 49  6e 74 65 72 66 61 63 65  |=3:.. "Interface|
00003a40  5f 53 6c 61 62 42 75 74  74 6f 6e 22 2c 2c 42 6c  |_SlabButton",,Bl|
00003a50  6f 63 6b 3a 85 20 39 39  39 39 2c 22 41 6e 20 65  |ock:. 9999,"An e|
00003a60  72 72 6f 72 20 6f 63 63  75 72 72 65 64 20 77 68  |rror occurred wh|
00003a70  69 6c 73 74 20 73 61 76  69 6e 67 20 74 68 65 20  |ilst saving the |
00003a80  66 69 6c 65 2e 22 0d 0e  74 4d 20 20 20 20 20 20  |file."..tM      |
00003a90  42 6c 6f 63 6b 21 38 3d  30 3a 42 6c 6f 63 6b 21  |Block!8=0:Block!|
00003aa0  31 32 3d 53 61 76 65 3a  42 6c 6f 63 6b 21 31 36  |12=Save:Block!16|
00003ab0  3d 33 3a c8 99 20 22 49  6e 74 65 72 66 61 63 65  |=3:.. "Interface|
00003ac0  5f 53 6c 61 62 42 75 74  74 6f 6e 22 2c 2c 42 6c  |_SlabButton",,Bl|
00003ad0  6f 63 6b 0d 0e 7e 22 20  20 20 20 20 20 c8 99 20  |ock..~"      .. |
00003ae0  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
00003af0  22 2c 2c 2d 31 0d 0e 88  09 20 20 20 20 cc 0d 0e  |",,-1....    ...|
00003b00  92 28 20 20 20 20 20 20  c8 99 20 22 57 69 6d 70  |.(      .. "Wimp|
00003b10  5f 50 72 6f 63 65 73 73  4b 65 79 22 2c 43 68 61  |_ProcessKey",Cha|
00003b20  72 61 63 74 65 72 0d 0e  9c 09 20 20 20 20 cd 0d  |racter....    ..|
00003b30  0e a6 07 20 20 7f 0d 0e  b0 26 20 20 20 20 c8 99  |...  ....&    ..|
00003b40  20 22 57 69 6d 70 5f 50  72 6f 63 65 73 73 4b 65  | "Wimp_ProcessKe|
00003b50  79 22 2c 43 68 61 72 61  63 74 65 72 0d 0e ba 05  |y",Character....|
00003b60  cb 0d 0e c4 05 e1 0d 0e  ce 05 3a 0d 0e d8 11 dd  |..........:.....|
00003b70  20 f2 44 65 63 6f 64 65  4d 65 6e 75 0d 0e e2 2a  | .DecodeMenu...*|
00003b80  53 75 62 30 3d 42 6c 6f  63 6b 21 30 3a 53 75 62  |Sub0=Block!0:Sub|
00003b90  31 3d 42 6c 6f 63 6b 21  34 3a 53 75 62 32 3d 42  |1=Block!4:Sub2=B|
00003ba0  6c 6f 63 6b 21 38 0d 0e  ec 0f 43 6c 6f 73 65 4d  |lock!8....CloseM|
00003bb0  65 6e 75 3d a3 0d 0e f6  0b c8 8e 20 4d 25 20 ca  |enu=....... M% .|
00003bc0  0d 0f 00 0f 20 20 c9 20  49 42 4d 65 6e 75 3a 0d  |....  . IBMenu:.|
00003bd0  0f 0a 11 20 20 20 20 c8  8e 20 53 75 62 30 20 ca  |...    .. Sub0 .|
00003be0  0d 0f 14 0d 20 20 20 20  20 20 c9 20 30 0d 0f 1e  |....      . 0...|
00003bf0  2b 20 20 20 20 20 20 20  20 c8 99 20 22 57 69 6d  |+        .. "Wim|
00003c00  70 5f 47 65 74 50 6f 69  6e 74 65 72 49 6e 66 6f  |p_GetPointerInfo|
00003c10  22 2c 2c 42 6c 6f 63 6b  0d 0f 28 3c 20 20 20 20  |",,Block..(<    |
00003c20  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 43 72 65  |    .. "Wimp_Cre|
00003c30  61 74 65 4d 65 6e 75 22  2c 2c 49 6e 66 6f 2c 42  |ateMenu",,Info,B|
00003c40  6c 6f 63 6b 21 30 2d 32  34 2c 42 6c 6f 63 6b 21  |lock!0-24,Block!|
00003c50  34 2b 32 34 0d 0f 32 17  20 20 20 20 20 20 20 20  |4+24..2.        |
00003c60  43 6c 6f 73 65 4d 65 6e  75 3d b9 0d 0f 3c 0d 20  |CloseMenu=...<. |
00003c70  20 20 20 20 20 c9 20 31  0d 0f 46 12 20 20 20 20  |     . 1..F.    |
00003c80  20 20 20 20 44 6f 6e 65  3d b9 0d 0f 50 09 20 20  |    Done=...P.  |
00003c90  20 20 cb 0d 0f 5a 11 20  20 c9 20 4d 61 69 6e 4d  |  ...Z.  . MainM|
00003ca0  65 6e 75 3a 0d 0f 64 11  20 20 20 20 c8 8e 20 53  |enu:..d.    .. S|
00003cb0  75 62 30 20 ca 0d 0f 6e  0d 20 20 20 20 20 20 c9  |ub0 ...n.      .|
00003cc0  20 30 0d 0f 78 2b 20 20  20 20 20 20 20 20 c8 99  | 0..x+        ..|
00003cd0  20 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  | "Wimp_GetPointe|
00003ce0  72 49 6e 66 6f 22 2c 2c  42 6c 6f 63 6b 0d 0f 82  |rInfo",,Block...|
00003cf0  3c 20 20 20 20 20 20 20  20 c8 99 20 22 57 69 6d  |<        .. "Wim|
00003d00  70 5f 43 72 65 61 74 65  4d 65 6e 75 22 2c 2c 49  |p_CreateMenu",,I|
00003d10  6e 66 6f 2c 42 6c 6f 63  6b 21 30 2d 32 34 2c 42  |nfo,Block!0-24,B|
00003d20  6c 6f 63 6b 21 34 2b 32  34 0d 0f 8c 17 20 20 20  |lock!4+24....   |
00003d30  20 20 20 20 20 43 6c 6f  73 65 4d 65 6e 75 3d b9  |     CloseMenu=.|
00003d40  0d 0f 96 0d 20 20 20 20  20 20 c9 20 31 0d 0f a0  |....      . 1...|
00003d50  2f 20 20 20 20 20 20 20  20 f2 4d 69 6e 69 6d 69  |/        .Minimi|
00003d60  73 65 57 69 6d 70 53 6c  6f 74 3a f2 43 6c 65 61  |seWimpSlot:.Clea|
00003d70  72 53 74 61 74 73 57 69  6e 64 6f 77 0d 0f aa 0d  |rStatsWindow....|
00003d80  20 20 20 20 20 20 c9 20  32 0d 0f b4 2b 20 20 20  |      . 2...+   |
00003d90  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 47 65  |     .. "Wimp_Ge|
00003da0  74 50 6f 69 6e 74 65 72  49 6e 66 6f 22 2c 2c 42  |tPointerInfo",,B|
00003db0  6c 6f 63 6b 0d 0f be 3b  20 20 20 20 20 20 20 20  |lock...;        |
00003dc0  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 4d  |.. "Wimp_CreateM|
00003dd0  65 6e 75 22 2c 2c 4c 6f  63 2c 42 6c 6f 63 6b 21  |enu",,Loc,Block!|
00003de0  30 2d 32 34 2c 42 6c 6f  63 6b 21 34 2b 32 34 0d  |0-24,Block!4+24.|
00003df0  0f c8 17 20 20 20 20 20  20 20 20 43 6c 6f 73 65  |...        Close|
00003e00  4d 65 6e 75 3d b9 0d 0f  d2 0d 20 20 20 20 20 20  |Menu=.....      |
00003e10  c9 20 33 0d 0f dc 2b 20  20 20 20 20 20 20 20 c8  |. 3...+        .|
00003e20  99 20 22 57 69 6d 70 5f  47 65 74 50 6f 69 6e 74  |. "Wimp_GetPoint|
00003e30  65 72 49 6e 66 6f 22 2c  2c 42 6c 6f 63 6b 0d 0f  |erInfo",,Block..|
00003e40  e6 3d 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |.=        .. "Wi|
00003e50  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
00003e60  53 61 76 65 2c 42 6c 6f  63 6b 21 30 2d 31 34 36  |Save,Block!0-146|
00003e70  2c 42 6c 6f 63 6b 21 34  2b 36 30 0d 0f f0 17 20  |,Block!4+60.... |
00003e80  20 20 20 20 20 20 20 43  6c 6f 73 65 4d 65 6e 75  |       CloseMenu|
00003e90  3d b9 0d 0f fa 0d 20 20  20 20 20 20 c9 20 34 0d  |=.....      . 4.|
00003ea0  10 04 5c 20 20 20 20 20  20 20 20 e7 20 ac 20 a4  |..\        . . .|
00003eb0  53 61 76 65 53 65 74 74  69 6e 67 73 20 8c 20 85  |SaveSettings . .|
00003ec0  20 39 39 39 39 2c 22 41  6e 20 65 72 72 6f 72 20  | 9999,"An error |
00003ed0  6f 63 63 75 72 72 65 64  20 77 68 69 6c 73 74 20  |occurred whilst |
00003ee0  77 72 69 74 69 6e 67 20  74 68 65 20 73 65 74 74  |writing the sett|
00003ef0  69 6e 67 73 20 66 69 6c  65 2e 22 0d 10 0e 09 20  |ings file.".... |
00003f00  20 20 20 cb 0d 10 18 05  cb 0d 10 22 23 c8 99 20  |   ........"#.. |
00003f10  22 57 69 6d 70 5f 47 65  74 50 6f 69 6e 74 65 72  |"Wimp_GetPointer|
00003f20  49 6e 66 6f 22 2c 2c 42  6c 6f 63 6b 0d 10 2c 33  |Info",,Block..,3|
00003f30  e7 20 28 28 42 6c 6f 63  6b 21 38 20 80 20 31 29  |. ((Block!8 . 1)|
00003f40  3d 31 29 20 80 20 28 ac  20 43 6c 6f 73 65 4d 65  |=1) . (. CloseMe|
00003f50  6e 75 29 20 8c 20 f2 4d  61 6b 65 4d 65 6e 75 0d  |nu) . .MakeMenu.|
00003f60  10 36 05 e1 0d 10 40 05  3a 0d 10 4a 4f f4 20 2d  |.6....@.:..JO. -|
00003f70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003fb0  2d 2d 2d 2d 2d 2d 2d 2d  0d 10 54 13 f4 20 4d 65  |--------..T.. Me|
00003fc0  6e 75 20 72 6f 75 74 69  6e 65 73 0d 10 5e 4f f4  |nu routines..^O.|
00003fd0  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | ---------------|
00003fe0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004010  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 10 68 05 3a 0d  |----------..h.:.|
00004020  10 72 11 dd 20 f2 42 75  69 6c 64 4d 65 6e 75 73  |.r.. .BuildMenus|
00004030  0d 10 7c 49 f4 20 54 68  69 73 20 70 72 6f 63 65  |..|I. This proce|
00004040  64 75 72 65 20 73 68 6f  75 6c 64 20 6f 6e 6c 79  |dure should only|
00004050  20 62 65 20 76 69 73 69  74 65 64 20 6f 6e 63 65  | be visited once|
00004060  2c 20 73 69 6e 63 65 20  69 74 20 63 6f 6e 74 61  |, since it conta|
00004070  69 6e 73 20 44 49 4d 73  2e 0d 10 86 07 20 20 3a  |ins DIMs.....  :|
00004080  0d 10 90 4f f4 20 49 6e  20 74 68 65 20 6d 65 6e  |...O. In the men|
00004090  75 20 74 69 74 6c 65 20  73 74 72 69 6e 67 73 20  |u title strings |
000040a0  62 65 6c 6f 77 2c 20 69  66 20 61 20 22 7c 22 20  |below, if a "|" |
000040b0  63 68 61 72 61 63 74 65  72 20 69 73 20 70 72 65  |character is pre|
000040c0  73 65 6e 74 20 69 74 20  77 69 6c 6c 20 62 65 0d  |sent it will be.|
000040d0  10 9a 4f f4 20 72 65 70  6c 61 63 65 64 20 62 79  |..O. replaced by|
000040e0  20 61 20 73 70 61 63 65  20 75 6e 64 65 72 20 52  | a space under R|
000040f0  49 53 43 20 4f 53 20 33  2e 31 20 28 6f 72 20 67  |ISC OS 3.1 (or g|
00004100  72 65 61 74 65 72 29 2c  20 6f 72 20 77 69 6c 6c  |reater), or will|
00004110  20 74 65 72 6d 69 6e 61  74 65 20 74 68 65 0d 10  | terminate the..|
00004120  a4 4f f4 20 73 74 72 69  6e 67 20 75 6e 64 65 72  |.O. string under|
00004130  20 65 61 72 6c 69 65 72  20 76 65 72 73 69 6f 6e  | earlier version|
00004140  73 20 6f 66 20 74 68 65  20 77 69 6d 70 2e 20 54  |s of the wimp. T|
00004150  68 69 73 20 61 6c 6c 6f  77 73 20 74 68 65 20 6e  |his allows the n|
00004160  65 77 20 69 6e 64 69 72  65 63 74 65 64 0d 10 ae  |ew indirected...|
00004170  46 f4 20 6d 65 6e 75 20  74 69 74 6c 65 73 20 74  |F. menu titles t|
00004180  6f 20 62 65 20 75 73 65  64 20 28 77 68 69 63 68  |o be used (which|
00004190  20 77 65 72 65 20 69 6e  74 72 6f 64 75 63 65 64  | were introduced|
000041a0  20 77 69 74 68 20 52 49  53 43 20 4f 53 20 33 2e  | with RISC OS 3.|
000041b0  31 29 2e 0d 10 b8 07 20  20 3a 0d 10 c2 23 49 6e  |1).....  :...#In|
000041c0  64 69 72 65 63 74 4d 65  6e 75 54 65 78 74 4f 66  |directMenuTextOf|
000041d0  66 73 65 74 50 6f 69 6e  74 65 72 3d 30 0d 10 cc  |fsetPointer=0...|
000041e0  4e f4 20 54 68 69 73 20  70 6f 69 6e 74 73 20 74  |N. This points t|
000041f0  6f 20 61 20 70 6f 6f 6c  20 74 6f 20 62 65 20 75  |o a pool to be u|
00004200  73 65 64 20 62 79 20 61  6c 6c 20 6d 65 6e 75 73  |sed by all menus|
00004210  20 66 6f 72 20 74 68 65  69 72 20 69 6e 64 69 72  | for their indir|
00004220  65 63 74 65 64 20 74 65  78 74 2e 0d 10 d6 07 20  |ected text..... |
00004230  20 3a 0d 10 e0 0d 4d 25  3d 49 42 4d 65 6e 75 0d  | :....M%=IBMenu.|
00004240  10 ea 49 54 69 74 6c 65  24 3d 22 46 6f 72 6d 20  |..ITitle$="Form |
00004250  53 69 7a 65 72 22 3a de  20 49 42 4d 65 6e 75 54  |Sizer":. IBMenuT|
00004260  69 74 6c 65 20 a9 28 54  69 74 6c 65 24 29 2b 31  |itle .(Title$)+1|
00004270  3a 24 49 42 4d 65 6e 75  54 69 74 6c 65 3d 54 69  |:$IBMenuTitle=Ti|
00004280  74 6c 65 24 2b bd 31 33  0d 10 f4 1a f2 4d 65 6e  |tle$+.13.....Men|
00004290  75 49 6e 69 74 28 49 42  4d 65 6e 75 54 69 74 6c  |uInit(IBMenuTitl|
000042a0  65 29 0d 10 fe 1c f2 4d  65 6e 75 49 74 65 6d 28  |e).....MenuItem(|
000042b0  22 49 6e 66 6f 22 2c 30  2c 49 6e 66 6f 29 0d 11  |"Info",0,Info)..|
000042c0  08 1c f2 4d 65 6e 75 49  74 65 6d 28 22 51 75 69  |...MenuItem("Qui|
000042d0  74 22 2c 31 32 38 2c 2d  31 29 0d 11 12 07 20 20  |t",128,-1)....  |
000042e0  3a 0d 11 1c 0f 4d 25 3d  4d 61 69 6e 4d 65 6e 75  |:....M%=MainMenu|
000042f0  0d 11 26 4d 54 69 74 6c  65 24 3d 22 46 6f 72 6d  |..&MTitle$="Form|
00004300  20 53 69 7a 65 72 22 3a  de 20 4d 61 69 6e 4d 65  | Sizer":. MainMe|
00004310  6e 75 54 69 74 6c 65 20  a9 28 54 69 74 6c 65 24  |nuTitle .(Title$|
00004320  29 2b 32 3a 24 4d 61 69  6e 4d 65 6e 75 54 69 74  |)+2:$MainMenuTit|
00004330  6c 65 3d 54 69 74 6c 65  24 2b bd 31 33 0d 11 30  |le=Title$+.13..0|
00004340  1c f2 4d 65 6e 75 49 6e  69 74 28 4d 61 69 6e 4d  |..MenuInit(MainM|
00004350  65 6e 75 54 69 74 6c 65  29 0d 11 3a 1c f2 4d 65  |enuTitle)..:..Me|
00004360  6e 75 49 74 65 6d 28 22  49 6e 66 6f 22 2c 32 2c  |nuItem("Info",2,|
00004370  49 6e 66 6f 29 0d 11 44  26 f2 4d 65 6e 75 49 74  |Info)..D&.MenuIt|
00004380  65 6d 28 22 43 6c 65 61  72 20 73 74 61 74 69 73  |em("Clear statis|
00004390  74 69 63 73 22 2c 30 2c  2d 31 29 0d 11 4e 26 f2  |tics",0,-1)..N&.|
000043a0  4d 65 6e 75 49 74 65 6d  28 22 57 69 6e 64 6f 77  |MenuItem("Window|
000043b0  20 70 6f 73 69 74 69 6f  6e 22 2c 32 2c 4c 6f 63  | position",2,Loc|
000043c0  29 0d 11 58 27 f2 4d 65  6e 75 49 74 65 6d 28 22  |)..X'.MenuItem("|
000043d0  53 61 76 65 20 73 74 61  74 69 73 74 69 63 73 22  |Save statistics"|
000043e0  2c 30 2c 53 61 76 65 29  0d 11 62 25 f2 4d 65 6e  |,0,Save)..b%.Men|
000043f0  75 49 74 65 6d 28 22 53  61 76 65 20 73 65 74 74  |uItem("Save sett|
00004400  69 6e 67 73 22 2c 31 32  38 2c 2d 31 29 0d 11 6c  |ings",128,-1)..l|
00004410  05 e1 0d 11 76 05 3a 0d  11 80 0f dd 20 f2 4d 61  |....v.:..... .Ma|
00004420  6b 65 4d 65 6e 75 0d 11  8a 17 e7 20 4d 65 6e 75  |keMenu..... Menu|
00004430  58 3c 30 20 8c 20 4d 65  6e 75 58 3d 30 0d 11 94  |X<0 . MenuX=0...|
00004440  2a e7 20 4d 65 6e 75 59  3c 31 38 34 20 8c 20 4d  |*. MenuY<184 . M|
00004450  65 6e 75 59 3d 31 38 34  3a f4 20 66 6f 72 20 69  |enuY=184:. for i|
00004460  63 6f 6e 20 62 61 72 0d  11 9e 37 c8 99 20 22 57  |con bar...7.. "W|
00004470  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 22 2c  |imp_CreateMenu",|
00004480  2c 4d 25 2c 4d 65 6e 75  58 2d 28 28 33 36 2b 4d  |,M%,MenuX-((36+M|
00004490  25 21 31 36 29 2f 32 29  2c 4d 65 6e 75 59 0d 11  |%!16)/2),MenuY..|
000044a0  a8 05 e1 0d 11 b2 05 3a  0d 11 bc 1a dd 20 f2 4d  |.......:..... .M|
000044b0  65 6e 75 49 6e 69 74 28  4d 65 6e 75 54 69 74 6c  |enuInit(MenuTitl|
000044c0  65 29 0d 11 c6 11 e7 20  77 69 6d 70 3e 3d 33 31  |e)..... wimp>=31|
000044d0  30 20 8c 0d 11 d0 37 20  20 41 3d a7 24 4d 65 6e  |0 ....7  A=.$Men|
000044e0  75 54 69 74 6c 65 2c 22  7c 22 29 3a e7 20 41 3c  |uTitle,"|"):. A<|
000044f0  3e 30 20 8c 20 3f 28 4d  65 6e 75 54 69 74 6c 65  |>0 . ?(MenuTitle|
00004500  2b 28 41 2d 31 29 29 3d  33 32 0d 11 da 1b 20 20  |+(A-1))=32....  |
00004510  4d 65 6e 75 4d 61 78 3d  a9 28 24 4d 65 6e 75 54  |MenuMax=.($MenuT|
00004520  69 74 6c 65 29 0d 11 e4  14 20 20 4d 25 21 30 3d  |itle)....  M%!0=|
00004530  4d 65 6e 75 54 69 74 6c  65 0d 11 ee 05 cc 0d 11  |MenuTitle.......|
00004540  f8 37 20 20 41 3d a7 24  4d 65 6e 75 54 69 74 6c  |.7  A=.$MenuTitl|
00004550  65 2c 22 7c 22 29 3a e7  20 41 3c 3e 30 20 8c 20  |e,"|"):. A<>0 . |
00004560  3f 28 4d 65 6e 75 54 69  74 6c 65 2b 28 41 2d 31  |?(MenuTitle+(A-1|
00004570  29 29 3d 31 33 0d 12 02  20 20 20 4d 65 6e 75 4d  |))=13...   MenuM|
00004580  61 78 3d a9 28 c0 24 4d  65 6e 75 54 69 74 6c 65  |ax=.(.$MenuTitle|
00004590  2c 31 32 29 29 0d 12 0c  19 20 20 24 4d 25 3d c0  |,12))....  $M%=.|
000045a0  24 4d 65 6e 75 54 69 74  6c 65 2c 31 32 29 0d 12  |$MenuTitle,12)..|
000045b0  16 05 cd 0d 12 20 24 4d  25 3f 31 32 3d 37 3a 4d  |..... $M%?12=7:M|
000045c0  25 3f 31 33 3d 32 3a 4d  25 3f 31 34 3d 31 31 3a  |%?13=2:M%?14=11:|
000045d0  4d 25 3f 31 35 3d 30 0d  12 2a 14 4d 25 21 31 36  |M%?15=0..*.M%!16|
000045e0  3d 4d 65 6e 75 4d 61 78  2a 31 36 0d 12 34 14 4d  |=MenuMax*16..4.M|
000045f0  25 21 32 30 3d 34 34 3a  4d 25 21 32 34 3d 30 0d  |%!20=44:M%!24=0.|
00004600  12 3e 0c 50 25 3d 4d 25  2b 32 38 0d 12 48 05 e1  |.>.P%=M%+28..H..|
00004610  0d 12 52 05 3a 0d 12 5c  21 dd 20 f2 4d 65 6e 75  |..R.:..\!. .Menu|
00004620  49 74 65 6d 28 54 65 78  74 24 2c 46 6c 61 67 73  |Item(Text$,Flags|
00004630  2c 4c 69 6e 6b 29 0d 12  66 4b f4 20 46 6c 61 67  |,Link)..fK. Flag|
00004640  73 3a 20 31 2d 74 69 63  6b 65 64 2c 20 32 2d 64  |s: 1-ticked, 2-d|
00004650  61 73 68 65 64 20 6c 69  6e 65 2c 20 34 2d 77 72  |ashed line, 4-wr|
00004660  69 74 65 61 62 6c 65 2c  20 38 2d 6d 65 73 73 61  |iteable, 8-messa|
00004670  67 65 2c 20 31 32 38 2d  6c 61 73 74 20 69 74 65  |ge, 128-last ite|
00004680  6d 0d 12 70 31 f4 20 4c  69 6e 6b 3a 20 6d 65 6e  |m..p1. Link: men|
00004690  75 20 6f 72 20 77 69 6e  64 6f 77 20 68 61 6e 64  |u or window hand|
000046a0  6c 65 20 66 6f 72 20 73  75 62 2d 70 6f 69 6e 74  |le for sub-point|
000046b0  65 72 0d 12 7a 18 50 25  21 30 3d 46 6c 61 67 73  |er..z.P%!0=Flags|
000046c0  3a 50 25 21 34 3d 4c 69  6e 6b 0d 12 84 14 e7 20  |:P%!4=Link..... |
000046d0  a9 28 54 65 78 74 24 29  3c 3d 31 32 20 8c 0d 12  |.(Text$)<=12 ...|
000046e0  8e 25 20 20 50 25 21 38  3d 26 30 37 30 30 33 30  |.%  P%!8=&070030|
000046f0  32 31 3a f4 20 4e 6f 74  20 69 6e 64 69 72 65 63  |21:. Not indirec|
00004700  74 65 64 0d 12 98 14 20  20 24 28 50 25 2b 31 32  |ted....  $(P%+12|
00004710  29 3d 54 65 78 74 24 0d  12 a2 05 cc 0d 12 ac 21  |)=Text$........!|
00004720  20 20 50 25 21 38 3d 26  30 37 30 30 33 31 32 31  |  P%!8=&07003121|
00004730  3a f4 20 49 6e 64 69 72  65 63 74 65 64 0d 12 b6  |:. Indirected...|
00004740  3a 20 20 50 25 21 31 32  3d 49 6e 64 69 72 65 63  |:  P%!12=Indirec|
00004750  74 4d 65 6e 75 54 65 78  74 2b 49 6e 64 69 72 65  |tMenuText+Indire|
00004760  63 74 4d 65 6e 75 54 65  78 74 4f 66 66 73 65 74  |ctMenuTextOffset|
00004770  50 6f 69 6e 74 65 72 0d  12 c0 15 20 20 50 25 21  |Pointer....  P%!|
00004780  31 36 3d 30 3a 50 25 21  32 30 3d 30 0d 12 ca 41  |16=0:P%!20=0...A|
00004790  20 20 24 28 49 6e 64 69  72 65 63 74 4d 65 6e 75  |  $(IndirectMenu|
000047a0  54 65 78 74 2b 49 6e 64  69 72 65 63 74 4d 65 6e  |Text+IndirectMen|
000047b0  75 54 65 78 74 4f 66 66  73 65 74 50 6f 69 6e 74  |uTextOffsetPoint|
000047c0  65 72 29 3d 54 65 78 74  24 2b bd 31 33 0d 12 d4  |er)=Text$+.13...|
000047d0  2f 20 20 49 6e 64 69 72  65 63 74 4d 65 6e 75 54  |/  IndirectMenuT|
000047e0  65 78 74 4f 66 66 73 65  74 50 6f 69 6e 74 65 72  |extOffsetPointer|
000047f0  2b 3d a9 28 54 65 78 74  24 29 2b 31 0d 12 de 82  |+=.(Text$)+1....|
00004800  20 20 e7 20 49 6e 64 69  72 65 63 74 4d 65 6e 75  |  . IndirectMenu|
00004810  54 65 78 74 4f 66 66 73  65 74 50 6f 69 6e 74 65  |TextOffsetPointe|
00004820  72 3e 49 6e 64 4d 65 6e  75 4d 61 78 20 8c 20 85  |r>IndMenuMax . .|
00004830  20 30 2c 22 54 68 65 20  69 6e 64 69 72 65 63 74  | 0,"The indirect|
00004840  20 6d 65 6e 75 20 74 65  78 74 20 62 75 66 66 65  | menu text buffe|
00004850  72 20 68 61 73 20 6f 76  65 72 66 6c 6f 77 65 64  |r has overflowed|
00004860  2e 20 50 6c 65 61 73 65  20 61 6c 6c 6f 63 61 74  |. Please allocat|
00004870  65 20 6d 6f 72 65 20 73  70 61 63 65 2e 22 0d 12  |e more space."..|
00004880  e8 05 cd 0d 12 f2 0a 50  25 2b 3d 32 34 0d 12 fc  |.......P%+=24...|
00004890  3e e7 20 4d 65 6e 75 4d  61 78 3c a9 28 54 65 78  |>. MenuMax<.(Tex|
000048a0  74 24 29 20 8c 20 4d 65  6e 75 4d 61 78 3d a9 28  |t$) . MenuMax=.(|
000048b0  54 65 78 74 24 29 3a 4d  25 21 31 36 3d 28 4d 65  |Text$):M%!16=(Me|
000048c0  6e 75 4d 61 78 2b 31 29  2a 31 36 0d 13 06 41 e7  |nuMax+1)*16...A.|
000048d0  20 28 46 6c 61 67 73 3d  31 32 38 29 20 80 20 28  | (Flags=128) . (|
000048e0  77 69 6d 70 3e 3d 33 31  30 29 20 8c 20 4d 25 21  |wimp>=310) . M%!|
000048f0  32 38 3d 28 28 28 4d 25  21 32 38 29 20 80 20 ac  |28=(((M%!28) . .|
00004900  20 32 35 36 29 20 82 20  32 35 36 29 0d 13 10 37  | 256) . 256)...7|
00004910  20 20 f4 20 49 6e 64 69  72 65 63 74 65 64 20 6d  |  . Indirected m|
00004920  65 6e 75 20 74 69 74 6c  65 73 20 66 6f 72 20 52  |enu titles for R|
00004930  49 53 43 20 4f 53 20 33  2e 31 20 75 70 77 61 72  |ISC OS 3.1 upwar|
00004940  64 73 2e 0d 13 1a 05 e1  0d 13 24 05 3a 0d 13 2e  |ds........$.:...|
00004950  4f f4 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |O. -------------|
00004960  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004990  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 13 38 29  |------------..8)|
000049a0  f4 20 52 65 73 70 6f 6e  73 65 73 20 74 6f 20 69  |. Responses to i|
000049b0  6e 63 6f 6d 69 6e 67 20  77 69 6d 70 20 6d 65 73  |ncoming wimp mes|
000049c0  73 61 67 65 73 0d 13 42  4f f4 20 2d 2d 2d 2d 2d  |sages..BO. -----|
000049d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004a10  2d 2d 2d 2d 0d 13 4c 05  3a 0d 13 56 18 dd 20 f2  |----..L.:..V.. .|
00004a20  53 61 76 65 44 65 73 6b  74 6f 70 28 46 69 6c 65  |SaveDesktop(File|
00004a30  29 0d 13 60 07 ea 20 85  0d 13 6a 47 ee 20 85 20  |)..`.. ...jG. . |
00004a40  ea 20 42 6c 6f 63 6b 21  31 32 3d 42 6c 6f 63 6b  |. Block!12=Block|
00004a50  21 38 3a c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |!8:.. "Wimp_Send|
00004a60  4d 65 73 73 61 67 65 22  2c 31 39 2c 42 6c 6f 63  |Message",19,Bloc|
00004a70  6b 2c 42 6c 6f 63 6b 21  34 3a f7 20 85 3a e1 0d  |k,Block!4:. .:..|
00004a80  13 74 49 f4 20 54 68 65  20 61 62 6f 76 65 20 6c  |.tI. The above l|
00004a90  69 6e 65 20 61 63 6b 6e  6f 77 6c 65 64 67 65 73  |ine acknowledges|
00004aa0  20 74 68 65 20 6d 65 73  73 61 67 65 20 69 66 20  | the message if |
00004ab0  61 6e 20 65 72 72 6f 72  20 6f 63 63 75 72 73 2c  |an error occurs,|
00004ac0  20 74 68 65 72 65 62 79  0d 13 7e 20 f4 20 61 62  | thereby..~ . ab|
00004ad0  6f 72 74 69 6e 67 20 74  68 65 20 64 65 73 6b 74  |orting the deskt|
00004ae0  6f 70 20 73 61 76 65 2e  0d 13 88 2b d5 23 46 69  |op save....+.#Fi|
00004af0  6c 65 2c 22 52 75 6e 20  22 2b 4f 75 72 50 61 74  |le,"Run "+OurPat|
00004b00  68 4e 61 6d 65 24 2b 4f  75 72 46 69 6c 65 4e 61  |hName$+OurFileNa|
00004b10  6d 65 24 0d 13 92 05 e1  0d 13 9c 05 3a 0d 13 a6  |me$.........:...|
00004b20  0b dd 20 f2 48 65 6c 70  0d 13 b0 34 42 6c 6f 63  |.. .Help...4Bloc|
00004b30  6b 21 31 32 3d 42 6c 6f  63 6b 21 38 3a 42 6c 6f  |k!12=Block!8:Blo|
00004b40  63 6b 21 31 36 3d 26 35  30 33 3a 48 65 6c 70 49  |ck!16=&503:HelpI|
00004b50  6e 66 6f 3d 42 6c 6f 63  6b 2b 32 30 0d 13 ba 07  |nfo=Block+20....|
00004b60  20 20 3a 0d 13 c4 30 f4  20 42 6c 6f 63 6b 21 33  |  :...0. Block!3|
00004b70  32 20 67 69 76 65 73 20  77 69 6e 64 6f 77 2c 20  |2 gives window, |
00004b80  42 6c 6f 63 6b 21 33 36  20 67 69 76 65 73 20 69  |Block!36 gives i|
00004b90  63 6f 6e 0d 13 ce 07 20  20 3a 0d 13 d8 11 c8 8e  |con....  :......|
00004ba0  20 42 6c 6f 63 6b 21 33  32 20 ca 0d 13 e2 30 20  | Block!32 ....0 |
00004bb0  20 c9 20 2d 32 3a f2 53  65 6e 64 28 22 54 68 69  | . -2:.Send("Thi|
00004bc0  73 20 69 73 20 74 68 65  20 46 6f 72 6d 20 53 69  |s is the Form Si|
00004bd0  7a 65 72 20 69 63 6f 6e  2e 22 29 0d 13 ec 3d 20  |zer icon.")...= |
00004be0  20 20 20 20 20 20 20 20  20 f2 53 65 6e 64 28 22  |         .Send("|
00004bf0  43 6c 69 63 6b 20 4d 45  4e 55 20 66 6f 72 20 69  |Click MENU for i|
00004c00  6e 66 6f 72 6d 61 74 69  6f 6e 20 6f 72 20 74 6f  |nformation or to|
00004c10  20 71 75 69 74 2e 22 29  0d 13 f6 4c 20 20 20 20  | quit.")...L    |
00004c20  20 20 20 20 20 20 f2 53  65 6e 64 28 22 43 6c 69  |      .Send("Cli|
00004c30  63 6b 20 53 45 4c 45 43  54 20 74 6f 20 6f 70 65  |ck SELECT to ope|
00004c40  6e 20 74 68 65 20 74 65  6d 70 6c 61 74 65 73 20  |n the templates |
00004c50  73 74 61 74 69 73 74 69  63 73 20 77 69 6e 64 6f  |statistics windo|
00004c60  77 2e 22 29 0d 14 00 0e  20 20 c9 20 53 74 61 74  |w.")....  . Stat|
00004c70  73 3a 0d 14 0a 15 20 20  20 20 c8 8e 20 42 6c 6f  |s:....    .. Blo|
00004c80  63 6b 21 33 36 20 ca 0d  14 14 4b 20 20 20 20 20  |ck!36 ....K     |
00004c90  20 c9 20 2d 31 3a f2 53  65 6e 64 28 22 54 68 69  | . -1:.Send("Thi|
00004ca0  73 20 69 73 20 74 68 65  20 46 6f 72 6d 20 53 69  |s is the Form Si|
00004cb0  7a 65 72 20 74 65 6d 70  6c 61 74 65 73 20 73 74  |zer templates st|
00004cc0  61 74 69 73 74 69 63 73  20 77 69 6e 64 6f 77 2e  |atistics window.|
00004cd0  22 29 0d 14 1e 31 20 20  20 20 20 20 20 20 20 20  |")...1          |
00004ce0  20 20 20 20 f2 53 65 6e  64 28 22 41 6c 6c 20 6e  |    .Send("All n|
00004cf0  75 6d 62 65 72 73 20 61  72 65 20 62 79 74 65 73  |umbers are bytes|
00004d00  2e 22 29 0d 14 28 38 20  20 20 20 20 20 20 20 20  |.")..(8         |
00004d10  20 20 20 20 20 f2 53 65  6e 64 28 22 43 6c 69 63  |     .Send("Clic|
00004d20  6b 20 4d 45 4e 55 20 66  6f 72 20 74 68 65 20 6d  |k MENU for the m|
00004d30  61 69 6e 20 6d 65 6e 75  2e 22 29 0d 14 32 5d 20  |ain menu.")..2] |
00004d40  20 20 20 20 20 c9 20 30  2c 31 2c 32 3a f2 53 65  |     . 0,1,2:.Se|
00004d50  6e 64 28 22 54 68 69 73  20 61 72 65 61 20 64 69  |nd("This area di|
00004d60  73 70 6c 61 79 73 20 74  68 65 20 66 69 6c 65 6e  |splays the filen|
00004d70  61 6d 65 20 6f 66 20 74  68 65 20 63 75 72 72 65  |ame of the curre|
00004d80  6e 74 6c 79 20 6c 6f 61  64 65 64 20 74 65 6d 70  |ntly loaded temp|
00004d90  6c 61 74 65 73 2e 22 29  0d 14 3c 5d 20 20 20 20  |lates.")..<]    |
00004da0  20 20 c9 20 33 2c 34 3a  f2 53 65 6e 64 28 22 54  |  . 3,4:.Send("T|
00004db0  68 69 73 20 61 72 65 61  20 64 69 73 70 6c 61 79  |his area display|
00004dc0  73 20 69 6e 66 6f 72 6d  61 74 69 6f 6e 20 61 62  |s information ab|
00004dd0  6f 75 74 20 74 68 65 20  63 75 72 72 65 6e 74 6c  |out the currentl|
00004de0  79 20 6c 6f 61 64 65 64  20 74 65 6d 70 6c 61 74  |y loaded templat|
00004df0  65 73 2e 22 29 0d 14 46  6d 20 20 20 20 20 20 c9  |es.")..Fm      .|
00004e00  20 35 2c 36 3a f2 53 65  6e 64 28 22 54 68 69 73  | 5,6:.Send("This|
00004e10  20 6c 69 6e 65 20 73 68  6f 77 73 20 74 68 65 20  | line shows the |
00004e20  61 6d 6f 75 6e 74 20 6f  66 20 6d 65 6d 6f 72 79  |amount of memory|
00004e30  20 6e 65 65 64 65 64 20  74 6f 20 73 74 6f 72 65  | needed to store|
00004e40  20 74 68 65 20 6c 61 72  67 65 73 74 20 77 69 6e  | the largest win|
00004e50  64 6f 77 20 69 6e 20 74  68 65 20 66 69 6c 65 2e  |dow in the file.|
00004e60  22 29 0d 14 50 a3 20 20  20 20 20 20 20 20 20 20  |")..P.          |
00004e70  20 20 20 20 20 f2 53 65  6e 64 28 22 49 66 20 61  |     .Send("If a|
00004e80  20 62 6c 6f 63 6b 20 6f  66 20 6d 65 6d 6f 72 79  | block of memory|
00004e90  20 6f 66 20 74 68 69 73  20 73 69 7a 65 20 69 73  | of this size is|
00004ea0  20 72 65 73 65 72 76 65  64 2c 20 74 68 65 6e 20  | reserved, then |
00004eb0  74 68 65 20 77 69 6e 64  6f 77 73 20 63 61 6e 20  |the windows can |
00004ec0  69 6e 20 74 75 72 6e 20  62 65 20 6c 6f 61 64 65  |in turn be loade|
00004ed0  64 20 69 6e 74 6f 20 69  74 2c 20 63 72 65 61 74  |d into it, creat|
00004ee0  65 64 20 61 6e 64 20 74  68 65 69 72 20 64 65 66  |ed and their def|
00004ef0  69 6e 69 74 69 6f 6e 73  20 64 69 73 63 61 72 64  |initions discard|
00004f00  65 64 2e 22 29 0d 14 5a  72 20 20 20 20 20 20 c9  |ed.")..Zr      .|
00004f10  20 37 2c 38 3a f2 53 65  6e 64 28 22 54 68 69 73  | 7,8:.Send("This|
00004f20  20 6c 69 6e 65 20 73 68  6f 77 73 20 74 68 65 20  | line shows the |
00004f30  61 6d 6f 75 6e 74 20 6f  66 20 6d 65 6d 6f 72 79  |amount of memory|
00004f40  20 6e 65 65 64 65 64 20  74 6f 20 73 74 6f 72 65  | needed to store|
00004f50  20 61 6c 6c 20 74 68 65  20 69 6e 64 69 72 65 63  | all the indirec|
00004f60  74 65 64 20 64 61 74 61  20 69 6e 20 74 68 65 20  |ted data in the |
00004f70  66 69 6c 65 2e 22 29 0d  14 64 a5 20 20 20 20 20  |file.")..d.     |
00004f80  20 20 20 20 20 20 20 20  20 20 f2 53 65 6e 64 28  |          .Send(|
00004f90  22 49 66 20 61 20 62 6c  6f 63 6b 20 6f 66 20 6d  |"If a block of m|
00004fa0  65 6d 6f 72 79 20 6f 66  20 74 68 69 73 20 73 69  |emory of this si|
00004fb0  7a 65 20 69 73 20 72 65  73 65 72 76 65 64 2c 20  |ze is reserved, |
00004fc0  74 68 65 6e 20 74 68 65  20 64 61 74 61 20 63 61  |then the data ca|
00004fd0  6e 20 62 65 20 6c 6f 61  64 65 64 20 69 6e 74 6f  |n be loaded into|
00004fe0  20 69 74 20 73 65 71 75  65 6e 74 69 61 6c 6c 79  | it sequentially|
00004ff0  2c 20 61 73 20 61 6c 6c  20 69 6e 64 69 72 65 63  |, as all indirec|
00005000  74 65 64 20 64 61 74 61  20 6d 75 73 74 20 62 65  |ted data must be|
00005010  20 72 65 74 61 69 6e 65  64 2e 22 29 0d 14 6e 5d  | retained.")..n]|
00005020  20 20 20 20 20 20 c9 20  39 3a f2 53 65 6e 64 28  |      . 9:.Send(|
00005030  22 54 68 69 73 20 63 6f  6c 75 6d 6e 20 73 68 6f  |"This column sho|
00005040  77 73 20 74 68 65 20 69  6e 74 65 72 6e 61 6c 20  |ws the internal |
00005050  69 64 65 6e 74 69 66 69  65 72 73 20 6f 66 20 74  |identifiers of t|
00005060  68 65 20 77 69 6e 64 6f  77 73 20 69 6e 20 74 68  |he windows in th|
00005070  65 20 66 69 6c 65 2e 22  29 0d 14 78 97 20 20 20  |e file.")..x.   |
00005080  20 20 20 c9 20 31 30 3a  f2 53 65 6e 64 28 22 54  |   . 10:.Send("T|
00005090  68 69 73 20 63 6f 6c 75  6d 6e 20 73 68 6f 77 73  |his column shows|
000050a0  20 74 68 65 20 73 69 7a  65 73 20 6f 66 20 74 68  | the sizes of th|
000050b0  65 20 62 6c 6f 63 6b 73  20 74 68 61 74 20 6e 65  |e blocks that ne|
000050c0  65 64 20 74 6f 20 62 65  20 72 65 73 65 72 76 65  |ed to be reserve|
000050d0  64 20 69 6e 20 6f 72 64  65 72 20 74 6f 20 73 74  |d in order to st|
000050e0  6f 72 65 20 74 68 65 20  64 65 66 69 6e 69 74 69  |ore the definiti|
000050f0  6f 6e 73 20 6f 66 20 65  61 63 68 20 69 6e 64 69  |ons of each indi|
00005100  76 69 64 75 61 6c 20 77  69 6e 64 6f 77 2e 22 29  |vidual window.")|
00005110  0d 14 82 94 20 20 20 20  20 20 c9 20 31 31 3a f2  |....      . 11:.|
00005120  53 65 6e 64 28 22 54 68  69 73 20 63 6f 6c 75 6d  |Send("This colum|
00005130  6e 20 73 68 6f 77 73 20  74 68 65 20 73 69 7a 65  |n shows the size|
00005140  73 20 6f 66 20 74 68 65  20 62 6c 6f 63 6b 73 20  |s of the blocks |
00005150  74 68 61 74 20 6e 65 65  64 20 74 6f 20 62 65 20  |that need to be |
00005160  72 65 73 65 72 76 65 64  20 69 6e 20 6f 72 64 65  |reserved in orde|
00005170  72 20 74 6f 20 73 74 6f  72 65 20 65 61 63 68 20  |r to store each |
00005180  69 6e 64 69 76 69 64 75  61 6c 20 73 65 74 20 6f  |individual set o|
00005190  66 20 69 6e 64 69 72 65  63 74 65 64 20 64 61 74  |f indirected dat|
000051a0  61 2e 22 29 0d 14 8c ab  20 20 20 20 20 20 c9 20  |a.")....      . |
000051b0  31 32 3a f2 53 65 6e 64  28 22 43 6c 69 63 6b 69  |12:.Send("Clicki|
000051c0  6e 67 20 6f 6e 20 74 68  69 73 20 62 75 74 74 6f  |ng on this butto|
000051d0  6e 20 77 69 6c 6c 20 74  6f 67 67 6c 65 20 69 74  |n will toggle it|
000051e0  20 62 65 74 77 65 65 6e  20 27 44 65 63 27 20 61  | between 'Dec' a|
000051f0  6e 64 20 27 48 65 78 27  2c 20 61 6e 64 20 74 68  |nd 'Hex', and th|
00005200  65 20 6e 75 6d 65 72 69  63 20 63 6f 6e 74 65 6e  |e numeric conten|
00005210  74 73 20 6f 66 20 74 68  65 20 77 69 6e 64 6f 77  |ts of the window|
00005220  20 77 69 6c 6c 20 73 77  69 74 63 68 20 62 65 74  | will switch bet|
00005230  77 65 65 6e 20 64 65 63  69 6d 61 6c 20 61 6e 64  |ween decimal and|
00005240  20 68 65 78 61 64 65 63  69 6d 61 6c 2e 22 29 0d  | hexadecimal.").|
00005250  14 96 68 20 20 20 20 20  20 20 20 20 20 20 20 20  |..h             |
00005260  20 f2 53 65 6e 64 28 22  54 68 65 20 73 65 74 74  | .Send("The sett|
00005270  69 6e 67 20 61 6c 73 6f  20 61 66 66 65 63 74 73  |ing also affects|
00005280  20 74 68 65 20 6e 75 6d  65 72 69 63 20 6f 75 74  | the numeric out|
00005290  70 75 74 20 69 6e 20 74  68 65 20 74 65 6d 70 6c  |put in the templ|
000052a0  61 74 65 73 20 73 74 61  74 69 73 74 69 63 73 20  |ates statistics |
000052b0  66 69 6c 65 2e 22 29 0d  14 a0 2a 20 20 20 20 20  |file.")...*     |
000052c0  20 c9 20 31 33 3a e7 20  a4 4d 65 6e 75 53 68 61  | . 13:. .MenuSha|
000052d0  64 65 64 28 4d 61 69 6e  4d 65 6e 75 2c 33 29 20  |ded(MainMenu,3) |
000052e0  8c 0d 14 aa 8f 20 20 20  20 20 20 20 20 20 20 20  |.....           |
000052f0  20 20 20 20 20 f2 53 65  6e 64 28 22 54 68 69 73  |     .Send("This|
00005300  20 61 72 65 61 20 77 69  6c 6c 20 64 69 73 70 6c  | area will displ|
00005310  61 79 20 73 70 65 63 69  66 69 63 20 69 6e 66 6f  |ay specific info|
00005320  72 6d 61 74 69 6f 6e 20  61 62 6f 75 74 20 74 68  |rmation about th|
00005330  65 20 77 69 6e 64 6f 77  73 20 69 6e 20 77 68 61  |e windows in wha|
00005340  74 65 76 65 72 20 74 65  6d 70 6c 61 74 65 73 20  |tever templates |
00005350  66 69 6c 65 20 79 6f 75  20 64 72 61 67 20 69 6e  |file you drag in|
00005360  74 6f 20 46 6f 72 6d 20  53 69 7a 65 72 2e 22 29  |to Form Sizer.")|
00005370  0d 14 b4 13 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00005380  20 20 cc 0d 14 be 61 20  20 20 20 20 20 20 20 20  |  ....a         |
00005390  20 20 20 20 20 20 20 f2  53 65 6e 64 28 22 54 68  |       .Send("Th|
000053a0  69 73 20 61 72 65 61 20  64 69 73 70 6c 61 79 73  |is area displays|
000053b0  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 61 62 6f  | information abo|
000053c0  75 74 20 74 68 65 20 63  75 72 72 65 6e 74 6c 79  |ut the currently|
000053d0  20 6c 6f 61 64 65 64 20  74 65 6d 70 6c 61 74 65  | loaded template|
000053e0  73 2e 22 29 0d 14 c8 13  20 20 20 20 20 20 20 20  |s.")....        |
000053f0  20 20 20 20 20 20 cd 0d  14 d2 0b 20 20 20 20 20  |      .....     |
00005400  20 7f 0d 14 dc 1e 20 20  20 20 20 20 20 20 e7 20  | .....        . |
00005410  28 42 6c 6f 63 6b 21 33  36 29 3e 3d 31 34 20 8c  |(Block!36)>=14 .|
00005420  0d 14 e6 26 20 20 20 20  20 20 20 20 20 20 49 63  |...&          Ic|
00005430  6f 6e 3d 28 28 42 6c 6f  63 6b 21 33 36 29 2d 31  |on=((Block!36)-1|
00005440  34 29 20 83 20 33 0d 14  f0 29 20 20 20 20 20 20  |4) . 3...)      |
00005450  20 20 20 20 e7 20 a4 4d  65 6e 75 53 68 61 64 65  |    . .MenuShade|
00005460  64 28 4d 61 69 6e 4d 65  6e 75 2c 33 29 20 8c 0d  |d(MainMenu,3) ..|
00005470  14 fa 8b 20 20 20 20 20  20 20 20 20 20 20 20 f2  |...            .|
00005480  53 65 6e 64 28 22 54 68  69 73 20 61 72 65 61 20  |Send("This area |
00005490  77 69 6c 6c 20 64 69 73  70 6c 61 79 20 73 70 65  |will display spe|
000054a0  63 69 66 69 63 20 69 6e  66 6f 72 6d 61 74 69 6f  |cific informatio|
000054b0  6e 20 61 62 6f 75 74 20  74 68 65 20 77 69 6e 64  |n about the wind|
000054c0  6f 77 73 20 69 6e 20 77  68 61 74 65 76 65 72 20  |ows in whatever |
000054d0  74 65 6d 70 6c 61 74 65  73 20 66 69 6c 65 20 79  |templates file y|
000054e0  6f 75 20 64 72 61 67 20  69 6e 74 6f 20 46 6f 72  |ou drag into For|
000054f0  6d 20 53 69 7a 65 72 2e  22 29 0d 15 04 0f 20 20  |m Sizer.")....  |
00005500  20 20 20 20 20 20 20 20  cc 0d 15 0e 19 20 20 20  |        .....   |
00005510  20 20 20 20 20 20 20 20  20 c8 8e 20 49 63 6f 6e  |         .. Icon|
00005520  20 ca 0d 15 18 65 20 20  20 20 20 20 20 20 20 20  | ....e          |
00005530  20 20 20 20 c9 20 30 3a  f2 53 65 6e 64 28 22 54  |    . 0:.Send("T|
00005540  68 69 73 20 63 6f 6c 75  6d 6e 20 73 68 6f 77 73  |his column shows|
00005550  20 74 68 65 20 69 6e 74  65 72 6e 61 6c 20 69 64  | the internal id|
00005560  65 6e 74 69 66 69 65 72  73 20 6f 66 20 74 68 65  |entifiers of the|
00005570  20 77 69 6e 64 6f 77 73  20 69 6e 20 74 68 65 20  | windows in the |
00005580  66 69 6c 65 2e 22 29 0d  15 22 6e 20 20 20 20 20  |file.").."n     |
00005590  20 20 20 20 20 20 20 20  20 c9 20 31 3a 54 65 6d  |         . 1:Tem|
000055a0  70 48 65 6c 70 42 6c 6f  63 6b 21 30 3d 53 74 61  |pHelpBlock!0=Sta|
000055b0  74 73 3a 54 65 6d 70 48  65 6c 70 42 6c 6f 63 6b  |ts:TempHelpBlock|
000055c0  21 34 3d 28 42 6c 6f 63  6b 21 33 36 29 2d 31 3a  |!4=(Block!36)-1:|
000055d0  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
000055e0  53 74 61 74 65 22 2c 2c  54 65 6d 70 48 65 6c 70  |State",,TempHelp|
000055f0  42 6c 6f 63 6b 0d 15 2c  8c 20 20 20 20 20 20 20  |Block..,.       |
00005600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 f2 53  |              .S|
00005610  65 6e 64 28 22 54 68 69  73 20 69 73 20 74 68 65  |end("This is the|
00005620  20 61 6d 6f 75 6e 74 20  6f 66 20 73 70 61 63 65  | amount of space|
00005630  20 6e 65 65 64 65 64 20  74 6f 20 73 74 6f 72 65  | needed to store|
00005640  20 74 68 65 20 77 69 6e  64 6f 77 20 64 65 66 69  | the window defi|
00005650  6e 69 74 69 6f 6e 20 6f  66 20 74 68 65 20 27 22  |nition of the '"|
00005660  2b 24 28 54 65 6d 70 48  65 6c 70 42 6c 6f 63 6b  |+$(TempHelpBlock|
00005670  2b 32 38 29 2b 22 27 20  77 69 6e 64 6f 77 2e 22  |+28)+"' window."|
00005680  29 0d 15 36 6e 20 20 20  20 20 20 20 20 20 20 20  |)..6n           |
00005690  20 20 20 c9 20 32 3a 54  65 6d 70 48 65 6c 70 42  |   . 2:TempHelpB|
000056a0  6c 6f 63 6b 21 30 3d 53  74 61 74 73 3a 54 65 6d  |lock!0=Stats:Tem|
000056b0  70 48 65 6c 70 42 6c 6f  63 6b 21 34 3d 28 42 6c  |pHelpBlock!4=(Bl|
000056c0  6f 63 6b 21 33 36 29 2d  32 3a c8 99 20 22 57 69  |ock!36)-2:.. "Wi|
000056d0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000056e0  2c 2c 54 65 6d 70 48 65  6c 70 42 6c 6f 63 6b 0d  |,,TempHelpBlock.|
000056f0  15 40 8a 20 20 20 20 20  20 20 20 20 20 20 20 20  |.@.             |
00005700  20 20 20 20 20 20 20 20  f2 53 65 6e 64 28 22 54  |        .Send("T|
00005710  68 69 73 20 69 73 20 74  68 65 20 61 6d 6f 75 6e  |his is the amoun|
00005720  74 20 6f 66 20 73 70 61  63 65 20 6e 65 65 64 65  |t of space neede|
00005730  64 20 74 6f 20 73 74 6f  72 65 20 74 68 65 20 69  |d to store the i|
00005740  6e 64 69 72 65 63 74 65  64 20 64 61 74 61 20 6f  |ndirected data o|
00005750  66 20 74 68 65 20 27 22  2b 24 28 54 65 6d 70 48  |f the '"+$(TempH|
00005760  65 6c 70 42 6c 6f 63 6b  2b 32 38 29 2b 22 27 20  |elpBlock+28)+"' |
00005770  77 69 6e 64 6f 77 2e 22  29 0d 15 4a 11 20 20 20  |window.")..J.   |
00005780  20 20 20 20 20 20 20 20  20 cb 0d 15 54 0f 20 20  |         ...T.  |
00005790  20 20 20 20 20 20 20 20  cd 0d 15 5e 0d 20 20 20  |        ...^.   |
000057a0  20 20 20 20 20 cd 0d 15  68 09 20 20 20 20 cb 0d  |     ...h.    ..|
000057b0  15 72 48 20 20 c9 20 49  6e 66 6f 3a f2 53 65 6e  |.rH  . Info:.Sen|
000057c0  64 28 22 54 68 69 73 20  77 69 6e 64 6f 77 20 64  |d("This window d|
000057d0  69 73 70 6c 61 79 73 20  69 6e 66 6f 72 6d 61 74  |isplays informat|
000057e0  69 6f 6e 20 61 62 6f 75  74 20 46 6f 72 6d 20 53  |ion about Form S|
000057f0  69 7a 65 72 2e 22 29 0d  15 7c 5b 20 20 20 20 20  |izer.")..|[     |
00005800  20 20 20 20 20 20 20 f2  53 65 6e 64 28 22 46 6f  |       .Send("Fo|
00005810  72 6d 20 53 69 7a 65 72  20 69 73 20 61 20 6d 65  |rm Sizer is a me|
00005820  6d 62 65 72 20 6f 66 20  74 68 65 20 4f 6d 6e 69  |mber of the Omni|
00005830  44 65 73 6b 20 53 75 69  74 65 20 6f 66 20 64 65  |Desk Suite of de|
00005840  73 6b 74 6f 70 20 75 74  69 6c 69 74 69 65 73 2e  |sktop utilities.|
00005850  22 29 0d 15 86 0c 20 20  c9 20 4c 6f 63 3a 0d 15  |")....  . Loc:..|
00005860  90 0d 20 20 20 c8 8e 20  b9 20 ca 0d 15 9a 6d 20  |..   .. . ....m |
00005870  20 20 20 20 c9 20 28 28  42 6c 6f 63 6b 21 33 36  |    . ((Block!36|
00005880  29 3c 36 29 3a f2 53 65  6e 64 28 22 54 68 69 73  |)<6):.Send("This|
00005890  20 77 69 6e 64 6f 77 20  6c 65 74 73 20 79 6f 75  | window lets you|
000058a0  20 73 6e 61 70 20 74 68  65 20 6d 61 67 6e 69 66  | snap the magnif|
000058b0  69 65 72 20 77 69 6e 64  6f 77 20 74 6f 20 61 6e  |ier window to an|
000058c0  20 69 6e 76 69 73 62 6c  65 20 73 63 72 65 65 6e  | invisble screen|
000058d0  20 67 72 69 64 2e 22 29  0d 15 a4 9d 20 20 20 20  | grid.")....    |
000058e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000058f0  20 20 20 20 20 f2 53 65  6e 64 28 22 54 68 65 20  |     .Send("The |
00005900  73 65 63 6f 6e 64 20 70  6f 73 69 74 69 6f 6e 20  |second position |
00005910  75 70 20 70 75 74 73 20  74 68 65 20 77 69 6e 64  |up puts the wind|
00005920  6f 77 20 6a 75 73 74 20  61 62 6f 76 65 20 74 68  |ow just above th|
00005930  65 20 69 63 6f 6e 2d 62  61 72 2c 20 61 6e 64 20  |e icon-bar, and |
00005940  69 73 20 74 68 65 72 65  66 6f 72 65 20 6e 6f 74  |is therefore not|
00005950  20 65 76 65 6e 6c 79 20  73 70 61 63 65 64 20 77  | evenly spaced w|
00005960  69 74 68 20 74 68 65 20  6f 74 68 65 72 20 72 6f  |ith the other ro|
00005970  77 73 2e 22 29 0d 15 ae  87 20 20 20 20 20 7f 20  |ws.")....     . |
00005980  f2 53 65 6e 64 28 22 43  6c 69 63 6b 20 53 45 4c  |.Send("Click SEL|
00005990  45 43 54 20 6f 6e 20 74  68 65 20 70 6f 73 69 74  |ECT on the posit|
000059a0  69 6f 6e 20 79 6f 75 20  77 61 6e 74 20 74 68 65  |ion you want the|
000059b0  20 77 69 6e 64 6f 77 20  74 6f 20 73 6e 61 70 20  | window to snap |
000059c0  74 6f 2c 20 6f 72 20 41  44 4a 55 53 54 20 6f 6e  |to, or ADJUST on|
000059d0  20 74 68 65 20 77 69 6e  64 6f 77 20 69 63 6f 6e  | the window icon|
000059e0  20 74 6f 20 74 75 72 6e  20 74 68 65 20 73 6e 61  | to turn the sna|
000059f0  70 70 69 6e 67 20 6f 66  66 2e 22 29 0d 15 b8 75  |pping off.")...u|
00005a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 f2  |               .|
00005a10  53 65 6e 64 28 22 49 66  20 73 6e 61 70 70 69 6e  |Send("If snappin|
00005a20  67 20 69 73 20 6f 6e 2c  20 74 68 65 20 77 69 6e  |g is on, the win|
00005a30  64 6f 77 20 77 69 6c 6c  20 6f 70 65 6e 20 61 74  |dow will open at|
00005a40  20 74 68 65 20 61 70 70  72 6f 70 72 69 61 74 65  | the appropriate|
00005a50  20 70 6f 73 69 74 69 6f  6e 20 77 68 65 6e 20 79  | position when y|
00005a60  6f 75 20 63 68 61 6e 67  65 20 6d 6f 64 65 2e 22  |ou change mode."|
00005a70  29 0d 15 c2 08 20 20 20  cb 0d 15 cc 0c 20 c9 20  |)....   ..... . |
00005a80  53 61 76 65 3a 0d 15 d6  14 20 20 20 c8 8e 20 42  |Save:....   .. B|
00005a90  6c 6f 63 6b 21 33 36 20  ca 0d 15 e0 ad 20 20 20  |lock!36 .....   |
00005aa0  20 20 c9 20 30 3a f2 53  65 6e 64 28 22 44 72 61  |  . 0:.Send("Dra|
00005ab0  67 20 74 68 65 20 66 69  6c 65 20 69 63 6f 6e 20  |g the file icon |
00005ac0  74 6f 20 61 20 66 69 6c  65 72 20 77 69 6e 64 6f  |to a filer windo|
00005ad0  77 20 6f 72 20 74 6f 20  61 6e 6f 74 68 65 72 20  |w or to another |
00005ae0  61 70 70 6c 69 63 61 74  69 6f 6e 20 77 68 69 63  |application whic|
00005af0  68 20 63 61 6e 20 61 63  63 65 70 74 20 74 65 78  |h can accept tex|
00005b00  74 20 66 69 6c 65 73 2c  20 6f 72 20 65 6e 74 65  |t files, or ente|
00005b10  72 20 61 20 66 69 6c 65  6e 61 6d 65 20 61 6e 64  |r a filename and|
00005b20  20 63 6c 69 63 6b 20 4f  4b 20 28 6f 72 20 70 72  | click OK (or pr|
00005b30  65 73 73 20 52 45 54 55  52 4e 29 20 74 6f 20 73  |ess RETURN) to s|
00005b40  61 76 65 2e 22 29 0d 15  ea 6d 20 20 20 20 20 c9  |ave.")...m     .|
00005b50  20 31 3a f2 53 65 6e 64  28 22 44 72 61 67 20 74  | 1:.Send("Drag t|
00005b60  68 69 73 20 69 63 6f 6e  20 74 6f 20 61 20 66 69  |his icon to a fi|
00005b70  6c 65 72 20 77 69 6e 64  6f 77 20 6f 72 20 74 6f  |ler window or to|
00005b80  20 61 6e 6f 74 68 65 72  20 61 70 70 6c 69 63 61  | another applica|
00005b90  74 69 6f 6e 20 77 68 69  63 68 20 63 61 6e 20 61  |tion which can a|
00005ba0  63 63 65 70 74 20 74 65  78 74 20 66 69 6c 65 73  |ccept text files|
00005bb0  2e 22 29 0d 15 f4 b2 20  20 20 20 20 c9 20 32 3a  |.")....     . 2:|
00005bc0  f2 53 65 6e 64 28 22 45  6e 74 65 72 20 61 20 66  |.Send("Enter a f|
00005bd0  69 6c 65 6e 61 6d 65 20  68 65 72 65 20 61 6e 64  |ilename here and|
00005be0  20 63 6c 69 63 6b 20 4f  4b 20 28 6f 72 20 70 72  | click OK (or pr|
00005bf0  65 73 73 20 52 45 54 55  52 4e 29 20 74 6f 20 73  |ess RETURN) to s|
00005c00  61 76 65 2c 20 6f 72 20  64 72 61 67 20 74 68 65  |ave, or drag the|
00005c10  20 66 69 6c 65 20 69 63  6f 6e 20 74 6f 20 61 20  | file icon to a |
00005c20  66 69 6c 65 72 20 77 69  6e 64 6f 77 20 6f 72 20  |filer window or |
00005c30  74 6f 20 61 6e 6f 74 68  65 72 20 61 70 70 6c 69  |to another appli|
00005c40  63 61 74 69 6f 6e 20 77  68 69 63 68 20 63 61 6e  |cation which can|
00005c50  20 61 63 63 65 70 74 20  74 65 78 74 20 66 69 6c  | accept text fil|
00005c60  65 73 2e 22 29 0d 15 fe  a1 20 20 20 20 20 c9 20  |es.")....     . |
00005c70  33 3a f2 53 65 6e 64 28  22 43 6c 69 63 6b 20 4f  |3:.Send("Click O|
00005c80  4b 20 28 6f 72 20 70 72  65 73 73 20 52 45 54 55  |K (or press RETU|
00005c90  52 4e 29 20 74 6f 20 73  61 76 65 20 74 68 65 20  |RN) to save the |
00005ca0  66 69 6c 65 2c 20 6f 72  20 64 72 61 67 20 74 68  |file, or drag th|
00005cb0  65 20 66 69 6c 65 20 69  63 6f 6e 20 74 6f 20 61  |e file icon to a|
00005cc0  20 66 69 6c 65 72 20 77  69 6e 64 6f 77 20 6f 72  | filer window or|
00005cd0  20 74 6f 20 61 6e 6f 74  68 65 72 20 61 70 70 6c  | to another appl|
00005ce0  69 63 61 74 69 6f 6e 20  77 68 69 63 68 20 63 61  |ication which ca|
00005cf0  6e 20 61 63 63 65 70 74  20 74 65 78 74 20 66 69  |n accept text fi|
00005d00  6c 65 73 2e 22 29 0d 16  08 2c 20 20 20 20 20 7f  |les.")...,     .|
00005d10  20 f2 53 65 6e 64 28 22  54 68 69 73 20 69 73 20  | .Send("This is |
00005d20  74 68 65 20 53 61 76 65  20 77 69 6e 64 6f 77 2e  |the Save window.|
00005d30  22 29 0d 16 12 9d 20 20  20 20 20 20 20 20 20 20  |")....          |
00005d40  20 20 20 20 20 f2 53 65  6e 64 28 22 54 68 65 20  |     .Send("The |
00005d50  66 69 6c 65 20 73 61 76  65 64 20 77 69 6c 6c 20  |file saved will |
00005d60  63 6f 6e 74 61 69 6e 20  64 65 74 61 69 6c 65 64  |contain detailed|
00005d70  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 6f 6e 20  | information on |
00005d80  74 68 65 20 63 6f 6e 74  65 6e 74 73 20 6f 66 20  |the contents of |
00005d90  74 68 65 20 77 69 6e 64  6f 77 73 20 61 6e 64 20  |the windows and |
00005da0  69 63 6f 6e 73 20 69 6e  20 74 68 65 20 63 75 72  |icons in the cur|
00005db0  72 65 6e 74 6c 79 20 6c  6f 61 64 65 64 20 74 65  |rently loaded te|
00005dc0  6d 70 6c 61 74 65 73 20  66 69 6c 65 2e 22 29 0d  |mplates file.").|
00005dd0  16 1c 08 20 20 20 cb 0d  16 26 05 7f 0d 16 30 13  |...   ...&....0.|
00005de0  20 20 e7 20 77 69 6d 70  3e 3d 32 31 37 20 8c 0d  |  . wimp>=217 ..|
00005df0  16 3a 31 20 20 20 20 4d  65 6e 75 48 65 6c 70 21  |.:1    MenuHelp!|
00005e00  30 3d 2d 31 3a 4d 65 6e  75 48 65 6c 70 21 34 3d  |0=-1:MenuHelp!4=|
00005e10  2d 31 3a 4d 65 6e 75 48  65 6c 70 21 38 3d 2d 31  |-1:MenuHelp!8=-1|
00005e20  0d 16 44 3b 20 20 20 20  c8 99 20 22 57 69 6d 70  |..D;    .. "Wimp|
00005e30  5f 47 65 74 4d 65 6e 75  53 74 61 74 65 22 2c 31  |_GetMenuState",1|
00005e40  2c 4d 65 6e 75 48 65 6c  70 2c 42 6c 6f 63 6b 21  |,MenuHelp,Block!|
00005e50  33 32 2c 42 6c 6f 63 6b  21 33 36 0d 16 4e 0f 20  |32,Block!36..N. |
00005e60  20 20 20 c8 8e 20 4d 25  20 ca 0d 16 58 13 20 20  |   .. M% ...X.  |
00005e70  20 20 20 20 c9 20 49 42  4d 65 6e 75 3a 0d 16 62  |    . IBMenu:..b|
00005e80  1d 20 20 20 20 20 20 20  20 e7 20 4d 65 6e 75 48  |.        . MenuH|
00005e90  65 6c 70 21 34 3d 2d 31  20 8c 0d 16 6c 1d 20 20  |elp!4=-1 ...l.  |
00005ea0  20 20 20 20 20 20 20 20  c8 8e 20 4d 65 6e 75 48  |        .. MenuH|
00005eb0  65 6c 70 21 30 20 ca 0d  16 76 58 20 20 20 20 20  |elp!0 ...vX     |
00005ec0  20 20 20 20 20 20 20 c9  20 30 3a f2 53 65 6e 64  |       . 0:.Send|
00005ed0  28 22 4d 6f 76 65 20 74  68 65 20 70 6f 69 6e 74  |("Move the point|
00005ee0  65 72 20 72 69 67 68 74  20 74 6f 20 73 65 65 20  |er right to see |
00005ef0  69 6e 66 6f 72 6d 61 74  69 6f 6e 20 61 62 6f 75  |information abou|
00005f00  74 20 46 6f 72 6d 20 53  69 7a 65 72 2e 22 29 0d  |t Form Sizer.").|
00005f10  16 80 3d 20 20 20 20 20  20 20 20 20 20 20 20 c9  |..=            .|
00005f20  20 31 3a f2 53 65 6e 64  28 22 43 6c 69 63 6b 20  | 1:.Send("Click |
00005f30  53 45 4c 45 43 54 20 74  6f 20 71 75 69 74 20 46  |SELECT to quit F|
00005f40  6f 72 6d 20 53 69 7a 65  72 2e 22 29 0d 16 8a 40  |orm Sizer.")...@|
00005f50  20 20 20 20 20 20 20 20  20 20 20 20 7f 20 f2 53  |            . .S|
00005f60  65 6e 64 28 22 54 68 69  73 20 69 73 20 74 68 65  |end("This is the|
00005f70  20 46 6f 72 6d 20 53 69  7a 65 72 20 69 63 6f 6e  | Form Sizer icon|
00005f80  2d 62 61 72 20 6d 65 6e  75 2e 22 29 0d 16 94 0f  |-bar menu.")....|
00005f90  20 20 20 20 20 20 20 20  20 20 cb 0d 16 9e 0d 20  |          ..... |
00005fa0  20 20 20 20 20 20 20 cd  0d 16 a8 15 20 20 20 20  |       .....    |
00005fb0  20 20 c9 20 4d 61 69 6e  4d 65 6e 75 3a 0d 16 b2  |  . MainMenu:...|
00005fc0  57 20 20 20 20 20 20 20  20 44 69 72 65 63 74 69  |W        Directi|
00005fd0  6f 6e 24 3d 22 72 69 67  68 74 22 3a e7 20 77 69  |on$="right":. wi|
00005fe0  6d 70 3e 3d 33 31 30 20  80 20 bd 28 4d 61 69 6e  |mp>=310 . .(Main|
00005ff0  4d 65 6e 75 54 69 74 6c  65 3f 30 29 3d 22 5c 22  |MenuTitle?0)="\"|
00006000  20 8c 20 44 69 72 65 63  74 69 6f 6e 24 3d 22 6c  | . Direction$="l|
00006010  65 66 74 22 0d 16 bc 1b  20 20 20 20 20 20 20 20  |eft"....        |
00006020  c8 8e 20 4d 65 6e 75 48  65 6c 70 21 30 20 ca 0d  |.. MenuHelp!0 ..|
00006030  16 c6 5f 20 20 20 20 20  20 20 20 20 20 c9 20 30  |.._          . 0|
00006040  3a f2 53 65 6e 64 28 22  4d 6f 76 65 20 74 68 65  |:.Send("Move the|
00006050  20 70 6f 69 6e 74 65 72  20 22 2b 44 69 72 65 63  | pointer "+Direc|
00006060  74 69 6f 6e 24 2b 22 20  74 6f 20 73 65 65 20 69  |tion$+" to see i|
00006070  6e 66 6f 72 6d 61 74 69  6f 6e 20 61 62 6f 75 74  |nformation about|
00006080  20 46 6f 72 6d 20 53 69  7a 65 72 2e 22 29 0d 16  | Form Sizer.")..|
00006090  d0 2d 20 20 20 20 20 20  20 20 20 20 c9 20 31 3a  |.-          . 1:|
000060a0  e7 20 a4 4d 65 6e 75 53  68 61 64 65 64 28 4d 61  |. .MenuShaded(Ma|
000060b0  69 6e 4d 65 6e 75 2c 31  29 20 8c 0d 16 da cb 20  |inMenu,1) ..... |
000060c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000060d0  20 20 f2 53 65 6e 64 28  22 57 68 65 6e 20 79 6f  |  .Send("When yo|
000060e0  75 20 68 61 76 65 20 6c  6f 61 64 65 64 20 73 6f  |u have loaded so|
000060f0  6d 65 20 74 65 6d 70 6c  61 74 65 73 20 69 6e 74  |me templates int|
00006100  6f 20 46 6f 72 6d 20 53  69 7a 65 72 2c 20 74 68  |o Form Sizer, th|
00006110  69 73 20 6f 70 74 69 6f  6e 20 77 69 6c 6c 20 63  |is option will c|
00006120  6c 65 61 72 20 74 68 65  6d 20 61 6e 64 20 72 65  |lear them and re|
00006130  73 65 74 20 74 68 65 20  73 74 61 74 69 73 74 69  |set the statisti|
00006140  63 73 20 77 69 6e 64 6f  77 2c 20 74 68 65 72 65  |cs window, there|
00006150  62 79 20 66 72 65 65 69  6e 67 20 61 20 73 6d 61  |by freeing a sma|
00006160  6c 6c 20 61 6d 6f 75 6e  74 20 6f 66 20 6d 65 6d  |ll amount of mem|
00006170  6f 72 79 20 66 6f 72 20  6f 74 68 65 72 20 74 61  |ory for other ta|
00006180  73 6b 73 2e 22 29 0d 16  e4 16 20 20 20 20 20 20  |sks.")....      |
00006190  20 20 20 20 20 20 20 20  20 20 20 cc 0d 16 ee 8a  |           .....|
000061a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000061b0  20 20 20 f2 53 65 6e 64  28 22 43 6c 69 63 6b 20  |   .Send("Click |
000061c0  53 45 4c 45 43 54 20 6f  72 20 41 44 4a 55 53 54  |SELECT or ADJUST|
000061d0  20 74 6f 20 63 6c 65 61  72 20 74 68 65 20 63 75  | to clear the cu|
000061e0  72 72 65 6e 74 6c 79 20  6c 6f 61 64 65 64 20 74  |rrently loaded t|
000061f0  65 6d 70 6c 61 74 65 73  20 61 6e 64 20 72 65 73  |emplates and res|
00006200  65 74 20 74 68 65 20 46  6f 72 6d 20 53 69 7a 65  |et the Form Size|
00006210  72 20 73 74 61 74 69 73  74 69 63 73 20 77 69 6e  |r statistics win|
00006220  64 6f 77 2e 22 29 0d 16  f8 58 20 20 20 20 20 20  |dow.")...X      |
00006230  20 20 20 20 20 20 20 20  20 20 20 20 20 f2 53 65  |             .Se|
00006240  6e 64 28 22 54 68 69 73  20 77 69 6c 6c 20 66 72  |nd("This will fr|
00006250  65 65 20 61 20 73 6d 61  6c 6c 20 61 6d 6f 75 6e  |ee a small amoun|
00006260  74 20 6f 66 20 6d 65 6d  6f 72 79 20 66 6f 72 20  |t of memory for |
00006270  6f 74 68 65 72 20 74 61  73 6b 73 2e 22 29 0d 17  |other tasks.")..|
00006280  02 16 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00006290  20 20 20 cd 0d 17 0c 76  20 20 20 20 20 20 20 20  |   ....v        |
000062a0  20 20 c9 20 32 3a f2 53  65 6e 64 28 22 4d 6f 76  |  . 2:.Send("Mov|
000062b0  65 20 74 68 65 20 70 6f  69 6e 74 65 72 20 22 2b  |e the pointer "+|
000062c0  44 69 72 65 63 74 69 6f  6e 24 2b 22 20 74 6f 20  |Direction$+" to |
000062d0  73 65 74 20 74 68 65 20  70 6f 73 69 74 69 6f 6e  |set the position|
000062e0  20 6f 66 20 74 68 65 20  46 6f 72 6d 20 53 69 7a  | of the Form Siz|
000062f0  65 72 20 77 69 6e 64 6f  77 20 6f 6e 20 74 68 65  |er window on the|
00006300  20 73 63 72 65 65 6e 2e  22 29 0d 17 16 2d 20 20  | screen.")...-  |
00006310  20 20 20 20 20 20 20 20  c9 20 33 3a e7 20 a4 4d  |        . 3:. .M|
00006320  65 6e 75 53 68 61 64 65  64 28 4d 61 69 6e 4d 65  |enuShaded(MainMe|
00006330  6e 75 2c 33 29 20 8c 0d  17 20 bc 20 20 20 20 20  |nu,3) ... .     |
00006340  20 20 20 20 20 20 20 20  20 20 20 20 20 20 f2 53  |              .S|
00006350  65 6e 64 28 22 57 68 65  6e 20 79 6f 75 20 68 61  |end("When you ha|
00006360  76 65 20 6c 6f 61 64 65  64 20 73 6f 6d 65 20 74  |ve loaded some t|
00006370  65 6d 70 6c 61 74 65 73  20 69 6e 74 6f 20 46 6f  |emplates into Fo|
00006380  72 6d 20 53 69 7a 65 72  2c 20 74 68 69 73 20 6f  |rm Sizer, this o|
00006390  70 74 69 6f 6e 20 77 69  6c 6c 20 61 6c 6c 6f 77  |ption will allow|
000063a0  20 79 6f 75 20 74 6f 20  73 61 76 65 20 64 65 74  | you to save det|
000063b0  61 69 6c 65 64 20 69 6e  66 6f 72 6d 61 74 69 6f  |ailed informatio|
000063c0  6e 20 61 62 6f 75 74 20  74 68 65 20 74 65 6d 70  |n about the temp|
000063d0  6c 61 74 65 73 20 69 6e  20 74 68 65 20 66 6f 72  |lates in the for|
000063e0  6d 20 6f 66 20 61 20 74  65 78 74 20 66 69 6c 65  |m of a text file|
000063f0  2e 22 29 0d 17 2a 16 20  20 20 20 20 20 20 20 20  |.")..*.         |
00006400  20 20 20 20 20 20 20 20  cc 0d 17 34 a2 20 20 20  |        ...4.   |
00006410  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006420  f2 53 65 6e 64 28 22 4d  6f 76 65 20 74 68 65 20  |.Send("Move the |
00006430  70 6f 69 6e 74 65 72 20  22 2b 44 69 72 65 63 74  |pointer "+Direct|
00006440  69 6f 6e 24 2b 22 20 74  6f 20 73 61 76 65 20 73  |ion$+" to save s|
00006450  6f 6d 65 20 64 65 74 61  69 6c 65 64 20 69 6e 66  |ome detailed inf|
00006460  6f 72 6d 61 74 69 6f 6e  20 61 62 6f 75 74 20 74  |ormation about t|
00006470  68 65 20 63 75 72 72 65  6e 74 6c 79 20 6c 6f 61  |he currently loa|
00006480  64 65 64 20 74 65 6d 70  6c 61 74 65 73 20 69 6e  |ded templates in|
00006490  20 74 68 65 20 66 6f 72  6d 20 6f 66 20 61 20 74  | the form of a t|
000064a0  65 78 74 20 66 69 6c 65  2e 22 29 0d 17 3e 16 20  |ext file.")..>. |
000064b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000064c0  cd 0d 17 48 7d 20 20 20  20 20 20 20 20 20 20 c9  |...H}          .|
000064d0  20 34 3a f2 53 65 6e 64  28 22 43 6c 69 63 6b 20  | 4:.Send("Click |
000064e0  53 45 4c 45 43 54 20 6f  72 20 41 44 4a 55 53 54  |SELECT or ADJUST|
000064f0  20 74 6f 20 73 61 76 65  20 74 68 65 20 46 6f 72  | to save the For|
00006500  6d 20 53 69 7a 65 72 20  77 69 6e 64 6f 77 20 70  |m Sizer window p|
00006510  6f 73 69 74 69 6f 6e 20  61 6e 64 20 74 68 65 20  |osition and the |
00006520  64 65 63 69 6d 61 6c 2f  68 65 78 61 64 65 63 69  |decimal/hexadeci|
00006530  6d 61 6c 20 73 65 74 74  69 6e 67 2e 22 29 0d 17  |mal setting.")..|
00006540  52 3a 20 20 20 20 20 20  20 20 20 20 7f 20 f2 53  |R:          . .S|
00006550  65 6e 64 28 22 54 68 69  73 20 69 73 20 74 68 65  |end("This is the|
00006560  20 46 6f 72 6d 20 53 69  7a 65 72 20 6d 61 69 6e  | Form Sizer main|
00006570  20 6d 65 6e 75 2e 22 29  0d 17 5c 0d 20 20 20 20  | menu.")..\.    |
00006580  20 20 20 20 cb 0d 17 66  09 20 20 20 20 cb 0d 17  |    ...f.    ...|
00006590  70 07 20 20 cd 0d 17 7a  05 cb 0d 17 84 07 20 20  |p.  ...z......  |
000065a0  3a 0d 17 8e 0f 3f 48 65  6c 70 49 6e 66 6f 3d 30  |:....?HelpInfo=0|
000065b0  0d 17 98 24 42 6c 6f 63  6b 21 30 3d 28 48 65 6c  |...$Block!0=(Hel|
000065c0  70 49 6e 66 6f 2b 34 2d  42 6c 6f 63 6b 29 20 80  |pInfo+4-Block) .|
000065d0  20 ac 20 33 0d 17 a2 2a  c8 99 20 22 57 69 6d 70  | . 3...*.. "Wimp|
000065e0  5f 53 65 6e 64 4d 65 73  73 61 67 65 22 2c 31 37  |_SendMessage",17|
000065f0  2c 42 6c 6f 63 6b 2c 42  6c 6f 63 6b 21 34 0d 17  |,Block,Block!4..|
00006600  ac 05 e1 0d 17 b6 05 3a  0d 17 c0 1a dd 20 a4 4f  |.......:..... .O|
00006610  6d 6e 69 48 65 6c 70 4d  65 73 73 61 67 65 28 41  |mniHelpMessage(A|
00006620  24 29 0d 17 ca 44 e7 20  41 24 3d 22 43 4c 49 43  |$)...D. A$="CLIC|
00006630  4b 22 20 8c 20 3d c0 22  6f 70 65 6e 20 74 68 65  |K" . =."open the|
00006640  20 74 65 6d 70 6c 61 74  65 73 20 73 74 61 74 69  | templates stati|
00006650  73 74 69 63 73 20 77 69  6e 64 6f 77 2e 22 2c 37  |stics window.",7|
00006660  36 29 2b bd 31 33 0d 17  d4 53 e7 20 41 24 3d 22  |6)+.13...S. A$="|
00006670  44 52 41 47 22 20 8c 20  3d c0 22 44 72 61 67 20  |DRAG" . =."Drag |
00006680  61 20 74 65 6d 70 6c 61  74 65 73 20 66 69 6c 65  |a templates file|
00006690  20 68 65 72 65 20 74 6f  20 64 69 73 70 6c 61 79  | here to display|
000066a0  20 69 74 73 20 73 74 61  74 69 73 74 69 63 73 2e  | its statistics.|
000066b0  22 2c 37 36 29 2b bd 31  33 0d 17 de 07 3d 22 22  |",76)+.13....=""|
000066c0  0d 17 e8 05 3a 0d 17 f2  12 dd 20 f2 53 65 6e 64  |....:..... .Send|
000066d0  28 54 65 78 74 24 29 0d  17 fc 18 24 48 65 6c 70  |(Text$)....$Help|
000066e0  49 6e 66 6f 3d 54 65 78  74 24 2b 22 7c 4d 22 0d  |Info=Text$+"|M".|
000066f0  18 06 18 48 65 6c 70 49  6e 66 6f 2b 3d a9 28 54  |...HelpInfo+=.(T|
00006700  65 78 74 24 29 2b 32 0d  18 10 05 e1 0d 18 1a 05  |ext$)+2.........|
00006710  3a 0d 18 24 16 dd 20 f2  4f 6d 6e 69 44 65 73 6b  |:..$.. .OmniDesk|
00006720  43 61 6c 6c 69 6e 67 0d  18 2e 14 e7 20 4f 6d 6e  |Calling..... Omn|
00006730  69 44 65 73 6b 3d 30 20  8c 20 e1 0d 18 38 49 f4  |iDesk=0 . ...8I.|
00006740  20 54 68 69 73 20 66 69  72 73 74 20 6c 69 6e 65  | This first line|
00006750  20 69 73 20 66 6f 72 20  69 66 20 61 20 62 72 6f  | is for if a bro|
00006760  61 64 63 61 73 74 20 6d  65 73 73 61 67 65 20 69  |adcast message i|
00006770  73 20 72 65 63 65 69 76  65 64 20 77 68 69 63 68  |s received which|
00006780  20 77 61 73 0d 18 42 41  f4 20 69 6e 74 65 6e 64  | was..BA. intend|
00006790  65 64 20 66 6f 72 20 61  20 74 72 61 6e 73 69 65  |ed for a transie|
000067a0  6e 74 20 63 6f 70 79 20  6f 66 20 74 68 65 20 75  |nt copy of the u|
000067b0  74 69 6c 69 74 79 2e 20  41 20 73 74 61 6e 64 2d  |tility. A stand-|
000067c0  61 6c 6f 6e 65 0d 18 4c  3f f4 20 69 6e 73 74 61  |alone..L?. insta|
000067d0  6e 74 69 61 74 69 6f 6e  20 6f 66 20 74 68 65 20  |ntiation of the |
000067e0  75 74 69 6c 69 74 79 20  73 68 6f 75 6c 64 20 69  |utility should i|
000067f0  67 6e 6f 72 65 20 73 75  63 68 20 6d 65 73 73 61  |gnore such messa|
00006800  67 65 73 2e 0d 18 56 11  c8 8e 20 42 6c 6f 63 6b  |ges...V... Block|
00006810  21 32 30 20 ca 0d 18 60  2c 20 20 c9 20 34 3a f2  |!20 ...`,  . 4:.|
00006820  4f 70 65 6e 28 53 74 61  74 73 2c b9 2c 58 50 6f  |Open(Stats,.,XPo|
00006830  73 69 74 69 6f 6e 2c 59  50 6f 73 69 74 69 6f 6e  |sition,YPosition|
00006840  29 0d 18 6a 28 20 20 c9  20 32 3a 54 65 6d 70 6c  |)..j(  . 2:Templ|
00006850  61 74 65 73 46 69 6c 65  4e 61 6d 65 24 3d 24 28  |atesFileName$=$(|
00006860  42 6c 6f 63 6b 2b 35 32  29 0d 18 74 65 20 20 20  |Block+52)..te   |
00006870  20 20 20 20 20 20 e7 20  54 65 6d 70 6c 61 74 65  |      . Template|
00006880  73 46 69 6c 65 4e 61 6d  65 24 3d 22 3c 57 69 6d  |sFileName$="<Wim|
00006890  70 24 53 63 72 61 70 3e  22 20 8c 20 54 65 6d 70  |p$Scrap>" . Temp|
000068a0  6c 61 74 65 73 46 69 6c  65 4e 61 6d 65 24 3d 22  |latesFileName$="|
000068b0  4e 6f 20 66 69 6c 65 6e  61 6d 65 20 2d 20 64 69  |No filename - di|
000068c0  72 65 63 74 20 74 72 61  6e 73 66 65 72 22 0d 18  |rect transfer"..|
000068d0  7e 43 20 20 20 20 20 20  20 20 20 4c 6f 61 64 46  |~C         LoadF|
000068e0  69 6c 65 45 72 72 6f 72  3d a4 4c 6f 61 64 46 69  |ileError=.LoadFi|
000068f0  6c 65 28 42 6c 6f 63 6b  21 34 34 2c 42 6c 6f 63  |le(Block!44,Bloc|
00006900  6b 21 34 38 2c 24 28 42  6c 6f 63 6b 2b 35 32 29  |k!48,$(Block+52)|
00006910  29 0d 18 88 54 20 20 20  20 20 20 20 20 20 42 6c  |)...T         Bl|
00006920  6f 63 6b 21 30 3d 32 30  3a 42 6c 6f 63 6b 21 31  |ock!0=20:Block!1|
00006930  36 3d 55 74 69 6c 41 63  6b 4c 6f 61 64 3a c8 99  |6=UtilAckLoad:..|
00006940  20 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  | "Wimp_SendMessa|
00006950  67 65 22 2c 31 37 2c 42  6c 6f 63 6b 2c 4f 6d 6e  |ge",17,Block,Omn|
00006960  69 44 65 73 6b 0d 18 92  1e 20 20 20 20 20 20 20  |iDesk....       |
00006970  20 20 f2 43 6c 65 61 72  53 74 61 74 73 57 69 6e  |  .ClearStatsWin|
00006980  64 6f 77 0d 18 9c 20 20  20 20 20 20 20 20 20 20  |dow...          |
00006990  f2 43 68 65 63 6b 4c 6f  61 64 46 69 6c 65 45 72  |.CheckLoadFileEr|
000069a0  72 6f 72 0d 18 a6 3c 20  20 20 20 20 20 20 20 20  |ror...<         |
000069b0  f2 45 76 61 6c 75 61 74  65 54 65 6d 70 6c 61 74  |.EvaluateTemplat|
000069c0  65 53 74 61 74 69 73 74  69 63 73 28 54 65 6d 70  |eStatistics(Temp|
000069d0  6c 61 74 65 73 46 69 6c  65 4e 61 6d 65 24 29 0d  |latesFileName$).|
000069e0  18 b0 47 20 20 20 20 20  20 20 20 20 e7 20 ac 20  |..G         . . |
000069f0  a4 4f 70 65 6e 53 74 61  74 65 28 53 74 61 74 73  |.OpenState(Stats|
00006a00  29 20 8c 20 f2 4f 70 65  6e 28 53 74 61 74 73 2c  |) . .Open(Stats,|
00006a10  b9 2c 58 50 6f 73 69 74  69 6f 6e 2c 59 50 6f 73  |.,XPosition,YPos|
00006a20  69 74 69 6f 6e 29 0d 18  ba 05 cb 0d 18 c4 05 e1  |ition)..........|
00006a30  0d 18 ce 05 3a 0d 18 d8  11 dd 20 f2 4d 6f 64 65  |....:..... .Mode|
00006a40  43 68 61 6e 67 65 0d 18  e2 12 44 6f 4d 6f 64 65  |Change....DoMode|
00006a50  43 68 61 6e 67 65 3d b9  0d 18 ec 3e e7 20 4f 6d  |Change=....>. Om|
00006a60  6e 69 44 65 73 6b 3d 30  20 8c 20 f2 55 70 64 61  |niDesk=0 . .Upda|
00006a70  74 65 49 63 6f 6e 46 6f  72 4d 6f 64 65 28 22 21  |teIconForMode("!|
00006a80  46 6f 72 6d 53 69 7a 65  72 22 2c 2d 32 2c 49 63  |FormSizer",-2,Ic|
00006a90  6f 6e 42 61 72 29 0d 18  f6 05 e1 0d 19 00 05 3a  |onBar).........:|
00006aa0  0d 19 0a 4f f4 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...O. ----------|
00006ab0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00006ae0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00006af0  19 14 38 f4 20 47 65 6e  65 72 61 6c 20 6e 6f 6e  |..8. General non|
00006b00  2d 73 70 65 63 69 66 69  63 20 75 73 65 66 75 6c  |-specific useful|
00006b10  20 72 6f 75 74 69 6e 65  73 20 28 6d 6f 73 74 6c  | routines (mostl|
00006b20  79 20 77 69 6d 70 29 0d  19 1e 4f f4 20 2d 2d 2d  |y wimp)...O. ---|
00006b30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00006b70  2d 2d 2d 2d 2d 2d 0d 19  28 05 3a 0d 19 32 20 dd  |------..(.:..2 .|
00006b80  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 57 6e 64  | .UpdateIcon(Wnd|
00006b90  77 2c 49 63 6e 2c 54 78  74 24 29 0d 19 3c 3a 42  |w,Icn,Txt$)..<:B|
00006ba0  6c 6f 63 6b 21 30 3d 57  6e 64 77 3a 42 6c 6f 63  |lock!0=Wndw:Bloc|
00006bb0  6b 21 34 3d 49 63 6e 3a  c8 99 20 22 57 69 6d 70  |k!4=Icn:.. "Wimp|
00006bc0  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00006bd0  42 6c 6f 63 6b 0d 19 46  1c e7 20 a9 28 54 78 74  |Block..F.. .(Txt|
00006be0  24 29 3e 28 42 6c 6f 63  6b 21 33 36 29 2d 31 20  |$)>(Block!36)-1 |
00006bf0  8c 0d 19 50 26 20 20 e7  20 28 28 42 6c 6f 63 6b  |...P&  . ((Block|
00006c00  21 32 34 29 20 80 20 28  31 3c 3c 39 29 29 3d 28  |!24) . (1<<9))=(|
00006c10  31 3c 3c 39 29 20 8c 0d  19 5a 19 20 20 20 20 f4  |1<<9) ...Z.    .|
00006c20  20 52 69 67 68 74 2d 6a  75 73 74 69 66 69 65 64  | Right-justified|
00006c30  0d 19 64 24 20 20 20 20  54 78 74 24 3d 22 88 22  |..d$    Txt$="."|
00006c40  2b c2 54 78 74 24 2c 28  42 6c 6f 63 6b 21 33 36  |+.Txt$,(Block!36|
00006c50  29 2d 32 29 0d 19 6e 07  20 20 cc 0d 19 78 23 20  |)-2)..n.  ...x# |
00006c60  20 20 20 f4 20 4c 65 66  74 2d 6a 75 73 74 69 66  |   . Left-justif|
00006c70  69 65 64 20 6f 72 20 63  65 6e 74 72 65 64 0d 19  |ied or centred..|
00006c80  82 2b 20 20 20 20 54 78  74 24 3d c0 54 78 74 24  |.+    Txt$=.Txt$|
00006c90  2c 28 42 6c 6f 63 6b 21  33 36 29 2d 31 29 3a c2  |,(Block!36)-1):.|
00006ca0  54 78 74 24 29 3d 22 89  22 0d 19 8c 07 20 20 cd  |Txt$)="."....  .|
00006cb0  0d 19 96 05 cd 0d 19 a0  46 f4 20 5e 20 45 6e 73  |........F. ^ Ens|
00006cc0  75 72 65 73 20 74 68 65  20 74 65 78 74 20 63 61  |ures the text ca|
00006cd0  6e 27 74 20 6f 76 65 72  66 6c 6f 77 20 74 68 65  |n't overflow the|
00006ce0  20 6d 61 78 69 6d 75 6d  20 73 70 61 63 65 20 69  | maximum space i|
00006cf0  6e 20 74 68 65 20 69 63  6f 6e 2e 0d 19 aa 19 e7  |n the icon......|
00006d00  20 24 28 42 6c 6f 63 6b  21 32 38 29 3c 3e 54 78  | $(Block!28)<>Tx|
00006d10  74 24 20 8c 0d 19 b4 2b  20 20 24 28 42 6c 6f 63  |t$ ....+  $(Bloc|
00006d20  6b 21 32 38 29 3d 54 78  74 24 3a 42 6c 6f 63 6b  |k!28)=Txt$:Block|
00006d30  21 38 3d 30 3a 42 6c 6f  63 6b 21 31 32 3d 30 0d  |!8=0:Block!12=0.|
00006d40  19 be 23 20 20 c8 99 20  22 57 69 6d 70 5f 53 65  |..#  .. "Wimp_Se|
00006d50  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 42 6c 6f  |tIconState",,Blo|
00006d60  63 6b 0d 19 c8 05 cd 0d  19 d2 25 c8 99 20 22 57  |ck........%.. "W|
00006d70  69 6d 70 5f 47 65 74 43  61 72 65 74 50 6f 73 69  |imp_GetCaretPosi|
00006d80  74 69 6f 6e 22 2c 2c 42  6c 6f 63 6b 0d 19 dc 22  |tion",,Block..."|
00006d90  e7 20 42 6c 6f 63 6b 21  30 3d 57 6e 64 77 20 80  |. Block!0=Wndw .|
00006da0  20 42 6c 6f 63 6b 21 34  3d 49 63 6e 20 8c 0d 19  | Block!4=Icn ...|
00006db0  e6 3c 20 20 f4 20 49 66  20 74 68 69 73 20 69 63  |.<  . If this ic|
00006dc0  6f 6e 20 6f 77 6e 73 20  74 68 65 20 63 61 72 65  |on owns the care|
00006dd0  74 2c 20 74 68 65 6e 20  70 75 74 20 69 74 20 61  |t, then put it a|
00006de0  74 20 74 68 65 20 65 6e  64 2e 0d 19 f0 38 20 20  |t the end....8  |
00006df0  c8 99 20 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |.. "Wimp_SetCare|
00006e00  74 50 6f 73 69 74 69 6f  6e 22 2c 57 6e 64 77 2c  |tPosition",Wndw,|
00006e10  49 63 6e 2c 30 2c 30 2c  2d 31 2c a9 28 54 78 74  |Icn,0,0,-1,.(Txt|
00006e20  24 29 0d 19 fa 05 cd 0d  1a 04 05 e1 0d 1a 0e 05  |$)..............|
00006e30  3a 0d 1a 18 2b dd 20 f2  55 70 64 61 74 65 49 63  |:...+. .UpdateIc|
00006e40  6f 6e 43 6f 6c 6f 75 72  28 57 6e 64 77 2c 49 63  |onColour(Wndw,Ic|
00006e50  6e 2c 46 43 6f 6c 2c 42  43 6f 6c 29 0d 1a 22 1e  |n,FCol,BCol)..".|
00006e60  f4 20 43 68 61 6e 67 65  20 61 6e 20 69 63 6f 6e  |. Change an icon|
00006e70  27 73 20 63 6f 6c 6f 75  72 73 0d 1a 2c 3a 42 6c  |'s colours..,:Bl|
00006e80  6f 63 6b 21 30 3d 57 6e  64 77 3a 42 6c 6f 63 6b  |ock!0=Wndw:Block|
00006e90  21 34 3d 49 63 6e 3a c8  99 20 22 57 69 6d 70 5f  |!4=Icn:.. "Wimp_|
00006ea0  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 42  |GetIconState",,B|
00006eb0  6c 6f 63 6b 0d 1a 36 3b  e7 20 28 28 28 42 6c 6f  |lock..6;. (((Blo|
00006ec0  63 6b 3f 32 37 29 3e 3e  34 29 3d 42 43 6f 6c 29  |ck?27)>>4)=BCol)|
00006ed0  20 80 20 28 28 28 42 6c  6f 63 6b 3f 32 37 29 20  | . (((Block?27) |
00006ee0  83 20 31 36 29 3d 46 43  6f 6c 29 20 8c 20 e1 0d  |. 16)=FCol) . ..|
00006ef0  1a 40 27 20 20 f4 20 5e  20 53 61 6d 65 20 63 6f  |.@'  . ^ Same co|
00006f00  6c 6f 75 72 2c 20 73 6f  20 64 6f 6e 27 74 20 63  |lour, so don't c|
00006f10  68 61 6e 67 65 2e 0d 1a  4a 3a 42 6c 6f 63 6b 21  |hange...J:Block!|
00006f20  31 32 3d 28 25 31 31 31  31 31 31 31 31 3c 3c 32  |12=(%11111111<<2|
00006f30  34 29 3a 42 6c 6f 63 6b  21 38 3d 28 42 43 6f 6c  |4):Block!8=(BCol|
00006f40  3c 3c 32 38 29 2b 28 46  43 6f 6c 3c 3c 32 34 29  |<<28)+(FCol<<24)|
00006f50  0d 1a 54 21 c8 99 20 22  57 69 6d 70 5f 53 65 74  |..T!.. "Wimp_Set|
00006f60  49 63 6f 6e 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |IconState",,Bloc|
00006f70  6b 0d 1a 5e 05 e1 0d 1a  68 05 3a 0d 1a 72 29 dd  |k..^....h.:..r).|
00006f80  20 f2 55 70 64 61 74 65  53 65 6c 65 63 74 65 64  | .UpdateSelected|
00006f90  46 6c 61 67 28 57 6e 64  77 2c 49 63 6e 2c 53 74  |Flag(Wndw,Icn,St|
00006fa0  61 74 65 29 0d 1a 7c 31  f4 20 55 73 65 20 53 74  |ate)..|1. Use St|
00006fb0  61 74 65 3d 54 52 55 45  20 74 6f 20 6d 61 6b 65  |ate=TRUE to make|
00006fc0  20 69 63 6f 6e 20 62 65  63 6f 6d 65 20 73 65 6c  | icon become sel|
00006fd0  65 63 74 65 64 0d 1a 86  3a 42 6c 6f 63 6b 21 30  |ected...:Block!0|
00006fe0  3d 57 6e 64 77 3a 42 6c  6f 63 6b 21 34 3d 49 63  |=Wndw:Block!4=Ic|
00006ff0  6e 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |n:.. "Wimp_GetIc|
00007000  6f 6e 53 74 61 74 65 22  2c 2c 42 6c 6f 63 6b 0d  |onState",,Block.|
00007010  1a 90 2f e7 20 28 28 42  6c 6f 63 6b 21 32 34 29  |../. ((Block!24)|
00007020  20 80 20 28 31 3c 3c 32  31 29 29 3d 28 28 2d 53  | . (1<<21))=((-S|
00007030  74 61 74 65 29 3c 3c 32  31 29 20 8c 20 e1 0d 1a  |tate)<<21) . ...|
00007040  9a 40 42 6c 6f 63 6b 21  31 32 3d 28 31 3c 3c 32  |.@Block!12=(1<<2|
00007050  31 29 3a e7 20 53 74 61  74 65 20 8c 20 42 6c 6f  |1):. State . Blo|
00007060  63 6b 21 38 3d 28 31 3c  3c 32 31 29 20 8b 20 42  |ck!8=(1<<21) . B|
00007070  6c 6f 63 6b 21 38 3d 28  30 3c 3c 32 31 29 0d 1a  |lock!8=(0<<21)..|
00007080  a4 21 c8 99 20 22 57 69  6d 70 5f 53 65 74 49 63  |.!.. "Wimp_SetIc|
00007090  6f 6e 53 74 61 74 65 22  2c 2c 42 6c 6f 63 6b 0d  |onState",,Block.|
000070a0  1a ae 05 e1 0d 1a b8 05  3a 0d 1a c2 27 dd 20 f2  |........:...'. .|
000070b0  55 70 64 61 74 65 53 68  61 64 65 64 46 6c 61 67  |UpdateShadedFlag|
000070c0  28 57 6e 64 77 2c 49 63  6e 2c 53 74 61 74 65 29  |(Wndw,Icn,State)|
000070d0  0d 1a cc 2f f4 20 55 73  65 20 53 74 61 74 65 3d  |.../. Use State=|
000070e0  54 52 55 45 20 74 6f 20  6d 61 6b 65 20 69 63 6f  |TRUE to make ico|
000070f0  6e 20 62 65 63 6f 6d 65  20 73 68 61 64 65 64 0d  |n become shaded.|
00007100  1a d6 3a 42 6c 6f 63 6b  21 30 3d 57 6e 64 77 3a  |..:Block!0=Wndw:|
00007110  42 6c 6f 63 6b 21 34 3d  49 63 6e 3a c8 99 20 22  |Block!4=Icn:.. "|
00007120  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
00007130  65 22 2c 2c 42 6c 6f 63  6b 0d 1a e0 2f e7 20 28  |e",,Block.../. (|
00007140  28 42 6c 6f 63 6b 21 32  34 29 20 80 20 28 31 3c  |(Block!24) . (1<|
00007150  3c 32 32 29 29 3d 28 28  2d 53 74 61 74 65 29 3c  |<22))=((-State)<|
00007160  3c 32 32 29 20 8c 20 e1  0d 1a ea 40 42 6c 6f 63  |<22) . ....@Bloc|
00007170  6b 21 31 32 3d 28 31 3c  3c 32 32 29 3a e7 20 53  |k!12=(1<<22):. S|
00007180  74 61 74 65 20 8c 20 42  6c 6f 63 6b 21 38 3d 28  |tate . Block!8=(|
00007190  31 3c 3c 32 32 29 20 8b  20 42 6c 6f 63 6b 21 38  |1<<22) . Block!8|
000071a0  3d 28 30 3c 3c 32 32 29  0d 1a f4 21 c8 99 20 22  |=(0<<22)...!.. "|
000071b0  57 69 6d 70 5f 53 65 74  49 63 6f 6e 53 74 61 74  |Wimp_SetIconStat|
000071c0  65 22 2c 2c 42 6c 6f 63  6b 0d 1a fe 05 e1 0d 1b  |e",,Block.......|
000071d0  08 05 3a 0d 1b 12 1e dd  20 a4 53 65 6c 65 63 74  |..:..... .Select|
000071e0  65 64 53 74 61 74 65 28  57 6e 64 77 2c 49 63 6e  |edState(Wndw,Icn|
000071f0  29 0d 1b 1c 3a 42 6c 6f  63 6b 21 30 3d 57 6e 64  |)...:Block!0=Wnd|
00007200  77 3a 42 6c 6f 63 6b 21  34 3d 49 63 6e 3a c8 99  |w:Block!4=Icn:..|
00007210  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
00007220  61 74 65 22 2c 2c 42 6c  6f 63 6b 0d 1b 26 29 e7  |ate",,Block..&).|
00007230  20 28 28 42 6c 6f 63 6b  21 32 34 29 20 80 20 28  | ((Block!24) . (|
00007240  31 3c 3c 32 31 29 29 3d  28 31 3c 3c 32 31 29 20  |1<<21))=(1<<21) |
00007250  8c 20 3d b9 0d 1b 30 06  3d a3 0d 1b 3a 05 3a 0d  |. =...0.=...:.:.|
00007260  1b 44 1c dd 20 a4 53 68  61 64 65 64 53 74 61 74  |.D.. .ShadedStat|
00007270  65 28 57 6e 64 77 2c 49  63 6e 29 0d 1b 4e 3a 42  |e(Wndw,Icn)..N:B|
00007280  6c 6f 63 6b 21 30 3d 57  6e 64 77 3a 42 6c 6f 63  |lock!0=Wndw:Bloc|
00007290  6b 21 34 3d 49 63 6e 3a  c8 99 20 22 57 69 6d 70  |k!4=Icn:.. "Wimp|
000072a0  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
000072b0  42 6c 6f 63 6b 0d 1b 58  29 e7 20 28 28 42 6c 6f  |Block..X). ((Blo|
000072c0  63 6b 21 32 34 29 20 80  20 28 31 3c 3c 32 32 29  |ck!24) . (1<<22)|
000072d0  29 3d 28 31 3c 3c 32 32  29 20 8c 20 3d b9 0d 1b  |)=(1<<22) . =...|
000072e0  62 06 3d a3 0d 1b 6c 05  3a 0d 1b 76 16 dd 20 a4  |b.=...l.:..v.. .|
000072f0  4f 70 65 6e 53 74 61 74  65 28 57 6e 64 77 29 0d  |OpenState(Wndw).|
00007300  1b 80 35 f4 20 52 65 74  75 72 6e 73 20 54 52 55  |..5. Returns TRU|
00007310  45 20 69 66 20 77 69 6e  64 6f 77 20 69 73 20 6f  |E if window is o|
00007320  70 65 6e 3b 20 66 61 6c  73 65 20 6f 74 68 65 72  |pen; false other|
00007330  77 69 73 65 0d 1b 8a 30  42 6c 6f 63 6b 21 30 3d  |wise...0Block!0=|
00007340  57 6e 64 77 3a c8 99 20  22 57 69 6d 70 5f 47 65  |Wndw:.. "Wimp_Ge|
00007350  74 57 69 6e 64 6f 77 53  74 61 74 65 22 2c 2c 42  |tWindowState",,B|
00007360  6c 6f 63 6b 0d 1b 94 29  e7 20 28 28 42 6c 6f 63  |lock...). ((Bloc|
00007370  6b 21 33 32 29 20 80 20  28 31 3c 3c 31 36 29 29  |k!32) . (1<<16))|
00007380  3d 28 31 3c 3c 31 36 29  20 8c 20 3d b9 0d 1b 9e  |=(1<<16) . =....|
00007390  06 3d a3 0d 1b a8 05 3a  0d 1b b2 21 dd 20 f2 53  |.=.....:...!. .S|
000073a0  68 61 64 65 4d 65 6e 75  28 4d 65 6e 75 2c 49 74  |hadeMenu(Menu,It|
000073b0  65 6d 2c 53 74 61 74 65  29 0d 1b bc 50 21 28 4d  |em,State)...P!(M|
000073c0  65 6e 75 2b 32 38 2b 28  32 34 2a 49 74 65 6d 29  |enu+28+(24*Item)|
000073d0  2b 38 29 3d 28 21 28 4d  65 6e 75 2b 32 38 2b 28  |+8)=(!(Menu+28+(|
000073e0  32 34 2a 49 74 65 6d 29  2b 38 29 20 80 20 ac 20  |24*Item)+8) . . |
000073f0  28 31 3c 3c 32 32 29 29  20 82 20 28 28 2d 53 74  |(1<<22)) . ((-St|
00007400  61 74 65 29 3c 3c 32 32  29 0d 1b c6 05 e1 0d 1b  |ate)<<22).......|
00007410  d0 05 3a 0d 1b da 20 dd  20 f2 54 69 63 6b 4d 65  |..:... . .TickMe|
00007420  6e 75 28 4d 65 6e 75 2c  49 74 65 6d 2c 53 74 61  |nu(Menu,Item,Sta|
00007430  74 65 29 0d 1b e4 40 21  28 4d 65 6e 75 2b 32 38  |te)...@!(Menu+28|
00007440  2b 28 32 34 2a 49 74 65  6d 29 29 3d 28 21 28 4d  |+(24*Item))=(!(M|
00007450  65 6e 75 2b 32 38 2b 28  32 34 2a 49 74 65 6d 29  |enu+28+(24*Item)|
00007460  29 20 80 20 ac 20 31 29  20 82 20 28 2d 53 74 61  |) . . 1) . (-Sta|
00007470  74 65 29 0d 1b ee 05 e1  0d 1b f8 05 3a 0d 1c 02  |te).........:...|
00007480  1c dd 20 a4 4d 65 6e 75  53 68 61 64 65 64 28 4d  |.. .MenuShaded(M|
00007490  65 6e 75 2c 49 74 65 6d  29 0d 1c 0c 35 e7 20 28  |enu,Item)...5. (|
000074a0  21 28 4d 65 6e 75 2b 32  38 2b 28 32 34 2a 49 74  |!(Menu+28+(24*It|
000074b0  65 6d 29 2b 38 29 20 80  20 28 31 3c 3c 32 32 29  |em)+8) . (1<<22)|
000074c0  29 3d 28 31 3c 3c 32 32  29 20 8c 20 3d b9 0d 1c  |)=(1<<22) . =...|
000074d0  16 06 3d a3 0d 1c 20 05  3a 0d 1c 2a 1c dd 20 a4  |..=... .:..*.. .|
000074e0  4d 65 6e 75 54 69 63 6b  65 64 28 4d 65 6e 75 2c  |MenuTicked(Menu,|
000074f0  49 74 65 6d 29 0d 1c 34  27 e7 20 28 21 28 4d 65  |Item)..4'. (!(Me|
00007500  6e 75 2b 32 38 2b 28 32  34 2a 49 74 65 6d 29 29  |nu+28+(24*Item))|
00007510  20 80 20 31 29 3d 31 20  8c 20 3d b9 0d 1c 3e 06  | . 1)=1 . =...>.|
00007520  3d a3 0d 1c 48 05 3a 0d  1c 52 19 dd 20 a4 52 65  |=...H.:..R.. .Re|
00007530  61 64 49 63 6f 6e 28 57  6e 64 77 2c 49 63 6e 29  |adIcon(Wndw,Icn)|
00007540  0d 1c 5c 20 f4 20 52 65  61 64 20 6e 75 6d 65 72  |..\ . Read numer|
00007550  69 63 20 76 61 6c 75 65  20 6f 66 20 69 63 6f 6e  |ic value of icon|
00007560  0d 1c 66 3a 42 6c 6f 63  6b 21 30 3d 57 6e 64 77  |..f:Block!0=Wndw|
00007570  3a 42 6c 6f 63 6b 21 34  3d 49 63 6e 3a c8 99 20  |:Block!4=Icn:.. |
00007580  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00007590  74 65 22 2c 2c 42 6c 6f  63 6b 0d 1c 70 13 3d bb  |te",,Block..p.=.|
000075a0  28 24 28 42 6c 6f 63 6b  21 32 38 29 29 0d 1c 7a  |($(Block!28))..z|
000075b0  05 3a 0d 1c 84 1c dd 20  a4 52 65 61 64 49 63 6f  |.:..... .ReadIco|
000075c0  6e 53 74 72 28 57 6e 64  77 2c 49 63 6e 29 0d 1c  |nStr(Wndw,Icn)..|
000075d0  8e 1f f4 20 52 65 61 64  20 73 74 72 69 6e 67 20  |... Read string |
000075e0  76 61 6c 75 65 20 6f 66  20 69 63 6f 6e 0d 1c 98  |value of icon...|
000075f0  3a 42 6c 6f 63 6b 21 30  3d 57 6e 64 77 3a 42 6c  |:Block!0=Wndw:Bl|
00007600  6f 63 6b 21 34 3d 49 63  6e 3a c8 99 20 22 57 69  |ock!4=Icn:.. "Wi|
00007610  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00007620  2c 2c 42 6c 6f 63 6b 0d  1c a2 10 3d 24 28 42 6c  |,,Block....=$(Bl|
00007630  6f 63 6b 21 32 38 29 0d  1c ac 05 3a 0d 1c b6 1a  |ock!28)....:....|
00007640  dd 20 a4 4d 6f 64 65 49  6e 66 6f 28 76 61 72 24  |. .ModeInfo(var$|
00007650  2c 6d 6f 64 65 29 0d 1c  c0 29 f4 20 55 73 65 20  |,mode)...). Use |
00007660  6d 6f 64 65 3d 2d 31 20  66 6f 72 20 63 75 72 72  |mode=-1 for curr|
00007670  65 6e 74 20 73 63 72 65  65 6e 20 6d 6f 64 65 0d  |ent screen mode.|
00007680  1c ca 0d c8 8e 20 76 61  72 24 20 ca 0d 1c d4 3a  |..... var$ ....:|
00007690  20 20 c9 20 22 58 50 69  78 65 6c 73 22 3a c8 99  |  . "XPixels":..|
000076a0  20 22 4f 53 5f 52 65 61  64 4d 6f 64 65 56 61 72  | "OS_ReadModeVar|
000076b0  69 61 62 6c 65 22 2c 6d  6f 64 65 2c 31 31 20 b8  |iable",mode,11 .|
000076c0  20 2c 2c 76 61 72 0d 1c  de 3a 20 20 c9 20 22 59  | ,,var...:  . "Y|
000076d0  50 69 78 65 6c 73 22 3a  c8 99 20 22 4f 53 5f 52  |Pixels":.. "OS_R|
000076e0  65 61 64 4d 6f 64 65 56  61 72 69 61 62 6c 65 22  |eadModeVariable"|
000076f0  2c 6d 6f 64 65 2c 31 32  20 b8 20 2c 2c 76 61 72  |,mode,12 . ,,var|
00007700  0d 1c e8 36 20 20 c9 20  22 4e 43 6f 6c 22 3a c8  |...6  . "NCol":.|
00007710  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
00007720  72 69 61 62 6c 65 22 2c  6d 6f 64 65 2c 33 20 b8  |riable",mode,3 .|
00007730  20 2c 2c 76 61 72 0d 1c  f2 3c 20 20 c9 20 22 58  | ,,var...<  . "X|
00007740  45 69 67 46 61 63 74 6f  72 22 3a c8 99 20 22 4f  |EigFactor":.. "O|
00007750  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
00007760  6c 65 22 2c 6d 6f 64 65  2c 34 20 b8 20 2c 2c 76  |le",mode,4 . ,,v|
00007770  61 72 0d 1c fc 3c 20 20  c9 20 22 59 45 69 67 46  |ar...<  . "YEigF|
00007780  61 63 74 6f 72 22 3a c8  99 20 22 4f 53 5f 52 65  |actor":.. "OS_Re|
00007790  61 64 4d 6f 64 65 56 61  72 69 61 62 6c 65 22 2c  |adModeVariable",|
000077a0  6d 6f 64 65 2c 35 20 b8  20 2c 2c 76 61 72 0d 1d  |mode,5 . ,,var..|
000077b0  06 3f 20 20 c9 20 22 42  50 50 22 3a c8 99 20 22  |.?  . "BPP":.. "|
000077c0  4f 53 5f 52 65 61 64 4d  6f 64 65 56 61 72 69 61  |OS_ReadModeVaria|
000077d0  62 6c 65 22 2c 6d 6f 64  65 2c 39 20 b8 20 2c 2c  |ble",mode,9 . ,,|
000077e0  76 61 72 3a 76 61 72 3d  32 5e 76 61 72 0d 1d 10  |var:var=2^var...|
000077f0  36 20 20 7f 20 76 61 72  3d 2d 31 3a f4 20 46 61  |6  . var=-1:. Fa|
00007800  6c 6c 2d 74 68 72 6f 75  67 68 20 66 6f 72 20 61  |ll-through for a|
00007810  20 66 61 75 6c 74 79 20  69 6e 70 75 74 20 76 61  | faulty input va|
00007820  6c 75 65 0d 1d 1a 05 cb  0d 1d 24 08 3d 76 61 72  |lue.......$.=var|
00007830  0d 1d 2e 05 3a 0d 1d 38  2b dd 20 f2 55 70 64 61  |....:..8+. .Upda|
00007840  74 65 49 63 6f 6e 46 6f  72 4d 6f 64 65 28 41 70  |teIconForMode(Ap|
00007850  70 6e 61 6d 65 24 2c 57  6e 64 77 2c 49 63 6e 29  |pname$,Wndw,Icn)|
00007860  0d 1d 42 4e f4 20 54 68  69 73 20 70 72 6f 63 65  |..BN. This proce|
00007870  64 75 72 65 20 72 65 71  75 69 72 65 73 20 74 68  |dure requires th|
00007880  61 74 20 41 4c 4c 20 74  68 65 20 69 63 6f 6e 20  |at ALL the icon |
00007890  73 70 72 69 74 65 73 20  61 72 65 20 64 65 66 69  |sprites are defi|
000078a0  6e 65 64 20 69 6e 20 6d  6f 64 65 20 32 30 0d 1d  |ned in mode 20..|
000078b0  4c 4e f4 20 6f 72 20 6d  6f 64 65 20 32 37 20 28  |LN. or mode 27 (|
000078c0  77 68 69 63 68 20 69 73  20 65 71 75 69 76 61 6c  |which is equival|
000078d0  65 6e 74 29 20 77 69 74  68 20 61 20 6d 61 73 6b  |ent) with a mask|
000078e0  20 62 75 74 20 6e 6f 20  70 61 6c 65 74 74 65 2e  | but no palette.|
000078f0  20 54 68 65 79 20 73 68  6f 75 6c 64 0d 1d 56 4e  | They should..VN|
00007900  f4 20 73 74 69 6c 6c 20  61 70 70 65 61 72 20 74  |. still appear t|
00007910  6f 20 68 61 76 65 20 74  68 65 20 65 78 70 65 63  |o have the expec|
00007920  74 65 64 20 72 65 73 6f  6c 75 74 69 6f 6e 73 20  |ted resolutions |
00007930  61 6e 64 20 6e 75 6d 62  65 72 20 6f 66 20 63 6f  |and number of co|
00007940  6c 6f 75 72 73 2c 20 69  2e 65 0d 1d 60 4e f4 20  |lours, i.e..`N. |
00007950  21 53 70 72 69 74 65 73  32 33 3a 20 74 77 6f 20  |!Sprites23: two |
00007960  63 6f 6c 6f 75 72 73 2c  20 68 69 67 68 20 72 65  |colours, high re|
00007970  73 6f 6c 75 74 69 6f 6e  2c 20 21 53 70 72 69 74  |solution, !Sprit|
00007980  65 73 20 28 61 63 74 75  61 6c 6c 79 20 21 53 70  |es (actually !Sp|
00007990  72 69 74 65 73 32 34 29  0d 1d 6a 4c f4 20 61 74  |rites24)..jL. at|
000079a0  20 6d 6f 64 65 20 31 32  20 72 65 73 6f 6c 75 74  | mode 12 resolut|
000079b0  69 6f 6e 20 28 64 6f 75  62 6c 65 20 68 65 69 67  |ion (double heig|
000079c0  68 74 20 70 69 78 65 6c  73 29 20 69 6e 20 31 36  |ht pixels) in 16|
000079d0  20 63 6f 6c 6f 75 72 73  2c 20 61 6e 64 20 6e 6f  | colours, and no|
000079e0  72 6d 61 6c 0d 1d 74 4c  f4 20 6d 6f 64 65 20 32  |rmal..tL. mode 2|
000079f0  30 20 72 65 73 6f 6c 75  74 69 6f 6e 2c 20 31 36  |0 resolution, 16|
00007a00  20 63 6f 6c 6f 75 72 73  20 66 6f 72 20 74 68 65  | colours for the|
00007a10  20 21 53 70 72 69 74 65  73 32 32 20 69 63 6f 6e  | !Sprites22 icon|
00007a20  2e 20 49 66 20 74 68 69  73 20 69 73 20 6e 6f 74  |. If this is not|
00007a30  0d 1d 7e 49 f4 20 61 64  68 65 72 65 64 20 74 6f  |..~I. adhered to|
00007a40  2c 20 74 68 65 6e 20 6d  65 6d 6f 72 79 20 73 68  |, then memory sh|
00007a50  6f 72 74 61 67 65 20 65  72 72 6f 72 73 20 6d 61  |ortage errors ma|
00007a60  79 20 6f 63 63 75 72 20  6f 6e 20 61 20 6d 6f 64  |y occur on a mod|
00007a70  65 20 63 68 61 6e 67 65  2e 0d 1d 88 13 45 78 74  |e change.....Ext|
00007a80  65 6e 73 69 6f 6e 24 3d  22 32 34 22 0d 1d 92 24  |ension$="24"...$|
00007a90  e7 20 a4 4d 6f 64 65 49  6e 66 6f 28 22 59 45 69  |. .ModeInfo("YEi|
00007aa0  67 46 61 63 74 6f 72 22  2c 2d 31 29 3c 32 20 8c  |gFactor",-1)<2 .|
00007ab0  0d 1d 9c 20 20 20 e7 20  a4 4d 6f 64 65 49 6e 66  |...   . .ModeInf|
00007ac0  6f 28 22 4e 43 6f 6c 22  2c 2d 31 29 3e 32 20 8c  |o("NCol",-1)>2 .|
00007ad0  0d 1d a6 17 20 20 20 20  45 78 74 65 6e 73 69 6f  |....    Extensio|
00007ae0  6e 24 3d 22 32 32 22 0d  1d b0 07 20 20 cc 0d 1d  |n$="22"....  ...|
00007af0  ba 17 20 20 20 20 45 78  74 65 6e 73 69 6f 6e 24  |..    Extension$|
00007b00  3d 22 32 33 22 0d 1d c4  07 20 20 cd 0d 1d ce 05  |="23"....  .....|
00007b10  cd 0d 1d d8 2a c8 99 20  22 57 69 6d 70 5f 42 61  |....*.. "Wimp_Ba|
00007b20  73 65 4f 66 53 70 72 69  74 65 73 22 20 b8 20 2c  |seOfSprites" . ,|
00007b30  69 63 6f 6e 73 70 72 69  74 65 25 0d 1d e2 45 c8  |iconsprite%...E.|
00007b40  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
00007b50  32 35 36 2b 32 35 2c 69  63 6f 6e 73 70 72 69 74  |256+25,iconsprit|
00007b60  65 25 2c 41 70 70 6e 61  6d 65 24 3a f4 20 44 65  |e%,Appname$:. De|
00007b70  6c 65 74 65 20 69 63 6f  6e 20 73 70 72 69 74 65  |lete icon sprite|
00007b80  0d 1d ec 3d f4 20 54 68  65 20 66 6f 6c 6c 6f 77  |...=. The follow|
00007b90  69 6e 67 20 74 68 72 65  65 20 6c 69 6e 65 73 20  |ing three lines |
00007ba0  61 73 73 75 6d 65 20 61  20 6d 61 73 6b 20 62 75  |assume a mask bu|
00007bb0  74 20 6e 6f 20 70 61 6c  65 74 74 65 3a 0d 1d f6  |t no palette:...|
00007bc0  62 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |b.. "OS_SpriteOp|
00007bd0  22 2c 32 35 36 2b 34 30  2c 53 70 72 69 74 65 73  |",256+40,Sprites|
00007be0  2c 41 70 70 6e 61 6d 65  24 2b 45 78 74 65 6e 73  |,Appname$+Extens|
00007bf0  69 6f 6e 24 20 b8 20 2c  2c 2c 77 2c 68 2c 2c 6d  |ion$ . ,,,w,h,,m|
00007c00  6f 64 65 3a f4 20 47 65  74 20 69 6e 66 6f 20 61  |ode:. Get info a|
00007c10  62 6f 75 74 20 6e 65 77  20 73 70 72 69 74 65 0d  |bout new sprite.|
00007c20  1e 00 5c c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |..\.. "OS_Sprite|
00007c30  4f 70 22 2c 32 35 36 2b  31 35 2c 69 63 6f 6e 73  |Op",256+15,icons|
00007c40  70 72 69 74 65 25 2c 41  70 70 6e 61 6d 65 24 2c  |prite%,Appname$,|
00007c50  30 2c 77 2c 68 2c 6d 6f  64 65 3a f4 20 43 72 65  |0,w,h,mode:. Cre|
00007c60  61 74 65 20 72 65 70 6c  61 63 65 6d 65 6e 74 20  |ate replacement |
00007c70  69 63 6f 6e 20 73 70 72  69 74 65 0d 1e 0a 3e c8  |icon sprite...>.|
00007c80  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
00007c90  32 35 36 2b 32 39 2c 69  63 6f 6e 73 70 72 69 74  |256+29,iconsprit|
00007ca0  65 25 2c 41 70 70 6e 61  6d 65 24 3a f4 20 43 72  |e%,Appname$:. Cr|
00007cb0  65 61 74 65 20 6d 61 73  6b 0d 1e 14 07 20 20 3a  |eate mask....  :|
00007cc0  0d 1e 1e 2d f4 20 50 61  69 6e 74 20 73 70 72 69  |...-. Paint spri|
00007cd0  74 65 20 6d 61 73 6b 20  69 6e 74 6f 20 69 63 6f  |te mask into ico|
00007ce0  6e 73 70 72 69 74 65 20  6d 61 73 6b 3a 0d 1e 28  |nsprite mask:..(|
00007cf0  51 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |Q.. "OS_SpriteOp|
00007d00  22 2c 32 35 36 2b 36 31  2c 69 63 6f 6e 73 70 72  |",256+61,iconspr|
00007d10  69 74 65 25 2c 41 70 70  6e 61 6d 65 24 2c 30 20  |ite%,Appname$,0 |
00007d20  b8 20 72 30 2c 72 31 2c  72 32 2c 72 33 3a f4 20  |. r0,r1,r2,r3:. |
00007d30  4f 75 74 70 75 74 20 74  6f 20 6d 61 73 6b 0d 1e  |Output to mask..|
00007d40  32 55 c8 99 20 22 4f 53  5f 53 70 72 69 74 65 4f  |2U.. "OS_SpriteO|
00007d50  70 22 2c 32 35 36 2b 34  39 2c 53 70 72 69 74 65  |p",256+49,Sprite|
00007d60  73 2c 41 70 70 6e 61 6d  65 24 2b 45 78 74 65 6e  |s,Appname$+Exten|
00007d70  73 69 6f 6e 24 2c 30 2c  30 3a f4 20 50 61 69 6e  |sion$,0,0:. Pain|
00007d80  74 20 6d 61 73 6b 20 66  72 6f 6d 20 53 70 72 69  |t mask from Spri|
00007d90  74 65 73 0d 1e 3c 37 e6  20 34 2c 31 32 38 3a da  |tes..<7. 4,128:.|
00007da0  3a f4 20 49 6e 76 65 72  74 20 74 6f 20 6d 61 6b  |:. Invert to mak|
00007db0  65 20 6d 61 73 6b 20 74  68 65 20 72 69 67 68 74  |e mask the right|
00007dc0  20 77 61 79 20 72 6f 75  6e 64 0d 1e 46 36 c8 99  | way round..F6..|
00007dd0  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 72  | "OS_SpriteOp",r|
00007de0  30 2c 72 31 2c 72 32 2c  72 33 3a f4 20 52 65 73  |0,r1,r2,r3:. Res|
00007df0  65 74 20 73 63 72 65 65  6e 20 6f 75 74 70 75 74  |et screen output|
00007e00  0d 1e 50 07 20 20 3a 0d  1e 5a 23 f4 20 50 61 69  |..P.  :..Z#. Pai|
00007e10  6e 74 20 73 70 72 69 74  65 20 69 6e 74 6f 20 69  |nt sprite into i|
00007e20  63 6f 6e 73 70 72 69 74  65 3a 0d 1e 64 5c c8 99  |consprite:..d\..|
00007e30  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 32  | "OS_SpriteOp",2|
00007e40  35 36 2b 36 30 2c 69 63  6f 6e 73 70 72 69 74 65  |56+60,iconsprite|
00007e50  25 2c 41 70 70 6e 61 6d  65 24 2c 30 20 b8 20 72  |%,Appname$,0 . r|
00007e60  30 2c 72 31 2c 72 32 2c  72 33 3a f4 20 4f 75 74  |0,r1,r2,r3:. Out|
00007e70  70 75 74 20 74 6f 20 6e  65 77 20 69 63 6f 6e 20  |put to new icon |
00007e80  73 70 72 69 74 65 0d 1e  6e 57 c8 99 20 22 4f 53  |sprite..nW.. "OS|
00007e90  5f 53 70 72 69 74 65 4f  70 22 2c 32 35 36 2b 33  |_SpriteOp",256+3|
00007ea0  34 2c 53 70 72 69 74 65  73 2c 41 70 70 6e 61 6d  |4,Sprites,Appnam|
00007eb0  65 24 2b 45 78 74 65 6e  73 69 6f 6e 24 2c 30 2c  |e$+Extension$,0,|
00007ec0  30 2c 38 3a f4 20 50 61  69 6e 74 20 63 6f 70 79  |0,8:. Paint copy|
00007ed0  20 66 72 6f 6d 20 53 70  72 69 74 65 73 0d 1e 78  | from Sprites..x|
00007ee0  36 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |6.. "OS_SpriteOp|
00007ef0  22 2c 72 30 2c 72 31 2c  72 32 2c 72 33 3a f4 20  |",r0,r1,r2,r3:. |
00007f00  52 65 73 65 74 20 73 63  72 65 65 6e 20 6f 75 74  |Reset screen out|
00007f10  70 75 74 0d 1e 82 3a 42  6c 6f 63 6b 21 30 3d 57  |put...:Block!0=W|
00007f20  6e 64 77 3a 42 6c 6f 63  6b 21 34 3d 49 63 6e 3a  |ndw:Block!4=Icn:|
00007f30  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
00007f40  53 74 61 74 65 22 2c 2c  42 6c 6f 63 6b 0d 1e 8c  |State",,Block...|
00007f50  45 42 6c 6f 63 6b 21 38  3d 30 3a 42 6c 6f 63 6b  |EBlock!8=0:Block|
00007f60  21 31 32 3d 30 3a c8 99  20 22 57 69 6d 70 5f 53  |!12=0:.. "Wimp_S|
00007f70  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 42 6c  |etIconState",,Bl|
00007f80  6f 63 6b 3a f4 20 52 65  2d 70 6c 6f 74 20 69 63  |ock:. Re-plot ic|
00007f90  6f 6e 0d 1e 96 05 e1 0d  1e a0 05 3a 0d 1e aa d8  |on.........:....|
00007fa0  dd 20 a4 43 72 65 61 74  65 57 69 6e 64 6f 77 28  |. .CreateWindow(|
00007fb0  6d 69 6e 58 2c 6d 69 6e  59 2c 6d 61 78 58 2c 6d  |minX,minY,maxX,m|
00007fc0  61 78 59 2c 58 6f 66 66  73 65 74 2c 59 6f 66 66  |axY,Xoffset,Yoff|
00007fd0  73 65 74 2c 48 61 6e 64  6c 65 2c 46 6c 61 67 73  |set,Handle,Flags|
00007fe0  2c 54 69 74 6c 65 43 6f  6c 2c 54 69 74 6c 65 42  |,TitleCol,TitleB|
00007ff0  61 63 6b 43 6f 6c 2c 57  6f 72 6b 43 6f 6c 2c 57  |ackCol,WorkCol,W|
00008000  6f 72 6b 42 61 63 6b 43  6f 6c 2c 53 63 72 6f 6c  |orkBackCol,Scrol|
00008010  6c 43 6f 6c 2c 53 6c 69  64 65 72 43 6f 6c 2c 49  |lCol,SliderCol,I|
00008020  6e 70 75 74 43 6f 6c 2c  57 6d 69 6e 58 2c 57 6d  |nputCol,WminX,Wm|
00008030  69 6e 59 2c 57 6d 61 78  58 2c 57 6d 61 78 59 2c  |inY,WmaxX,WmaxY,|
00008040  54 69 74 6c 65 46 6c 61  67 73 2c 57 62 75 74 74  |TitleFlags,Wbutt|
00008050  6f 6e 2c 53 70 72 69 74  65 50 6f 69 6e 74 2c 4d  |on,SpritePoint,M|
00008060  69 6e 57 2c 4d 69 6e 48  2c 54 69 74 6c 65 44 61  |inW,MinH,TitleDa|
00008070  74 61 24 29 0d 1e b4 5a  42 6c 6f 63 6b 21 30 3d  |ta$)...ZBlock!0=|
00008080  6d 69 6e 58 3a 42 6c 6f  63 6b 21 34 3d 6d 69 6e  |minX:Block!4=min|
00008090  59 3a 42 6c 6f 63 6b 21  38 3d 6d 61 78 58 3a 42  |Y:Block!8=maxX:B|
000080a0  6c 6f 63 6b 21 31 32 3d  6d 61 78 59 3a 42 6c 6f  |lock!12=maxY:Blo|
000080b0  63 6b 21 31 36 3d 58 6f  66 66 73 65 74 3a 42 6c  |ck!16=Xoffset:Bl|
000080c0  6f 63 6b 21 32 30 3d 59  6f 66 66 73 65 74 0d 1e  |ock!20=Yoffset..|
000080d0  be 22 42 6c 6f 63 6b 21  32 34 3d 48 61 6e 64 6c  |."Block!24=Handl|
000080e0  65 3a 42 6c 6f 63 6b 21  32 38 3d 46 6c 61 67 73  |e:Block!28=Flags|
000080f0  0d 1e c8 51 42 6c 6f 63  6b 3f 33 32 3d 54 69 74  |...QBlock?32=Tit|
00008100  6c 65 43 6f 6c 3a 42 6c  6f 63 6b 3f 33 33 3d 54  |leCol:Block?33=T|
00008110  69 74 6c 65 42 61 63 6b  43 6f 6c 3a 42 6c 6f 63  |itleBackCol:Bloc|
00008120  6b 3f 33 34 3d 57 6f 72  6b 43 6f 6c 3a 42 6c 6f  |k?34=WorkCol:Blo|
00008130  63 6b 3f 33 35 3d 57 6f  72 6b 42 61 63 6b 43 6f  |ck?35=WorkBackCo|
00008140  6c 0d 1e d2 46 42 6c 6f  63 6b 3f 33 36 3d 53 63  |l...FBlock?36=Sc|
00008150  72 6f 6c 6c 43 6f 6c 3a  42 6c 6f 63 6b 3f 33 37  |rollCol:Block?37|
00008160  3d 53 6c 69 64 65 72 43  6f 6c 3a 42 6c 6f 63 6b  |=SliderCol:Block|
00008170  3f 33 38 3d 49 6e 70 75  74 43 6f 6c 3a 42 6c 6f  |?38=InputCol:Blo|
00008180  63 6b 3f 33 39 3d 30 0d  1e dc 3f 42 6c 6f 63 6b  |ck?39=0...?Block|
00008190  21 34 30 3d 57 6d 69 6e  58 3a 42 6c 6f 63 6b 21  |!40=WminX:Block!|
000081a0  34 34 3d 57 6d 69 6e 59  3a 42 6c 6f 63 6b 21 34  |44=WminY:Block!4|
000081b0  38 3d 57 6d 61 78 58 3a  42 6c 6f 63 6b 21 35 32  |8=WmaxX:Block!52|
000081c0  3d 57 6d 61 78 59 0d 1e  e6 3d 42 6c 6f 63 6b 21  |=WmaxY...=Block!|
000081d0  35 36 3d 54 69 74 6c 65  46 6c 61 67 73 3a 42 6c  |56=TitleFlags:Bl|
000081e0  6f 63 6b 21 36 30 3d 57  62 75 74 74 6f 6e 3a 42  |ock!60=Wbutton:B|
000081f0  6c 6f 63 6b 21 36 34 3d  53 70 72 69 74 65 50 6f  |lock!64=SpritePo|
00008200  69 6e 74 0d 1e f0 5f 42  6c 6f 63 6b 21 36 38 3d  |int..._Block!68=|
00008210  28 4d 69 6e 48 3c 3c 31  35 29 2b 4d 69 6e 57 20  |(MinH<<15)+MinW |
00008220  3a 3a 3a 3a 3a 3a 3a 3a  3a 3a 3a 3a 20 f4 20 30  |:::::::::::: . 0|
00008230  2c 30 20 73 65 74 73 20  74 68 65 20 6d 69 6e 69  |,0 sets the mini|
00008240  6d 75 6d 20 77 69 6e 64  6f 77 20 77 69 74 68 20  |mum window with |
00008250  74 6f 20 74 68 65 20 74  69 74 6c 65 20 77 69 64  |to the title wid|
00008260  74 68 0d 1e fa 3e 24 28  42 6c 6f 63 6b 2b 37 32  |th...>$(Block+72|
00008270  29 3d 54 69 74 6c 65 44  61 74 61 24 3a 42 6c 6f  |)=TitleData$:Blo|
00008280  63 6b 21 38 34 3d 30 20  3a 3a 3a 20 f4 20 4e 6f  |ck!84=0 ::: . No|
00008290  20 69 63 6f 6e 73 20 69  6e 69 74 69 61 6c 6c 79  | icons initially|
000082a0  0d 1f 04 30 c8 99 20 22  57 69 6d 70 5f 43 72 65  |...0.. "Wimp_Cre|
000082b0  61 74 65 57 69 6e 64 6f  77 22 2c 2c 42 6c 6f 63  |ateWindow",,Bloc|
000082c0  6b 20 b8 20 57 69 6e 64  6f 77 48 61 6e 64 6c 65  |k . WindowHandle|
000082d0  0d 1f 0e 11 3d 57 69 6e  64 6f 77 48 61 6e 64 6c  |....=WindowHandl|
000082e0  65 0d 1f 18 05 3a 0d 1f  22 11 dd 20 f2 49 6e 69  |e....:..".. .Ini|
000082f0  74 69 61 6c 69 73 65 0d  1f 2c 2d 41 70 70 53 69  |tialise..,-AppSi|
00008300  7a 65 3d 93 2d 26 38 30  30 30 3a 4d 69 6e 53 69  |ze=.-&8000:MinSi|
00008310  7a 65 3d 41 70 70 53 69  7a 65 3a 53 6c 6f 74 45  |ze=AppSize:SlotE|
00008320  6e 64 3d 93 0d 1f 36 05  e1 0d 1f 40 05 3a 0d 1f  |nd=...6....@.:..|
00008330  4a 1f dd 20 a4 41 6c 6c  6f 63 61 74 65 4d 65 6d  |J.. .AllocateMem|
00008340  6f 72 79 28 52 65 71 75  69 72 65 64 29 0d 1f 54  |ory(Required)..T|
00008350  1a 53 6c 6f 74 53 69 7a  65 3d a4 53 6c 6f 74 53  |.SlotSize=.SlotS|
00008360  69 7a 65 28 2d 31 29 0d  1f 5e 92 e7 20 53 6c 6f  |ize(-1)..^.. Slo|
00008370  74 53 69 7a 65 3c 52 65  71 75 69 72 65 64 20 8c  |tSize<Required .|
00008380  20 4e 65 77 53 69 7a 65  3d a4 53 6c 6f 74 53 69  | NewSize=.SlotSi|
00008390  7a 65 28 52 65 71 75 69  72 65 64 29 3a e7 20 4e  |ze(Required):. N|
000083a0  65 77 53 69 7a 65 3c 52  65 71 75 69 72 65 64 20  |ewSize<Required |
000083b0  8c 20 53 6c 6f 74 53 69  7a 65 3d a4 53 6c 6f 74  |. SlotSize=.Slot|
000083c0  53 69 7a 65 28 41 70 70  53 69 7a 65 29 3a 3d 30  |Size(AppSize):=0|
000083d0  3a f4 20 52 65 74 75 72  6e 73 2c 20 69 6e 64 69  |:. Returns, indi|
000083e0  63 61 74 69 6e 67 20 6d  65 6d 6f 72 79 20 6e 6f  |cating memory no|
000083f0  74 20 63 6c 61 69 6d 65  64 0d 1f 68 36 e7 20 53  |t claimed..h6. S|
00008400  6c 6f 74 53 69 7a 65 3e  52 65 71 75 69 72 65 64  |lotSize>Required|
00008410  20 8c 20 53 6c 6f 74 53  69 7a 65 3d a4 53 6c 6f  | . SlotSize=.Slo|
00008420  74 53 69 7a 65 28 52 65  71 75 69 72 65 64 29 0d  |tSize(Required).|
00008430  1f 72 2a 3d 53 6c 6f 74  53 69 7a 65 3a f4 20 52  |.r*=SlotSize:. R|
00008440  65 74 75 72 6e 73 20 77  69 74 68 20 62 79 74 65  |eturns with byte|
00008450  73 20 63 6c 61 69 6d 65  64 0d 1f 7c 05 3a 0d 1f  |s claimed..|.:..|
00008460  86 16 dd 20 a4 53 6c 6f  74 53 69 7a 65 28 42 79  |... .SlotSize(By|
00008470  74 65 73 29 0d 1f 90 27  c8 99 20 22 57 69 6d 70  |tes)...'.. "Wimp|
00008480  5f 53 6c 6f 74 53 69 7a  65 22 2c 42 79 74 65 73  |_SlotSize",Bytes|
00008490  2c 2d 31 20 b8 20 42 79  74 65 73 0d 1f 9a 0a 3d  |,-1 . Bytes....=|
000084a0  42 79 74 65 73 0d 1f a4  05 3a 0d 1f ae 17 dd 20  |Bytes....:..... |
000084b0  f2 4d 69 6e 69 6d 69 73  65 57 69 6d 70 53 6c 6f  |.MinimiseWimpSlo|
000084c0  74 0d 1f b8 22 64 75 6d  6d 79 3d a4 41 6c 6c 6f  |t..."dummy=.Allo|
000084d0  63 61 74 65 4d 65 6d 6f  72 79 28 4d 69 6e 53 69  |cateMemory(MinSi|
000084e0  7a 65 29 0d 1f c2 05 e1  0d 1f cc 05 3a 0d 1f d6  |ze).........:...|
000084f0  22 dd 20 f2 43 6c 6f 73  65 46 69 6c 65 49 66 50  |". .CloseFileIfP|
00008500  6f 73 73 28 46 69 6c 65  48 61 6e 64 6c 65 29 0d  |oss(FileHandle).|
00008510  1f e0 07 ea 20 85 0d 1f  ea 26 ee 20 85 20 ea 20  |.... ....&. . . |
00008520  f7 20 85 3a e1 3a f4 20  55 6e 61 62 6c 65 20 74  |. .:.:. Unable t|
00008530  6f 20 63 6c 6f 73 65 20  66 69 6c 65 0d 1f f4 10  |o close file....|
00008540  d9 23 46 69 6c 65 48 61  6e 64 6c 65 0d 1f fe 05  |.#FileHandle....|
00008550  e1 0d 20 08 05 3a 0d 20  12 1e dd 20 a4 46 69 6e  |.. ..:. ... .Fin|
00008560  64 46 69 6c 65 53 69 7a  65 28 46 69 6c 65 4e 61  |dFileSize(FileNa|
00008570  6d 65 24 29 0d 20 1c 20  e7 20 46 69 6c 65 4e 61  |me$). . . FileNa|
00008580  6d 65 24 3d 22 3c 57 69  6d 70 24 53 63 72 61 70  |me$="<Wimp$Scrap|
00008590  3e 22 20 8c 0d 20 26 3a  20 20 c8 99 20 22 4f 53  |>" .. &:  .. "OS|
000085a0  5f 46 69 6c 65 22 2c 31  35 2c 46 69 6c 65 4e 61  |_File",15,FileNa|
000085b0  6d 65 24 2c 2c 2c 46 69  6c 65 4e 61 6d 65 24 20  |me$,,,FileName$ |
000085c0  b8 20 2c 2c 2c 2c 46 69  6c 65 53 69 7a 65 0d 20  |. ,,,,FileSize. |
000085d0  30 05 cc 0d 20 3a 34 20  20 4e 3d 2d 31 3a f5 3a  |0... :4  N=-1:.:|
000085e0  4e 2b 3d 31 3a fd 20 c1  46 69 6c 65 4e 61 6d 65  |N+=1:. .FileName|
000085f0  24 2c a9 28 46 69 6c 65  4e 61 6d 65 24 29 2d 4e  |$,.(FileName$)-N|
00008600  2c 31 29 3d 22 2e 22 0d  20 44 42 20 20 50 61 74  |,1)=".". DB  Pat|
00008610  68 4e 61 6d 65 24 3d c0  46 69 6c 65 4e 61 6d 65  |hName$=.FileName|
00008620  24 2c a9 28 46 69 6c 65  4e 61 6d 65 24 29 2d 4e  |$,.(FileName$)-N|
00008630  29 3a 4c 65 61 66 4e 61  6d 65 24 3d c2 46 69 6c  |):LeafName$=.Fil|
00008640  65 4e 61 6d 65 24 2c 4e  29 0d 20 4e 3a 20 20 c8  |eName$,N). N:  .|
00008650  99 20 22 4f 53 5f 46 69  6c 65 22 2c 31 33 2c 4c  |. "OS_File",13,L|
00008660  65 61 66 4e 61 6d 65 24  2c 2c 2c 50 61 74 68 4e  |eafName$,,,PathN|
00008670  61 6d 65 24 20 b8 20 2c  2c 2c 2c 46 69 6c 65 53  |ame$ . ,,,,FileS|
00008680  69 7a 65 0d 20 58 05 cd  0d 20 62 0d 3d 46 69 6c  |ize. X... b.=Fil|
00008690  65 53 69 7a 65 0d 20 6c  05 3a 0d 20 76 10 dd 20  |eSize. l.:. v.. |
000086a0  a4 4e 65 78 74 45 6e 74  72 79 0d 20 80 48 f4 20  |.NextEntry. .H. |
000086b0  47 65 74 73 20 6e 65 78  74 20 65 6e 74 72 79 20  |Gets next entry |
000086c0  28 63 72 65 61 74 65 64  20 62 79 20 42 50 55 54  |(created by BPUT|
000086d0  23 44 61 74 61 2c 41 24  29 20 66 72 6f 6d 20 61  |#Data,A$) from a|
000086e0  20 66 69 6c 65 20 61 73  20 61 20 73 74 72 69 6e  | file as a strin|
000086f0  67 2e 0d 20 8a 1c f4 20  55 73 65 20 61 73 20 41  |g.. ... Use as A|
00008700  24 3d 46 4e 4e 65 78 74  45 6e 74 72 79 2e 0d 20  |$=FNNextEntry.. |
00008710  94 07 ea 20 85 0d 20 9e  26 ee 20 85 20 ea 20 f7  |... .. .&. . . .|
00008720  20 85 3a 3d 22 22 3a f4  20 45 72 72 6f 72 20 72  | .:="":. Error r|
00008730  65 61 64 69 6e 67 20 66  69 6c 65 0d 20 a8 0e 4e  |eading file. ..N|
00008740  45 24 3d be 23 44 61 74  61 0d 20 b2 12 c8 95 20  |E$=.#Data. .... |
00008750  c0 4e 45 24 2c 31 29 3d  22 7c 22 0d 20 bc 10 20  |.NE$,1)="|". .. |
00008760  20 4e 45 24 3d be 23 44  61 74 61 0d 20 c6 05 ce  | NE$=.#Data. ...|
00008770  0d 20 d0 08 3d 4e 45 24  0d 20 da 05 3a 0d 20 e4  |. ..=NE$. ..:. .|
00008780  47 dd 20 f2 44 72 61 67  42 6f 78 28 57 69 6e 64  |G. .DragBox(Wind|
00008790  6f 77 48 61 6e 64 6c 65  2c 49 63 6f 6e 48 61 6e  |owHandle,IconHan|
000087a0  64 6c 65 2c 44 72 61 67  54 79 70 65 2c 53 70 72  |dle,DragType,Spr|
000087b0  69 74 65 41 72 65 61 2c  53 70 72 69 74 65 4e 61  |iteArea,SpriteNa|
000087c0  6d 65 24 29 0d 20 ee 38  42 6c 6f 63 6b 21 30 3d  |me$). .8Block!0=|
000087d0  57 69 6e 64 6f 77 48 61  6e 64 6c 65 3a c8 99 20  |WindowHandle:.. |
000087e0  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
000087f0  74 61 74 65 22 2c 2c 42  6c 6f 63 6b 0d 20 f8 20  |tate",,Block. . |
00008800  77 6d 69 6e 78 3d 42 6c  6f 63 6b 21 34 3a 77 6d  |wminx=Block!4:wm|
00008810  61 78 79 3d 42 6c 6f 63  6b 21 31 36 0d 21 02 49  |axy=Block!16.!.I|
00008820  42 6c 6f 63 6b 21 30 3d  57 69 6e 64 6f 77 48 61  |Block!0=WindowHa|
00008830  6e 64 6c 65 3a 42 6c 6f  63 6b 21 34 3d 49 63 6f  |ndle:Block!4=Ico|
00008840  6e 48 61 6e 64 6c 65 3a  c8 99 20 22 57 69 6d 70  |nHandle:.. "Wimp|
00008850  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00008860  42 6c 6f 63 6b 0d 21 0c  3e 69 6d 69 6e 78 3d 42  |Block.!.>iminx=B|
00008870  6c 6f 63 6b 21 38 3a 69  6d 69 6e 79 3d 42 6c 6f  |lock!8:iminy=Blo|
00008880  63 6b 21 31 32 3a 69 6d  61 78 78 3d 42 6c 6f 63  |ck!12:imaxx=Bloc|
00008890  6b 21 31 36 3a 69 6d 61  78 79 3d 42 6c 6f 63 6b  |k!16:imaxy=Block|
000088a0  21 32 30 0d 21 16 29 42  6c 6f 63 6b 21 30 3d 57  |!20.!.)Block!0=W|
000088b0  69 6e 64 6f 77 48 61 6e  64 6c 65 3a 42 6c 6f 63  |indowHandle:Bloc|
000088c0  6b 21 34 3d 44 72 61 67  54 79 70 65 0d 21 20 19  |k!4=DragType.! .|
000088d0  42 6c 6f 63 6b 21 38 3d  28 77 6d 69 6e 78 2b 69  |Block!8=(wminx+i|
000088e0  6d 69 6e 78 29 0d 21 2a  1a 42 6c 6f 63 6b 21 31  |minx).!*.Block!1|
000088f0  32 3d 28 77 6d 61 78 79  2b 69 6d 69 6e 79 29 0d  |2=(wmaxy+iminy).|
00008900  21 34 1a 42 6c 6f 63 6b  21 31 36 3d 28 77 6d 69  |!4.Block!16=(wmi|
00008910  6e 78 2b 69 6d 61 78 78  29 0d 21 3e 1a 42 6c 6f  |nx+imaxx).!>.Blo|
00008920  63 6b 21 32 30 3d 28 77  6d 61 78 79 2b 69 6d 61  |ck!20=(wmaxy+ima|
00008930  78 79 29 0d 21 48 19 42  6c 6f 63 6b 21 32 34 3d  |xy).!H.Block!24=|
00008940  31 3a 42 6c 6f 63 6b 21  32 38 3d 31 0d 21 52 47  |1:Block!28=1.!RG|
00008950  42 6c 6f 63 6b 21 33 32  3d 28 a4 4d 6f 64 65 49  |Block!32=(.ModeI|
00008960  6e 66 6f 28 22 58 70 69  78 65 6c 73 22 2c 2d 31  |nfo("Xpixels",-1|
00008970  29 2b 31 29 2a 28 32 5e  a4 4d 6f 64 65 49 6e 66  |)+1)*(2^.ModeInf|
00008980  6f 28 22 58 45 69 67 46  61 63 74 6f 72 22 2c 2d  |o("XEigFactor",-|
00008990  31 29 29 0d 21 5c 47 42  6c 6f 63 6b 21 33 36 3d  |1)).!\GBlock!36=|
000089a0  28 a4 4d 6f 64 65 49 6e  66 6f 28 22 59 70 69 78  |(.ModeInfo("Ypix|
000089b0  65 6c 73 22 2c 2d 31 29  2b 31 29 2a 28 32 5e a4  |els",-1)+1)*(2^.|
000089c0  4d 6f 64 65 49 6e 66 6f  28 22 59 45 69 67 46 61  |ModeInfo("YEigFa|
000089d0  63 74 6f 72 22 2c 2d 31  29 29 0d 21 66 13 e7 20  |ctor",-1)).!f.. |
000089e0  44 72 61 67 41 53 70 72  69 74 65 20 8c 0d 21 70  |DragASprite ..!p|
000089f0  45 20 20 c8 99 20 22 44  72 61 67 41 53 70 72 69  |E  .. "DragASpri|
00008a00  74 65 5f 53 74 61 72 74  22 2c 25 31 30 30 30 30  |te_Start",%10000|
00008a10  31 30 31 2c 53 70 72 69  74 65 41 72 65 61 2c 53  |101,SpriteArea,S|
00008a20  70 72 69 74 65 4e 61 6d  65 24 2c 42 6c 6f 63 6b  |priteName$,Block|
00008a30  2b 38 0d 21 7a 05 cc 0d  21 84 1e 20 20 c8 99 20  |+8.!z...!..  .. |
00008a40  22 57 69 6d 70 5f 44 72  61 67 42 6f 78 22 2c 2c  |"Wimp_DragBox",,|
00008a50  42 6c 6f 63 6b 0d 21 8e  05 cd 0d 21 98 05 e1 0d  |Block.!....!....|
00008a60  21 a2 05 3a 0d 21 ac 4f  f4 20 2d 2d 2d 2d 2d 2d  |!..:.!.O. ------|
00008a70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00008ab0  2d 2d 2d 0d 21 b6 2f f4  20 52 6f 75 74 69 6e 65  |---.!./. Routine|
00008ac0  73 20 63 6f 6d 6d 6f 6e  20 74 6f 20 74 68 65 20  |s common to the |
00008ad0  4f 6d 6e 69 44 65 73 6b  20 75 74 69 6c 69 74 69  |OmniDesk utiliti|
00008ae0  65 73 0d 21 c0 4f f4 20  2d 2d 2d 2d 2d 2d 2d 2d  |es.!.O. --------|
00008af0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00008b30  2d 0d 21 ca 05 3a 0d 21  d4 18 dd 20 f2 44 65 63  |-.!..:.!... .Dec|
00008b40  6c 61 72 65 54 6f 4f 6d  6e 69 44 65 73 6b 0d 21  |lareToOmniDesk.!|
00008b50  de 2f 42 6c 6f 63 6b 21  30 3d 32 30 38 3a 42 6c  |./Block!0=208:Bl|
00008b60  6f 63 6b 21 31 32 3d 30  3a 42 6c 6f 63 6b 21 31  |ock!12=0:Block!1|
00008b70  36 3d 55 74 69 6c 44 65  63 6c 61 72 65 0d 21 e8  |6=UtilDeclare.!.|
00008b80  11 42 6c 6f 63 6b 21 32  30 3d 54 61 73 6b 0d 21  |.Block!20=Task.!|
00008b90  f2 19 24 28 42 6c 6f 63  6b 2b 32 34 29 3d 54 61  |..$(Block+24)=Ta|
00008ba0  73 6b 6e 61 6d 65 24 0d  21 fc 1c 24 28 42 6c 6f  |skname$.!..$(Blo|
00008bb0  63 6b 2b 34 34 29 3d 4f  75 72 46 69 6c 65 4e 61  |ck+44)=OurFileNa|
00008bc0  6d 65 24 0d 22 06 29 24  28 42 6c 6f 63 6b 2b 35  |me$.".)$(Block+5|
00008bd0  35 29 3d a4 4f 6d 6e 69  48 65 6c 70 4d 65 73 73  |5)=.OmniHelpMess|
00008be0  61 67 65 28 22 43 4c 49  43 4b 22 29 0d 22 10 29  |age("CLICK").".)|
00008bf0  24 28 42 6c 6f 63 6b 2b  31 33 32 29 3d a4 4f 6d  |$(Block+132)=.Om|
00008c00  6e 69 48 65 6c 70 4d 65  73 73 61 67 65 28 22 44  |niHelpMessage("D|
00008c10  52 41 47 22 29 0d 22 1a  2b c8 99 20 22 57 69 6d  |RAG").".+.. "Wim|
00008c20  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00008c30  37 2c 42 6c 6f 63 6b 2c  4f 6d 6e 69 44 65 73 6b  |7,Block,OmniDesk|
00008c40  0d 22 24 05 e1 0d 22 2e  05 3a 0d 22 38 11 dd 20  |."$..."..:."8.. |
00008c50  f2 53 61 79 47 6f 6f 64  62 79 65 0d 22 42 14 e7  |.SayGoodbye."B..|
00008c60  20 4f 6d 6e 69 44 65 73  6b 3d 30 20 8c 20 e1 0d  | OmniDesk=0 . ..|
00008c70  22 4c 2f 42 6c 6f 63 6b  21 30 3d 32 34 3a 42 6c  |"L/Block!0=24:Bl|
00008c80  6f 63 6b 21 31 32 3d 30  3a 42 6c 6f 63 6b 21 31  |ock!12=0:Block!1|
00008c90  36 3d 55 74 69 6c 51 75  69 74 74 69 6e 67 0d 22  |6=UtilQuitting."|
00008ca0  56 11 42 6c 6f 63 6b 21  32 30 3d 54 61 73 6b 0d  |V.Block!20=Task.|
00008cb0  22 60 2b c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |"`+.. "Wimp_Send|
00008cc0  4d 65 73 73 61 67 65 22  2c 31 37 2c 42 6c 6f 63  |Message",17,Bloc|
00008cd0  6b 2c 4f 6d 6e 69 44 65  73 6b 0d 22 6a 05 e1 0d  |k,OmniDesk."j...|
00008ce0  22 74 05 3a 0d 22 7e 18  dd 20 a4 52 65 61 64 53  |"t.:."~.. .ReadS|
00008cf0  74 61 72 74 75 70 53 74  72 69 6e 67 0d 22 88 4d  |tartupString.".M|
00008d00  f4 20 52 65 74 75 72 6e  73 20 74 61 73 6b 20 68  |. Returns task h|
00008d10  61 6e 64 6c 65 20 6f 66  20 4f 6d 6e 69 44 65 73  |andle of OmniDes|
00008d20  6b 20 28 77 68 69 63 68  20 69 73 20 70 61 73 73  |k (which is pass|
00008d30  65 64 20 69 6e 20 74 68  65 20 63 6f 6d 6d 61 6e  |ed in the comman|
00008d40  64 20 73 74 72 69 6e 67  29 0d 22 92 26 f4 20 6f  |d string).".&. o|
00008d50  72 20 30 20 69 66 20 6e  6f 74 20 73 74 61 72 74  |r 0 if not start|
00008d60  65 64 20 62 79 20 4f 6d  6e 69 44 65 73 6b 2e 0d  |ed by OmniDesk..|
00008d70  22 9c 1d c8 99 20 22 4f  53 5f 47 65 74 45 6e 76  |".... "OS_GetEnv|
00008d80  22 20 b8 20 43 6f 6d 6d  61 6e 64 24 0d 22 a6 1b  |" . Command$."..|
00008d90  41 3d a7 43 6f 6d 6d 61  6e 64 24 2c 22 2d 53 74  |A=.Command$,"-St|
00008da0  61 72 74 75 70 22 29 0d  22 b0 16 e7 20 41 3c 3e  |artup")."... A<>|
00008db0  30 20 8c 20 53 74 61 72  74 75 70 3d b9 0d 22 ba  |0 . Startup=..".|
00008dc0  18 41 3d a7 43 6f 6d 6d  61 6e 64 24 2c 22 2d 45  |.A=.Command$,"-E|
00008dd0  78 69 74 22 29 0d 22 c4  13 e7 20 41 3c 3e 30 20  |xit")."... A<>0 |
00008de0  8c 20 45 78 69 74 3d b9  0d 22 ce 1c 41 3d a7 43  |. Exit=.."..A=.C|
00008df0  6f 6d 6d 61 6e 64 24 2c  22 2d 4f 6d 6e 69 44 65  |ommand$,"-OmniDe|
00008e00  73 6b 22 29 0d 22 d8 0e  e7 20 41 3d 30 20 8c 20  |sk")."... A=0 . |
00008e10  3d 30 0d 22 e2 16 3d bb  28 c1 43 6f 6d 6d 61 6e  |=0."..=.(.Comman|
00008e20  64 24 2c 41 2b 39 29 29  0d 22 ec 05 3a 0d 22 f6  |d$,A+9))."..:.".|
00008e30  20 dd 20 a4 52 65 61 64  57 69 6e 64 6f 77 4c 6f  | . .ReadWindowLo|
00008e40  63 61 74 69 6f 6e 28 41  78 69 73 24 29 0d 23 00  |cation(Axis$).#.|
00008e50  48 f4 20 52 65 61 64 73  20 77 68 69 63 68 20 72  |H. Reads which r|
00008e60  61 64 69 6f 20 69 63 6f  6e 20 28 69 66 20 61 6e  |adio icon (if an|
00008e70  79 29 20 69 73 20 73 65  6c 65 63 74 65 64 20 69  |y) is selected i|
00008e80  6e 20 74 68 65 20 57 69  6e 64 6f 77 20 50 6f 73  |n the Window Pos|
00008e90  69 74 69 6f 6e 0d 23 0a  48 f4 20 73 65 6c 65 63  |ition.#.H. selec|
00008ea0  74 6f 72 20 77 69 6e 64  6f 77 20 61 6e 64 20 72  |tor window and r|
00008eb0  65 74 75 72 6e 73 20 74  68 65 20 61 78 69 73 20  |eturns the axis |
00008ec0  63 6f 6f 72 64 69 6e 61  74 65 20 28 74 77 6f 20  |coordinate (two |
00008ed0  63 61 6c 6c 73 20 6e 65  65 64 65 64 29 0d 23 14  |calls needed).#.|
00008ee0  25 f4 20 6f 72 20 2d 31  20 66 6f 72 20 6e 6f 20  |%. or -1 for no |
00008ef0  70 6f 73 69 74 69 6f 6e  20 73 65 6c 65 63 74 65  |position selecte|
00008f00  64 2e 0d 23 1e 3f 49 63  6f 6e 3d 35 3a f5 3a 49  |d..#.?Icon=5:.:I|
00008f10  63 6f 6e 2b 3d 31 3a fd  20 28 a4 53 65 6c 65 63  |con+=1:. (.Selec|
00008f20  74 65 64 53 74 61 74 65  28 4c 6f 63 2c 49 63 6f  |tedState(Loc,Ico|
00008f30  6e 29 3d b9 29 20 84 20  28 49 63 6f 6e 3d 33 31  |n)=.) . (Icon=31|
00008f40  29 0d 23 28 2a e7 20 49  63 6f 6e 3d 33 31 20 8c  |).#(*. Icon=31 .|
00008f50  20 3d 2d 31 3a f4 20 41  6c 6c 20 69 63 6f 6e 73  | =-1:. All icons|
00008f60  20 64 65 73 65 6c 65 63  74 65 64 0d 23 32 34 4c  | deselected.#24L|
00008f70  6f 63 61 74 69 6f 6e 3d  2d 31 3a 49 63 6f 6e 2d  |ocation=-1:Icon-|
00008f80  3d 36 3a f4 20 42 72 69  6e 67 20 69 63 6f 6e 20  |=6:. Bring icon |
00008f90  69 6e 74 6f 20 72 61 6e  67 65 20 30 2d 31 34 0d  |into range 0-14.|
00008fa0  23 3c 0e c8 8e 20 41 78  69 73 24 20 ca 0d 23 46  |#<... Axis$ ..#F|
00008fb0  21 20 20 c9 20 22 58 22  2c 22 78 22 3a 4c 6f 63  |!  . "X","x":Loc|
00008fc0  61 74 69 6f 6e 3d 49 63  6f 6e 20 81 20 35 0d 23  |ation=Icon . 5.#|
00008fd0  50 25 20 20 c9 20 22 59  22 2c 22 79 22 3a 4c 6f  |P%  . "Y","y":Lo|
00008fe0  63 61 74 69 6f 6e 3d 34  2d 28 49 63 6f 6e 20 83  |cation=4-(Icon .|
00008ff0  20 35 29 0d 23 5a 05 cb  0d 23 64 0d 3d 4c 6f 63  | 5).#Z...#d.=Loc|
00009000  61 74 69 6f 6e 0d 23 6e  05 3a 0d 23 78 17 dd 20  |ation.#n.:.#x.. |
00009010  f2 43 6c 65 61 6e 55 70  4c 6f 63 57 69 6e 64 6f  |.CleanUpLocWindo|
00009020  77 0d 23 82 4f f4 20 4d  61 6b 65 73 20 73 75 72  |w.#.O. Makes sur|
00009030  65 20 74 68 61 74 20 6e  6f 6e 65 20 6f 66 20 74  |e that none of t|
00009040  68 65 20 27 77 69 6e 64  6f 77 27 20 69 63 6f 6e  |he 'window' icon|
00009050  73 20 69 6e 20 74 68 65  20 4c 6f 63 20 77 69 6e  |s in the Loc win|
00009060  64 6f 77 20 69 73 20 73  65 6c 65 63 74 65 64 2e  |dow is selected.|
00009070  0d 23 8c 09 4e 3d 35 3a  f5 0d 23 96 27 4e 2b 3d  |.#..N=5:..#.'N+=|
00009080  31 3a fd 20 4e 3d 33 30  20 84 20 a4 53 65 6c 65  |1:. N=30 . .Sele|
00009090  63 74 65 64 53 74 61 74  65 28 4c 6f 63 2c 4e 29  |ctedState(Loc,N)|
000090a0  0d 23 a0 20 f2 55 70 64  61 74 65 53 65 6c 65 63  |.#. .UpdateSelec|
000090b0  74 65 64 46 6c 61 67 28  4c 6f 63 2c 4e 2c a3 29  |tedFlag(Loc,N,.)|
000090c0  0d 23 aa 05 e1 0d 23 b4  05 3a 0d 23 be 4f f4 20  |.#....#..:.#.O. |
000090d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00009110  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 23 c8 2c f4 20 53  |---------.#.,. S|
00009120  70 65 63 69 61 6c 20 72  6f 75 74 69 6e 65 73 20  |pecial routines |
00009130  66 6f 72 20 74 68 69 73  20 70 72 6f 67 72 61 6d  |for this program|
00009140  20 6f 6e 6c 79 0d 23 d2  4f f4 20 2d 2d 2d 2d 2d  | only.#.O. -----|
00009150  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00009190  2d 2d 2d 2d 0d 23 dc 05  3a 0d 23 e6 2c dd 20 a4  |----.#..:.#.,. .|
000091a0  4c 6f 61 64 46 69 6c 65  28 46 69 6c 65 53 69 7a  |LoadFile(FileSiz|
000091b0  65 2c 46 69 6c 65 54 79  70 65 2c 46 69 6c 65 4e  |e,FileType,FileN|
000091c0  61 6d 65 24 29 0d 23 f0  07 ea 20 85 0d 23 fa 18  |ame$).#... ..#..|
000091d0  ee 20 85 20 ea 20 f7 20  85 3a 3d 31 3a f4 20 45  |. . . . .:=1:. E|
000091e0  72 72 6f 72 0d 24 04 30  e7 20 46 69 6c 65 54 79  |rror.$.0. FileTy|
000091f0  70 65 3c 3e 26 46 45 43  20 8c 20 3d 32 3a f4 20  |pe<>&FEC . =2:. |
00009200  4e 6f 74 20 61 20 74 65  6d 70 6c 61 74 65 20 66  |Not a template f|
00009210  69 6c 65 2e 0d 24 0e 15  f2 4d 69 6e 69 6d 69 73  |ile..$...Minimis|
00009220  65 57 69 6d 70 53 6c 6f  74 0d 24 18 35 e7 20 46  |eWimpSlot.$.5. F|
00009230  69 6c 65 53 69 7a 65 3d  2d 31 20 8c 20 46 69 6c  |ileSize=-1 . Fil|
00009240  65 53 69 7a 65 3d a4 46  69 6e 64 46 69 6c 65 53  |eSize=.FindFileS|
00009250  69 7a 65 28 46 69 6c 65  4e 61 6d 65 24 29 0d 24  |ize(FileName$).$|
00009260  22 2e e7 20 a4 41 6c 6c  6f 63 61 74 65 4d 65 6d  |".. .AllocateMem|
00009270  6f 72 79 28 46 69 6c 65  53 69 7a 65 2b 41 70 70  |ory(FileSize+App|
00009280  53 69 7a 65 29 3d 30 20  8c 20 3d 33 0d 24 2c 27  |Size)=0 . =3.$,'|
00009290  c8 99 20 22 4f 53 5f 46  69 6c 65 22 2c 31 36 2c  |.. "OS_File",16,|
000092a0  46 69 6c 65 4e 61 6d 65  24 2c 53 6c 6f 74 45 6e  |FileName$,SlotEn|
000092b0  64 2c 30 0d 24 36 06 3d  30 0d 24 40 05 3a 0d 24  |d,0.$6.=0.$@.:.$|
000092c0  4a 32 dd 20 a4 53 61 76  65 53 74 61 74 73 54 6f  |J2. .SaveStatsTo|
000092d0  46 69 6c 65 28 54 65 6d  70 6c 61 74 65 73 46 69  |File(TemplatesFi|
000092e0  6c 65 4e 61 6d 65 24 2c  4f 75 74 70 75 74 24 29  |leName$,Output$)|
000092f0  0d 24 54 07 ea 20 85 0d  24 5e 3c ee 20 85 20 ea  |.$T.. ..$^<. . .|
00009300  20 f7 20 85 3a f2 43 6c  6f 73 65 46 69 6c 65 49  | . .:.CloseFileI|
00009310  66 50 6f 73 73 28 46 69  6c 65 29 3a 3d a3 3a f4  |fPoss(File):=.:.|
00009320  20 45 72 72 6f 72 20 77  72 69 74 69 6e 67 20 66  | Error writing f|
00009330  69 6c 65 0d 24 68 07 20  20 3a 0d 24 72 16 20 20  |ile.$h.  :.$r.  |
00009340  46 69 6c 65 3d ae 20 28  4f 75 74 70 75 74 24 29  |File=. (Output$)|
00009350  0d 24 7c 3c 20 20 54 25  3d 53 6c 6f 74 45 6e 64  |.$|<  T%=SlotEnd|
00009360  3a 54 25 2b 3d 31 36 3a  4c 61 72 67 65 73 74 57  |:T%+=16:LargestW|
00009370  69 6e 64 6f 77 53 69 7a  65 3d 30 3a 4c 61 72 67  |indowSize=0:Larg|
00009380  65 73 74 49 6e 64 53 69  7a 65 3d 30 0d 24 86 31  |estIndSize=0.$.1|
00009390  20 20 d5 23 46 69 6c 65  2c 22 54 65 6d 70 6c 61  |  .#File,"Templa|
000093a0  74 65 20 66 69 6c 65 3a  20 22 2b 54 65 6d 70 6c  |te file: "+Templ|
000093b0  61 74 65 73 46 69 6c 65  4e 61 6d 65 24 0d 24 90  |atesFileName$.$.|
000093c0  12 20 20 c8 95 20 28 54  25 21 30 29 3c 3e 30 0d  |.  .. (T%!0)<>0.|
000093d0  24 9a 13 20 20 20 20 e7  20 54 25 21 38 3c 3e 31  |$..    . T%!8<>1|
000093e0  20 8c 0d 24 a4 2c 20 20  20 20 20 20 f4 20 41 20  | ..$.,      . A |
000093f0  76 61 6c 75 65 20 6f 66  20 31 20 72 65 66 65 72  |value of 1 refer|
00009400  73 20 74 6f 20 61 20 77  69 6e 64 6f 77 2e 0d 24  |s to a window..$|
00009410  ae 3d 20 20 20 20 20 20  f4 20 28 49 66 20 6e 6f  |.=      . (If no|
00009420  74 20 31 2c 20 74 68 65  6e 20 77 65 20 64 6f 6e  |t 1, then we don|
00009430  27 74 20 6b 6e 6f 77 20  77 68 61 74 20 69 74 20  |'t know what it |
00009440  72 65 66 65 72 73 20 74  6f 2e 29 0d 24 b8 3b 20  |refers to.).$.; |
00009450  20 20 20 20 20 f4 20 57  65 20 64 6f 6e 27 74 20  |     . We don't |
00009460  6b 6e 6f 77 20 77 68 61  74 20 74 68 69 73 20 72  |know what this r|
00009470  65 63 6f 72 64 27 73 20  74 61 6c 6b 69 6e 67 20  |ecord's talking |
00009480  61 62 6f 75 74 2c 0d 24  c2 20 20 20 20 20 20 20  |about,.$.       |
00009490  f4 20 73 6f 20 73 6b 69  70 20 74 6f 20 74 68 65  |. so skip to the|
000094a0  20 6e 65 78 74 2e 0d 24  cc 3f 20 20 20 20 20 20  | next..$.?      |
000094b0  54 25 2b 3d 32 34 3a f4  20 49 6e 63 72 65 6d 65  |T%+=24:. Increme|
000094c0  6e 74 20 62 79 20 74 68  65 20 73 69 7a 65 20 6f  |nt by the size o|
000094d0  66 20 6f 6e 65 20 74 65  6d 70 6c 61 74 65 20 72  |f one template r|
000094e0  65 63 6f 72 64 0d 24 d6  09 20 20 20 20 cc 0d 24  |ecord.$..    ..$|
000094f0  e0 33 20 20 20 20 20 20  d5 23 46 69 6c 65 2c bd  |.3      .#File,.|
00009500  31 30 2b 22 57 69 6e 64  6f 77 20 69 64 65 6e 74  |10+"Window ident|
00009510  69 66 69 65 72 3a 20 22  2b 24 28 54 25 2b 31 32  |ifier: "+$(T%+12|
00009520  29 0d 24 ea 25 20 20 20  20 20 20 d5 23 46 69 6c  |).$.%      .#Fil|
00009530  65 2c 22 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |e,"~~~~~~~~~~~~~|
00009540  7e 7e 7e 7e 7e 22 0d 24  f4 2b 20 20 20 20 20 20  |~~~~~".$.+      |
00009550  44 61 74 61 3d 53 6c 6f  74 45 6e 64 2b 28 54 25  |Data=SlotEnd+(T%|
00009560  21 30 29 3a 44 61 74 61  53 69 7a 65 3d 54 25 21  |!0):DataSize=T%!|
00009570  34 0d 24 fe 11 20 20 20  20 20 20 e7 20 48 65 78  |4.$..      . Hex|
00009580  20 8c 0d 25 08 39 20 20  20 20 20 20 20 20 d5 23  | ..%.9        .#|
00009590  46 69 6c 65 2c 22 57 69  6e 64 6f 77 20 62 6c 6f  |File,"Window blo|
000095a0  63 6b 20 73 69 7a 65 3a  20 22 2b 22 26 22 2b c3  |ck size: "+"&"+.|
000095b0  7e 28 44 61 74 61 53 69  7a 65 29 0d 25 12 0b 20  |~(DataSize).%.. |
000095c0  20 20 20 20 20 cc 0d 25  1c 34 20 20 20 20 20 20  |     ..%.4      |
000095d0  20 20 d5 23 46 69 6c 65  2c 22 57 69 6e 64 6f 77  |  .#File,"Window|
000095e0  20 62 6c 6f 63 6b 20 73  69 7a 65 3a 20 22 2b c3  | block size: "+.|
000095f0  28 44 61 74 61 53 69 7a  65 29 0d 25 26 0b 20 20  |(DataSize).%&.  |
00009600  20 20 20 20 cd 0d 25 30  43 20 20 20 20 20 20 e7  |    ..%0C      .|
00009610  20 44 61 74 61 53 69 7a  65 3e 4c 61 72 67 65 73  | DataSize>Larges|
00009620  74 57 69 6e 64 6f 77 53  69 7a 65 20 8c 20 4c 61  |tWindowSize . La|
00009630  72 67 65 73 74 57 69 6e  64 6f 77 53 69 7a 65 3d  |rgestWindowSize=|
00009640  44 61 74 61 53 69 7a 65  0d 25 3a 17 20 20 20 20  |DataSize.%:.    |
00009650  20 20 49 63 6f 6e 73 3d  44 61 74 61 21 38 34 0d  |  Icons=Data!84.|
00009660  25 44 23 20 20 20 20 20  20 49 25 3d 44 61 74 61  |%D#      I%=Data|
00009670  2b 38 38 3a f4 20 49 63  6f 6e 20 70 6f 69 6e 74  |+88:. Icon point|
00009680  65 72 0d 25 4e 33 20 20  20 20 20 20 4d 61 78 53  |er.%N3      MaxS|
00009690  69 7a 65 3d 30 3a f4 20  49 6e 64 69 72 65 63 74  |ize=0:. Indirect|
000096a0  20 64 61 74 61 20 73 69  7a 65 20 66 6f 72 20 77  | data size for w|
000096b0  69 6e 64 6f 77 0d 25 58  29 20 20 20 20 20 20 e7  |indow.%X)      .|
000096c0  20 28 28 44 61 74 61 21  35 36 29 20 80 20 28 31  | ((Data!56) . (1|
000096d0  3c 3c 38 29 29 3d 28 31  3c 3c 38 29 20 8c 0d 25  |<<8))=(1<<8) ..%|
000096e0  62 25 20 20 20 20 20 20  20 20 f4 20 54 69 74 6c  |b%        . Titl|
000096f0  65 20 62 61 72 20 69 73  20 69 6e 64 69 72 65 63  |e bar is indirec|
00009700  74 65 64 0d 25 6c 3f 20  20 20 20 20 20 20 20 56  |ted.%l?        V|
00009710  61 6c 69 64 24 3d 22 22  3a e7 20 28 44 61 74 61  |alid$="":. (Data|
00009720  21 37 36 29 3e 3d 30 20  8c 20 56 61 6c 69 64 24  |!76)>=0 . Valid$|
00009730  3d 24 28 44 61 74 61 2b  28 44 61 74 61 21 37 36  |=$(Data+(Data!76|
00009740  29 29 0d 25 76 39 20 20  20 20 20 20 20 20 53 69  |)).%v9        Si|
00009750  7a 65 3d 44 61 74 61 21  38 30 3a e7 20 56 61 6c  |ze=Data!80:. Val|
00009760  69 64 24 3c 3e 22 22 20  8c 20 53 69 7a 65 2b 3d  |id$<>"" . Size+=|
00009770  a9 28 56 61 6c 69 64 24  29 2b 31 0d 25 80 19 20  |.(Valid$)+1.%.. |
00009780  20 20 20 20 20 20 20 4d  61 78 53 69 7a 65 2b 3d  |       MaxSize+=|
00009790  53 69 7a 65 0d 25 8a 40  20 20 20 20 20 20 20 20  |Size.%.@        |
000097a0  d5 23 46 69 6c 65 2c 22  57 69 6e 64 6f 77 20 74  |.#File,"Window t|
000097b0  69 74 6c 65 20 28 69 6e  64 69 72 65 63 74 29 3a  |itle (indirect):|
000097c0  20 22 2b 24 28 44 61 74  61 2b 28 44 61 74 61 21  | "+$(Data+(Data!|
000097d0  37 32 29 29 0d 25 94 44  20 20 20 20 20 20 20 20  |72)).%.D        |
000097e0  e7 20 56 61 6c 69 64 24  3c 3e 22 22 20 8c 20 d5  |. Valid$<>"" . .|
000097f0  23 46 69 6c 65 2c 22 54  69 74 6c 65 20 76 61 6c  |#File,"Title val|
00009800  69 64 61 74 69 6f 6e 20  73 74 72 69 6e 67 3a 20  |idation string: |
00009810  22 2b 56 61 6c 69 64 24  0d 25 9e 0b 20 20 20 20  |"+Valid$.%..    |
00009820  20 20 cc 0d 25 a8 1a 20  20 20 20 20 20 20 20 f4  |  ..%..        .|
00009830  20 44 69 72 65 63 74 20  74 69 74 6c 65 0d 25 b2  | Direct title.%.|
00009840  33 20 20 20 20 20 20 20  20 d5 23 46 69 6c 65 2c  |3        .#File,|
00009850  22 57 69 6e 64 6f 77 20  74 69 74 6c 65 3a 20 22  |"Window title: "|
00009860  2b c0 24 28 44 61 74 61  2b 37 32 29 2c 31 32 29  |+.$(Data+72),12)|
00009870  0d 25 bc 0b 20 20 20 20  20 20 cd 0d 25 c6 35 20  |.%..      ..%.5 |
00009880  20 20 20 20 20 d5 23 46  69 6c 65 2c 22 4e 75 6d  |     .#File,"Num|
00009890  62 65 72 20 6f 66 20 69  63 6f 6e 73 20 64 65 66  |ber of icons def|
000098a0  69 6e 65 64 3a 20 22 2b  c3 28 49 63 6f 6e 73 29  |ined: "+.(Icons)|
000098b0  0d 25 d0 15 20 20 20 20  20 20 e7 20 49 63 6f 6e  |.%..      . Icon|
000098c0  73 3e 30 20 8c 0d 25 da  1a 20 20 20 20 20 20 20  |s>0 ..%..       |
000098d0  20 d5 23 46 69 6c 65 2c  22 49 63 6f 6e 3a 22 0d  | .#File,"Icon:".|
000098e0  25 e4 19 20 20 20 20 20  20 20 20 e3 20 4e 3d 31  |%..        . N=1|
000098f0  20 b8 20 49 63 6f 6e 73  0d 25 ee 32 20 20 20 20  | . Icons.%.2    |
00009900  20 20 20 20 20 20 49 6e  64 69 72 65 63 74 3d 28  |      Indirect=(|
00009910  28 28 49 25 21 31 36 29  20 80 20 28 31 3c 3c 38  |((I%!16) . (1<<8|
00009920  29 29 3d 28 31 3c 3c 38  29 29 0d 25 f8 2e 20 20  |))=(1<<8)).%..  |
00009930  20 20 20 20 20 20 20 20  54 65 78 74 3d 28 28 28  |        Text=(((|
00009940  49 25 21 31 36 29 20 80  20 28 31 3c 3c 30 29 29  |I%!16) . (1<<0))|
00009950  3d 28 31 3c 3c 30 29 29  0d 26 02 30 20 20 20 20  |=(1<<0)).&.0    |
00009960  20 20 20 20 20 20 53 70  72 69 74 65 3d 28 28 28  |      Sprite=(((|
00009970  49 25 21 31 36 29 20 80  20 28 31 3c 3c 31 29 29  |I%!16) . (1<<1))|
00009980  3d 28 31 3c 3c 31 29 29  0d 26 0c 5c 20 20 20 20  |=(1<<1)).&.\    |
00009990  20 20 20 20 20 20 44 65  73 63 72 69 70 74 69 6f  |      Descriptio|
000099a0  6e 24 3d c4 34 2d 28 a9  28 c3 28 4e 2d 31 29 29  |n$=.4-(.(.(N-1))|
000099b0  29 2c 22 20 22 29 2b c3  28 4e 2d 31 29 2b 22 3a  |)," ")+.(N-1)+":|
000099c0  20 22 3a 44 65 73 63 72  69 70 74 69 6f 6e 32 24  | ":Description2$|
000099d0  3d 22 22 3a 44 65 73 63  72 69 70 74 69 6f 6e 33  |="":Description3|
000099e0  24 3d 22 22 0d 26 16 1a  20 20 20 20 20 20 20 20  |$="".&..        |
000099f0  20 20 e7 20 49 6e 64 69  72 65 63 74 20 8c 0d 26  |  . Indirect ..&|
00009a00  20 36 20 20 20 20 20 20  20 20 20 20 20 20 f4 20  | 6            . |
00009a10  43 6f 75 6e 74 20 69 6e  64 69 72 65 63 74 20 69  |Count indirect i|
00009a20  63 6f 6e 73 2c 20 69 67  6e 6f 72 65 20 6f 74 68  |cons, ignore oth|
00009a30  65 72 73 2e 0d 26 2a 29  20 20 20 20 20 20 20 20  |ers..&*)        |
00009a40  20 20 20 20 44 65 73 63  72 69 70 74 69 6f 6e 24  |    Description$|
00009a50  2b 3d 22 49 6e 64 69 72  65 63 74 20 22 0d 26 34  |+="Indirect ".&4|
00009a60  18 20 20 20 20 20 20 20  20 20 20 20 20 e7 20 54  |.            . T|
00009a70  65 78 74 20 8c 0d 26 3e  53 20 20 20 20 20 20 20  |ext ..&>S       |
00009a80  20 20 20 20 20 20 20 f4  20 54 72 65 61 74 20 69  |       . Treat i|
00009a90  6e 64 69 72 65 63 74 20  74 65 78 74 2b 73 70 72  |ndirect text+spr|
00009aa0  69 74 65 20 61 6e 64 20  74 65 78 74 2d 6f 6e 6c  |ite and text-onl|
00009ab0  79 20 69 63 6f 6e 73 20  69 6e 20 74 68 65 20 73  |y icons in the s|
00009ac0  61 6d 65 20 77 61 79 3a  0d 26 48 41 20 20 20 20  |ame way:.&HA    |
00009ad0  20 20 20 20 20 20 20 20  20 20 56 61 6c 69 64 24  |          Valid$|
00009ae0  3d 22 22 3a e7 20 28 49  25 21 32 34 29 3e 3d 30  |="":. (I%!24)>=0|
00009af0  20 8c 20 56 61 6c 69 64  24 3d 24 28 44 61 74 61  | . Valid$=$(Data|
00009b00  2b 28 49 25 21 32 34 29  29 0d 26 52 3d 20 20 20  |+(I%!24)).&R=   |
00009b10  20 20 20 20 20 20 20 20  20 20 20 53 69 7a 65 3d  |           Size=|
00009b20  49 25 21 32 38 3a e7 20  56 61 6c 69 64 24 3c 3e  |I%!28:. Valid$<>|
00009b30  22 22 20 8c 20 53 69 7a  65 2b 3d a9 28 56 61 6c  |"" . Size+=.(Val|
00009b40  69 64 24 29 2b 31 0d 26  5c 1f 20 20 20 20 20 20  |id$)+1.&\.      |
00009b50  20 20 20 20 20 20 20 20  4d 61 78 53 69 7a 65 2b  |        MaxSize+|
00009b60  3d 53 69 7a 65 0d 26 66  27 20 20 20 20 20 20 20  |=Size.&f'       |
00009b70  20 20 20 20 20 20 20 44  65 73 63 72 69 70 74 69  |       Descripti|
00009b80  6f 6e 24 2b 3d 22 74 65  78 74 20 22 0d 26 70 36  |on$+="text ".&p6|
00009b90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 e7 20  |              . |
00009ba0  53 70 72 69 74 65 20 8c  20 44 65 73 63 72 69 70  |Sprite . Descrip|
00009bb0  74 69 6f 6e 24 2b 3d 22  2b 20 73 70 72 69 74 65  |tion$+="+ sprite|
00009bc0  20 22 0d 26 7a 26 20 20  20 20 20 20 20 20 20 20  | ".&z&          |
00009bd0  20 20 20 20 44 65 73 63  72 69 70 74 69 6f 6e 24  |    Description$|
00009be0  2b 3d 22 69 63 6f 6e 22  0d 26 84 8a 20 20 20 20  |+="icon".&..    |
00009bf0  20 20 20 20 20 20 20 20  20 20 e7 20 24 28 44 61  |          . $(Da|
00009c00  74 61 2b 28 49 25 21 32  30 29 29 3c 3e 22 22 20  |ta+(I%!20))<>"" |
00009c10  8c 20 44 65 73 63 72 69  70 74 69 6f 6e 32 24 3d  |. Description2$=|
00009c20  c4 36 2c 22 20 22 29 2b  22 54 65 78 74 20 62 75  |.6," ")+"Text bu|
00009c30  66 66 65 72 20 63 6f 6e  74 65 6e 74 73 3a 20 22  |ffer contents: "|
00009c40  2b 24 28 44 61 74 61 2b  28 49 25 21 32 30 29 29  |+$(Data+(I%!20))|
00009c50  20 8b 20 44 65 73 63 72  69 70 74 69 6f 6e 32 24  | . Description2$|
00009c60  3d c4 36 2c 22 20 22 29  2b 22 28 45 6d 70 74 79  |=.6," ")+"(Empty|
00009c70  29 22 0d 26 8e 5c 20 20  20 20 20 20 20 20 20 20  |)".&.\          |
00009c80  20 20 20 20 e7 20 56 61  6c 69 64 24 3c 3e 22 22  |    . Valid$<>""|
00009c90  20 8c 20 44 65 73 63 72  69 70 74 69 6f 6e 33 24  | . Description3$|
00009ca0  3d c4 36 2c 22 20 22 29  2b 22 56 61 6c 69 64 61  |=.6," ")+"Valida|
00009cb0  74 69 6f 6e 20 62 75 66  66 65 72 20 63 6f 6e 74  |tion buffer cont|
00009cc0  65 6e 74 73 3a 20 22 2b  56 61 6c 69 64 24 0d 26  |ents: "+Valid$.&|
00009cd0  98 11 20 20 20 20 20 20  20 20 20 20 20 20 cc 0d  |..            ..|
00009ce0  26 a2 1c 20 20 20 20 20  20 20 20 20 20 20 20 20  |&..             |
00009cf0  20 e7 20 53 70 72 69 74  65 20 8c 0d 26 ac 2f 20  | . Sprite ..&./ |
00009d00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 f4  |               .|
00009d10  20 49 6e 64 69 72 65 63  74 20 73 70 72 69 74 65  | Indirect sprite|
00009d20  2d 6f 6e 6c 79 20 69 63  6f 6e 0d 26 b6 1e 20 20  |-only icon.&..  |
00009d30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 53 69  |              Si|
00009d40  7a 65 3d 49 25 21 32 38  0d 26 c0 21 20 20 20 20  |ze=I%!28.&.!    |
00009d50  20 20 20 20 20 20 20 20  20 20 20 20 4d 61 78 53  |            MaxS|
00009d60  69 7a 65 2b 3d 53 69 7a  65 0d 26 ca 2f 20 20 20  |ize+=Size.&./   |
00009d70  20 20 20 20 20 20 20 20  20 20 20 20 20 44 65 73  |             Des|
00009d80  63 72 69 70 74 69 6f 6e  24 2b 3d 22 73 70 72 69  |cription$+="spri|
00009d90  74 65 20 69 63 6f 6e 22  0d 26 d4 8e 20 20 20 20  |te icon".&..    |
00009da0  20 20 20 20 20 20 20 20  20 20 20 20 e7 20 53 69  |            . Si|
00009db0  7a 65 3e 30 20 8c 20 e7  20 24 28 44 61 74 61 2b  |ze>0 . . $(Data+|
00009dc0  28 49 25 21 32 30 29 29  3c 3e 22 22 20 8c 20 44  |(I%!20))<>"" . D|
00009dd0  65 73 63 72 69 70 74 69  6f 6e 32 24 3d c4 36 2c  |escription2$=.6,|
00009de0  22 20 22 29 2b 22 53 70  72 69 74 65 20 6e 61 6d  |" ")+"Sprite nam|
00009df0  65 3a 20 22 2b 24 28 44  61 74 61 2b 28 49 25 21  |e: "+$(Data+(I%!|
00009e00  32 30 29 29 20 8b 20 44  65 73 63 72 69 70 74 69  |20)) . Descripti|
00009e10  6f 6e 32 24 3d c4 36 2c  22 20 22 29 2b 22 28 45  |on2$=.6," ")+"(E|
00009e20  6d 70 74 79 29 22 0d 26  de 13 20 20 20 20 20 20  |mpty)".&..      |
00009e30  20 20 20 20 20 20 20 20  cc 0d 26 e8 46 20 20 20  |        ..&.F   |
00009e40  20 20 20 20 20 20 20 20  20 20 20 20 20 f4 20 49  |             . I|
00009e50  6e 64 69 72 65 63 74 20  6e 6f 6e 2d 74 65 78 74  |ndirect non-text|
00009e60  2c 20 6e 6f 6e 2d 73 70  72 69 74 65 20 69 63 6f  |, non-sprite ico|
00009e70  6e 73 20 61 72 65 20 69  67 6e 6f 72 65 64 2e 0d  |ns are ignored..|
00009e80  26 f2 3d 20 20 20 20 20  20 20 20 20 20 20 20 20  |&.=             |
00009e90  20 20 20 44 65 73 63 72  69 70 74 69 6f 6e 24 2b  |   Description$+|
00009ea0  3d 22 6e 6f 6e 2d 74 65  78 74 2c 20 6e 6f 6e 2d  |="non-text, non-|
00009eb0  73 70 72 69 74 65 20 69  63 6f 6e 22 0d 26 fc 13  |sprite icon".&..|
00009ec0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |              ..|
00009ed0  27 06 11 20 20 20 20 20  20 20 20 20 20 20 20 cd  |'..            .|
00009ee0  0d 27 10 0f 20 20 20 20  20 20 20 20 20 20 cc 0d  |.'..          ..|
00009ef0  27 1a 59 20 20 20 20 20  20 20 20 20 20 20 20 f4  |'.Y            .|
00009f00  20 49 67 6e 6f 72 65 20  64 69 72 65 63 74 20 69  | Ignore direct i|
00009f10  63 6f 6e 73 2c 20 65 78  63 65 70 74 20 66 6f 72  |cons, except for|
00009f20  20 6f 75 74 70 75 74 74  69 6e 67 20 73 6f 6d 65  | outputting some|
00009f30  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 61 62 6f  | information abo|
00009f40  75 74 20 74 68 65 6d 2e  0d 27 24 18 20 20 20 20  |ut them..'$.    |
00009f50  20 20 20 20 20 20 20 20  e7 20 54 65 78 74 20 8c  |        . Text .|
00009f60  0d 27 2e 27 20 20 20 20  20 20 20 20 20 20 20 20  |.'.'            |
00009f70  20 20 44 65 73 63 72 69  70 74 69 6f 6e 24 2b 3d  |  Description$+=|
00009f80  22 54 65 78 74 20 22 0d  27 38 1c 20 20 20 20 20  |"Text ".'8.     |
00009f90  20 20 20 20 20 20 20 20  20 e7 20 53 70 72 69 74  |         . Sprit|
00009fa0  65 20 8c 0d 27 42 2d 20  20 20 20 20 20 20 20 20  |e ..'B-         |
00009fb0  20 20 20 20 20 20 20 44  65 73 63 72 69 70 74 69  |       Descripti|
00009fc0  6f 6e 24 2b 3d 22 2b 20  73 70 72 69 74 65 20 22  |on$+="+ sprite "|
00009fd0  0d 27 4c 88 20 20 20 20  20 20 20 20 20 20 20 20  |.'L.            |
00009fe0  20 20 20 20 e7 20 c0 24  28 49 25 2b 32 30 29 2c  |    . .$(I%+20),|
00009ff0  31 32 29 3c 3e 22 22 20  8c 20 44 65 73 63 72 69  |12)<>"" . Descri|
0000a000  70 74 69 6f 6e 32 24 3d  c4 36 2c 22 20 22 29 2b  |ption2$=.6," ")+|
0000a010  22 54 65 78 74 20 61 6e  64 20 73 70 72 69 74 65  |"Text and sprite|
0000a020  20 6e 61 6d 65 3a 20 22  2b c0 24 28 49 25 2b 32  | name: "+.$(I%+2|
0000a030  30 29 2c 31 32 29 20 8b  20 44 65 73 63 72 69 70  |0),12) . Descrip|
0000a040  74 69 6f 6e 32 24 3d c4  36 2c 22 20 22 29 2b 22  |tion2$=.6," ")+"|
0000a050  28 45 6d 70 74 79 29 22  0d 27 56 13 20 20 20 20  |(Empty)".'V.    |
0000a060  20 20 20 20 20 20 20 20  20 20 cc 0d 27 60 7c 20  |          ..'`| |
0000a070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 e7  |               .|
0000a080  20 c0 24 28 49 25 2b 32  30 29 2c 31 32 29 3c 3e  | .$(I%+20),12)<>|
0000a090  22 22 20 8c 20 44 65 73  63 72 69 70 74 69 6f 6e  |"" . Description|
0000a0a0  32 24 3d c4 36 2c 22 20  22 29 2b 22 43 6f 6e 74  |2$=.6," ")+"Cont|
0000a0b0  65 6e 74 73 3a 20 22 2b  c0 24 28 49 25 2b 32 30  |ents: "+.$(I%+20|
0000a0c0  29 2c 31 32 29 20 8b 20  44 65 73 63 72 69 70 74  |),12) . Descript|
0000a0d0  69 6f 6e 32 24 3d c4 36  2c 22 20 22 29 2b 22 28  |ion2$=.6," ")+"(|
0000a0e0  45 6d 70 74 79 29 22 0d  27 6a 13 20 20 20 20 20  |Empty)".'j.     |
0000a0f0  20 20 20 20 20 20 20 20  20 cd 0d 27 74 26 20 20  |         ..'t&  |
0000a100  20 20 20 20 20 20 20 20  20 20 20 20 44 65 73 63  |            Desc|
0000a110  72 69 70 74 69 6f 6e 24  2b 3d 22 69 63 6f 6e 22  |ription$+="icon"|
0000a120  0d 27 7e 11 20 20 20 20  20 20 20 20 20 20 20 20  |.'~.            |
0000a130  cc 0d 27 88 1c 20 20 20  20 20 20 20 20 20 20 20  |..'..           |
0000a140  20 20 20 e7 20 53 70 72  69 74 65 20 8c 0d 27 92  |   . Sprite ..'.|
0000a150  2f 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |/               |
0000a160  20 44 65 73 63 72 69 70  74 69 6f 6e 24 2b 3d 22  | Description$+="|
0000a170  53 70 72 69 74 65 20 69  63 6f 6e 22 0d 27 9c 7f  |Sprite icon".'..|
0000a180  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000a190  e7 20 c0 24 28 49 25 2b  32 30 29 2c 31 32 29 3c  |. .$(I%+20),12)<|
0000a1a0  3e 22 22 20 8c 20 44 65  73 63 72 69 70 74 69 6f  |>"" . Descriptio|
0000a1b0  6e 32 24 3d c4 36 2c 22  20 22 29 2b 22 53 70 72  |n2$=.6," ")+"Spr|
0000a1c0  69 74 65 20 6e 61 6d 65  3a 20 22 2b c0 24 28 49  |ite name: "+.$(I|
0000a1d0  25 2b 32 30 29 2c 31 32  29 20 8b 20 44 65 73 63  |%+20),12) . Desc|
0000a1e0  72 69 70 74 69 6f 6e 32  24 3d c4 36 2c 22 20 22  |ription2$=.6," "|
0000a1f0  29 2b 22 28 45 6d 70 74  79 29 22 0d 27 a6 13 20  |)+"(Empty)".'.. |
0000a200  20 20 20 20 20 20 20 20  20 20 20 20 20 cc 0d 27  |             ..'|
0000a210  b0 3d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.=              |
0000a220  20 20 44 65 73 63 72 69  70 74 69 6f 6e 24 2b 3d  |  Description$+=|
0000a230  22 4e 6f 6e 2d 74 65 78  74 2c 20 6e 6f 6e 2d 73  |"Non-text, non-s|
0000a240  70 72 69 74 65 20 69 63  6f 6e 22 0d 27 ba 13 20  |prite icon".'.. |
0000a250  20 20 20 20 20 20 20 20  20 20 20 20 20 cd 0d 27  |             ..'|
0000a260  c4 11 20 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |..            ..|
0000a270  27 ce 0f 20 20 20 20 20  20 20 20 20 20 cd 0d 27  |'..          ..'|
0000a280  d8 21 20 20 20 20 20 20  20 20 20 20 d5 23 46 69  |.!          .#Fi|
0000a290  6c 65 2c 44 65 73 63 72  69 70 74 69 6f 6e 24 0d  |le,Description$.|
0000a2a0  27 e2 38 20 20 20 20 20  20 20 20 20 20 e7 20 44  |'.8          . D|
0000a2b0  65 73 63 72 69 70 74 69  6f 6e 32 24 3c 3e 22 22  |escription2$<>""|
0000a2c0  20 8c 20 d5 23 46 69 6c  65 2c 44 65 73 63 72 69  | . .#File,Descri|
0000a2d0  70 74 69 6f 6e 32 24 0d  27 ec 38 20 20 20 20 20  |ption2$.'.8     |
0000a2e0  20 20 20 20 20 e7 20 44  65 73 63 72 69 70 74 69  |     . Descripti|
0000a2f0  6f 6e 33 24 3c 3e 22 22  20 8c 20 d5 23 46 69 6c  |on3$<>"" . .#Fil|
0000a300  65 2c 44 65 73 63 72 69  70 74 69 6f 6e 33 24 0d  |e,Description3$.|
0000a310  27 f6 3e 20 20 20 20 20  20 20 20 20 20 49 25 2b  |'.>          I%+|
0000a320  3d 33 32 3a f4 20 49 6e  63 72 65 6d 65 6e 74 20  |=32:. Increment |
0000a330  62 79 20 74 68 65 20 73  69 7a 65 20 6f 66 20 6f  |by the size of o|
0000a340  6e 65 20 69 63 6f 6e 20  62 6c 6f 63 6b 0d 28 00  |ne icon block.(.|
0000a350  0f 20 20 20 20 20 20 20  20 ed 20 4e 0d 28 0a 0b  |.        . N.(..|
0000a360  20 20 20 20 20 20 cd 0d  28 14 11 20 20 20 20 20  |      ..(..     |
0000a370  20 e7 20 48 65 78 20 8c  0d 28 1e 59 20 20 20 20  | . Hex ..(.Y    |
0000a380  20 20 20 20 d5 23 46 69  6c 65 2c 22 53 69 7a 65  |    .#File,"Size|
0000a390  20 6f 66 20 62 6c 6f 63  6b 20 72 65 71 75 69 72  | of block requir|
0000a3a0  65 64 20 74 6f 20 68 6f  6c 64 20 61 6c 6c 20 69  |ed to hold all i|
0000a3b0  6e 64 69 72 65 63 74 65  64 20 64 61 74 61 3a 20  |ndirected data: |
0000a3c0  22 2b 22 26 22 2b c3 7e  28 4d 61 78 53 69 7a 65  |"+"&"+.~(MaxSize|
0000a3d0  29 0d 28 28 0b 20 20 20  20 20 20 cc 0d 28 32 54  |).((.      ..(2T|
0000a3e0  20 20 20 20 20 20 20 20  d5 23 46 69 6c 65 2c 22  |        .#File,"|
0000a3f0  53 69 7a 65 20 6f 66 20  62 6c 6f 63 6b 20 72 65  |Size of block re|
0000a400  71 75 69 72 65 64 20 74  6f 20 68 6f 6c 64 20 61  |quired to hold a|
0000a410  6c 6c 20 69 6e 64 69 72  65 63 74 65 64 20 64 61  |ll indirected da|
0000a420  74 61 3a 20 22 2b c3 28  4d 61 78 53 69 7a 65 29  |ta: "+.(MaxSize)|
0000a430  0d 28 3c 0b 20 20 20 20  20 20 cd 0d 28 46 4e 20  |.(<.      ..(FN |
0000a440  20 20 20 20 20 4c 61 72  67 65 73 74 49 6e 64 53  |     LargestIndS|
0000a450  69 7a 65 2b 3d 4d 61 78  53 69 7a 65 3a f4 20 41  |ize+=MaxSize:. A|
0000a460  64 64 20 74 68 69 73 20  77 69 6e 64 6f 77 27 73  |dd this window's|
0000a470  20 69 6e 64 69 72 65 63  74 20 73 70 61 63 65 20  | indirect space |
0000a480  74 6f 20 74 6f 74 61 6c  2e 0d 28 50 3f 20 20 20  |to total..(P?   |
0000a490  20 20 20 54 25 2b 3d 32  34 3a f4 20 49 6e 63 72  |   T%+=24:. Incr|
0000a4a0  65 6d 65 6e 74 20 62 79  20 74 68 65 20 73 69 7a  |ement by the siz|
0000a4b0  65 20 6f 66 20 6f 6e 65  20 74 65 6d 70 6c 61 74  |e of one templat|
0000a4c0  65 20 72 65 63 6f 72 64  0d 28 5a 09 20 20 20 20  |e record.(Z.    |
0000a4d0  cd 0d 28 64 07 20 20 ce  0d 28 6e 0d 20 20 e7 20  |..(d.  ..(n.  . |
0000a4e0  48 65 78 20 8c 0d 28 78  6b 20 20 20 20 d5 23 46  |Hex ..(xk    .#F|
0000a4f0  69 6c 65 2c bd 31 30 2b  22 53 69 7a 65 20 6f 66  |ile,.10+"Size of|
0000a500  20 62 6c 6f 63 6b 20 72  65 71 75 69 72 65 64 20  | block required |
0000a510  74 6f 20 68 6f 6c 64 20  67 6c 6f 62 61 6c 20 74  |to hold global t|
0000a520  65 6d 70 6c 61 74 65 20  64 65 66 69 6e 69 74 69  |emplate definiti|
0000a530  6f 6e 73 3a 20 22 2b 22  26 22 2b c3 7e 28 4c 61  |ons: "+"&"+.~(La|
0000a540  72 67 65 73 74 57 69 6e  64 6f 77 53 69 7a 65 29  |rgestWindowSize)|
0000a550  0d 28 82 64 20 20 20 20  d5 23 46 69 6c 65 2c 22  |.(.d    .#File,"|
0000a560  53 69 7a 65 20 6f 66 20  62 6c 6f 63 6b 20 72 65  |Size of block re|
0000a570  71 75 69 72 65 64 20 74  6f 20 68 6f 6c 64 20 61  |quired to hold a|
0000a580  6c 6c 20 69 6e 64 69 72  65 63 74 65 64 20 64 61  |ll indirected da|
0000a590  74 61 3a 20 20 20 20 20  20 20 20 20 22 2b 22 26  |ta:         "+"&|
0000a5a0  22 2b c3 7e 28 4c 61 72  67 65 73 74 49 6e 64 53  |"+.~(LargestIndS|
0000a5b0  69 7a 65 29 0d 28 8c 07  20 20 cc 0d 28 96 66 20  |ize).(..  ..(.f |
0000a5c0  20 20 20 d5 23 46 69 6c  65 2c bd 31 30 2b 22 53  |   .#File,.10+"S|
0000a5d0  69 7a 65 20 6f 66 20 62  6c 6f 63 6b 20 72 65 71  |ize of block req|
0000a5e0  75 69 72 65 64 20 74 6f  20 68 6f 6c 64 20 67 6c  |uired to hold gl|
0000a5f0  6f 62 61 6c 20 74 65 6d  70 6c 61 74 65 20 64 65  |obal template de|
0000a600  66 69 6e 69 74 69 6f 6e  73 3a 20 22 2b c3 28 4c  |finitions: "+.(L|
0000a610  61 72 67 65 73 74 57 69  6e 64 6f 77 53 69 7a 65  |argestWindowSize|
0000a620  29 0d 28 a0 5f 20 20 20  20 d5 23 46 69 6c 65 2c  |).(._    .#File,|
0000a630  22 53 69 7a 65 20 6f 66  20 62 6c 6f 63 6b 20 72  |"Size of block r|
0000a640  65 71 75 69 72 65 64 20  74 6f 20 68 6f 6c 64 20  |equired to hold |
0000a650  61 6c 6c 20 69 6e 64 69  72 65 63 74 65 64 20 64  |all indirected d|
0000a660  61 74 61 3a 20 20 20 20  20 20 20 20 20 22 2b c3  |ata:         "+.|
0000a670  28 4c 61 72 67 65 73 74  49 6e 64 53 69 7a 65 29  |(LargestIndSize)|
0000a680  0d 28 aa 07 20 20 cd 0d  28 b4 0c 20 20 d9 23 46  |.(..  ..(..  .#F|
0000a690  69 6c 65 0d 28 be 23 20  20 ff 28 22 53 65 74 74  |ile.(.#  .("Sett|
0000a6a0  79 70 65 20 22 2b 4f 75  74 70 75 74 24 2b 22 20  |ype "+Output$+" |
0000a6b0  54 65 78 74 22 29 0d 28  c8 07 20 20 3a 0d 28 d2  |Text").(..  :.(.|
0000a6c0  06 3d b9 0d 28 dc 05 3a  0d 28 e6 19 dd 20 f2 43  |.=..(..:.(... .C|
0000a6d0  68 65 63 6b 4c 6f 61 64  46 69 6c 65 45 72 72 6f  |heckLoadFileErro|
0000a6e0  72 0d 28 f0 16 c8 8e 20  4c 6f 61 64 46 69 6c 65  |r.(.... LoadFile|
0000a6f0  45 72 72 6f 72 20 ca 0d  28 fa 46 20 20 c9 20 31  |Error ..(.F  . 1|
0000a700  3a 85 20 39 39 39 39 2c  22 41 6e 20 65 72 72 6f  |:. 9999,"An erro|
0000a710  72 20 6f 63 63 75 72 72  65 64 20 77 68 69 6c 73  |r occurred whils|
0000a720  74 20 72 65 61 64 69 6e  67 20 74 68 65 20 74 65  |t reading the te|
0000a730  6d 70 6c 61 74 65 20 66  69 6c 65 2e 22 0d 29 04  |mplate file.".).|
0000a740  3d 20 20 c9 20 32 3a 85  20 39 39 39 39 2c 22 46  |=  . 2:. 9999,"F|
0000a750  6f 72 6d 20 53 69 7a 65  72 20 63 61 6e 20 6f 6e  |orm Sizer can on|
0000a760  6c 79 20 68 61 6e 64 6c  65 20 74 65 6d 70 6c 61  |ly handle templa|
0000a770  74 65 20 66 69 6c 65 73  2e 22 0d 29 0e 4b 20 20  |te files.".).K  |
0000a780  c9 20 33 3a 85 20 39 39  39 39 2c 22 55 6e 61 62  |. 3:. 9999,"Unab|
0000a790  6c 65 20 74 6f 20 63 6c  61 69 6d 20 65 6e 6f 75  |le to claim enou|
0000a7a0  67 68 20 6d 65 6d 6f 72  79 20 74 6f 20 6c 6f 61  |gh memory to loa|
0000a7b0  64 20 74 68 65 20 74 65  6d 70 6c 61 74 65 20 66  |d the template f|
0000a7c0  69 6c 65 2e 22 0d 29 18  18 20 20 7f 20 f4 20 57  |ile.".)..  . . W|
0000a7d0  65 27 72 65 20 61 6c 72  69 67 68 74 2e 0d 29 22  |e're alright..)"|
0000a7e0  05 cb 0d 29 2c 05 e1 0d  29 36 05 3a 0d 29 40 17  |...),...)6.:.)@.|
0000a7f0  dd 20 f2 43 6c 65 61 72  53 74 61 74 73 57 69 6e  |. .ClearStatsWin|
0000a800  64 6f 77 0d 29 4a 1a 4f  70 65 6e 3d a4 4f 70 65  |dow.)J.Open=.Ope|
0000a810  6e 53 74 61 74 65 28 53  74 61 74 73 29 0d 29 54  |nState(Stats).)T|
0000a820  4f 42 6c 6f 63 6b 21 30  3d 53 74 61 74 73 3a c8  |OBlock!0=Stats:.|
0000a830  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
0000a840  77 53 74 61 74 65 22 2c  2c 42 6c 6f 63 6b 3a c8  |wState",,Block:.|
0000a850  99 20 22 57 69 6d 70 5f  44 65 6c 65 74 65 57 69  |. "Wimp_DeleteWi|
0000a860  6e 64 6f 77 22 2c 2c 42  6c 6f 63 6b 0d 29 5e 2c  |ndow",,Block.)^,|
0000a870  e3 20 4e 3d 30 20 b8 20  31 32 20 88 20 34 3a 54  |. N=0 . 12 . 4:T|
0000a880  65 6d 70 6c 61 74 65 73  21 4e 3d 42 6c 6f 63 6b  |emplates!N=Block|
0000a890  21 28 4e 2b 34 29 3a ed  0d 29 68 45 f4 20 55 70  |!(N+4):..)hE. Up|
0000a8a0  64 61 74 65 20 74 65 6d  70 6c 61 74 65 20 77 69  |date template wi|
0000a8b0  6e 64 6f 77 27 73 20 70  6f 73 69 74 69 6f 6e 20  |ndow's position |
0000a8c0  77 69 74 68 20 61 63 74  75 61 6c 20 77 69 6e 64  |with actual wind|
0000a8d0  6f 77 27 73 20 70 6f 73  69 74 69 6f 6e 0d 29 72  |ow's position.)r|
0000a8e0  2d c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |-.. "Wimp_Create|
0000a8f0  57 69 6e 64 6f 77 22 2c  2c 54 65 6d 70 6c 61 74  |Window",,Templat|
0000a900  65 73 20 b8 20 53 74 61  74 73 0d 29 7c 42 f2 55  |es . Stats.)|B.U|
0000a910  70 64 61 74 65 49 63 6f  6e 28 53 74 61 74 73 2c  |pdateIcon(Stats,|
0000a920  32 2c 22 44 72 61 67 20  61 20 74 65 6d 70 6c 61  |2,"Drag a templa|
0000a930  74 65 73 20 66 69 6c 65  20 69 6e 74 6f 20 74 68  |tes file into th|
0000a940  69 73 20 77 69 6e 64 6f  77 2e 22 29 0d 29 86 2b  |is window.").).+|
0000a950  e3 20 4e 3d 36 20 b8 20  38 20 88 20 32 3a f2 55  |. N=6 . 8 . 2:.U|
0000a960  70 64 61 74 65 49 63 6f  6e 28 53 74 61 74 73 2c  |pdateIcon(Stats,|
0000a970  4e 2c 22 22 29 3a ed 0d  29 90 0f e3 20 4e 3d 31  |N,""):..)... N=1|
0000a980  34 20 b8 20 31 36 0d 29  9a 3b 20 20 42 6c 6f 63  |4 . 16.).;  Bloc|
0000a990  6b 21 30 3d 53 74 61 74  73 3a 42 6c 6f 63 6b 21  |k!0=Stats:Block!|
0000a9a0  34 3d 4e 3a c8 99 20 22  57 69 6d 70 5f 47 65 74  |4=N:.. "Wimp_Get|
0000a9b0  49 63 6f 6e 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |IconState",,Bloc|
0000a9c0  6b 0d 29 a4 21 20 20 c8  99 20 22 57 69 6d 70 5f  |k.).!  .. "Wimp_|
0000a9d0  44 65 6c 65 74 65 49 63  6f 6e 22 2c 2c 42 6c 6f  |DeleteIcon",,Blo|
0000a9e0  63 6b 0d 29 ae 18 20 20  24 28 42 6c 6f 63 6b 2b  |ck.)..  $(Block+|
0000a9f0  32 38 29 3d 22 22 2b bd  31 33 0d 29 b8 31 20 20  |28)=""+.13.).1  |
0000aa00  42 6c 6f 63 6b 21 34 3d  53 74 61 74 73 3a c8 99  |Block!4=Stats:..|
0000aa10  20 22 57 69 6d 70 5f 43  72 65 61 74 65 49 63 6f  | "Wimp_CreateIco|
0000aa20  6e 22 2c 2c 42 6c 6f 63  6b 2b 34 0d 29 c2 2b 20  |n",,Block+4.).+ |
0000aa30  20 f4 20 42 6c 61 6e 6b  20 6f 75 74 20 74 68 65  | . Blank out the|
0000aa40  73 65 20 6e 6f 6e 2d 69  6e 64 69 72 65 63 74 20  |se non-indirect |
0000aa50  69 63 6f 6e 73 2e 0d 29  cc 05 ed 0d 29 d6 21 e7  |icons..)....).!.|
0000aa60  20 4f 70 65 6e 20 8c 20  f2 4f 70 65 6e 28 53 74  | Open . .Open(St|
0000aa70  61 74 73 2c b9 2c 2d 31  2c 2d 31 29 0d 29 e0 1c  |ats,.,-1,-1).)..|
0000aa80  f2 53 68 61 64 65 4d 65  6e 75 28 4d 61 69 6e 4d  |.ShadeMenu(MainM|
0000aa90  65 6e 75 2c 31 2c b9 29  0d 29 ea 1c f2 53 68 61  |enu,1,.).)...Sha|
0000aaa0  64 65 4d 65 6e 75 28 4d  61 69 6e 4d 65 6e 75 2c  |deMenu(MainMenu,|
0000aab0  33 2c b9 29 0d 29 f4 05  e1 0d 29 fe 05 3a 0d 2a  |3,.).)....)..:.*|
0000aac0  08 13 dd 20 f2 55 70 64  61 74 65 48 65 78 44 65  |... .UpdateHexDe|
0000aad0  63 0d 2a 12 11 e3 20 4e  3d 36 20 b8 20 38 20 88  |c.*... N=6 . 8 .|
0000aae0  20 32 0d 2a 1c 20 20 20  41 3d a0 28 a4 52 65 61  | 2.*.   A=.(.Rea|
0000aaf0  64 49 63 6f 6e 53 74 72  28 53 74 61 74 73 2c 4e  |dIconStr(Stats,N|
0000ab00  29 29 0d 2a 26 48 20 20  e7 20 48 65 78 20 8c 20  |)).*&H  . Hex . |
0000ab10  f2 55 70 64 61 74 65 49  63 6f 6e 28 53 74 61 74  |.UpdateIcon(Stat|
0000ab20  73 2c 4e 2c 22 26 22 2b  c3 7e 28 41 29 29 20 8b  |s,N,"&"+.~(A)) .|
0000ab30  20 f2 55 70 64 61 74 65  49 63 6f 6e 28 53 74 61  | .UpdateIcon(Sta|
0000ab40  74 73 2c 4e 2c c3 28 41  29 29 0d 2a 30 05 ed 0d  |ts,N,.(A)).*0...|
0000ab50  2a 3a 24 e3 20 4d 3d 31  34 20 b8 20 28 31 31 2b  |*:$. M=14 . (11+|
0000ab60  28 33 2a 52 6f 77 43 6f  75 6e 74 65 72 29 29 20  |(3*RowCounter)) |
0000ab70  88 20 33 0d 2a 44 0f 20  20 e3 20 4e 3d 31 20 b8  |. 3.*D.  . N=1 .|
0000ab80  20 32 0d 2a 4e 3f 20 20  20 20 42 6c 6f 63 6b 21  | 2.*N?    Block!|
0000ab90  30 3d 53 74 61 74 73 3a  42 6c 6f 63 6b 21 34 3d  |0=Stats:Block!4=|
0000aba0  4d 2b 4e 3a c8 99 20 22  57 69 6d 70 5f 47 65 74  |M+N:.. "Wimp_Get|
0000abb0  49 63 6f 6e 53 74 61 74  65 22 2c 2c 42 6c 6f 63  |IconState",,Bloc|
0000abc0  6b 0d 2a 58 18 20 20 20  20 41 3d a0 28 24 28 42  |k.*X.    A=.($(B|
0000abd0  6c 6f 63 6b 2b 32 38 29  29 0d 2a 62 38 20 20 20  |lock+28)).*b8   |
0000abe0  20 e7 20 48 65 78 20 8c  20 24 28 42 6c 6f 63 6b  | . Hex . $(Block|
0000abf0  2b 32 38 29 3d 22 26 22  2b c3 7e 28 41 29 20 8b  |+28)="&"+.~(A) .|
0000ac00  20 24 28 42 6c 6f 63 6b  2b 32 38 29 3d c3 28 41  | $(Block+28)=.(A|
0000ac10  29 0d 2a 6c 4f 20 20 20  20 c8 99 20 22 57 69 6d  |).*lO    .. "Wim|
0000ac20  70 5f 44 65 6c 65 74 65  49 63 6f 6e 22 2c 2c 42  |p_DeleteIcon",,B|
0000ac30  6c 6f 63 6b 3a 42 6c 6f  63 6b 21 34 3d 53 74 61  |lock:Block!4=Sta|
0000ac40  74 73 3a c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |ts:.. "Wimp_Crea|
0000ac50  74 65 49 63 6f 6e 22 2c  2c 42 6c 6f 63 6b 2b 34  |teIcon",,Block+4|
0000ac60  0d 2a 76 46 20 20 20 20  c8 99 20 22 57 69 6d 70  |.*vF    .. "Wimp|
0000ac70  5f 46 6f 72 63 65 52 65  64 72 61 77 22 2c 53 74  |_ForceRedraw",St|
0000ac80  61 74 73 2c 42 6c 6f 63  6b 21 38 2c 42 6c 6f 63  |ats,Block!8,Bloc|
0000ac90  6b 21 31 32 2c 42 6c 6f  63 6b 21 31 36 2c 42 6c  |k!12,Block!16,Bl|
0000aca0  6f 63 6b 21 32 30 0d 2a  80 07 20 20 ed 0d 2a 8a  |ock!20.*..  ..*.|
0000acb0  05 ed 0d 2a 94 05 e1 0d  2a 9e 05 3a 0d 2a a8 35  |...*....*..:.*.5|
0000acc0  dd 20 f2 45 76 61 6c 75  61 74 65 54 65 6d 70 6c  |. .EvaluateTempl|
0000acd0  61 74 65 53 74 61 74 69  73 74 69 63 73 28 54 65  |ateStatistics(Te|
0000ace0  6d 70 6c 61 74 65 73 46  69 6c 65 4e 61 6d 65 24  |mplatesFileName$|
0000acf0  29 0d 2a b2 3a 54 25 3d  53 6c 6f 74 45 6e 64 3a  |).*.:T%=SlotEnd:|
0000ad00  54 25 2b 3d 31 36 3a 4c  61 72 67 65 73 74 57 69  |T%+=16:LargestWi|
0000ad10  6e 64 6f 77 53 69 7a 65  3d 30 3a 4c 61 72 67 65  |ndowSize=0:Large|
0000ad20  73 74 49 6e 64 53 69 7a  65 3d 30 0d 2a bc 1c 52  |stIndSize=0.*..R|
0000ad30  6f 77 43 6f 75 6e 74 65  72 3d 30 3a 42 61 73 65  |owCounter=0:Base|
0000ad40  49 63 6f 6e 3d 31 34 0d  2a c6 2b f2 55 70 64 61  |Icon=14.*.+.Upda|
0000ad50  74 65 49 63 6f 6e 28 53  74 61 74 73 2c 32 2c 54  |teIcon(Stats,2,T|
0000ad60  65 6d 70 6c 61 74 65 73  46 69 6c 65 4e 61 6d 65  |emplatesFileName|
0000ad70  24 29 0d 2a d0 10 c8 95  20 28 54 25 21 30 29 3c  |$).*.... (T%!0)<|
0000ad80  3e 30 0d 2a da 11 20 20  e7 20 54 25 21 38 3c 3e  |>0.*..  . T%!8<>|
0000ad90  31 20 8c 0d 2a e4 2a 20  20 20 20 f4 20 41 20 76  |1 ..*.*    . A v|
0000ada0  61 6c 75 65 20 6f 66 20  31 20 72 65 66 65 72 73  |alue of 1 refers|
0000adb0  20 74 6f 20 61 20 77 69  6e 64 6f 77 2e 0d 2a ee  | to a window..*.|
0000adc0  3b 20 20 20 20 f4 20 28  49 66 20 6e 6f 74 20 31  |;    . (If not 1|
0000add0  2c 20 74 68 65 6e 20 77  65 20 64 6f 6e 27 74 20  |, then we don't |
0000ade0  6b 6e 6f 77 20 77 68 61  74 20 69 74 20 72 65 66  |know what it ref|
0000adf0  65 72 73 20 74 6f 2e 29  0d 2a f8 39 20 20 20 20  |ers to.).*.9    |
0000ae00  f4 20 57 65 20 64 6f 6e  27 74 20 6b 6e 6f 77 20  |. We don't know |
0000ae10  77 68 61 74 20 74 68 69  73 20 72 65 63 6f 72 64  |what this record|
0000ae20  27 73 20 74 61 6c 6b 69  6e 67 20 61 62 6f 75 74  |'s talking about|
0000ae30  2c 0d 2b 02 1e 20 20 20  20 f4 20 73 6f 20 73 6b  |,.+..    . so sk|
0000ae40  69 70 20 74 6f 20 74 68  65 20 6e 65 78 74 2e 0d  |ip to the next..|
0000ae50  2b 0c 3d 20 20 20 20 54  25 2b 3d 32 34 3a f4 20  |+.=    T%+=24:. |
0000ae60  49 6e 63 72 65 6d 65 6e  74 20 62 79 20 74 68 65  |Increment by the|
0000ae70  20 73 69 7a 65 20 6f 66  20 6f 6e 65 20 74 65 6d  | size of one tem|
0000ae80  70 6c 61 74 65 20 72 65  63 6f 72 64 0d 2b 16 07  |plate record.+..|
0000ae90  20 20 cc 0d 2b 20 18 20  20 20 20 e7 20 52 6f 77  |  ..+ .    . Row|
0000aea0  43 6f 75 6e 74 65 72 3d  30 20 8c 0d 2b 2a 53 20  |Counter=0 ..+*S |
0000aeb0  20 20 20 20 20 52 6f 77  43 6f 75 6e 74 65 72 2b  |     RowCounter+|
0000aec0  3d 31 3a f4 20 54 68 65  20 69 63 6f 6e 73 20 66  |=1:. The icons f|
0000aed0  6f 72 20 74 68 65 20 66  69 72 73 74 20 72 6f 77  |or the first row|
0000aee0  20 61 72 65 20 64 65 66  69 6e 65 64 20 69 6e 20  | are defined in |
0000aef0  74 68 65 20 74 65 6d 70  6c 61 74 65 73 2e 0d 2b  |the templates..+|
0000af00  34 09 20 20 20 20 cc 0d  2b 3e 49 20 20 20 20 20  |4.    ..+>I     |
0000af10  20 f4 20 41 6d 65 6e 64  20 77 6f 72 6b 20 61 72  | . Amend work ar|
0000af20  65 61 20 73 69 7a 65 20  61 6e 64 20 73 69 7a 65  |ea size and size|
0000af30  20 6f 66 20 62 6f 75 6e  64 69 6e 67 20 69 63 6f  | of bounding ico|
0000af40  6e 73 20 77 69 74 68 69  6e 20 53 74 61 74 73 3a  |ns within Stats:|
0000af50  0d 2b 48 4a 20 20 20 20  20 20 42 6c 6f 63 6b 21  |.+HJ      Block!|
0000af60  30 3d 2d 31 36 3a 42 6c  6f 63 6b 21 34 3d 2d 35  |0=-16:Block!4=-5|
0000af70  34 32 2d 28 34 38 2a 52  6f 77 43 6f 75 6e 74 65  |42-(48*RowCounte|
0000af80  72 29 3a 42 6c 6f 63 6b  21 38 3d 37 30 32 3a 42  |r):Block!8=702:B|
0000af90  6c 6f 63 6b 21 31 32 3d  31 36 0d 2b 52 29 20 20  |lock!12=16.+R)  |
0000afa0  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |    .. "Wimp_Set|
0000afb0  45 78 74 65 6e 74 22 2c  53 74 61 74 73 2c 42 6c  |Extent",Stats,Bl|
0000afc0  6f 63 6b 0d 2b 5c 18 20  20 20 20 20 20 e3 20 4e  |ock.+\.      . N|
0000afd0  3d 34 20 b8 20 31 33 20  88 20 39 0d 2b 66 41 20  |=4 . 13 . 9.+fA |
0000afe0  20 20 20 20 20 20 20 42  6c 6f 63 6b 21 30 3d 53  |       Block!0=S|
0000aff0  74 61 74 73 3a 42 6c 6f  63 6b 21 34 3d 4e 3a c8  |tats:Block!4=N:.|
0000b000  99 20 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |. "Wimp_GetIconS|
0000b010  74 61 74 65 22 2c 2c 42  6c 6f 63 6b 0d 2b 70 34  |tate",,Block.+p4|
0000b020  20 20 20 20 20 20 20 20  42 6c 6f 63 6b 21 31 32  |        Block!12|
0000b030  2d 3d 34 38 3a c8 99 20  22 57 69 6d 70 5f 44 65  |-=48:.. "Wimp_De|
0000b040  6c 65 74 65 49 63 6f 6e  22 2c 2c 42 6c 6f 63 6b  |leteIcon",,Block|
0000b050  0d 2b 7a 37 20 20 20 20  20 20 20 20 42 6c 6f 63  |.+z7        Bloc|
0000b060  6b 21 34 3d 53 74 61 74  73 3a c8 99 20 22 57 69  |k!4=Stats:.. "Wi|
0000b070  6d 70 5f 43 72 65 61 74  65 49 63 6f 6e 22 2c 2c  |mp_CreateIcon",,|
0000b080  42 6c 6f 63 6b 2b 34 0d  2b 84 0b 20 20 20 20 20  |Block+4.+..     |
0000b090  20 ed 0d 2b 8e 34 20 20  20 20 20 20 f4 20 4e 6f  | ..+.4      . No|
0000b0a0  77 20 63 72 65 61 74 65  20 65 78 74 72 61 20 72  |w create extra r|
0000b0b0  6f 77 73 20 6f 66 20 69  63 6f 6e 73 20 69 6e 20  |ows of icons in |
0000b0c0  53 74 61 74 73 2e 0d 2b  98 36 20 20 20 20 20 20  |Stats..+.6      |
0000b0d0  f4 20 57 65 20 6a 75 73  74 20 63 6f 70 79 20 74  |. We just copy t|
0000b0e0  68 65 20 69 63 6f 6e 73  20 66 72 6f 6d 20 74 68  |he icons from th|
0000b0f0  65 20 72 6f 77 20 61 62  6f 76 65 2e 0d 2b a2 13  |e row above..+..|
0000b100  20 20 20 20 20 20 e3 20  4e 3d 30 20 b8 20 32 0d  |      . N=0 . 2.|
0000b110  2b ac 4a 20 20 20 20 20  20 20 20 42 6c 6f 63 6b  |+.J        Block|
0000b120  21 30 3d 53 74 61 74 73  3a 42 6c 6f 63 6b 21 34  |!0=Stats:Block!4|
0000b130  3d 42 61 73 65 49 63 6f  6e 2b 4e 3a c8 99 20 22  |=BaseIcon+N:.. "|
0000b140  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
0000b150  65 22 2c 2c 42 6c 6f 63  6b 0d 2b b6 3e 20 20 20  |e",,Block.+.>   |
0000b160  20 20 20 20 20 42 6c 6f  63 6b 21 31 32 2d 3d 34  |     Block!12-=4|
0000b170  38 3a 42 6c 6f 63 6b 21  32 30 2d 3d 34 38 3a f4  |8:Block!20-=48:.|
0000b180  20 43 6f 70 79 20 69 63  6f 6e 20 64 6f 77 6e 20  | Copy icon down |
0000b190  6f 6e 65 20 72 6f 77 0d  2b c0 37 20 20 20 20 20  |one row.+.7     |
0000b1a0  20 20 20 42 6c 6f 63 6b  21 34 3d 53 74 61 74 73  |   Block!4=Stats|
0000b1b0  3a c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |:.. "Wimp_Create|
0000b1c0  49 63 6f 6e 22 2c 2c 42  6c 6f 63 6b 2b 34 0d 2b  |Icon",,Block+4.+|
0000b1d0  ca 0b 20 20 20 20 20 20  ed 0d 2b d4 23 20 20 20  |..      ..+.#   |
0000b1e0  20 20 20 52 6f 77 43 6f  75 6e 74 65 72 2b 3d 31  |   RowCounter+=1|
0000b1f0  3a 42 61 73 65 49 63 6f  6e 2b 3d 33 0d 2b de 09  |:BaseIcon+=3.+..|
0000b200  20 20 20 20 cd 0d 2b e8  09 20 20 20 20 3a 0d 2b  |    ..+..    :.+|
0000b210  f2 44 20 20 20 20 42 6c  6f 63 6b 21 30 3d 53 74  |.D    Block!0=St|
0000b220  61 74 73 3a 42 6c 6f 63  6b 21 34 3d 42 61 73 65  |ats:Block!4=Base|
0000b230  49 63 6f 6e 3a c8 99 20  22 57 69 6d 70 5f 47 65  |Icon:.. "Wimp_Ge|
0000b240  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 42 6c 6f  |tIconState",,Blo|
0000b250  63 6b 0d 2b fc 23 20 20  20 20 c8 99 20 22 57 69  |ck.+.#    .. "Wi|
0000b260  6d 70 5f 44 65 6c 65 74  65 49 63 6f 6e 22 2c 2c  |mp_DeleteIcon",,|
0000b270  42 6c 6f 63 6b 0d 2c 06  29 20 20 20 20 24 28 42  |Block.,.)    $(B|
0000b280  6c 6f 63 6b 2b 32 38 29  3d 24 28 54 25 2b 31 32  |lock+28)=$(T%+12|
0000b290  29 3a f4 20 49 64 65 6e  74 69 66 69 65 72 0d 2c  |):. Identifier.,|
0000b2a0  10 33 20 20 20 20 42 6c  6f 63 6b 21 34 3d 53 74  |.3    Block!4=St|
0000b2b0  61 74 73 3a c8 99 20 22  57 69 6d 70 5f 43 72 65  |ats:.. "Wimp_Cre|
0000b2c0  61 74 65 49 63 6f 6e 22  2c 2c 42 6c 6f 63 6b 2b  |ateIcon",,Block+|
0000b2d0  34 0d 2c 1a 09 20 20 20  20 3a 0d 2c 24 29 20 20  |4.,..    :.,$)  |
0000b2e0  20 20 44 61 74 61 3d 53  6c 6f 74 45 6e 64 2b 28  |  Data=SlotEnd+(|
0000b2f0  54 25 21 30 29 3a 44 61  74 61 53 69 7a 65 3d 54  |T%!0):DataSize=T|
0000b300  25 21 34 0d 2c 2e 09 20  20 20 20 3a 0d 2c 38 46  |%!4.,..    :.,8F|
0000b310  20 20 20 20 42 6c 6f 63  6b 21 30 3d 53 74 61 74  |    Block!0=Stat|
0000b320  73 3a 42 6c 6f 63 6b 21  34 3d 42 61 73 65 49 63  |s:Block!4=BaseIc|
0000b330  6f 6e 2b 31 3a c8 99 20  22 57 69 6d 70 5f 47 65  |on+1:.. "Wimp_Ge|
0000b340  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 42 6c 6f  |tIconState",,Blo|
0000b350  63 6b 0d 2c 42 23 20 20  20 20 c8 99 20 22 57 69  |ck.,B#    .. "Wi|
0000b360  6d 70 5f 44 65 6c 65 74  65 49 63 6f 6e 22 2c 2c  |mp_DeleteIcon",,|
0000b370  42 6c 6f 63 6b 0d 2c 4c  59 20 20 20 20 e7 20 48  |Block.,LY    . H|
0000b380  65 78 20 8c 20 24 28 42  6c 6f 63 6b 2b 32 38 29  |ex . $(Block+28)|
0000b390  3d 22 26 22 2b c3 7e 28  44 61 74 61 53 69 7a 65  |="&"+.~(DataSize|
0000b3a0  29 20 8b 20 24 28 42 6c  6f 63 6b 2b 32 38 29 3d  |) . $(Block+28)=|
0000b3b0  c3 28 44 61 74 61 53 69  7a 65 29 3a f4 20 57 69  |.(DataSize):. Wi|
0000b3c0  6e 64 6f 77 20 64 61 74  61 20 73 69 7a 65 0d 2c  |ndow data size.,|
0000b3d0  56 33 20 20 20 20 42 6c  6f 63 6b 21 34 3d 53 74  |V3    Block!4=St|
0000b3e0  61 74 73 3a c8 99 20 22  57 69 6d 70 5f 43 72 65  |ats:.. "Wimp_Cre|
0000b3f0  61 74 65 49 63 6f 6e 22  2c 2c 42 6c 6f 63 6b 2b  |ateIcon",,Block+|
0000b400  34 0d 2c 60 09 20 20 20  20 3a 0d 2c 6a 41 20 20  |4.,`.    :.,jA  |
0000b410  20 20 e7 20 44 61 74 61  53 69 7a 65 3e 4c 61 72  |  . DataSize>Lar|
0000b420  67 65 73 74 57 69 6e 64  6f 77 53 69 7a 65 20 8c  |gestWindowSize .|
0000b430  20 4c 61 72 67 65 73 74  57 69 6e 64 6f 77 53 69  | LargestWindowSi|
0000b440  7a 65 3d 44 61 74 61 53  69 7a 65 0d 2c 74 15 20  |ze=DataSize.,t. |
0000b450  20 20 20 49 63 6f 6e 73  3d 44 61 74 61 21 38 34  |   Icons=Data!84|
0000b460  0d 2c 7e 21 20 20 20 20  49 25 3d 44 61 74 61 2b  |.,~!    I%=Data+|
0000b470  38 38 3a f4 20 49 63 6f  6e 20 70 6f 69 6e 74 65  |88:. Icon pointe|
0000b480  72 0d 2c 88 31 20 20 20  20 4d 61 78 53 69 7a 65  |r.,.1    MaxSize|
0000b490  3d 30 3a f4 20 49 6e 64  69 72 65 63 74 20 64 61  |=0:. Indirect da|
0000b4a0  74 61 20 73 69 7a 65 20  66 6f 72 20 77 69 6e 64  |ta size for wind|
0000b4b0  6f 77 0d 2c 92 27 20 20  20 20 e7 20 28 28 44 61  |ow.,.'    . ((Da|
0000b4c0  74 61 21 35 36 29 20 80  20 28 31 3c 3c 38 29 29  |ta!56) . (1<<8))|
0000b4d0  3d 28 31 3c 3c 38 29 20  8c 0d 2c 9c 23 20 20 20  |=(1<<8) ..,.#   |
0000b4e0  20 20 20 f4 20 54 69 74  6c 65 20 62 61 72 20 69  |   . Title bar i|
0000b4f0  73 20 69 6e 64 69 72 65  63 74 65 64 0d 2c a6 3d  |s indirected.,.=|
0000b500  20 20 20 20 20 20 56 61  6c 69 64 24 3d 22 22 3a  |      Valid$="":|
0000b510  e7 20 28 44 61 74 61 21  37 36 29 3e 3d 30 20 8c  |. (Data!76)>=0 .|
0000b520  20 56 61 6c 69 64 24 3d  24 28 44 61 74 61 2b 28  | Valid$=$(Data+(|
0000b530  44 61 74 61 21 37 36 29  29 0d 2c b0 37 20 20 20  |Data!76)).,.7   |
0000b540  20 20 20 53 69 7a 65 3d  44 61 74 61 21 38 30 3a  |   Size=Data!80:|
0000b550  e7 20 56 61 6c 69 64 24  3c 3e 22 22 20 8c 20 53  |. Valid$<>"" . S|
0000b560  69 7a 65 2b 3d a9 28 56  61 6c 69 64 24 29 2b 31  |ize+=.(Valid$)+1|
0000b570  0d 2c ba 17 20 20 20 20  20 20 4d 61 78 53 69 7a  |.,..      MaxSiz|
0000b580  65 2b 3d 53 69 7a 65 0d  2c c4 09 20 20 20 20 cd  |e+=Size.,..    .|
0000b590  0d 2c ce 13 20 20 20 20  e7 20 49 63 6f 6e 73 3e  |.,..    . Icons>|
0000b5a0  30 20 8c 0d 2c d8 17 20  20 20 20 20 20 e3 20 4e  |0 ..,..      . N|
0000b5b0  3d 31 20 b8 20 49 63 6f  6e 73 0d 2c e2 30 20 20  |=1 . Icons.,.0  |
0000b5c0  20 20 20 20 20 20 49 6e  64 69 72 65 63 74 3d 28  |      Indirect=(|
0000b5d0  28 28 49 25 21 31 36 29  20 80 20 28 31 3c 3c 38  |((I%!16) . (1<<8|
0000b5e0  29 29 3d 28 31 3c 3c 38  29 29 0d 2c ec 2c 20 20  |))=(1<<8)).,.,  |
0000b5f0  20 20 20 20 20 20 54 65  78 74 3d 28 28 28 49 25  |      Text=(((I%|
0000b600  21 31 36 29 20 80 20 28  31 3c 3c 30 29 29 3d 28  |!16) . (1<<0))=(|
0000b610  31 3c 3c 30 29 29 0d 2c  f6 2e 20 20 20 20 20 20  |1<<0)).,..      |
0000b620  20 20 53 70 72 69 74 65  3d 28 28 28 49 25 21 31  |  Sprite=(((I%!1|
0000b630  36 29 20 80 20 28 31 3c  3c 31 29 29 3d 28 31 3c  |6) . (1<<1))=(1<|
0000b640  3c 31 29 29 0d 2d 00 18  20 20 20 20 20 20 20 20  |<1)).-..        |
0000b650  e7 20 49 6e 64 69 72 65  63 74 20 8c 0d 2d 0a 34  |. Indirect ..-.4|
0000b660  20 20 20 20 20 20 20 20  20 20 f4 20 43 6f 75 6e  |          . Coun|
0000b670  74 20 69 6e 64 69 72 65  63 74 20 69 63 6f 6e 73  |t indirect icons|
0000b680  2c 20 69 67 6e 6f 72 65  20 6f 74 68 65 72 73 2e  |, ignore others.|
0000b690  0d 2d 14 16 20 20 20 20  20 20 20 20 20 20 e7 20  |.-..          . |
0000b6a0  54 65 78 74 20 8c 0d 2d  1e 51 20 20 20 20 20 20  |Text ..-.Q      |
0000b6b0  20 20 20 20 20 20 f4 20  54 72 65 61 74 20 69 6e  |      . Treat in|
0000b6c0  64 69 72 65 63 74 20 74  65 78 74 2b 73 70 72 69  |direct text+spri|
0000b6d0  74 65 20 61 6e 64 20 74  65 78 74 2d 6f 6e 6c 79  |te and text-only|
0000b6e0  20 69 63 6f 6e 73 20 69  6e 20 74 68 65 20 73 61  | icons in the sa|
0000b6f0  6d 65 20 77 61 79 3a 0d  2d 28 3f 20 20 20 20 20  |me way:.-(?     |
0000b700  20 20 20 20 20 20 20 56  61 6c 69 64 24 3d 22 22  |       Valid$=""|
0000b710  3a e7 20 28 49 25 21 32  34 29 3e 3d 30 20 8c 20  |:. (I%!24)>=0 . |
0000b720  56 61 6c 69 64 24 3d 24  28 44 61 74 61 2b 28 49  |Valid$=$(Data+(I|
0000b730  25 21 32 34 29 29 0d 2d  32 3b 20 20 20 20 20 20  |%!24)).-2;      |
0000b740  20 20 20 20 20 20 53 69  7a 65 3d 49 25 21 32 38  |      Size=I%!28|
0000b750  3a e7 20 56 61 6c 69 64  24 3c 3e 22 22 20 8c 20  |:. Valid$<>"" . |
0000b760  53 69 7a 65 2b 3d a9 28  56 61 6c 69 64 24 29 2b  |Size+=.(Valid$)+|
0000b770  31 0d 2d 3c 1d 20 20 20  20 20 20 20 20 20 20 20  |1.-<.           |
0000b780  20 4d 61 78 53 69 7a 65  2b 3d 53 69 7a 65 0d 2d  | MaxSize+=Size.-|
0000b790  46 0f 20 20 20 20 20 20  20 20 20 20 cc 0d 2d 50  |F.          ..-P|
0000b7a0  1a 20 20 20 20 20 20 20  20 20 20 20 20 e7 20 53  |.            . S|
0000b7b0  70 72 69 74 65 20 8c 0d  2d 5a 2d 20 20 20 20 20  |prite ..-Z-     |
0000b7c0  20 20 20 20 20 20 20 20  20 f4 20 49 6e 64 69 72  |         . Indir|
0000b7d0  65 63 74 20 73 70 72 69  74 65 2d 6f 6e 6c 79 20  |ect sprite-only |
0000b7e0  69 63 6f 6e 0d 2d 64 1c  20 20 20 20 20 20 20 20  |icon.-d.        |
0000b7f0  20 20 20 20 20 20 53 69  7a 65 3d 49 25 21 32 38  |      Size=I%!28|
0000b800  0d 2d 6e 1f 20 20 20 20  20 20 20 20 20 20 20 20  |.-n.            |
0000b810  20 20 4d 61 78 53 69 7a  65 2b 3d 53 69 7a 65 0d  |  MaxSize+=Size.|
0000b820  2d 78 11 20 20 20 20 20  20 20 20 20 20 20 20 cc  |-x.            .|
0000b830  0d 2d 82 44 20 20 20 20  20 20 20 20 20 20 20 20  |.-.D            |
0000b840  20 20 f4 20 49 6e 64 69  72 65 63 74 20 6e 6f 6e  |  . Indirect non|
0000b850  2d 74 65 78 74 2c 20 6e  6f 6e 2d 73 70 72 69 74  |-text, non-sprit|
0000b860  65 20 69 63 6f 6e 73 20  61 72 65 20 69 67 6e 6f  |e icons are igno|
0000b870  72 65 64 2e 0d 2d 8c 11  20 20 20 20 20 20 20 20  |red..-..        |
0000b880  20 20 20 20 cd 0d 2d 96  0f 20 20 20 20 20 20 20  |    ..-..       |
0000b890  20 20 20 cd 0d 2d a0 0d  20 20 20 20 20 20 20 20  |   ..-..        |
0000b8a0  cd 0d 2d aa 3c 20 20 20  20 20 20 20 20 49 25 2b  |..-.<        I%+|
0000b8b0  3d 33 32 3a f4 20 49 6e  63 72 65 6d 65 6e 74 20  |=32:. Increment |
0000b8c0  62 79 20 74 68 65 20 73  69 7a 65 20 6f 66 20 6f  |by the size of o|
0000b8d0  6e 65 20 69 63 6f 6e 20  62 6c 6f 63 6b 0d 2d b4  |ne icon block.-.|
0000b8e0  0d 20 20 20 20 20 20 ed  20 4e 0d 2d be 09 20 20  |.      . N.-..  |
0000b8f0  20 20 cd 0d 2d c8 09 20  20 20 20 3a 0d 2d d2 46  |  ..-..    :.-.F|
0000b900  20 20 20 20 42 6c 6f 63  6b 21 30 3d 53 74 61 74  |    Block!0=Stat|
0000b910  73 3a 42 6c 6f 63 6b 21  34 3d 42 61 73 65 49 63  |s:Block!4=BaseIc|
0000b920  6f 6e 2b 32 3a c8 99 20  22 57 69 6d 70 5f 47 65  |on+2:.. "Wimp_Ge|
0000b930  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 42 6c 6f  |tIconState",,Blo|
0000b940  63 6b 0d 2d dc 23 20 20  20 20 c8 99 20 22 57 69  |ck.-.#    .. "Wi|
0000b950  6d 70 5f 44 65 6c 65 74  65 49 63 6f 6e 22 2c 2c  |mp_DeleteIcon",,|
0000b960  42 6c 6f 63 6b 0d 2d e6  60 20 20 20 20 e7 20 48  |Block.-.`    . H|
0000b970  65 78 20 8c 20 24 28 42  6c 6f 63 6b 2b 32 38 29  |ex . $(Block+28)|
0000b980  3d 22 26 22 2b c3 7e 28  4d 61 78 53 69 7a 65 29  |="&"+.~(MaxSize)|
0000b990  20 8b 20 24 28 42 6c 6f  63 6b 2b 32 38 29 3d c3  | . $(Block+28)=.|
0000b9a0  28 4d 61 78 53 69 7a 65  29 3a f4 20 49 6e 64 69  |(MaxSize):. Indi|
0000b9b0  72 65 63 74 65 64 20 69  63 6f 6e 20 64 61 74 61  |rected icon data|
0000b9c0  20 73 69 7a 65 0d 2d f0  33 20 20 20 20 42 6c 6f  | size.-.3    Blo|
0000b9d0  63 6b 21 34 3d 53 74 61  74 73 3a c8 99 20 22 57  |ck!4=Stats:.. "W|
0000b9e0  69 6d 70 5f 43 72 65 61  74 65 49 63 6f 6e 22 2c  |imp_CreateIcon",|
0000b9f0  2c 42 6c 6f 63 6b 2b 34  0d 2d fa 09 20 20 20 20  |,Block+4.-..    |
0000ba00  3a 0d 2e 04 4c 20 20 20  20 4c 61 72 67 65 73 74  |:...L    Largest|
0000ba10  49 6e 64 53 69 7a 65 2b  3d 4d 61 78 53 69 7a 65  |IndSize+=MaxSize|
0000ba20  3a f4 20 41 64 64 20 74  68 69 73 20 77 69 6e 64  |:. Add this wind|
0000ba30  6f 77 27 73 20 69 6e 64  69 72 65 63 74 20 73 70  |ow's indirect sp|
0000ba40  61 63 65 20 74 6f 20 74  6f 74 61 6c 2e 0d 2e 0e  |ace to total....|
0000ba50  3d 20 20 20 20 54 25 2b  3d 32 34 3a f4 20 49 6e  |=    T%+=24:. In|
0000ba60  63 72 65 6d 65 6e 74 20  62 79 20 74 68 65 20 73  |crement by the s|
0000ba70  69 7a 65 20 6f 66 20 6f  6e 65 20 74 65 6d 70 6c  |ize of one templ|
0000ba80  61 74 65 20 72 65 63 6f  72 64 0d 2e 18 07 20 20  |ate record....  |
0000ba90  cd 0d 2e 22 05 ce 0d 2e  2c 66 e7 20 48 65 78 20  |..."....,f. Hex |
0000baa0  8c 20 f2 55 70 64 61 74  65 49 63 6f 6e 28 53 74  |. .UpdateIcon(St|
0000bab0  61 74 73 2c 36 2c 22 26  22 2b c3 7e 28 4c 61 72  |ats,6,"&"+.~(Lar|
0000bac0  67 65 73 74 57 69 6e 64  6f 77 53 69 7a 65 29 29  |gestWindowSize))|
0000bad0  20 8b 20 f2 55 70 64 61  74 65 49 63 6f 6e 28 53  | . .UpdateIcon(S|
0000bae0  74 61 74 73 2c 36 2c c3  28 4c 61 72 67 65 73 74  |tats,6,.(Largest|
0000baf0  57 69 6e 64 6f 77 53 69  7a 65 29 29 0d 2e 36 60  |WindowSize))..6`|
0000bb00  e7 20 48 65 78 20 8c 20  f2 55 70 64 61 74 65 49  |. Hex . .UpdateI|
0000bb10  63 6f 6e 28 53 74 61 74  73 2c 38 2c 22 26 22 2b  |con(Stats,8,"&"+|
0000bb20  c3 7e 28 4c 61 72 67 65  73 74 49 6e 64 53 69 7a  |.~(LargestIndSiz|
0000bb30  65 29 29 20 8b 20 f2 55  70 64 61 74 65 49 63 6f  |e)) . .UpdateIco|
0000bb40  6e 28 53 74 61 74 73 2c  38 2c c3 28 4c 61 72 67  |n(Stats,8,.(Larg|
0000bb50  65 73 74 49 6e 64 53 69  7a 65 29 29 0d 2e 40 07  |estIndSize))..@.|
0000bb60  20 20 3a 0d 2e 4a 1c f2  53 68 61 64 65 4d 65 6e  |  :..J..ShadeMen|
0000bb70  75 28 4d 61 69 6e 4d 65  6e 75 2c 31 2c a3 29 0d  |u(MainMenu,1,.).|
0000bb80  2e 54 1c f2 53 68 61 64  65 4d 65 6e 75 28 4d 61  |.T..ShadeMenu(Ma|
0000bb90  69 6e 4d 65 6e 75 2c 33  2c a3 29 0d 2e 5e 07 20  |inMenu,3,.)..^. |
0000bba0  20 3a 0d 2e 68 0f 53 74  61 74 73 4f 70 65 6e 3d  | :..h.StatsOpen=|
0000bbb0  a3 0d 2e 72 25 e7 20 a4  4f 70 65 6e 53 74 61 74  |...r%. .OpenStat|
0000bbc0  65 28 53 74 61 74 73 29  20 8c 20 53 74 61 74 73  |e(Stats) . Stats|
0000bbd0  4f 70 65 6e 3d b9 0d 2e  7c 31 42 6c 6f 63 6b 21  |Open=...|1Block!|
0000bbe0  30 3d 53 74 61 74 73 3a  c8 99 20 22 57 69 6d 70  |0=Stats:.. "Wimp|
0000bbf0  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
0000bc00  2c 2c 42 6c 6f 63 6b 0d  2e 86 1c 42 6c 6f 63 6b  |,,Block....Block|
0000bc10  21 38 2d 3d 28 34 38 2a  52 6f 77 43 6f 75 6e 74  |!8-=(48*RowCount|
0000bc20  65 72 29 0d 2e 90 26 e7  20 42 6c 6f 63 6b 21 38  |er)...&. Block!8|
0000bc30  3c 30 20 8c 20 42 6c 6f  63 6b 21 31 36 2b 3d 28  |<0 . Block!16+=(|
0000bc40  2d 42 6c 6f 63 6b 21 38  29 0d 2e 9a 3c c8 99 20  |-Block!8)...<.. |
0000bc50  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
0000bc60  22 2c 2c 42 6c 6f 63 6b  3a c8 99 20 22 57 69 6d  |",,Block:.. "Wim|
0000bc70  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
0000bc80  42 6c 6f 63 6b 0d 2e a4  2b f4 20 5e 20 4e 65 65  |Block...+. ^ Nee|
0000bc90  64 65 64 20 74 6f 20 65  73 74 61 62 6c 69 73 68  |ded to establish|
0000bca0  20 6e 65 77 20 64 69 6d  65 6e 73 69 6f 6e 73 2e  | new dimensions.|
0000bcb0  0d 2e ae 34 e7 20 53 74  61 74 73 4f 70 65 6e 20  |...4. StatsOpen |
0000bcc0  8c 20 f2 4f 70 65 6e 28  53 74 61 74 73 2c a3 2c  |. .Open(Stats,.,|
0000bcd0  58 50 6f 73 69 74 69 6f  6e 2c 59 50 6f 73 69 74  |XPosition,YPosit|
0000bce0  69 6f 6e 29 0d 2e b8 05  e1 0d 2e c2 05 3a 0d 2e  |ion).........:..|
0000bcf0  cc 13 dd 20 a4 53 61 76  65 53 65 74 74 69 6e 67  |... .SaveSetting|
0000bd00  73 0d 2e d6 07 ea 20 85  0d 2e e0 3c ee 20 85 20  |s..... ....<. . |
0000bd10  ea 20 f7 20 85 3a f2 43  6c 6f 73 65 46 69 6c 65  |. . .:.CloseFile|
0000bd20  49 66 50 6f 73 73 28 44  61 74 61 29 3a 3d a3 3a  |IfPoss(Data):=.:|
0000bd30  f4 20 45 72 72 6f 72 20  77 72 69 74 69 6e 67 20  |. Error writing |
0000bd40  66 69 6c 65 0d 2e ea 07  20 20 3a 0d 2e f4 29 20  |file....  :...) |
0000bd50  20 44 61 74 61 3d ae 20  28 22 3c 46 6f 72 6d 53  | Data=. ("<FormS|
0000bd60  69 7a 65 72 24 44 69 72  3e 2e 53 65 74 74 69 6e  |izer$Dir>.Settin|
0000bd70  67 73 22 29 0d 2e fe 3f  20 20 d5 23 44 61 74 61  |gs")...?  .#Data|
0000bd80  2c 22 7c 20 58 20 61 6e  64 20 59 20 67 72 69 64  |,"| X and Y grid|
0000bd90  20 63 6f 6f 72 64 69 6e  61 74 65 73 20 6f 66 20  | coordinates of |
0000bda0  46 6f 72 6d 20 53 69 7a  65 72 20 77 69 6e 64 6f  |Form Sizer windo|
0000bdb0  77 3a 22 0d 2f 08 19 20  20 d5 23 44 61 74 61 2c  |w:"./..  .#Data,|
0000bdc0  c3 28 58 50 6f 73 69 74  69 6f 6e 29 0d 2f 12 19  |.(XPosition)./..|
0000bdd0  20 20 d5 23 44 61 74 61  2c c3 28 59 50 6f 73 69  |  .#Data,.(YPosi|
0000bde0  74 69 6f 6e 29 0d 2f 1c  4d 20 20 d5 23 44 61 74  |tion)./.M  .#Dat|
0000bdf0  61 2c 22 7c 20 4e 75 6d  62 65 72 20 62 61 73 65  |a,"| Number base|
0000be00  20 6f 66 20 6f 75 74 70  75 74 20 28 2d 31 20 66  | of output (-1 f|
0000be10  6f 72 20 68 65 78 61 64  65 63 69 6d 61 6c 20 6f  |or hexadecimal o|
0000be20  72 20 30 20 66 6f 72 20  64 65 63 69 6d 61 6c 29  |r 0 for decimal)|
0000be30  3a 22 0d 2f 26 13 20 20  d5 23 44 61 74 61 2c c3  |:"./&.  .#Data,.|
0000be40  28 48 65 78 29 0d 2f 30  0c 20 20 d9 23 44 61 74  |(Hex)./0.  .#Dat|
0000be50  61 0d 2f 3a 30 20 20 ff  28 22 53 65 74 74 79 70  |a./:0  .("Settyp|
0000be60  65 20 3c 46 6f 72 6d 53  69 7a 65 72 24 44 69 72  |e <FormSizer$Dir|
0000be70  3e 2e 53 65 74 74 69 6e  67 73 20 54 65 78 74 22  |>.Settings Text"|
0000be80  29 0d 2f 44 07 20 20 3a  0d 2f 4e 06 3d b9 0d 2f  |)./D.  :./N.=../|
0000be90  58 05 3a 0d 2f 62 13 dd  20 a4 4c 6f 61 64 53 65  |X.:./b.. .LoadSe|
0000bea0  74 74 69 6e 67 73 0d 2f  6c 07 ea 20 85 0d 2f 76  |ttings./l.. ../v|
0000beb0  4f ee 20 85 20 ea 20 f7  20 85 3a f2 43 6c 6f 73  |O. . . . .:.Clos|
0000bec0  65 46 69 6c 65 49 66 50  6f 73 73 28 44 61 74 61  |eFileIfPoss(Data|
0000bed0  29 3a 3d a3 3a f4 20 27  53 65 74 74 69 6e 67 73  |):=.:. 'Settings|
0000bee0  27 20 66 69 6c 65 20 69  73 20 64 61 6d 61 67 65  |' file is damage|
0000bef0  64 20 6f 72 20 6d 69 73  73 69 6e 67 0d 2f 80 07  |d or missing./..|
0000bf00  20 20 3a 0d 2f 8a 27 20  20 44 61 74 61 3d 8e 20  |  :./.'  Data=. |
0000bf10  22 3c 46 6f 72 6d 53 69  7a 65 72 24 44 69 72 3e  |"<FormSizer$Dir>|
0000bf20  2e 53 65 74 74 69 6e 67  73 22 0d 2f 94 1d 20 20  |.Settings"./..  |
0000bf30  58 50 6f 73 69 74 69 6f  6e 3d bb 28 a4 4e 65 78  |XPosition=.(.Nex|
0000bf40  74 45 6e 74 72 79 29 0d  2f 9e 1d 20 20 59 50 6f  |tEntry)./..  YPo|
0000bf50  73 69 74 69 6f 6e 3d bb  28 a4 4e 65 78 74 45 6e  |sition=.(.NextEn|
0000bf60  74 72 79 29 0d 2f a8 17  20 20 48 65 78 3d bb 28  |try)./..  Hex=.(|
0000bf70  a4 4e 65 78 74 45 6e 74  72 79 29 0d 2f b2 0c 20  |.NextEntry)./.. |
0000bf80  20 d9 23 44 61 74 61 0d  2f bc 07 20 20 3a 0d 2f  | .#Data./..  :./|
0000bf90  c6 62 20 20 e7 20 58 50  6f 73 69 74 69 6f 6e 3c  |.b  . XPosition<|
0000bfa0  3e 2d 31 20 80 20 59 50  6f 73 69 74 69 6f 6e 3c  |>-1 . YPosition<|
0000bfb0  3e 2d 31 20 8c 20 f2 55  70 64 61 74 65 53 65 6c  |>-1 . .UpdateSel|
0000bfc0  65 63 74 65 64 46 6c 61  67 28 4c 6f 63 2c 36 2b  |ectedFlag(Loc,6+|
0000bfd0  28 28 35 2a 58 50 6f 73  69 74 69 6f 6e 29 2b 28  |((5*XPosition)+(|
0000bfe0  34 2d 59 50 6f 73 69 74  69 6f 6e 29 29 2c b9 29  |4-YPosition)),.)|
0000bff0  0d 2f d0 47 20 20 e7 20  48 65 78 20 8c 20 f2 55  |./.G  . Hex . .U|
0000c000  70 64 61 74 65 49 63 6f  6e 28 53 74 61 74 73 2c  |pdateIcon(Stats,|
0000c010  31 32 2c 22 48 65 78 22  29 20 8b 20 f2 55 70 64  |12,"Hex") . .Upd|
0000c020  61 74 65 49 63 6f 6e 28  53 74 61 74 73 2c 31 32  |ateIcon(Stats,12|
0000c030  2c 22 44 65 63 22 29 0d  2f da 07 20 20 3a 0d 2f  |,"Dec")./..  :./|
0000c040  e4 06 3d b9 0d 2f ee 05  3a 0d 2f f8 16 dd 20 f2  |..=../..:./... .|
0000c050  44 65 66 61 75 6c 74 53  65 74 74 69 6e 67 73 0d  |DefaultSettings.|
0000c060  30 02 1b 58 50 6f 73 69  74 69 6f 6e 3d 33 3a 59  |0..XPosition=3:Y|
0000c070  50 6f 73 69 74 69 6f 6e  3d 33 0d 30 0c 3e f2 55  |Position=3.0.>.U|
0000c080  70 64 61 74 65 53 65 6c  65 63 74 65 64 46 6c 61  |pdateSelectedFla|
0000c090  67 28 4c 6f 63 2c 36 2b  28 28 35 2a 58 50 6f 73  |g(Loc,6+((5*XPos|
0000c0a0  69 74 69 6f 6e 29 2b 28  34 2d 59 50 6f 73 69 74  |ition)+(4-YPosit|
0000c0b0  69 6f 6e 29 29 2c b9 29  0d 30 16 09 48 65 78 3d  |ion)),.).0..Hex=|
0000c0c0  a3 0d 30 20 45 e7 20 48  65 78 20 8c 20 f2 55 70  |..0 E. Hex . .Up|
0000c0d0  64 61 74 65 49 63 6f 6e  28 53 74 61 74 73 2c 31  |dateIcon(Stats,1|
0000c0e0  32 2c 22 48 65 78 22 29  20 8b 20 f2 55 70 64 61  |2,"Hex") . .Upda|
0000c0f0  74 65 49 63 6f 6e 28 53  74 61 74 73 2c 31 32 2c  |teIcon(Stats,12,|
0000c100  22 44 65 63 22 29 0d 30  2a 05 e1 0d ff           |"Dec").0*....|
0000c10d