Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92 » !AWJUL92/Goodies/Wimp/!Convert/!RunImage

!AWJUL92/Goodies/Wimp/!Convert/!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_ArchimedesWorld_199207.adf » !AWJULY92
Filename: !AWJUL92/Goodies/Wimp/!Convert/!RunImage
Read OK:
File size: 5C83 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM                           LIBRARY "<Obey$Dir>.Wimp"
   20                            PROCWimp_Start
   30                            PROCCreate_Windows
   40                            PROCCreate_Icons
   50                            PROCCreate_Menus
   60                            PROCUser_SetInitialData
   70                           PROCWimp_WaitForEvent
   80                           PROCWimp_CloseDown
   90                           END
  100       :
  110       DEF PROCUser_SetInitialData
  120       Type%=-1
  130       BasText%=FALSE
  140       *SET z FFF
  150       line_numbers%=FALSE
  160       ENDPROC
  170       :
  180       DEF PROCCreate_Windows
  190        Info_Window%=FNWimp_WindowLoad("Info")
  200        Save_Window%=FNWimp_WindowLoad("Save")
  210        PROCWimp_WindowBringToTop(Save_Window%)
  220       ENDPROC
  230       :
  240       DEF PROCCreate_Icons
  250       ENDPROC
  260       :
  270       DEF PROCCreate_Menus
  280         Save_Menu%=FNWimp_MenuCreate("!Convert\Info\No Line#")
  290         PROCWimp_MenuGlue(Save_Menu%,1,Info_Window%)
  300         PROCWimp_MenuTick(Save_Menu%,2)
  310         PROCWimp_MenuDisable(Save_Menu%,2)
  320       ENDPROC
  330       :
  340       DEF PROCEvent_WindowClose(window%)
  350       CASE window% OF
  360        WHEN Save_Window%        : finished%=TRUE
  370       ENDCASE
  380       ENDPROC
  390       :
  400       DEF PROCEvent_Draw(window%)
  410       ENDPROC
  420       :
  430       DEF PROCEvent_PopUpMenu(window%,x%,y%)
  440       CASE window% OF
  450        WHEN Save_Window% : PROCWimp_MenuPopUp(Save_Menu%,x%,y%)
  460       ENDCASE
  470       ENDPROC
  480       :
  490       DEF PROCEvent_MouseClick(button%,window%,icon%,x%,y%)
  500       ENDPROC
  510       :
  520       DEF PROCEvent_MenuChoice(menu%)
  530        CASE menu% OF
  540         WHEN Save_Menu%
  550          IF FNWimp_MenuChoice(0)=2 THEN
  560           PROCWimp_MenuTick(Save_Menu%,2)
  570           line_numbers%=NOT(line_numbers%)
  580          ENDIF
  590        ENDCASE
  600        PROCWimp_MenuAdjustOn(Save_Menu%)
  610       ENDPROC
  620       :
  630       DEF FNEvent_Save(window%)
  640         CASE window% OF
  650           WHEN Save_Window% :=TRUE
  660           OTHERWISE :=FALSE
  670         ENDCASE
  680       :
  690       DEF PROCEvent_SaveFile(file$,window%)
  700         CASE window% OF
  710          WHEN Save_Window%
  720           CASE Type% OF
  730            WHEN 0 : PROCBasicToText(f$,file$)
  740            WHEN 1 : PROCTextToBasic(f$,file$)
  750           ENDCASE
  760         ENDCASE
  770       ENDPROC
  780:
  790DEF PROCBasicToText(f$,g$)
  800LOCAL x$
  810 OSCLI("SET y "+g$)
  820 *SET Alias$Twin SetEval x1 ("%*0"RIGHT(LEN"%*0"-1))LEFT8|MSetEval x2 ("%*0"RIGHT(LEN"%*0"-10))LEFT8|MSet Alias$x Save |<y> |<x1> |<x2>||MSetType |<y> |<z>||MBasic @|<x1>,|<x2>|Mx
  830 x$=" "
  840 CASE line_numbers% OF
  850  WHEN TRUE : x$=" "
  860  OTHERWISE : x$="O8 "
  870 ENDCASE
  880 OSCLI("*KEY12 TTWIN"+x$+"|mQUIT|m"+x$)
  890 $wimp%=f$
  900 SYS "Wimp_CommandWindow",wimp%
  910 *ECHO To convert Basic file to text,press Key F12!
  920 x$=GET$
  930 OSCLI("BASIC -load "+f$)
  940 SYS "Wimp_CommandWindow",0
  950ENDPROC
  960:
  970DEF PROCTextToBasic(f$,g$)
  980 OSCLI("*KEY12 SSAVE """+g$+"""|mQUIT|m")
  990 $wimp%=f$
 1000 SYS "Wimp_CommandWindow",wimp%
 1010 *ECHO To convert Text file to Basic, press Key F12!
 1020 x$=GET$
 1030 OSCLI("BASIC -load "+f$)
 1040 SYS "Wimp_CommandWindow",0
 1050ENDPROC
 1060:
 1070       DEF PROCEvent_LoadFile(file$,type$)
 1080       CASE type$ OF
 1090        WHEN "Basic" :
 1100         Type%=0
 1110         PROCMessage
 1120         PROCWimp_IconPutSprite(Save_Window%,0,"file_FFF")
 1130         PROCWimp_MenuEnable(Save_Menu%,2)
 1140         f$=file$:
 1150        WHEN "Text","FD1"  :
 1160         Type%=1
 1170         PROCMessage
 1180         PROCWimp_IconPutSprite(Save_Window%,0,"file_FFB")
 1190         PROCWimp_MenuDisable(Save_Menu%,2)
 1200         f$=file$
 1210       ENDCASE
 1220       ENDPROC
 1230:
 1240       DEF PROCMessage
 1250       PROCWimp_IconPutText(Save_Window%,1,file$)
 1260       PROCWimp_IconCaret(Save_Window%,1,LENfile$)
 1270       CASE Type% OF
 1280       WHEN 0 :
 1290       PROCWimp_IconPutText(Save_Window%,3,"Basic to Text")
 1300       WHEN 1 :
 1310       PROCWimp_IconPutText(Save_Window%,3,"Text to Basic")
 1320       ENDCASE
 1330       PROCWimp_IconPutText(Save_Window%,4,"Drag file icon to" )
 1340       PROCWimp_IconPutText(Save_Window%,5,"filer.")
 1350       ENDPROC
 1360REM|_________________________________________________________________________
 1370REM|_________________________________________________________________________
 1380REM|_________________________________________________________________________
 1390REM|
 1400REM|
 1410REM|
 1420REM|                -------------------------------          6/1/92
 1430REM|                   WIMP PROCEDURE LIBRARY
 1440REM|
 1450REM|                     Index of Contents
 1460REM|
 1470REM|                -------------------------------
 1480REM|
 1490REM|                    1.EVALWindows
 1500REM|
 1510REM|                    2.EVALIcons
 1520REM|
 1530REM|                    3.EVALMenus
 1540REM|
 1550REM|                    4.EVALSprites
 1560REM|
 1570REM|                    5.EVALFiles
 1580REM|
 1590REM|                    6.EVALMiscellaneous
 1600REM|
 1610REM|                -------------------------------
 1620REM|
 1630REM|
 1640REM|
 1650REM|
 1660REM|
 1670REM|
 1680REM|                -------------------------------
 1690REM|                          1.EVALWindows
 1700REM|                -------------------------------
 1710REM|
 1720REM|
 1730REM|          ------------------------------------------------
 1740REM|
 1750REM|                      Procedures :
 1760REM|
 1770REM|             PROCWimp_WindowAlert(title$,message$)
 1780REM|             PROCWimp_WindowAlertBox(title$,message$,button%)
 1790REM|             FNWimp_WindowCancel(title$,message$)
 1800REM|             PROCWimp_WindowErrorBox(title$,message$)
 1810REM|             FNWimp_WindowTitle(window%)
 1820REM|             FNWimp_WindowLoad(window$)
 1830REM|             FNWimp_WindowLoadFrom(window$,template$)
 1840REM|             FNWimp_WindowXOrigin
 1850REM|             FNWimp_WindowYOrigin
 1860REM|             PROCWimp_WindowBringToTop(window%)
 1870REM|             PROCWimp_WindowForceDraw(window%)
 1880REM|             PROCWimp_WindowOpen(window%)
 1890REM|             PROCWimp_Draw(x,y)
 1900REM|             PROCWimp_Move(x,y)
 1910REM|             PROCWimp_Line(x,y,x1,y1)
 1920REM|
 1930REM|           ----------------------------------------------
 1940REM|
 1950REM|
 1960REM|
 1970DEF PROCWimp_WindowAlert(title$,message$)
 1980PROCWimp_WindowAlertBox(title$,message$,0)
 1990ENDPROC
 2000:
 2010DEF PROCWimp_WindowAlertBox(title$,message$,button%)
 2020LOCAL response%
 2030$(wimp%+4)=message$
 2040CASE button% OF
 2050 WHEN 2    : response%=1
 2060 WHEN 1    : response%=15
 2070 WHEN 3    : response%=(1<<5)+16
 2080 WHEN 4    : response%=(1<<6)+16
 2090OTHERWISE : response%=16
 2100ENDCASE
 2110SYS "Wimp_ReportError",wimp%,response%,title$ TO ,response%
 2120ENDPROC
 2130:
 2140DEF FNWimp_WindowCancel(title$,message$)
 2150$(wimp%+4)=message$
 2160response%=23
 2170SYS "Wimp_ReportError",wimp%,response%,title$ TO ,response%
 2180=response%-2
 2190:
 2200DEF PROCWimp_WindowErrorBox(title$,message$)
 2210PROCWimp_WindowAlertBox(title$,message$,2)
 2220ENDPROC
 2230:
 2240DEF FNWimp_WindowTitle(window%)
 2250wimp%!0=window%
 2260SYS "Wimp_GetWindInfo",,wimp%
 2270IF ((wimp%!60)AND&100)=0 ERROR 1,"Title isn't indirected"
 2280=$(wimp%!76)
 2290:
 2300DEF FNWimp_WindowLoad(window$)
 2310=FNWimp_WindowLoadFrom(window$,"<Obey$Dir>.Templates")
 2320:
 2330DEF FNWimp_WindowLoadFrom(window$,template$)
 2340LOCAL c%
 2350SYS "Wimp_OpenTemplate",,template$
 2360SYS "Wimp_LoadTemplate",,wimp%,icons%,icon_memory%,-1,window$,0 TO ,,icons%
 2370IF sprites%<>0 THEN wimp%!64=sprites%
 2380SYS "Wimp_CreateWindow",,wimp% TO c%
 2390SYS "Wimp_CloseTemplate"
 2400=c%
 2410:
 2420DEF FNWimp_WindowXOrigin
 2430=16+wimp%!4-wimp%!20
 2440:
 2450DEF FNWimp_WindowYOrigin
 2460=-16+wimp%!16-wimp%!24
 2470:
 2480DEF PROCWimp_WindowBringToTop(window%)
 2490!wimp%=window%
 2500SYS "Wimp_GetWindowState",,wimp%
 2510wimp%!28=-1
 2520SYS "Wimp_OpenWindow",,wimp%
 2530ENDPROC
 2540:
 2550DEF  PROCWimp_WindowClose(window%)
 2560!wimp%=window%
 2570SYS "Wimp_CloseWindow",,wimp%
 2580ENDPROC
 2590:
 2600DEF PROCWimp_WindowForceDraw(window%)
 2610CASE window% OF
 2620 WHEN -1   : SYS "Wimp_ForceRedraw",-1,0,0,2*1280,2*1024
 2630 OTHERWISE : SYS "Wimp_ForceRedraw",window%,0,-2*1024,2*1280,0
 2640ENDCASE
 2650ENDPROC
 2660:
 2670DEF PROCWimp_WindowOpen(window%)
 2680!wimp%=window%
 2690SYS "Wimp_GetWindowState",,wimp%
 2700SYS "Wimp_OpenWindow",,wimp%
 2710ENDPROC
 2720:
 2730DEF PROCWimp_Draw(x,y)
 2740 DRAW x-x_origin%,y-y_origin%
 2750ENDPROC
 2760:
 2770DEF PROCWimp_Move(x,y)
 2780 MOVE x-x_origin%,y_origin%-y
 2790ENDPROC
 2800:
 2810DEF PROCWimp_Line(x,y,x1,y1)
 2820 LINE x-x_origin%,y-y_origin%,x1-x_origin%,y1-y_origin%
 2830ENDPROC
 2840:
 2850REM|
 2860REM|
 2870REM|
 2880REM|                  -------------------------
 2890REM|                          2.EVALIcons
 2900REM|                  -------------------------
 2910REM|
 2920REM|
 2930REM|             ------------------------------------------
 2940REM|
 2950REM|                      Procedures :
 2960REM|
 2970REM|              FNWimp_IconBar(Sprite$)
 2980REM|              PROCWimp_IconCaret(window%,icon%,chars%)
 2990REM|              FNWimp_IconText(window%,icon%)
 3000REM|              FNWimp_IconValidation(window%,icon%)
 3010REM|              PROCWimp_IconDisable(window%,icon%)
 3020REM|              PROCWimp_IconEnable(window%,icon%)
 3030REM|              FNWimp_IconPutSprite(window%,icon%,sprite$)
 3040REM|              PROCWimp_IconPutText(window%,icon%,text$)
 3050REM|
 3060REM|             ------------------------------------------
 3070REM|
 3080:
 3090DEF FNWimp_IconBar(Sprite$)
 3100LOCAL icon%
 3110wimp%!0=-1
 3120wimp%!4=0     : wimp%!8=0
 3130wimp%!12=68 : wimp%!16=68
 3140wimp%!20=&3002
 3150$(wimp%+24)=Sprite$
 3160SYS "Wimp_CreateIcon",,wimp% TO icon%
 3170=icon%
 3180:
 3190DEF PROCWimp_IconCaret(window%,icon%,chars%)
 3200SYS "Wimp_SetCaretPosition",window%,icon%,,,-1,chars%
 3210ENDPROC
 3220:
 3230DEF FNWimp_IconText(window%,icon%)
 3240wimp%!0=window% : wimp%!4=icon%
 3250SYS "Wimp_GetIconState",,wimp%
 3260IF ((wimp%!24) AND &100)=0 ERROR 1,"Icon isn't indirected"
 3270=$(wimp%!28)
 3280:
 3290DEF FNWimp_IconValidation(window%,icon%)
 3300wimp%!0=window% : wimp%!4=icon%
 3310SYS "Wimp_GetIconState",,wimp%
 3320IF ((wimp%!24) AND &100)=0 ERROR 1,"Icon isn't indirected"
 3330=$(wimp%!32)
 3340:
 3350DEF PROCWimp_IconDisable(window%,icon%)
 3360wimp%!0=window% : wimp%!4=icon%
 3370wimp%!8=1<<22   : wimp%!12=1<<22
 3380SYS "Wimp_SetIconState",,wimp%
 3390ENDPROC
 3400:
 3410DEF PROCWimp_IconEnable(window%,icon%)
 3420wimp%!0=window% : wimp%!4=icon%
 3430wimp%!8=0       : wimp%!12=1<<22
 3440SYS "Wimp_SetIconState",,wimp%
 3450ENDPROC
 3460:
 3470DEF PROCWimp_IconPutSprite(window%,icon%,sprite$)
 3480wimp%!0=window%:wimp%!4=icon%
 3490SYS "Wimp_GetIconState",,wimp%
 3500SYS "Wimp_DeleteIcon",,wimp%
 3510wimp%!4=wimp%!8   : wimp%!8=wimp%!12  : wimp%!12=wimp%!16
 3520wimp%!16=wimp%!20 : wimp%!20=wimp%!24 : $(wimp%+24)=sprite$
 3530SYS "Wimp_CreateIcon",,wimp% TO icon%
 3540SYS "Wimp_ForceRedraw",wimp%!0,wimp%!4,wimp%!8,wimp%!12,wimp%!16
 3550ENDPROC
 3560:
 3570DEF PROCWimp_IconPutText(window%,icon%,text$)
 3580LOCAL x$
 3590wimp%!0=window% : wimp%!4=icon%
 3600SYS "Wimp_GetIconState",,wimp%
 3610IF ((wimp%!24) AND &100)=0 ERROR 1,"Icon isn't indirected"
 3620$(wimp%!28)=text$
 3630wimp%!0=window% : wimp%!4=icon%
 3640wimp%!8=0 : wimp%!12=0
 3650SYS "Wimp_SetIconState",,wimp%
 3660ENDPROC
 3670:
 3680REM|
 3690REM|
 3700REM|
 3710REM|                  -------------------------
 3720REM|                          3.EVALMenus
 3730REM|                  -------------------------
 3740REM|
 3750REM|
 3760REM|           ----------------------------------------------
 3770REM|
 3780REM|                      Procedures :
 3790REM|
 3800REM|
 3810REM|            PROCWimp_MenuAdjustOn(menu%)
 3820REM|            FNWimp_MenuChoice(level%)
 3830REM|            FNWimp_MenuCreate(menu$)
 3840REM|            FNWimp_MenuColours
 3850REM|            FNWimp_MenuCreateColours(title$)
 3860REM|            FNWimp_MenuNoOfEntries(menu$)
 3870REM|            PROCWimp_MenuBackGroundColour(menu%,item%,colour%)
 3880REM|            PROCWimp_MenuCentre(menu%,item%)
 3890REM|            PROCWimp_MenuClose
 3900REM|            PROCWimp_MenuDisable(menu%,item%)
 3910REM|            PROCWimp_MenuDottedLine(menu%,item%)
 3920REM|            PROCWimp_MenuEnable(menu%,item%)
 3930REM|            PROCWimp_MenuForegroundColour(menu%,item%,colour%)
 3940REM|            PROCWimp_MenuGlue(menu1%,item%,menu2%)
 3950REM|            PROCWimp_MenuItem(menu%,item%,item$)
 3960REM|            PROCWimp_MenuMessage(menu%,item%)
 3970REM|            PROCWimp_MenuPopUp(Menu%,x%,y%)
 3980REM|            PROCWimp_MenuPopUpBar(x%,y%)
 3990REM|            PROCWimp_MenuTick(menu%,item%)
 4000REM|            PROCWimp_MenuTitle(menu%,title$)
 4010REM|            PROCWimp_MenuWrite(menu%,item%,buffer%,val%,BufferLength%)
 4020REM|
 4030REM|           ----------------------------------------------
 4040REM|
 4050:
 4060DEF PROCWimp_MenuAdjustOn(menu%)
 4070SYS "Wimp_GetPointerInfo",,pointer_block%
 4080IF ((pointer_block%!8)AND1)=1 THEN SYS "Wimp_CreateMenu",,menu%,pointer_block%!0,pointer_block%!4
 4090ENDPROC
 4100:
 4110DEF FNWimp_MenuChoice(level%)
 4120=(wimp%!(4*level%))+1
 4130:
 4140DEF FNWimp_MenuCreate(menu$)
 4150IF menu$="Colours" THEN=FNWimp_MenuColours
 4160LOCAL menu%,index%,width%,length%,k%,s%
 4170DIM menu% 28+FNWimp_MenuNoOfEntries(menu$)*24
 4180menu%?12=7   : menu%?13=2  : menu%?14=7 :menu%?15=0
 4190menu%!16=140 : menu%!20=44 : menu%!24=0
 4200index%=menu%+28
 4210$menu%=LEFT$(menu$,INSTR(menu$,"\")-1)
 4220width%=LEN(LEFT$(menu$,INSTR(menu$,"\")-1))
 4230menu$+="\" : Menu_NoOfEntries%=0
 4240WHILE menu$<>""
 4250menu$=MID$(menu$,INSTR(menu$,"\")+1)
 4260CASE menu$ OF
 4270 WHEN ""
 4280 OTHERWISE :
 4290  !index%=0 : index%!4=-1 : index%!8=&7000021
 4300  length%=INSTR(menu$,"\")-1
 4310  k%=INSTR(LEFT$(menu$,length%),">")
 4320  CASE k% OF
 4330   WHEN 0
 4340   OTHERWISE
 4350    s%=EVAL(MID$(menu$,k%+1,length%-k%))
 4360    index%!4=s%
 4370    length%=k%-1
 4380  ENDCASE
 4390  $(index%+12)=LEFT$(menu$,length%)
 4400  IF length%>width% THEN width%=length%
 4410  index%+=24
 4420ENDCASE
 4430ENDWHILE
 4440menu%!16=16*(width%+1)
 4450index%!-24=index%!-24 OR &80 : =menu%
 4460:
 4470DEF FNWimp_MenuColours
 4480=FNWimp_MenuCreateColours(" ")
 4490:
 4500DEF FNWimp_MenuCreateColours(title$)
 4510LOCAL x$,men%,j%,i%
 4520x$=title$+"\0\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15"
 4530men%=FNWimp_MenuCreate(x$)
 4540FOR i%=0 TO 15
 4550CASE TRUE OF
 4560WHEN i%<4,i%=9,i%=12,i%=14,i%=15 : j%=7
 4570OTHERWISE : j%=0
 4580ENDCASE
 4590men%?(39+i%*24)=i%*16+j%
 4600PROCWimp_MenuCentre(men%,i%+1)
 4610NEXT
 4620=men%
 4630:
 4640DEF FNWimp_MenuNoOfEntries(menu$)
 4650LOCAL n% ,j% : n%=0 : j%=0
 4660REPEAT
 4670j%=INSTR(menu$,"\",j%+1)
 4680IF j%<>0 THEN n%+=1
 4690UNTIL j%=0
 4700=n%
 4710:
 4720DEF PROCWimp_MenuBackGroundColour(menu%,item%,colour%)
 4730LOCAL fore%,i%
 4740fore%=(menu%?(39+(item%-1)*24))MOD16
 4750i%=((menu%?(39+(item%-1)*24))DIV16)MOD16
 4760menu%?(39+(item%-1)*24)=fore%+16*colour%+i%
 4770ENDPROC
 4780:
 4790DEF PROCWimp_MenuCentre(menu%,item%)
 4800menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)OR(1<<3)
 4810ENDPROC
 4820:
 4830DEF PROCWimp_MenuClose
 4840SYS "Wimp_CreateMenu",-1
 4850ENDPROC
 4860:
 4870DEF PROCWimp_MenuDisable(menu%,item%)
 4880menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)OR(1<<22)
 4890ENDPROC
 4900:
 4910DEF PROCWimp_MenuDottedLine(menu%,item%)
 4920menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))OR2
 4930ENDPROC
 4940:
 4950DEF PROCWimp_MenuEnable(menu%,item%)
 4960PROCWimp_MenuDisable(menu%,item%)
 4970menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)EOR(1<<22)
 4980ENDPROC
 4990:
 5000DEF PROCWimp_MenuForegroundColour(menu%,item%,colour%)
 5010menu%?(39+(item%-1)*24)=colour%+16*((menu%?(39+(item%-1)*24))DIV16)
 5020ENDPROC
 5030:
 5040DEF PROCWimp_MenuGlue(menu1%,item%,menu2%)
 5050menu1%!(8+item%*24)=menu2%
 5060ENDPROC
 5070:
 5080DEF PROCWimp_MenuItem(menu%,item%,item$)
 5090$(menu%+(40+(item%-1)*24))=LEFT$(item$,12)+CHR$0
 5100ENDPROC
 5110:
 5120DEF PROCWimp_MenuMessage(menu%,item%)
 5130menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))EOR(1<<3)
 5140ENDPROC
 5150:
 5160DEF PROCWimp_MenuPopUp(Menu%,x%,y%)
 5170menu%=Menu%
 5180SYS "Wimp_CreateMenu",,menu%,x%-64,y%+20
 5190ENDPROC
 5200:
 5210DEF PROCWimp_MenuPopUpBar(x%,y%)
 5220LOCAL n% : n%=0
 5230WHILE ((Bar_Menu%!(28+n%*24))AND%10000000)=0
 5240n%+=1
 5250ENDWHILE
 5260SYS "Wimp_CreateMenu",,Bar_Menu%,x%-64,96+n%*44
 5270menu%=Bar_Menu%
 5280ENDPROC
 5290:
 5300DEF PROCWimp_MenuTick(menu%,item%)
 5310menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))EOR1
 5320ENDPROC
 5330:
 5340DEF PROCWimp_MenuTitle(menu%,title$)
 5350$menu%=LEFT$(title$,12)+CHR$0
 5360ENDPROC
 5370:
 5380DEF PROCWimp_MenuWrite(menu%,item%,buffer%,val%,BufferLength%)
 5390menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))OR4
 5400menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)OR&100
 5410menu%!(40+(item%-1)*24)=buffer%
 5420menu%!(44+(item%-1)*24)=val%
 5430menu%!(48+(item%-1)*24)=BufferLength%
 5440ENDPROC
 5450REM|
 5460REM|
 5470REM|
 5480REM|                  -------------------------
 5490REM|                          4.EVALSprites
 5500REM|                  -------------------------
 5510REM|
 5520REM|
 5530REM|                ------------------------------------
 5540REM|
 5550REM|                      Procedures :
 5560REM|
 5570REM|
 5580REM|                  PROCWimp_SpritesLoad
 5590REM|                  PROCWimp_SpritesPathLoad(pathname$
 5600REM|
 5610REM|
 5620REM|
 5630REM|                ------------------------------------
 5640REM|
 5650:
 5660DEF PROCWimp_SpritesLoad
 5670PROCWimp_SpritesPathLoad("<Obey$Dir>.Sprites")
 5680ENDPROC
 5690:
 5700DEF PROCWimp_SpritesPathLoad(pathname$)
 5710LOCALS%,T%
 5720S%=OPENIN"<Obey$Dir>.Sprites":T%=EXT#S%+16:CLOSE#S%
 5730DIMsprites%T%,spname%12
 5740!sprites%=T%:sprites%!8=0
 5750SYS"OS_SpriteOp",&109,sprites%
 5760SYS"OS_SpriteOp",&10A,sprites%,pathname$
 5770ENDPROC
 5780:
 5790REM|
 5800REM|
 5810REM|
 5820REM|                  -------------------------
 5830REM|                          5.EVALFiles
 5840REM|                  -------------------------
 5850REM|
 5860REM|
 5870REM|                -------------------------------
 5880REM|
 5890REM|                      Procedures :
 5900REM|
 5910REM|
 5920REM|                  FNWimp_FileType(type%)
 5930REM|                  FNWimp_GetFilePathName
 5940REM|                  FNWimp_FileLoad(pathname$)
 5950REM|                  FNWimp_GetStringAtAddress(array%)
 5960REM|                  FNWimp_GetFileFromPathname(f$)
 5970REM|                  PROCWimp_SendToEdit(file$)
 5980REM|
 5990REM|                -------------------------------
 6000REM|
 6010REM|
 6020REM|
 6030:
 6040DEF FNWimp_FileType(type%)
 6050CASEtype%OF
 6060WHEN&FFF:="Text"
 6070WHEN&FFD:="Data"
 6080WHEN&FFB:="Basic"
 6090WHEN&FF9:="Sprite"
 6100WHEN&FED:="Palette"
 6110WHEN&FEC:="Template"
 6120WHEN&AFF:="Draw"
 6130WHEN&1000:="Folder"
 6140WHEN&2000:="Application"
 6150OTHERWISE=STR$~(type%)
 6160ENDCASE
 6170:
 6180DEF FNWimp_GetFilePathName
 6190=FNWimp_GetStringAtAddress(wimp%+44)
 6200:
 6210DEF FNWimp_FileLoad(pathname$)
 6220LOCALS%,T%,file%
 6230S%=OPENINpathname$
 6240T%=EXT#S%+16
 6250CLOSE#S%
 6260DIMfile%T%
 6270OSCLI("LOAD"+pathname$+""+STR$~file%)
 6280=file%
 6290;
 6300DEF FNWimp_GetStringAtAddress(array%)
 6310LOCALs$:s$=""
 6320WHILE(?array%<>13)AND(?array%<>0):s$+=CHR$(?array%):array%+=1:ENDWHILE:
 6330=s$
 6340:
 6350DEF FNWimp_GetFileFromPathname(f$)
 6360CASE INSTR(f$,".") OF
 6370 WHEN 0    :=f$
 6380 OTHERWISE :=FNWimp_GetFileFromPathname(RIGHT$(f$,LEN(f$)-INSTR(f$,".")))
 6390ENDCASE
 6400:
 6410DEF PROCWimp_SendToEdit(file$)
 6420LOCAL n%
 6430wimp%!4=&6CC01C0C
 6440wimp%!16=5
 6450wimp%!36=0
 6460wimp%!40=&FFF
 6470$(wimp%+44)=file$+CHR$0
 6480n%=LENfile$+45
 6490IF n%MOD4 THEN !wimp%=4+(n%>>2)<<2 ELSE !wimp%=n%
 6500SYS "Wimp_SendMessage",17,wimp%,0
 6510ENDPROC
 6520:
 6530REM|
 6540REM|
 6550REM|
 6560REM|                  -------------------------
 6570REM|                      6.EVALMiscellaneous
 6580REM|                  -------------------------
 6590REM|
 6600REM|
 6610REM|                -------------------------------
 6620REM|
 6630REM|                      Procedures :
 6640REM|
 6650REM|
 6660REM|                  PROCWimp_Start
 6670REM|                  FNWimp_BASICParameters
 6680REM|                  PROCWimp_SetEventVariables
 6690REM|                  PROCWimp_Error(task%,TaskName$)
 6700REM|                  PROCWimp_CloseDown
 6710REM|                  PROCWimp_Quit
 6720REM|                  FNWimp_ReadVariable(Variable$)
 6730REM|
 6740REM|
 6750REM|                -------------------------------
 6760REM|
 6770:
 6780DEF PROCWimp_Start
 6790LOCAL version%
 6800PROCWimp_SetEventVariables
 6810ON ERROR PROCWimp_Error(task%,task$):END
 6820$wimp%="TASK"
 6830SYS"Wimp_Initialise",200,!wimp%,task$ TO version%,task%
 6840ENDPROC
 6850:
 6860DEF FNWimp_BASICParameters
 6870 LOCAL com$,param$,I%
 6880 SYS "OS_GetEnv" TO com$
 6890 params$=""
 6900 I%=INSTR(com$," -quit ")
 6910 IF I% THEN params$=MID$(com$,INSTR(com$," ",I%+LEN" -quit ")+1)
 6920=params$
 6930:
 6940DEF PROCWimp_SetEventVariables
 6950task$=FNWimp_BASICParameters
 6960wimp_memory%=VAL(task$)
 6970CASE wimp_memory% OF
 6980 WHEN 0 :
 6990  wimp_memory%=&1000
 7000  icon_memory%=0
 7010 OTHERWISE
 7020  icon_memory%=INSTR(task$,STR$(wimp_memory%))
 7030  icon_memory%=INSTR(task$," ",icon_memory%)
 7040  icon_memory%=VAL(RIGHT$(task$,LENtask$-icon_memory%))
 7050ENDCASE
 7060DIM wimp% wimp_memory%,icons% icon_memory%
 7070DIM pointer_block% 20
 7080icon_memory%=icons%+icon_memory%
 7090null%=1  :draw%=2 :  pointer_leaving%=1<<4
 7100pointer_entering%=1<<5:mouse%=1<<6:drag%=1<<7
 7110key%=1<<8:menu%=1<<9:scroll%=1<<10
 7120lose_caret%=1<<11:gain_caret%=1<<12:message%=(1<<17)+(1<<18)
 7130recorder%=1<<18:acknowledge%=1<<19:window%=0
 7140sprites%=0:version%=0:task%=0
 7150Bar_Window%=-2:Bar_Icon%=0:Bar_Menu%=0
 7160x_origin%=0:y_origin%=0:SaveWindow%=-3
 7170message_quit%=0:message_save%=2:message_load%=3
 7180mouse_button%=2:save_event%=0
 7190top_line%=0 : bottom_line%=0
 7200task$=FNWimp_ReadVariable("Obey$Dir")
 7210task$=FNWimp_GetFileFromPathname(task$)
 7220ENDPROC
 7230:
 7240DEF PROCWimp_Error(task%,TaskName$)
 7250LOCALX$,x%
 7260ON ERROR OFF
 7270x%=ERL
 7280X$=REPORT$+"atline"+STR$(x%DIV10)
 7290DIMErrorMsg%36
 7300ErrorMsg%!0=36:ErrorMsg%!12=0:ErrorMsg%!16=&81080:ErrorMsg%!20=x%:$(ErrorMsg%+24)="!RunImage":SYS"Wimp_SendMessage",17,ErrorMsg%
 7310PROCWimp_WindowAlert(TaskName$,X$)
 7320PROCWimp_CloseDown
 7330ENDPROC
 7340:
 7350DEF PROCWimp_CloseDown
 7360SYS"Wimp_CloseDown",task%,"TASK"
 7370ENDPROC
 7380:
 7390DEF PROCWimp_Quit
 7400 finished%=TRUE
 7410ENDPROC
 7420:
 7430DEF FNWimp_ReadVariable(Variable$)
 7440LOCALlen%,result%,variable%
 7450$wimp%=Variable$
 7460SYS"OS_ReadVarVal",wimp%,wimp%+255,255,,3TO,,len%
 7470wimp%?(len%+255)=13
 7480=$(wimp%+255)
 7490:
 7500REM|
 7510REM|
 7520REM|
 7530REM|
 7540REM|                   ----------------
 7550REM|                     Wimp Polling
 7560REM|                   ----------------
 7570REM|
 7580REM|
 7590:
 7600DEF PROCWimp_WaitForEvent
 7610finished%=FALSE
 7620mask%=%111000011001
 7630REPEAT
 7640 SYS"Wimp_Poll",mask%,wimp% TO event%
 7650 CASE event% OF
 7660  WHEN 0:
 7670  WHEN 1: SYS"Wimp_RedrawWindow",,wimp%TOmore%
 7680          x_origin%=FNWimp_WindowXOrigin
 7690          y_origin%=FNWimp_WindowYOrigin
 7700          WHILEmore%
 7710REM           SYS"Wimp_BorderWindow",,wimp%
 7720           bottom_line%=(47+y_origin%-wimp%!32)DIV32
 7730           top_line%=(y_origin%-wimp%!40)DIV32
 7740           IF top_line%<0 THEN top_line%=0
 7750           PROCEvent_Draw(wimp%!0)
 7760           PROCEvent_Draw(wimp%!0)
 7770           SYS"Wimp_GetRectangle",,wimp%TOmore%
 7780          ENDWHILE
 7790  WHEN2 : SYS "Wimp_OpenWindow",,wimp%
 7800  WHEN3 : PROCEvent_WindowClose(!wimp%)
 7810          PROCWimp_WindowClose(!wimp%)
 7820  WHEN4 :
 7830  WHEN5 :
 7840  WHEN6 :button%=wimp%!8:window%=wimp%!12:icon%=wimp%!16
 7850         x%=wimp%!0:y%=wimp%!4
 7860         CASE button% OF
 7870          WHEN2    :PROCEvent_PopUpMenu(window%,x%,y%)
 7880          OTHERWISE:
 7890          CASE FNEvent_Save(window%) OF
 7900           WHEN TRUE
 7910            CASE icon% OF
 7920             WHEN 0 :
 7930              IF button% AND &50 THEN PROCWimpPoll_DragBox(window%)
 7940             WHEN 2 :
 7950              IF button% AND 5 THEN  PROCWimpPoll_SaveFile(window%)
 7960            ENDCASE
 7970           WHEN FALSE
 7980REM            SYS"Wimp_BorderIcon",,wimp%
 7990            PROCEvent_MouseClick(button%,window%,icon%,x%,y%)
 8000REM            wimp%!8=0
 8010REM            SYS"Wimp_BorderIcon",,wimp%
 8020          ENDCASE
 8030         ENDCASE
 8040  WHEN7 :PROCWimpPoll_SaveMessage
 8050  WHEN8 :window%=wimp%!0:icon%=wimp%!4:key%=wimp%!24
 8060         CASE FNEvent_Save(window%) OF
 8070          WHEN TRUE : PROCWimpPoll_SaveFile(window%)
 8080          WHEN FALSE: PROCEvent_KeyPress(window%,icon%,key%)
 8090         ENDCASE
 8100  WHEN9 :PROCEvent_MenuChoice(menu%)
 8110  WHEN10:
 8120  WHEN11:
 8130  WHEN12:
 8140  WHEN17,18: REM messages
 8150    CASE wimp%!16 OF
 8160     WHEN 0:finished%=TRUE
 8170     WHEN 1 :
 8180     WHEN 2 :
 8190       file$=FNWimp_GetStringAtAddress(wimp%+44)
 8200       PROCWimp_IconPutText(save%,1,file$)
 8210       PROCWimp_IconCaret(save%,1,LENfile$)
 8220       PROCEvent_SaveFile(file$,save%)
 8230     WHEN 3
 8240     PROCEvent_LoadFile(FNWimp_GetStringAtAddress(wimp%+44),FNWimp_FileType(wimp%!40))
 8250    ENDCASE
 8260  WHEN19:
 8270 ENDCASE
 8280UNTILfinished%
 8290ENDPROC
 8300:
 8310DEF PROCWimpPoll_SaveFile(window%)
 8320LOCALx$
 8330 x$=FNWimp_IconText(window%,1)
 8340 CASE INSTR(x$,".") OF
 8350  WHEN 0   :
 8360   PROCWimp_WindowAlert(task$,"To save, drag the icon to a directory window")
 8370  OTHERWISE: PROCEvent_SaveFile(x$,window%)
 8380 ENDCASE
 8390 SYS"Wimp_CreateMenu",-1
 8400ENDPROC
 8410:
 8420DEF PROCWimpPoll_DragBox(window%)
 8430LOCALx%,y%
 8440 save%=window%
 8450 !wimp%=window%
 8460 SYS"Wimp_GetWindowState",,wimp%
 8470 x%=wimp%!4-wimp%!20:y%=wimp%!16-wimp%!24
 8480 wimp%!4=0
 8490 SYS"Wimp_GetIconState",,wimp%
 8500 !wimp%=window%
 8510 wimp%!4=5
 8520 wimp%!8=x%+wimp%!8:wimp%!12=y%+wimp%!12
 8530 wimp%!16=x%+wimp%!16:wimp%!20=y%+wimp%!20
 8540 wimp%!24=0:wimp%!28=0
 8550 wimp%!32=&7FFFFFFF:wimp%!36=&7FFFFFFF
 8560 SYS"Wimp_DragBox",,wimp%
 8570ENDPROC
 8580:
 8590DEF PROCWimpPoll_SaveMessage
 8600LOCALfile$,window%,icon%,x%,y%
 8610 SYS"Wimp_GetPointerInfo",,wimp%
 8620 window%=wimp%!12:icon%=wimp%!16:x%=wimp%!0:y%=wimp%!4
 8630 file$=FNWimp_GetFileFromPathname(FNWimp_IconText(Save_Window%,1))
 8640 wimp%!20=window%
 8650 wimp%!24=icon%
 8660 wimp%!28=x%:wimp%!32=y%
 8670 wimp%!36=length%
 8680 wimp%!0=64
 8690 wimp%!12=0
 8700 wimp%!16=1
 8710 wimp%!40=&FFF
 8720 $(wimp%+44)=file$
 8730 SYS"Wimp_SendMessage",17,wimp%,wimp%!20,wimp%!24
 8740ENDPROC
 8750:

9�                           LIBRARY "<Obey$Dir>.Wimp"
+                            �Wimp_Start
/                            �Create_Windows
(-                            �Create_Icons
2-                            �Create_Menus
<4                            �User_SetInitialData
F1                           �Wimp_WaitForEvent
P.                           �Wimp_CloseDown
Z                            �
d       :
n!       � �User_SetInitialData
x       Type%=-1
�       BasText%=�
�       *SET z FFF
�       line_numbers%=�
�       �
�       :
�       � �Create_Windows
�1        Info_Window%=�Wimp_WindowLoad("Info")
�1        Save_Window%=�Wimp_WindowLoad("Save")
�0        �Wimp_WindowBringToTop(Save_Window%)
�       �
�       :
�       � �Create_Icons
�       �
       :
       � �Create_Menus
B         Save_Menu%=�Wimp_MenuCreate("!Convert\Info\No Line#")
"6         �Wimp_MenuGlue(Save_Menu%,1,Info_Window%)
,)         �Wimp_MenuTick(Save_Menu%,2)
6,         �Wimp_MenuDisable(Save_Menu%,2)
@       �
J       :
T(       � �Event_WindowClose(window%)
^       Ȏ window% �
h/        � Save_Window%        : finished%=�
r       �
|       �
�       :
�!       � �Event_Draw(window%)
�       �
�       :
�,       � �Event_PopUpMenu(window%,x%,y%)
�       Ȏ window% �
�>        � Save_Window% : �Wimp_MenuPopUp(Save_Menu%,x%,y%)
�       �
�       �
�       :
�;       � �Event_MouseClick(button%,window%,icon%,x%,y%)
�       �
�       :
%       � �Event_MenuChoice(menu%)
        Ȏ menu% �
         � Save_Menu%
&'          � �Wimp_MenuChoice(0)=2 �
0+           �Wimp_MenuTick(Save_Menu%,2)
:-           line_numbers%=�(line_numbers%)
D          �
N
        �
X*        �Wimp_MenuAdjustOn(Save_Menu%)
b       �
l       :
v!       � �Event_Save(window%)
�         Ȏ window% �
�!           � Save_Window% :=�
�            :=�
�         �
�       :
�+       � �Event_SaveFile(file$,window%)
�         Ȏ window% �
�          � Save_Window%
�           Ȏ Type% �
�,            � 0 : �BasicToText(f$,file$)
�,            � 1 : �TextToBasic(f$,file$)
�           �
�         �
       �
:
� �BasicToText(f$,g$)
 � x$
* �("SET y "+g$)
4� *SET Alias$Twin SetEval x1 ("%*0"RIGHT(LEN"%*0"-1))LEFT8|MSetEval x2 ("%*0"RIGHT(LEN"%*0"-10))LEFT8|MSet Alias$x Save |<y> |<x1> |<x2>||MSetType |<y> |<z>||MBasic @|<x1>,|<x2>|Mx
> x$=" "
H Ȏ line_numbers% �
R  � � : x$=" "
\   : x$="O8 "
f �
p' �("*KEY12 TTWIN"+x$+"|mQUIT|m"+x$)
z $wimp%=f$
�" ș "Wimp_CommandWindow",wimp%
�7 *ECHO To convert Basic file to text,press Key F12!
�	 x$=�
� �("BASIC -load "+f$)
� ș "Wimp_CommandWindow",0
��
�:
�� �TextToBasic(f$,g$)
�) �("*KEY12 SSAVE """+g$+"""|mQUIT|m")
� $wimp%=f$
�" ș "Wimp_CommandWindow",wimp%
�8 *ECHO To convert Text file to Basic, press Key F12!
�	 x$=�
 �("BASIC -load "+f$)
 ș "Wimp_CommandWindow",0
�
$:
.)       � �Event_LoadFile(file$,type$)
8       Ȏ type$ �
B        � "Basic" :
L         Type%=0
V         �Message
`;         �Wimp_IconPutSprite(Save_Window%,0,"file_FFF")
j+         �Wimp_MenuEnable(Save_Menu%,2)
t         f$=file$:
~        � "Text","FD1"  :
�         Type%=1
�         �Message
�;         �Wimp_IconPutSprite(Save_Window%,0,"file_FFB")
�,         �Wimp_MenuDisable(Save_Menu%,2)
�         f$=file$
�       �
�       �
�:
�       � �Message
�2       �Wimp_IconPutText(Save_Window%,1,file$)
�1       �Wimp_IconCaret(Save_Window%,1,�file$)
�       Ȏ Type% �
       � 0 :

<       �Wimp_IconPutText(Save_Window%,3,"Basic to Text")
       � 1 :
<       �Wimp_IconPutText(Save_Window%,3,"Text to Basic")
(       �
2A       �Wimp_IconPutText(Save_Window%,4,"Drag file icon to" )
<5       �Wimp_IconPutText(Save_Window%,5,"filer.")
F       �
PO�|_________________________________________________________________________
ZO�|_________________________________________________________________________
dO�|_________________________________________________________________________
n�|
x�|
��|
�E�|                -------------------------------          6/1/92
�/�|                   WIMP PROCEDURE LIBRARY
��|
�,�|                     Index of Contents
��|
�5�|                -------------------------------
��|
�$�|                    1.�Windows
��|
�"�|                    2.�Icons
��|
�"�|                    3.�Menus
�|
$�|                    4.�Sprites
�|
""�|                    5.�Files
,�|
6*�|                    6.�Miscellaneous
@�|
J5�|                -------------------------------
T�|
^�|
h�|
r�|
|�|
��|
�5�|                -------------------------------
�*�|                          1.�Windows
�5�|                -------------------------------
��|
��|
�@�|          ------------------------------------------------
��|
�(�|                      Procedures :
��|
�8�|             PROCWimp_WindowAlert(title$,message$)
�C�|             PROCWimp_WindowAlertBox(title$,message$,button%)
�7�|             FNWimp_WindowCancel(title$,message$)
;�|             PROCWimp_WindowErrorBox(title$,message$)
.�|             FNWimp_WindowTitle(window%)
-�|             FNWimp_WindowLoad(window$)
&;�|             FNWimp_WindowLoadFrom(window$,template$)
0'�|             FNWimp_WindowXOrigin
:'�|             FNWimp_WindowYOrigin
D5�|             PROCWimp_WindowBringToTop(window%)
N4�|             PROCWimp_WindowForceDraw(window%)
X/�|             PROCWimp_WindowOpen(window%)
b%�|             PROCWimp_Draw(x,y)
l%�|             PROCWimp_Move(x,y)
v+�|             PROCWimp_Line(x,y,x1,y1)
��|
�?�|           ----------------------------------------------
��|
��|
��|
�(� �Wimp_WindowAlert(title$,message$)
�+�Wimp_WindowAlertBox(title$,message$,0)
��
�:
�3� �Wimp_WindowAlertBox(title$,message$,button%)
�� response%
�$(wimp%+4)=message$
�Ȏ button% �
 � 2    : response%=1
 � 1    : response%=15
! � 3    : response%=(1<<5)+16
 ! � 4    : response%=(1<<6)+16
* : response%=16
4�
>=ș "Wimp_ReportError",wimp%,response%,title$ � ,response%
H�
R:
\)� �Wimp_WindowCancel(title$,message$)
f$(wimp%+4)=message$
presponse%=23
z=ș "Wimp_ReportError",wimp%,response%,title$ � ,response%
�=response%-2
�:
�+� �Wimp_WindowErrorBox(title$,message$)
�+�Wimp_WindowAlertBox(title$,message$,2)
��
�:
� � �Wimp_WindowTitle(window%)
�wimp%!0=window%
� ș "Wimp_GetWindInfo",,wimp%
�6� ((wimp%!60)�&100)=0 � 1,"Title isn't indirected"
�=$(wimp%!76)
�:
�� �Wimp_WindowLoad(window$)
	9=�Wimp_WindowLoadFrom(window$,"<Obey$Dir>.Templates")
	:
	-� �Wimp_WindowLoadFrom(window$,template$)
	$� c%
	.%ș "Wimp_OpenTemplate",,template$
	8Mș "Wimp_LoadTemplate",,wimp%,icons%,icon_memory%,-1,window$,0 � ,,icons%
	B%� sprites%<>0 � wimp%!64=sprites%
	L&ș "Wimp_CreateWindow",,wimp% � c%
	Vș "Wimp_CloseTemplate"
	`=c%
	j:
	t� �Wimp_WindowXOrigin
	~=16+wimp%!4-wimp%!20
	�:
	�� �Wimp_WindowYOrigin
	�=-16+wimp%!16-wimp%!24
	�:
	�%� �Wimp_WindowBringToTop(window%)
	�!wimp%=window%
	�#ș "Wimp_GetWindowState",,wimp%
	�wimp%!28=-1
	�ș "Wimp_OpenWindow",,wimp%
	��
	�:
	�!�  �Wimp_WindowClose(window%)
!wimp%=window%

 ș "Wimp_CloseWindow",,wimp%
�
:
($� �Wimp_WindowForceDraw(window%)
2Ȏ window% �
<8 � -1   : ș "Wimp_ForceRedraw",-1,0,0,2*1280,2*1024
F9  : ș "Wimp_ForceRedraw",window%,0,-2*1024,2*1280,0
P�
Z�
d:
n� �Wimp_WindowOpen(window%)
x!wimp%=window%
�#ș "Wimp_GetWindowState",,wimp%
�ș "Wimp_OpenWindow",,wimp%
��
�:
�� �Wimp_Draw(x,y)
� � x-x_origin%,y-y_origin%
��
�:
�� �Wimp_Move(x,y)
� � x-x_origin%,y_origin%-y
��
�:
�� �Wimp_Line(x,y,x1,y1)
8 � x-x_origin%,y-y_origin%,x1-x_origin%,y1-y_origin%
�
:
"�|
,�|
6�|
@1�|                  -------------------------
J(�|                          2.�Icons
T1�|                  -------------------------
^�|
h�|
r=�|             ------------------------------------------
|�|
�(�|                      Procedures :
��|
�+�|              FNWimp_IconBar(Sprite$)
�<�|              PROCWimp_IconCaret(window%,icon%,chars%)
�2�|              FNWimp_IconText(window%,icon%)
�8�|              FNWimp_IconValidation(window%,icon%)
�7�|              PROCWimp_IconDisable(window%,icon%)
�6�|              PROCWimp_IconEnable(window%,icon%)
�?�|              FNWimp_IconPutSprite(window%,icon%,sprite$)
�=�|              PROCWimp_IconPutText(window%,icon%,text$)
��|
�=�|             ------------------------------------------
��|
:
� �Wimp_IconBar(Sprite$)
� icon%
&wimp%!0=-1
0wimp%!4=0     : wimp%!8=0
:wimp%!12=68 : wimp%!16=68
Dwimp%!20=&3002
N$(wimp%+24)=Sprite$
X'ș "Wimp_CreateIcon",,wimp% � icon%
b
=icon%
l:
v+� �Wimp_IconCaret(window%,icon%,chars%)
�8ș "Wimp_SetCaretPosition",window%,icon%,,,-1,chars%
��
�:
�#� �Wimp_IconText(window%,icon%)
�#wimp%!0=window% : wimp%!4=icon%
�!ș "Wimp_GetIconState",,wimp%
�7� ((wimp%!24) � &100)=0 � 1,"Icon isn't indirected"
�=$(wimp%!28)
�:
�)� �Wimp_IconValidation(window%,icon%)
�#wimp%!0=window% : wimp%!4=icon%
�!ș "Wimp_GetIconState",,wimp%
�7� ((wimp%!24) � &100)=0 � 1,"Icon isn't indirected"

=$(wimp%!32)

:

&� �Wimp_IconDisable(window%,icon%)

 #wimp%!0=window% : wimp%!4=icon%

*$wimp%!8=1<<22   : wimp%!12=1<<22

4!ș "Wimp_SetIconState",,wimp%

>�

H:

R%� �Wimp_IconEnable(window%,icon%)

\#wimp%!0=window% : wimp%!4=icon%

f$wimp%!8=0       : wimp%!12=1<<22

p!ș "Wimp_SetIconState",,wimp%

z�

�:

�0� �Wimp_IconPutSprite(window%,icon%,sprite$)

�!wimp%!0=window%:wimp%!4=icon%

�!ș "Wimp_GetIconState",,wimp%

�ș "Wimp_DeleteIcon",,wimp%

�=wimp%!4=wimp%!8   : wimp%!8=wimp%!12  : wimp%!12=wimp%!16

�?wimp%!16=wimp%!20 : wimp%!20=wimp%!24 : $(wimp%+24)=sprite$

�'ș "Wimp_CreateIcon",,wimp% � icon%

�Cș "Wimp_ForceRedraw",wimp%!0,wimp%!4,wimp%!8,wimp%!12,wimp%!16

��

�:

�,� �Wimp_IconPutText(window%,icon%,text$)

�� x$
#wimp%!0=window% : wimp%!4=icon%
!ș "Wimp_GetIconState",,wimp%
7� ((wimp%!24) � &100)=0 � 1,"Icon isn't indirected"
$$(wimp%!28)=text$
.#wimp%!0=window% : wimp%!4=icon%
8wimp%!8=0 : wimp%!12=0
B!ș "Wimp_SetIconState",,wimp%
L�
V:
`�|
j�|
t�|
~1�|                  -------------------------
�(�|                          3.�Menus
�1�|                  -------------------------
��|
��|
�?�|           ----------------------------------------------
��|
�(�|                      Procedures :
��|
��|
�.�|            PROCWimp_MenuAdjustOn(menu%)
�+�|            FNWimp_MenuChoice(level%)
�*�|            FNWimp_MenuCreate(menu$)
$�|            FNWimp_MenuColours

2�|            FNWimp_MenuCreateColours(title$)
/�|            FNWimp_MenuNoOfEntries(menu$)
D�|            PROCWimp_MenuBackGroundColour(menu%,item%,colour%)
(2�|            PROCWimp_MenuCentre(menu%,item%)
2$�|            PROCWimp_MenuClose
<3�|            PROCWimp_MenuDisable(menu%,item%)
F6�|            PROCWimp_MenuDottedLine(menu%,item%)
P2�|            PROCWimp_MenuEnable(menu%,item%)
ZD�|            PROCWimp_MenuForegroundColour(menu%,item%,colour%)
d8�|            PROCWimp_MenuGlue(menu1%,item%,menu2%)
n6�|            PROCWimp_MenuItem(menu%,item%,item$)
x3�|            PROCWimp_MenuMessage(menu%,item%)
�1�|            PROCWimp_MenuPopUp(Menu%,x%,y%)
�.�|            PROCWimp_MenuPopUpBar(x%,y%)
�0�|            PROCWimp_MenuTick(menu%,item%)
�2�|            PROCWimp_MenuTitle(menu%,title$)
�L�|            PROCWimp_MenuWrite(menu%,item%,buffer%,val%,BufferLength%)
��|
�?�|           ----------------------------------------------
��|
�:
�� �Wimp_MenuAdjustOn(menu%)
�,ș "Wimp_GetPointerInfo",,pointer_block%
�^� ((pointer_block%!8)�1)=1 � ș "Wimp_CreateMenu",,menu%,pointer_block%!0,pointer_block%!4
��
:
� �Wimp_MenuChoice(level%)
=(wimp%!(4*level%))+1
":
,� �Wimp_MenuCreate(menu$)
6)� menu$="Colours" �=�Wimp_MenuColours
@'� menu%,index%,width%,length%,k%,s%
J.� menu% 28+�Wimp_MenuNoOfEntries(menu$)*24
T7menu%?12=7   : menu%?13=2  : menu%?14=7 :menu%?15=0
^+menu%!16=140 : menu%!20=44 : menu%!24=0
hindex%=menu%+28
r $menu%=�menu$,�menu$,"\")-1)
|#width%=�(�menu$,�menu$,"\")-1))
�$menu$+="\" : Menu_NoOfEntries%=0
�ȕ menu$<>""
�menu$=�menu$,�menu$,"\")+1)
�Ȏ menu$ �
�	 � ""
�  :
�1  !index%=0 : index%!4=-1 : index%!8=&7000021
�  length%=�menu$,"\")-1
�  k%=��menu$,length%),">")
�
  Ȏ k% �
�
   � 0
�   
�%    s%=�(�menu$,k%+1,length%-k%))
    index%!4=s%
    length%=k%-1
  �
&"  $(index%+12)=�menu$,length%)
0'  � length%>width% � width%=length%
:  index%+=24
D�
N�
Xmenu%!16=16*(width%+1)
b(index%!-24=index%!-24 � &80 : =menu%
l:
v� �Wimp_MenuColours
�!=�Wimp_MenuCreateColours(" ")
�:
�%� �Wimp_MenuCreateColours(title$)
�� x$,men%,j%,i%
�6x$=title$+"\0\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15"
�men%=�Wimp_MenuCreate(x$)
�� i%=0 � 15
�
Ȏ � �
�(� i%<4,i%=9,i%=12,i%=14,i%=15 : j%=7
� : j%=0
��
�men%?(39+i%*24)=i%*16+j%
��Wimp_MenuCentre(men%,i%+1)
�
	=men%
:
 "� �Wimp_MenuNoOfEntries(menu$)
*� n% ,j% : n%=0 : j%=0
4�
>j%=�menu$,"\",j%+1)
H� j%<>0 � n%+=1
R
� j%=0
\=n%
f:
p5� �Wimp_MenuBackGroundColour(menu%,item%,colour%)
z� fore%,i%
�&fore%=(menu%?(39+(item%-1)*24))�16
�(i%=((menu%?(39+(item%-1)*24))�16)�16
�/menu%?(39+(item%-1)*24)=fore%+16*colour%+i%
��
�:
�#� �Wimp_MenuCentre(menu%,item%)
�:menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)�(1<<3)
��
�:
�� �Wimp_MenuClose
�ș "Wimp_CreateMenu",-1
��
�:
$� �Wimp_MenuDisable(menu%,item%)
;menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)�(1<<22)
�
$:
.'� �Wimp_MenuDottedLine(menu%,item%)
87menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))�2
B�
L:
V#� �Wimp_MenuEnable(menu%,item%)
`"�Wimp_MenuDisable(menu%,item%)
j;menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)�(1<<22)
t�
~:
�5� �Wimp_MenuForegroundColour(menu%,item%,colour%)
�Emenu%?(39+(item%-1)*24)=colour%+16*((menu%?(39+(item%-1)*24))�16)
��
�:
�)� �Wimp_MenuGlue(menu1%,item%,menu2%)
�menu1%!(8+item%*24)=menu2%
��
�:
�'� �Wimp_MenuItem(menu%,item%,item$)
�,$(menu%+(40+(item%-1)*24))=�item$,12)+�0
��
�:
$� �Wimp_MenuMessage(menu%,item%)

<menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))�(1<<3)
�
:
("� �Wimp_MenuPopUp(Menu%,x%,y%)
2menu%=Menu%
<+ș "Wimp_CreateMenu",,menu%,x%-64,y%+20
F�
P:
Z� �Wimp_MenuPopUpBar(x%,y%)
d� n% : n%=0
n+ȕ ((Bar_Menu%!(28+n%*24))�%10000000)=0
x	n%+=1
��
�2ș "Wimp_CreateMenu",,Bar_Menu%,x%-64,96+n%*44
�menu%=Bar_Menu%
��
�:
�!� �Wimp_MenuTick(menu%,item%)
�7menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))�1
��
�:
�#� �Wimp_MenuTitle(menu%,title$)
�$menu%=�title$,12)+�0
��
�:
=� �Wimp_MenuWrite(menu%,item%,buffer%,val%,BufferLength%)
7menu%!(28+(item%-1)*24)=(menu%!(28+(item%-1)*24))�4
8menu%!(36+(item%-1)*24)=menu%!(36+(item%-1)*24)�&100
"#menu%!(40+(item%-1)*24)=buffer%
, menu%!(44+(item%-1)*24)=val%
6)menu%!(48+(item%-1)*24)=BufferLength%
@�
J�|
T�|
^�|
h1�|                  -------------------------
r*�|                          4.�Sprites
|1�|                  -------------------------
��|
��|
�:�|                ------------------------------------
��|
�(�|                      Procedures :
��|
��|
�,�|                  PROCWimp_SpritesLoad
�:�|                  PROCWimp_SpritesPathLoad(pathname$
��|
��|
��|
�:�|                ------------------------------------
�|
:
� �Wimp_SpritesLoad
&/�Wimp_SpritesPathLoad("<Obey$Dir>.Sprites")
0�
::
D&� �Wimp_SpritesPathLoad(pathname$)
N
�S%,T%
X,S%=�"<Obey$Dir>.Sprites":T%=�#S%+16:�#S%
b�sprites%T%,spname%12
l!sprites%=T%:sprites%!8=0
v!ș"OS_SpriteOp",&109,sprites%
�+ș"OS_SpriteOp",&10A,sprites%,pathname$
��
�:
��|
��|
��|
�1�|                  -------------------------
�(�|                          5.�Files
�1�|                  -------------------------
��|
��|
�5�|                -------------------------------
��|
(�|                      Procedures :
�|
�|
 .�|                  FNWimp_FileType(type%)
*.�|                  FNWimp_GetFilePathName
42�|                  FNWimp_FileLoad(pathname$)
>9�|                  FNWimp_GetStringAtAddress(array%)
H6�|                  FNWimp_GetFileFromPathname(f$)
R2�|                  PROCWimp_SendToEdit(file$)
\�|
f5�|                -------------------------------
p�|
z�|
��|
�:
�� �Wimp_FileType(type%)
�Ȏtype%�
��&FFF:="Text"
��&FFD:="Data"
��&FFB:="Basic"
��&FF9:="Sprite"
��&FED:="Palette"
��&FEC:="Template"
��&AFF:="Draw"
��&1000:="Folder"
��&2000:="Application"
=�~(type%)
�
:
$� �Wimp_GetFilePathName
.'=�Wimp_GetStringAtAddress(wimp%+44)
8:
B� �Wimp_FileLoad(pathname$)
L�S%,T%,file%
VS%=�pathname$
`T%=�#S%+16
j�#S%
t�file%T%
~"�("LOAD"+pathname$+""+�~file%)
�
=file%
�;
�&� �Wimp_GetStringAtAddress(array%)
�
�s$:s$=""
�<ȕ(?array%<>13)�(?array%<>0):s$+=�(?array%):array%+=1:�:
�=s$
�:
�#� �Wimp_GetFileFromPathname(f$)
�Ȏ �f$,".") �
� � 0    :=f$
�7  :=�Wimp_GetFileFromPathname(�f$,�(f$)-�f$,".")))
��
:

� �Wimp_SendToEdit(file$)
� n%
wimp%!4=&6CC01C0C
(wimp%!16=5
2wimp%!36=0
<wimp%!40=&FFF
F$(wimp%+44)=file$+�0
Pn%=�file$+45
Z,� n%�4 � !wimp%=4+(n%>>2)<<2 � !wimp%=n%
d$ș "Wimp_SendMessage",17,wimp%,0
n�
x:
��|
��|
��|
�1�|                  -------------------------
�,�|                      6.�Miscellaneous
�1�|                  -------------------------
��|
��|
�5�|                -------------------------------
��|
�(�|                      Procedures :
��|
��|
&�|                  PROCWimp_Start
.�|                  FNWimp_BASICParameters
2�|                  PROCWimp_SetEventVariables
"7�|                  PROCWimp_Error(task%,TaskName$)
,*�|                  PROCWimp_CloseDown
6%�|                  PROCWimp_Quit
@6�|                  FNWimp_ReadVariable(Variable$)
J�|
T�|
^5�|                -------------------------------
h�|
r:
|� �Wimp_Start
�� version%
��Wimp_SetEventVariables
�"� � �Wimp_Error(task%,task$):�
�$wimp%="TASK"
�9ș"Wimp_Initialise",200,!wimp%,task$ � version%,task%
��
�:
�� �Wimp_BASICParameters
� � com$,param$,I%
� ș "OS_GetEnv" � com$
� params$=""
� I%=�com$," -quit ")
�5 � I% � params$=�com$,�com$," ",I%+�" -quit ")+1)
=params$
:
� �Wimp_SetEventVariables
&task$=�Wimp_BASICParameters
0wimp_memory%=�(task$)
:Ȏ wimp_memory% �
D
 � 0 :
N  wimp_memory%=&1000
X  icon_memory%=0
b 
l*  icon_memory%=�task$,�(wimp_memory%))
v+  icon_memory%=�task$," ",icon_memory%)
�1  icon_memory%=�(�task$,�task$-icon_memory%))
��
�,� wimp% wimp_memory%,icons% icon_memory%
�� pointer_block% 20
�$icon_memory%=icons%+icon_memory%
�.null%=1  :draw%=2 :  pointer_leaving%=1<<4
�1pointer_entering%=1<<5:mouse%=1<<6:drag%=1<<7
�&key%=1<<8:menu%=1<<9:scroll%=1<<10
�@lose_caret%=1<<11:gain_caret%=1<<12:message%=(1<<17)+(1<<18)
�0recorder%=1<<18:acknowledge%=1<<19:window%=0
�!sprites%=0:version%=0:task%=0
�*Bar_Window%=-2:Bar_Icon%=0:Bar_Menu%=0
�*x_origin%=0:y_origin%=0:SaveWindow%=-3
3message_quit%=0:message_save%=2:message_load%=3
!mouse_button%=2:save_event%=0
 top_line%=0 : bottom_line%=0
 (task$=�Wimp_ReadVariable("Obey$Dir")
**task$=�Wimp_GetFileFromPathname(task$)
4�
>:
H"� �Wimp_Error(task%,TaskName$)
R
�X$,x%
\	� � �
fx%=�
pX$=�$+"atline"+�(x%�10)
z�ErrorMsg%36
��ErrorMsg%!0=36:ErrorMsg%!12=0:ErrorMsg%!16=&81080:ErrorMsg%!20=x%:$(ErrorMsg%+24)="!RunImage":ș"Wimp_SendMessage",17,ErrorMsg%
�#�Wimp_WindowAlert(TaskName$,X$)
��Wimp_CloseDown
��
�:
�� �Wimp_CloseDown
�#ș"Wimp_CloseDown",task%,"TASK"
��
�:
�� �Wimp_Quit
� finished%=�
��
�:
#� �Wimp_ReadVariable(Variable$)
�len%,result%,variable%
$wimp%=Variable$
$3ș"OS_ReadVarVal",wimp%,wimp%+255,255,,3�,,len%
.wimp%?(len%+255)=13
8=$(wimp%+255)
B:
L�|
V�|
`�|
j�|
t)�|                   ----------------
~'�|                     Wimp Polling
�)�|                   ----------------
��|
��|
�:
�� �Wimp_WaitForEvent
�finished%=�
�mask%=%111000011001
��
�' ș"Wimp_Poll",mask%,wimp% � event%
� Ȏ event% �
�
  � 0:
�-  � 1: ș"Wimp_RedrawWindow",,wimp%�more%
+          x_origin%=�Wimp_WindowXOrigin

+          y_origin%=�Wimp_WindowYOrigin
          ȕmore%
-�           SYS"Wimp_BorderWindow",,wimp%
(6           bottom_line%=(47+y_origin%-wimp%!32)�32
20           top_line%=(y_origin%-wimp%!40)�32
<*           � top_line%<0 � top_line%=0
F#           �Event_Draw(wimp%!0)
P#           �Event_Draw(wimp%!0)
Z1           ș"Wimp_GetRectangle",,wimp%�more%
d          �
n&  �2 : ș "Wimp_OpenWindow",,wimp%
x%  �3 : �Event_WindowClose(!wimp%)
�'          �Wimp_WindowClose(!wimp%)
�
  �4 :
�
  �5 :
�9  �6 :button%=wimp%!8:window%=wimp%!12:icon%=wimp%!16
�"         x%=wimp%!0:y%=wimp%!4
�         Ȏ button% �
�4          �2    :�Event_PopUpMenu(window%,x%,y%)
�          :
�'          Ȏ �Event_Save(window%) �
�           � �
�            Ȏ icon% �
�             � 0 :
�>              � button% � &50 � �WimpPoll_DragBox(window%)
             � 2 :
>              � button% � 5 �  �WimpPoll_SaveFile(window%)
            �
"           � �
,,�            SYS"Wimp_BorderIcon",,wimp%
6>            �Event_MouseClick(button%,window%,icon%,x%,y%)
@�            wimp%!8=0
J,�            SYS"Wimp_BorderIcon",,wimp%
T          �
^         �
h  �7 :�WimpPoll_SaveMessage
r5  �8 :window%=wimp%!0:icon%=wimp%!4:key%=wimp%!24
|&         Ȏ �Event_Save(window%) �
�/          � � : �WimpPoll_SaveFile(window%)
�6          � �: �Event_KeyPress(window%,icon%,key%)
�         �
�"  �9 :�Event_MenuChoice(menu%)
�
  �10:
�
  �11:
�
  �12:
�  �17,18: � messages
�    Ȏ wimp%!16 �
�     � 0:finished%=�
�     � 1 :
�     � 2 :
�3       file$=�Wimp_GetStringAtAddress(wimp%+44)
 +       �Wimp_IconPutText(save%,1,file$)
 *       �Wimp_IconCaret(save%,1,�file$)
 '       �Event_SaveFile(file$,save%)
 &     � 3
 0U     �Event_LoadFile(�Wimp_GetStringAtAddress(wimp%+44),�Wimp_FileType(wimp%!40))
 :	    �
 D
  �19:
 N �
 X�finished%
 b�
 l:
 v!� �WimpPoll_SaveFile(window%)
 ��x$
 �! x$=�Wimp_IconText(window%,1)
 � Ȏ �x$,".") �
 �
  � 0   :
 �N   �Wimp_WindowAlert(task$,"To save, drag the icon to a directory window")
 �$  : �Event_SaveFile(x$,window%)
 � �
 � ș"Wimp_CreateMenu",-1
 ��
 �:
 � � �WimpPoll_DragBox(window%)
 �
�x%,y%
 � save%=window%
! !wimp%=window%
!# ș"Wimp_GetWindowState",,wimp%
!- x%=wimp%!4-wimp%!20:y%=wimp%!16-wimp%!24
!  wimp%!4=0
!*! ș"Wimp_GetIconState",,wimp%
!4 !wimp%=window%
!> wimp%!4=5
!H, wimp%!8=x%+wimp%!8:wimp%!12=y%+wimp%!12
!R. wimp%!16=x%+wimp%!16:wimp%!20=y%+wimp%!20
!\ wimp%!24=0:wimp%!28=0
!f* wimp%!32=&7FFFFFFF:wimp%!36=&7FFFFFFF
!p ș"Wimp_DragBox",,wimp%
!z�
!�:
!�� �WimpPoll_SaveMessage
!��file$,window%,icon%,x%,y%
!�# ș"Wimp_GetPointerInfo",,wimp%
!�: window%=wimp%!12:icon%=wimp%!16:x%=wimp%!0:y%=wimp%!4
!�D file$=�Wimp_GetFileFromPathname(�Wimp_IconText(Save_Window%,1))
!� wimp%!20=window%
!� wimp%!24=icon%
!� wimp%!28=x%:wimp%!32=y%
!� wimp%!36=length%
!� wimp%!0=64
!� wimp%!12=0
!� wimp%!16=1
" wimp%!40=&FFF
" $(wimp%+44)=file$
"4 ș"Wimp_SendMessage",17,wimp%,wimp%!20,wimp%!24
"$�
".:
�
00000000  0d 00 0a 39 f4 20 20 20  20 20 20 20 20 20 20 20  |...9.           |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000020  4c 49 42 52 41 52 59 20  22 3c 4f 62 65 79 24 44  |LIBRARY "<Obey$D|
00000030  69 72 3e 2e 57 69 6d 70  22 0d 00 14 2b 20 20 20  |ir>.Wimp"...+   |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000050  20 20 20 20 20 20 20 20  20 f2 57 69 6d 70 5f 53  |         .Wimp_S|
00000060  74 61 72 74 0d 00 1e 2f  20 20 20 20 20 20 20 20  |tart.../        |
00000070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000080  20 20 20 20 f2 43 72 65  61 74 65 5f 57 69 6e 64  |    .Create_Wind|
00000090  6f 77 73 0d 00 28 2d 20  20 20 20 20 20 20 20 20  |ows..(-         |
000000a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000b0  20 20 20 f2 43 72 65 61  74 65 5f 49 63 6f 6e 73  |   .Create_Icons|
000000c0  0d 00 32 2d 20 20 20 20  20 20 20 20 20 20 20 20  |..2-            |
000000d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000e0  f2 43 72 65 61 74 65 5f  4d 65 6e 75 73 0d 00 3c  |.Create_Menus..<|
000000f0  34 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4               |
00000100  20 20 20 20 20 20 20 20  20 20 20 20 20 f2 55 73  |             .Us|
00000110  65 72 5f 53 65 74 49 6e  69 74 69 61 6c 44 61 74  |er_SetInitialDat|
00000120  61 0d 00 46 31 20 20 20  20 20 20 20 20 20 20 20  |a..F1           |
00000130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000140  f2 57 69 6d 70 5f 57 61  69 74 46 6f 72 45 76 65  |.Wimp_WaitForEve|
00000150  6e 74 0d 00 50 2e 20 20  20 20 20 20 20 20 20 20  |nt..P.          |
00000160  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000170  20 f2 57 69 6d 70 5f 43  6c 6f 73 65 44 6f 77 6e  | .Wimp_CloseDown|
00000180  0d 00 5a 20 20 20 20 20  20 20 20 20 20 20 20 20  |..Z             |
00000190  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 e0  |               .|
000001a0  0d 00 64 0c 20 20 20 20  20 20 20 3a 0d 00 6e 21  |..d.       :..n!|
000001b0  20 20 20 20 20 20 20 dd  20 f2 55 73 65 72 5f 53  |       . .User_S|
000001c0  65 74 49 6e 69 74 69 61  6c 44 61 74 61 0d 00 78  |etInitialData..x|
000001d0  13 20 20 20 20 20 20 20  54 79 70 65 25 3d 2d 31  |.       Type%=-1|
000001e0  0d 00 82 15 20 20 20 20  20 20 20 42 61 73 54 65  |....       BasTe|
000001f0  78 74 25 3d a3 0d 00 8c  15 20 20 20 20 20 20 20  |xt%=.....       |
00000200  2a 53 45 54 20 7a 20 46  46 46 0d 00 96 1a 20 20  |*SET z FFF....  |
00000210  20 20 20 20 20 6c 69 6e  65 5f 6e 75 6d 62 65 72  |     line_number|
00000220  73 25 3d a3 0d 00 a0 0c  20 20 20 20 20 20 20 e1  |s%=.....       .|
00000230  0d 00 aa 0c 20 20 20 20  20 20 20 3a 0d 00 b4 1c  |....       :....|
00000240  20 20 20 20 20 20 20 dd  20 f2 43 72 65 61 74 65  |       . .Create|
00000250  5f 57 69 6e 64 6f 77 73  0d 00 be 31 20 20 20 20  |_Windows...1    |
00000260  20 20 20 20 49 6e 66 6f  5f 57 69 6e 64 6f 77 25  |    Info_Window%|
00000270  3d a4 57 69 6d 70 5f 57  69 6e 64 6f 77 4c 6f 61  |=.Wimp_WindowLoa|
00000280  64 28 22 49 6e 66 6f 22  29 0d 00 c8 31 20 20 20  |d("Info")...1   |
00000290  20 20 20 20 20 53 61 76  65 5f 57 69 6e 64 6f 77  |     Save_Window|
000002a0  25 3d a4 57 69 6d 70 5f  57 69 6e 64 6f 77 4c 6f  |%=.Wimp_WindowLo|
000002b0  61 64 28 22 53 61 76 65  22 29 0d 00 d2 30 20 20  |ad("Save")...0  |
000002c0  20 20 20 20 20 20 f2 57  69 6d 70 5f 57 69 6e 64  |      .Wimp_Wind|
000002d0  6f 77 42 72 69 6e 67 54  6f 54 6f 70 28 53 61 76  |owBringToTop(Sav|
000002e0  65 5f 57 69 6e 64 6f 77  25 29 0d 00 dc 0c 20 20  |e_Window%)....  |
000002f0  20 20 20 20 20 e1 0d 00  e6 0c 20 20 20 20 20 20  |     .....      |
00000300  20 3a 0d 00 f0 1a 20 20  20 20 20 20 20 dd 20 f2  | :....       . .|
00000310  43 72 65 61 74 65 5f 49  63 6f 6e 73 0d 00 fa 0c  |Create_Icons....|
00000320  20 20 20 20 20 20 20 e1  0d 01 04 0c 20 20 20 20  |       .....    |
00000330  20 20 20 3a 0d 01 0e 1a  20 20 20 20 20 20 20 dd  |   :....       .|
00000340  20 f2 43 72 65 61 74 65  5f 4d 65 6e 75 73 0d 01  | .Create_Menus..|
00000350  18 42 20 20 20 20 20 20  20 20 20 53 61 76 65 5f  |.B         Save_|
00000360  4d 65 6e 75 25 3d a4 57  69 6d 70 5f 4d 65 6e 75  |Menu%=.Wimp_Menu|
00000370  43 72 65 61 74 65 28 22  21 43 6f 6e 76 65 72 74  |Create("!Convert|
00000380  5c 49 6e 66 6f 5c 4e 6f  20 4c 69 6e 65 23 22 29  |\Info\No Line#")|
00000390  0d 01 22 36 20 20 20 20  20 20 20 20 20 f2 57 69  |.."6         .Wi|
000003a0  6d 70 5f 4d 65 6e 75 47  6c 75 65 28 53 61 76 65  |mp_MenuGlue(Save|
000003b0  5f 4d 65 6e 75 25 2c 31  2c 49 6e 66 6f 5f 57 69  |_Menu%,1,Info_Wi|
000003c0  6e 64 6f 77 25 29 0d 01  2c 29 20 20 20 20 20 20  |ndow%)..,)      |
000003d0  20 20 20 f2 57 69 6d 70  5f 4d 65 6e 75 54 69 63  |   .Wimp_MenuTic|
000003e0  6b 28 53 61 76 65 5f 4d  65 6e 75 25 2c 32 29 0d  |k(Save_Menu%,2).|
000003f0  01 36 2c 20 20 20 20 20  20 20 20 20 f2 57 69 6d  |.6,         .Wim|
00000400  70 5f 4d 65 6e 75 44 69  73 61 62 6c 65 28 53 61  |p_MenuDisable(Sa|
00000410  76 65 5f 4d 65 6e 75 25  2c 32 29 0d 01 40 0c 20  |ve_Menu%,2)..@. |
00000420  20 20 20 20 20 20 e1 0d  01 4a 0c 20 20 20 20 20  |      ...J.     |
00000430  20 20 3a 0d 01 54 28 20  20 20 20 20 20 20 dd 20  |  :..T(       . |
00000440  f2 45 76 65 6e 74 5f 57  69 6e 64 6f 77 43 6c 6f  |.Event_WindowClo|
00000450  73 65 28 77 69 6e 64 6f  77 25 29 0d 01 5e 17 20  |se(window%)..^. |
00000460  20 20 20 20 20 20 c8 8e  20 77 69 6e 64 6f 77 25  |      .. window%|
00000470  20 ca 0d 01 68 2f 20 20  20 20 20 20 20 20 c9 20  | ...h/        . |
00000480  53 61 76 65 5f 57 69 6e  64 6f 77 25 20 20 20 20  |Save_Window%    |
00000490  20 20 20 20 3a 20 66 69  6e 69 73 68 65 64 25 3d  |    : finished%=|
000004a0  b9 0d 01 72 0c 20 20 20  20 20 20 20 cb 0d 01 7c  |...r.       ...||
000004b0  0c 20 20 20 20 20 20 20  e1 0d 01 86 0c 20 20 20  |.       .....   |
000004c0  20 20 20 20 3a 0d 01 90  21 20 20 20 20 20 20 20  |    :...!       |
000004d0  dd 20 f2 45 76 65 6e 74  5f 44 72 61 77 28 77 69  |. .Event_Draw(wi|
000004e0  6e 64 6f 77 25 29 0d 01  9a 0c 20 20 20 20 20 20  |ndow%)....      |
000004f0  20 e1 0d 01 a4 0c 20 20  20 20 20 20 20 3a 0d 01  | .....       :..|
00000500  ae 2c 20 20 20 20 20 20  20 dd 20 f2 45 76 65 6e  |.,       . .Even|
00000510  74 5f 50 6f 70 55 70 4d  65 6e 75 28 77 69 6e 64  |t_PopUpMenu(wind|
00000520  6f 77 25 2c 78 25 2c 79  25 29 0d 01 b8 17 20 20  |ow%,x%,y%)....  |
00000530  20 20 20 20 20 c8 8e 20  77 69 6e 64 6f 77 25 20  |     .. window% |
00000540  ca 0d 01 c2 3e 20 20 20  20 20 20 20 20 c9 20 53  |....>        . S|
00000550  61 76 65 5f 57 69 6e 64  6f 77 25 20 3a 20 f2 57  |ave_Window% : .W|
00000560  69 6d 70 5f 4d 65 6e 75  50 6f 70 55 70 28 53 61  |imp_MenuPopUp(Sa|
00000570  76 65 5f 4d 65 6e 75 25  2c 78 25 2c 79 25 29 0d  |ve_Menu%,x%,y%).|
00000580  01 cc 0c 20 20 20 20 20  20 20 cb 0d 01 d6 0c 20  |...       ..... |
00000590  20 20 20 20 20 20 e1 0d  01 e0 0c 20 20 20 20 20  |      .....     |
000005a0  20 20 3a 0d 01 ea 3b 20  20 20 20 20 20 20 dd 20  |  :...;       . |
000005b0  f2 45 76 65 6e 74 5f 4d  6f 75 73 65 43 6c 69 63  |.Event_MouseClic|
000005c0  6b 28 62 75 74 74 6f 6e  25 2c 77 69 6e 64 6f 77  |k(button%,window|
000005d0  25 2c 69 63 6f 6e 25 2c  78 25 2c 79 25 29 0d 01  |%,icon%,x%,y%)..|
000005e0  f4 0c 20 20 20 20 20 20  20 e1 0d 01 fe 0c 20 20  |..       .....  |
000005f0  20 20 20 20 20 3a 0d 02  08 25 20 20 20 20 20 20  |     :...%      |
00000600  20 dd 20 f2 45 76 65 6e  74 5f 4d 65 6e 75 43 68  | . .Event_MenuCh|
00000610  6f 69 63 65 28 6d 65 6e  75 25 29 0d 02 12 16 20  |oice(menu%).... |
00000620  20 20 20 20 20 20 20 c8  8e 20 6d 65 6e 75 25 20  |       .. menu% |
00000630  ca 0d 02 1c 19 20 20 20  20 20 20 20 20 20 c9 20  |.....         . |
00000640  53 61 76 65 5f 4d 65 6e  75 25 0d 02 26 27 20 20  |Save_Menu%..&'  |
00000650  20 20 20 20 20 20 20 20  e7 20 a4 57 69 6d 70 5f  |        . .Wimp_|
00000660  4d 65 6e 75 43 68 6f 69  63 65 28 30 29 3d 32 20  |MenuChoice(0)=2 |
00000670  8c 0d 02 30 2b 20 20 20  20 20 20 20 20 20 20 20  |...0+           |
00000680  f2 57 69 6d 70 5f 4d 65  6e 75 54 69 63 6b 28 53  |.Wimp_MenuTick(S|
00000690  61 76 65 5f 4d 65 6e 75  25 2c 32 29 0d 02 3a 2d  |ave_Menu%,2)..:-|
000006a0  20 20 20 20 20 20 20 20  20 20 20 6c 69 6e 65 5f  |           line_|
000006b0  6e 75 6d 62 65 72 73 25  3d ac 28 6c 69 6e 65 5f  |numbers%=.(line_|
000006c0  6e 75 6d 62 65 72 73 25  29 0d 02 44 0f 20 20 20  |numbers%)..D.   |
000006d0  20 20 20 20 20 20 20 cd  0d 02 4e 0d 20 20 20 20  |       ...N.    |
000006e0  20 20 20 20 cb 0d 02 58  2a 20 20 20 20 20 20 20  |    ...X*       |
000006f0  20 f2 57 69 6d 70 5f 4d  65 6e 75 41 64 6a 75 73  | .Wimp_MenuAdjus|
00000700  74 4f 6e 28 53 61 76 65  5f 4d 65 6e 75 25 29 0d  |tOn(Save_Menu%).|
00000710  02 62 0c 20 20 20 20 20  20 20 e1 0d 02 6c 0c 20  |.b.       ...l. |
00000720  20 20 20 20 20 20 3a 0d  02 76 21 20 20 20 20 20  |      :..v!     |
00000730  20 20 dd 20 a4 45 76 65  6e 74 5f 53 61 76 65 28  |  . .Event_Save(|
00000740  77 69 6e 64 6f 77 25 29  0d 02 80 19 20 20 20 20  |window%)....    |
00000750  20 20 20 20 20 c8 8e 20  77 69 6e 64 6f 77 25 20  |     .. window% |
00000760  ca 0d 02 8a 21 20 20 20  20 20 20 20 20 20 20 20  |....!           |
00000770  c9 20 53 61 76 65 5f 57  69 6e 64 6f 77 25 20 3a  |. Save_Window% :|
00000780  3d b9 0d 02 94 14 20 20  20 20 20 20 20 20 20 20  |=.....          |
00000790  20 7f 20 3a 3d a3 0d 02  9e 0e 20 20 20 20 20 20  | . :=.....      |
000007a0  20 20 20 cb 0d 02 a8 0c  20 20 20 20 20 20 20 3a  |   .....       :|
000007b0  0d 02 b2 2b 20 20 20 20  20 20 20 dd 20 f2 45 76  |...+       . .Ev|
000007c0  65 6e 74 5f 53 61 76 65  46 69 6c 65 28 66 69 6c  |ent_SaveFile(fil|
000007d0  65 24 2c 77 69 6e 64 6f  77 25 29 0d 02 bc 19 20  |e$,window%).... |
000007e0  20 20 20 20 20 20 20 20  c8 8e 20 77 69 6e 64 6f  |        .. windo|
000007f0  77 25 20 ca 0d 02 c6 1c  20 20 20 20 20 20 20 20  |w% .....        |
00000800  20 20 c9 20 53 61 76 65  5f 57 69 6e 64 6f 77 25  |  . Save_Window%|
00000810  0d 02 d0 19 20 20 20 20  20 20 20 20 20 20 20 c8  |....           .|
00000820  8e 20 54 79 70 65 25 20  ca 0d 02 da 2c 20 20 20  |. Type% ....,   |
00000830  20 20 20 20 20 20 20 20  20 c9 20 30 20 3a 20 f2  |         . 0 : .|
00000840  42 61 73 69 63 54 6f 54  65 78 74 28 66 24 2c 66  |BasicToText(f$,f|
00000850  69 6c 65 24 29 0d 02 e4  2c 20 20 20 20 20 20 20  |ile$)...,       |
00000860  20 20 20 20 20 c9 20 31  20 3a 20 f2 54 65 78 74  |     . 1 : .Text|
00000870  54 6f 42 61 73 69 63 28  66 24 2c 66 69 6c 65 24  |ToBasic(f$,file$|
00000880  29 0d 02 ee 10 20 20 20  20 20 20 20 20 20 20 20  |)....           |
00000890  cb 0d 02 f8 0e 20 20 20  20 20 20 20 20 20 cb 0d  |.....         ..|
000008a0  03 02 0c 20 20 20 20 20  20 20 e1 0d 03 0c 05 3a  |...       .....:|
000008b0  0d 03 16 19 dd 20 f2 42  61 73 69 63 54 6f 54 65  |..... .BasicToTe|
000008c0  78 74 28 66 24 2c 67 24  29 0d 03 20 08 ea 20 78  |xt(f$,g$).. .. x|
000008d0  24 0d 03 2a 13 20 ff 28  22 53 45 54 20 79 20 22  |$..*. .("SET y "|
000008e0  2b 67 24 29 0d 03 34 b7  20 2a 53 45 54 20 41 6c  |+g$)..4. *SET Al|
000008f0  69 61 73 24 54 77 69 6e  20 53 65 74 45 76 61 6c  |ias$Twin SetEval|
00000900  20 78 31 20 28 22 25 2a  30 22 52 49 47 48 54 28  | x1 ("%*0"RIGHT(|
00000910  4c 45 4e 22 25 2a 30 22  2d 31 29 29 4c 45 46 54  |LEN"%*0"-1))LEFT|
00000920  38 7c 4d 53 65 74 45 76  61 6c 20 78 32 20 28 22  |8|MSetEval x2 ("|
00000930  25 2a 30 22 52 49 47 48  54 28 4c 45 4e 22 25 2a  |%*0"RIGHT(LEN"%*|
00000940  30 22 2d 31 30 29 29 4c  45 46 54 38 7c 4d 53 65  |0"-10))LEFT8|MSe|
00000950  74 20 41 6c 69 61 73 24  78 20 53 61 76 65 20 7c  |t Alias$x Save ||
00000960  3c 79 3e 20 7c 3c 78 31  3e 20 7c 3c 78 32 3e 7c  |<y> |<x1> |<x2>||
00000970  7c 4d 53 65 74 54 79 70  65 20 7c 3c 79 3e 20 7c  ||MSetType |<y> ||
00000980  3c 7a 3e 7c 7c 4d 42 61  73 69 63 20 40 7c 3c 78  |<z>||MBasic @|<x|
00000990  31 3e 2c 7c 3c 78 32 3e  7c 4d 78 0d 03 3e 0b 20  |1>,|<x2>|Mx..>. |
000009a0  78 24 3d 22 20 22 0d 03  48 17 20 c8 8e 20 6c 69  |x$=" "..H. .. li|
000009b0  6e 65 5f 6e 75 6d 62 65  72 73 25 20 ca 0d 03 52  |ne_numbers% ...R|
000009c0  12 20 20 c9 20 b9 20 3a  20 78 24 3d 22 20 22 0d  |.  . . : x$=" ".|
000009d0  03 5c 12 20 20 7f 20 3a  20 78 24 3d 22 4f 38 20  |.\.  . : x$="O8 |
000009e0  22 0d 03 66 06 20 cb 0d  03 70 27 20 ff 28 22 2a  |"..f. ...p' .("*|
000009f0  4b 45 59 31 32 20 54 54  57 49 4e 22 2b 78 24 2b  |KEY12 TTWIN"+x$+|
00000a00  22 7c 6d 51 55 49 54 7c  6d 22 2b 78 24 29 0d 03  |"|mQUIT|m"+x$)..|
00000a10  7a 0e 20 24 77 69 6d 70  25 3d 66 24 0d 03 84 22  |z. $wimp%=f$..."|
00000a20  20 c8 99 20 22 57 69 6d  70 5f 43 6f 6d 6d 61 6e  | .. "Wimp_Comman|
00000a30  64 57 69 6e 64 6f 77 22  2c 77 69 6d 70 25 0d 03  |dWindow",wimp%..|
00000a40  8e 37 20 2a 45 43 48 4f  20 54 6f 20 63 6f 6e 76  |.7 *ECHO To conv|
00000a50  65 72 74 20 42 61 73 69  63 20 66 69 6c 65 20 74  |ert Basic file t|
00000a60  6f 20 74 65 78 74 2c 70  72 65 73 73 20 4b 65 79  |o text,press Key|
00000a70  20 46 31 32 21 0d 03 98  09 20 78 24 3d be 0d 03  | F12!.... x$=...|
00000a80  a2 19 20 ff 28 22 42 41  53 49 43 20 2d 6c 6f 61  |.. .("BASIC -loa|
00000a90  64 20 22 2b 66 24 29 0d  03 ac 1e 20 c8 99 20 22  |d "+f$).... .. "|
00000aa0  57 69 6d 70 5f 43 6f 6d  6d 61 6e 64 57 69 6e 64  |Wimp_CommandWind|
00000ab0  6f 77 22 2c 30 0d 03 b6  05 e1 0d 03 c0 05 3a 0d  |ow",0.........:.|
00000ac0  03 ca 19 dd 20 f2 54 65  78 74 54 6f 42 61 73 69  |.... .TextToBasi|
00000ad0  63 28 66 24 2c 67 24 29  0d 03 d4 29 20 ff 28 22  |c(f$,g$)...) .("|
00000ae0  2a 4b 45 59 31 32 20 53  53 41 56 45 20 22 22 22  |*KEY12 SSAVE """|
00000af0  2b 67 24 2b 22 22 22 7c  6d 51 55 49 54 7c 6d 22  |+g$+"""|mQUIT|m"|
00000b00  29 0d 03 de 0e 20 24 77  69 6d 70 25 3d 66 24 0d  |).... $wimp%=f$.|
00000b10  03 e8 22 20 c8 99 20 22  57 69 6d 70 5f 43 6f 6d  |.." .. "Wimp_Com|
00000b20  6d 61 6e 64 57 69 6e 64  6f 77 22 2c 77 69 6d 70  |mandWindow",wimp|
00000b30  25 0d 03 f2 38 20 2a 45  43 48 4f 20 54 6f 20 63  |%...8 *ECHO To c|
00000b40  6f 6e 76 65 72 74 20 54  65 78 74 20 66 69 6c 65  |onvert Text file|
00000b50  20 74 6f 20 42 61 73 69  63 2c 20 70 72 65 73 73  | to Basic, press|
00000b60  20 4b 65 79 20 46 31 32  21 0d 03 fc 09 20 78 24  | Key F12!.... x$|
00000b70  3d be 0d 04 06 19 20 ff  28 22 42 41 53 49 43 20  |=..... .("BASIC |
00000b80  2d 6c 6f 61 64 20 22 2b  66 24 29 0d 04 10 1e 20  |-load "+f$).... |
00000b90  c8 99 20 22 57 69 6d 70  5f 43 6f 6d 6d 61 6e 64  |.. "Wimp_Command|
00000ba0  57 69 6e 64 6f 77 22 2c  30 0d 04 1a 05 e1 0d 04  |Window",0.......|
00000bb0  24 05 3a 0d 04 2e 29 20  20 20 20 20 20 20 dd 20  |$.:...)       . |
00000bc0  f2 45 76 65 6e 74 5f 4c  6f 61 64 46 69 6c 65 28  |.Event_LoadFile(|
00000bd0  66 69 6c 65 24 2c 74 79  70 65 24 29 0d 04 38 15  |file$,type$)..8.|
00000be0  20 20 20 20 20 20 20 c8  8e 20 74 79 70 65 24 20  |       .. type$ |
00000bf0  ca 0d 04 42 17 20 20 20  20 20 20 20 20 c9 20 22  |...B.        . "|
00000c00  42 61 73 69 63 22 20 3a  0d 04 4c 14 20 20 20 20  |Basic" :..L.    |
00000c10  20 20 20 20 20 54 79 70  65 25 3d 30 0d 04 56 15  |     Type%=0..V.|
00000c20  20 20 20 20 20 20 20 20  20 f2 4d 65 73 73 61 67  |         .Messag|
00000c30  65 0d 04 60 3b 20 20 20  20 20 20 20 20 20 f2 57  |e..`;         .W|
00000c40  69 6d 70 5f 49 63 6f 6e  50 75 74 53 70 72 69 74  |imp_IconPutSprit|
00000c50  65 28 53 61 76 65 5f 57  69 6e 64 6f 77 25 2c 30  |e(Save_Window%,0|
00000c60  2c 22 66 69 6c 65 5f 46  46 46 22 29 0d 04 6a 2b  |,"file_FFF")..j+|
00000c70  20 20 20 20 20 20 20 20  20 f2 57 69 6d 70 5f 4d  |         .Wimp_M|
00000c80  65 6e 75 45 6e 61 62 6c  65 28 53 61 76 65 5f 4d  |enuEnable(Save_M|
00000c90  65 6e 75 25 2c 32 29 0d  04 74 16 20 20 20 20 20  |enu%,2)..t.     |
00000ca0  20 20 20 20 66 24 3d 66  69 6c 65 24 3a 0d 04 7e  |    f$=file$:..~|
00000cb0  1d 20 20 20 20 20 20 20  20 c9 20 22 54 65 78 74  |.        . "Text|
00000cc0  22 2c 22 46 44 31 22 20  20 3a 0d 04 88 14 20 20  |","FD1"  :....  |
00000cd0  20 20 20 20 20 20 20 54  79 70 65 25 3d 31 0d 04  |       Type%=1..|
00000ce0  92 15 20 20 20 20 20 20  20 20 20 f2 4d 65 73 73  |..         .Mess|
00000cf0  61 67 65 0d 04 9c 3b 20  20 20 20 20 20 20 20 20  |age...;         |
00000d00  f2 57 69 6d 70 5f 49 63  6f 6e 50 75 74 53 70 72  |.Wimp_IconPutSpr|
00000d10  69 74 65 28 53 61 76 65  5f 57 69 6e 64 6f 77 25  |ite(Save_Window%|
00000d20  2c 30 2c 22 66 69 6c 65  5f 46 46 42 22 29 0d 04  |,0,"file_FFB")..|
00000d30  a6 2c 20 20 20 20 20 20  20 20 20 f2 57 69 6d 70  |.,         .Wimp|
00000d40  5f 4d 65 6e 75 44 69 73  61 62 6c 65 28 53 61 76  |_MenuDisable(Sav|
00000d50  65 5f 4d 65 6e 75 25 2c  32 29 0d 04 b0 15 20 20  |e_Menu%,2)....  |
00000d60  20 20 20 20 20 20 20 66  24 3d 66 69 6c 65 24 0d  |       f$=file$.|
00000d70  04 ba 0c 20 20 20 20 20  20 20 cb 0d 04 c4 0c 20  |...       ..... |
00000d80  20 20 20 20 20 20 e1 0d  04 ce 05 3a 0d 04 d8 15  |      .....:....|
00000d90  20 20 20 20 20 20 20 dd  20 f2 4d 65 73 73 61 67  |       . .Messag|
00000da0  65 0d 04 e2 32 20 20 20  20 20 20 20 f2 57 69 6d  |e...2       .Wim|
00000db0  70 5f 49 63 6f 6e 50 75  74 54 65 78 74 28 53 61  |p_IconPutText(Sa|
00000dc0  76 65 5f 57 69 6e 64 6f  77 25 2c 31 2c 66 69 6c  |ve_Window%,1,fil|
00000dd0  65 24 29 0d 04 ec 31 20  20 20 20 20 20 20 f2 57  |e$)...1       .W|
00000de0  69 6d 70 5f 49 63 6f 6e  43 61 72 65 74 28 53 61  |imp_IconCaret(Sa|
00000df0  76 65 5f 57 69 6e 64 6f  77 25 2c 31 2c a9 66 69  |ve_Window%,1,.fi|
00000e00  6c 65 24 29 0d 04 f6 15  20 20 20 20 20 20 20 c8  |le$)....       .|
00000e10  8e 20 54 79 70 65 25 20  ca 0d 05 00 10 20 20 20  |. Type% .....   |
00000e20  20 20 20 20 c9 20 30 20  3a 0d 05 0a 3c 20 20 20  |    . 0 :...<   |
00000e30  20 20 20 20 f2 57 69 6d  70 5f 49 63 6f 6e 50 75  |    .Wimp_IconPu|
00000e40  74 54 65 78 74 28 53 61  76 65 5f 57 69 6e 64 6f  |tText(Save_Windo|
00000e50  77 25 2c 33 2c 22 42 61  73 69 63 20 74 6f 20 54  |w%,3,"Basic to T|
00000e60  65 78 74 22 29 0d 05 14  10 20 20 20 20 20 20 20  |ext")....       |
00000e70  c9 20 31 20 3a 0d 05 1e  3c 20 20 20 20 20 20 20  |. 1 :...<       |
00000e80  f2 57 69 6d 70 5f 49 63  6f 6e 50 75 74 54 65 78  |.Wimp_IconPutTex|
00000e90  74 28 53 61 76 65 5f 57  69 6e 64 6f 77 25 2c 33  |t(Save_Window%,3|
00000ea0  2c 22 54 65 78 74 20 74  6f 20 42 61 73 69 63 22  |,"Text to Basic"|
00000eb0  29 0d 05 28 0c 20 20 20  20 20 20 20 cb 0d 05 32  |)..(.       ...2|
00000ec0  41 20 20 20 20 20 20 20  f2 57 69 6d 70 5f 49 63  |A       .Wimp_Ic|
00000ed0  6f 6e 50 75 74 54 65 78  74 28 53 61 76 65 5f 57  |onPutText(Save_W|
00000ee0  69 6e 64 6f 77 25 2c 34  2c 22 44 72 61 67 20 66  |indow%,4,"Drag f|
00000ef0  69 6c 65 20 69 63 6f 6e  20 74 6f 22 20 29 0d 05  |ile icon to" )..|
00000f00  3c 35 20 20 20 20 20 20  20 f2 57 69 6d 70 5f 49  |<5       .Wimp_I|
00000f10  63 6f 6e 50 75 74 54 65  78 74 28 53 61 76 65 5f  |conPutText(Save_|
00000f20  57 69 6e 64 6f 77 25 2c  35 2c 22 66 69 6c 65 72  |Window%,5,"filer|
00000f30  2e 22 29 0d 05 46 0c 20  20 20 20 20 20 20 e1 0d  |.")..F.       ..|
00000f40  05 50 4f f4 7c 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |.PO.|___________|
00000f50  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |________________|
*
00000f80  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 0d 05  |______________..|
00000f90  5a 4f f4 7c 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |ZO.|____________|
00000fa0  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |________________|
*
00000fd0  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 0d 05 64  |_____________..d|
00000fe0  4f f4 7c 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |O.|_____________|
00000ff0  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 5f 5f 5f 5f  |________________|
*
00001020  5f 5f 5f 5f 5f 5f 5f 5f  5f 5f 5f 5f 0d 05 6e 06  |____________..n.|
00001030  f4 7c 0d 05 78 06 f4 7c  0d 05 82 06 f4 7c 0d 05  |.|..x..|.....|..|
00001040  8c 45 f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.E.|            |
00001050  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00001060  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001070  2d 2d 2d 20 20 20 20 20  20 20 20 20 20 36 2f 31  |---          6/1|
00001080  2f 39 32 0d 05 96 2f f4  7c 20 20 20 20 20 20 20  |/92.../.|       |
00001090  20 20 20 20 20 20 20 20  20 20 20 20 57 49 4d 50  |            WIMP|
000010a0  20 50 52 4f 43 45 44 55  52 45 20 4c 49 42 52 41  | PROCEDURE LIBRA|
000010b0  52 59 0d 05 a0 06 f4 7c  0d 05 aa 2c f4 7c 20 20  |RY.....|...,.|  |
000010c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010d0  20 20 20 49 6e 64 65 78  20 6f 66 20 43 6f 6e 74  |   Index of Cont|
000010e0  65 6e 74 73 0d 05 b4 06  f4 7c 0d 05 be 35 f4 7c  |ents.....|...5.||
000010f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001100  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001110  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00001120  05 c8 06 f4 7c 0d 05 d2  24 f4 7c 20 20 20 20 20  |....|...$.|     |
00001130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
00001140  2e a0 57 69 6e 64 6f 77  73 0d 05 dc 06 f4 7c 0d  |..Windows.....|.|
00001150  05 e6 22 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..".|           |
00001160  20 20 20 20 20 20 20 20  20 32 2e a0 49 63 6f 6e  |         2..Icon|
00001170  73 0d 05 f0 06 f4 7c 0d  05 fa 22 f4 7c 20 20 20  |s.....|...".|   |
00001180  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001190  20 33 2e a0 4d 65 6e 75  73 0d 06 04 06 f4 7c 0d  | 3..Menus.....|.|
000011a0  06 0e 24 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..$.|           |
000011b0  20 20 20 20 20 20 20 20  20 34 2e a0 53 70 72 69  |         4..Spri|
000011c0  74 65 73 0d 06 18 06 f4  7c 0d 06 22 22 f4 7c 20  |tes.....|.."".| |
000011d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000011e0  20 20 20 35 2e a0 46 69  6c 65 73 0d 06 2c 06 f4  |   5..Files..,..|
000011f0  7c 0d 06 36 2a f4 7c 20  20 20 20 20 20 20 20 20  ||..6*.|         |
00001200  20 20 20 20 20 20 20 20  20 20 20 36 2e a0 4d 69  |           6..Mi|
00001210  73 63 65 6c 6c 61 6e 65  6f 75 73 0d 06 40 06 f4  |scellaneous..@..|
00001220  7c 0d 06 4a 35 f4 7c 20  20 20 20 20 20 20 20 20  ||..J5.|         |
00001230  20 20 20 20 20 20 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |       ---------|
00001240  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001250  2d 2d 2d 2d 2d 2d 0d 06  54 06 f4 7c 0d 06 5e 06  |------..T..|..^.|
00001260  f4 7c 0d 06 68 06 f4 7c  0d 06 72 06 f4 7c 0d 06  |.|..h..|..r..|..|
00001270  7c 06 f4 7c 0d 06 86 06  f4 7c 0d 06 90 35 f4 7c  ||..|.....|...5.||
00001280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001290  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000012a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
000012b0  06 9a 2a f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..*.|           |
000012c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
000012d0  2e a0 57 69 6e 64 6f 77  73 0d 06 a4 35 f4 7c 20  |..Windows...5.| |
000012e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2d  |               -|
000012f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001300  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 06  |--------------..|
00001310  ae 06 f4 7c 0d 06 b8 06  f4 7c 0d 06 c2 40 f4 7c  |...|.....|...@.||
00001320  20 20 20 20 20 20 20 20  20 20 2d 2d 2d 2d 2d 2d  |          ------|
00001330  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001350  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 06 cc 06 f4 7c  |----------.....||
00001360  0d 06 d6 28 f4 7c 20 20  20 20 20 20 20 20 20 20  |...(.|          |
00001370  20 20 20 20 20 20 20 20  20 20 20 20 50 72 6f 63  |            Proc|
00001380  65 64 75 72 65 73 20 3a  0d 06 e0 06 f4 7c 0d 06  |edures :.....|..|
00001390  ea 38 f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.8.|            |
000013a0  20 50 52 4f 43 57 69 6d  70 5f 57 69 6e 64 6f 77  | PROCWimp_Window|
000013b0  41 6c 65 72 74 28 74 69  74 6c 65 24 2c 6d 65 73  |Alert(title$,mes|
000013c0  73 61 67 65 24 29 0d 06  f4 43 f4 7c 20 20 20 20  |sage$)...C.|    |
000013d0  20 20 20 20 20 20 20 20  20 50 52 4f 43 57 69 6d  |         PROCWim|
000013e0  70 5f 57 69 6e 64 6f 77  41 6c 65 72 74 42 6f 78  |p_WindowAlertBox|
000013f0  28 74 69 74 6c 65 24 2c  6d 65 73 73 61 67 65 24  |(title$,message$|
00001400  2c 62 75 74 74 6f 6e 25  29 0d 06 fe 37 f4 7c 20  |,button%)...7.| |
00001410  20 20 20 20 20 20 20 20  20 20 20 20 46 4e 57 69  |            FNWi|
00001420  6d 70 5f 57 69 6e 64 6f  77 43 61 6e 63 65 6c 28  |mp_WindowCancel(|
00001430  74 69 74 6c 65 24 2c 6d  65 73 73 61 67 65 24 29  |title$,message$)|
00001440  0d 07 08 3b f4 7c 20 20  20 20 20 20 20 20 20 20  |...;.|          |
00001450  20 20 20 50 52 4f 43 57  69 6d 70 5f 57 69 6e 64  |   PROCWimp_Wind|
00001460  6f 77 45 72 72 6f 72 42  6f 78 28 74 69 74 6c 65  |owErrorBox(title|
00001470  24 2c 6d 65 73 73 61 67  65 24 29 0d 07 12 2e f4  |$,message$).....|
00001480  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 46 4e  ||             FN|
00001490  57 69 6d 70 5f 57 69 6e  64 6f 77 54 69 74 6c 65  |Wimp_WindowTitle|
000014a0  28 77 69 6e 64 6f 77 25  29 0d 07 1c 2d f4 7c 20  |(window%)...-.| |
000014b0  20 20 20 20 20 20 20 20  20 20 20 20 46 4e 57 69  |            FNWi|
000014c0  6d 70 5f 57 69 6e 64 6f  77 4c 6f 61 64 28 77 69  |mp_WindowLoad(wi|
000014d0  6e 64 6f 77 24 29 0d 07  26 3b f4 7c 20 20 20 20  |ndow$)..&;.|    |
000014e0  20 20 20 20 20 20 20 20  20 46 4e 57 69 6d 70 5f  |         FNWimp_|
000014f0  57 69 6e 64 6f 77 4c 6f  61 64 46 72 6f 6d 28 77  |WindowLoadFrom(w|
00001500  69 6e 64 6f 77 24 2c 74  65 6d 70 6c 61 74 65 24  |indow$,template$|
00001510  29 0d 07 30 27 f4 7c 20  20 20 20 20 20 20 20 20  |)..0'.|         |
00001520  20 20 20 20 46 4e 57 69  6d 70 5f 57 69 6e 64 6f  |    FNWimp_Windo|
00001530  77 58 4f 72 69 67 69 6e  0d 07 3a 27 f4 7c 20 20  |wXOrigin..:'.|  |
00001540  20 20 20 20 20 20 20 20  20 20 20 46 4e 57 69 6d  |           FNWim|
00001550  70 5f 57 69 6e 64 6f 77  59 4f 72 69 67 69 6e 0d  |p_WindowYOrigin.|
00001560  07 44 35 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |.D5.|           |
00001570  20 20 50 52 4f 43 57 69  6d 70 5f 57 69 6e 64 6f  |  PROCWimp_Windo|
00001580  77 42 72 69 6e 67 54 6f  54 6f 70 28 77 69 6e 64  |wBringToTop(wind|
00001590  6f 77 25 29 0d 07 4e 34  f4 7c 20 20 20 20 20 20  |ow%)..N4.|      |
000015a0  20 20 20 20 20 20 20 50  52 4f 43 57 69 6d 70 5f  |       PROCWimp_|
000015b0  57 69 6e 64 6f 77 46 6f  72 63 65 44 72 61 77 28  |WindowForceDraw(|
000015c0  77 69 6e 64 6f 77 25 29  0d 07 58 2f f4 7c 20 20  |window%)..X/.|  |
000015d0  20 20 20 20 20 20 20 20  20 20 20 50 52 4f 43 57  |           PROCW|
000015e0  69 6d 70 5f 57 69 6e 64  6f 77 4f 70 65 6e 28 77  |imp_WindowOpen(w|
000015f0  69 6e 64 6f 77 25 29 0d  07 62 25 f4 7c 20 20 20  |indow%)..b%.|   |
00001600  20 20 20 20 20 20 20 20  20 20 50 52 4f 43 57 69  |          PROCWi|
00001610  6d 70 5f 44 72 61 77 28  78 2c 79 29 0d 07 6c 25  |mp_Draw(x,y)..l%|
00001620  f4 7c 20 20 20 20 20 20  20 20 20 20 20 20 20 50  |.|             P|
00001630  52 4f 43 57 69 6d 70 5f  4d 6f 76 65 28 78 2c 79  |ROCWimp_Move(x,y|
00001640  29 0d 07 76 2b f4 7c 20  20 20 20 20 20 20 20 20  |)..v+.|         |
00001650  20 20 20 20 50 52 4f 43  57 69 6d 70 5f 4c 69 6e  |    PROCWimp_Lin|
00001660  65 28 78 2c 79 2c 78 31  2c 79 31 29 0d 07 80 06  |e(x,y,x1,y1)....|
00001670  f4 7c 0d 07 8a 3f f4 7c  20 20 20 20 20 20 20 20  |.|...?.|        |
00001680  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
00001690  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000016b0  2d 0d 07 94 06 f4 7c 0d  07 9e 06 f4 7c 0d 07 a8  |-.....|.....|...|
000016c0  06 f4 7c 0d 07 b2 28 dd  20 f2 57 69 6d 70 5f 57  |..|...(. .Wimp_W|
000016d0  69 6e 64 6f 77 41 6c 65  72 74 28 74 69 74 6c 65  |indowAlert(title|
000016e0  24 2c 6d 65 73 73 61 67  65 24 29 0d 07 bc 2b f2  |$,message$)...+.|
000016f0  57 69 6d 70 5f 57 69 6e  64 6f 77 41 6c 65 72 74  |Wimp_WindowAlert|
00001700  42 6f 78 28 74 69 74 6c  65 24 2c 6d 65 73 73 61  |Box(title$,messa|
00001710  67 65 24 2c 30 29 0d 07  c6 05 e1 0d 07 d0 05 3a  |ge$,0).........:|
00001720  0d 07 da 33 dd 20 f2 57  69 6d 70 5f 57 69 6e 64  |...3. .Wimp_Wind|
00001730  6f 77 41 6c 65 72 74 42  6f 78 28 74 69 74 6c 65  |owAlertBox(title|
00001740  24 2c 6d 65 73 73 61 67  65 24 2c 62 75 74 74 6f  |$,message$,butto|
00001750  6e 25 29 0d 07 e4 0f ea  20 72 65 73 70 6f 6e 73  |n%)..... respons|
00001760  65 25 0d 07 ee 17 24 28  77 69 6d 70 25 2b 34 29  |e%....$(wimp%+4)|
00001770  3d 6d 65 73 73 61 67 65  24 0d 07 f8 10 c8 8e 20  |=message$...... |
00001780  62 75 74 74 6f 6e 25 20  ca 0d 08 02 19 20 c9 20  |button% ..... . |
00001790  32 20 20 20 20 3a 20 72  65 73 70 6f 6e 73 65 25  |2    : response%|
000017a0  3d 31 0d 08 0c 1a 20 c9  20 31 20 20 20 20 3a 20  |=1.... . 1    : |
000017b0  72 65 73 70 6f 6e 73 65  25 3d 31 35 0d 08 16 21  |response%=15...!|
000017c0  20 c9 20 33 20 20 20 20  3a 20 72 65 73 70 6f 6e  | . 3    : respon|
000017d0  73 65 25 3d 28 31 3c 3c  35 29 2b 31 36 0d 08 20  |se%=(1<<5)+16.. |
000017e0  21 20 c9 20 34 20 20 20  20 3a 20 72 65 73 70 6f  |! . 4    : respo|
000017f0  6e 73 65 25 3d 28 31 3c  3c 36 29 2b 31 36 0d 08  |nse%=(1<<6)+16..|
00001800  2a 14 7f 20 3a 20 72 65  73 70 6f 6e 73 65 25 3d  |*.. : response%=|
00001810  31 36 0d 08 34 05 cb 0d  08 3e 3d c8 99 20 22 57  |16..4....>=.. "W|
00001820  69 6d 70 5f 52 65 70 6f  72 74 45 72 72 6f 72 22  |imp_ReportError"|
00001830  2c 77 69 6d 70 25 2c 72  65 73 70 6f 6e 73 65 25  |,wimp%,response%|
00001840  2c 74 69 74 6c 65 24 20  b8 20 2c 72 65 73 70 6f  |,title$ . ,respo|
00001850  6e 73 65 25 0d 08 48 05  e1 0d 08 52 05 3a 0d 08  |nse%..H....R.:..|
00001860  5c 29 dd 20 a4 57 69 6d  70 5f 57 69 6e 64 6f 77  |\). .Wimp_Window|
00001870  43 61 6e 63 65 6c 28 74  69 74 6c 65 24 2c 6d 65  |Cancel(title$,me|
00001880  73 73 61 67 65 24 29 0d  08 66 17 24 28 77 69 6d  |ssage$)..f.$(wim|
00001890  70 25 2b 34 29 3d 6d 65  73 73 61 67 65 24 0d 08  |p%+4)=message$..|
000018a0  70 10 72 65 73 70 6f 6e  73 65 25 3d 32 33 0d 08  |p.response%=23..|
000018b0  7a 3d c8 99 20 22 57 69  6d 70 5f 52 65 70 6f 72  |z=.. "Wimp_Repor|
000018c0  74 45 72 72 6f 72 22 2c  77 69 6d 70 25 2c 72 65  |tError",wimp%,re|
000018d0  73 70 6f 6e 73 65 25 2c  74 69 74 6c 65 24 20 b8  |sponse%,title$ .|
000018e0  20 2c 72 65 73 70 6f 6e  73 65 25 0d 08 84 10 3d  | ,response%....=|
000018f0  72 65 73 70 6f 6e 73 65  25 2d 32 0d 08 8e 05 3a  |response%-2....:|
00001900  0d 08 98 2b dd 20 f2 57  69 6d 70 5f 57 69 6e 64  |...+. .Wimp_Wind|
00001910  6f 77 45 72 72 6f 72 42  6f 78 28 74 69 74 6c 65  |owErrorBox(title|
00001920  24 2c 6d 65 73 73 61 67  65 24 29 0d 08 a2 2b f2  |$,message$)...+.|
00001930  57 69 6d 70 5f 57 69 6e  64 6f 77 41 6c 65 72 74  |Wimp_WindowAlert|
00001940  42 6f 78 28 74 69 74 6c  65 24 2c 6d 65 73 73 61  |Box(title$,messa|
00001950  67 65 24 2c 32 29 0d 08  ac 05 e1 0d 08 b6 05 3a  |ge$,2).........:|
00001960  0d 08 c0 20 dd 20 a4 57  69 6d 70 5f 57 69 6e 64  |... . .Wimp_Wind|
00001970  6f 77 54 69 74 6c 65 28  77 69 6e 64 6f 77 25 29  |owTitle(window%)|
00001980  0d 08 ca 13 77 69 6d 70  25 21 30 3d 77 69 6e 64  |....wimp%!0=wind|
00001990  6f 77 25 0d 08 d4 20 c8  99 20 22 57 69 6d 70 5f  |ow%... .. "Wimp_|
000019a0  47 65 74 57 69 6e 64 49  6e 66 6f 22 2c 2c 77 69  |GetWindInfo",,wi|
000019b0  6d 70 25 0d 08 de 36 e7  20 28 28 77 69 6d 70 25  |mp%...6. ((wimp%|
000019c0  21 36 30 29 80 26 31 30  30 29 3d 30 20 85 20 31  |!60).&100)=0 . 1|
000019d0  2c 22 54 69 74 6c 65 20  69 73 6e 27 74 20 69 6e  |,"Title isn't in|
000019e0  64 69 72 65 63 74 65 64  22 0d 08 e8 10 3d 24 28  |directed"....=$(|
000019f0  77 69 6d 70 25 21 37 36  29 0d 08 f2 05 3a 0d 08  |wimp%!76)....:..|
00001a00  fc 1f dd 20 a4 57 69 6d  70 5f 57 69 6e 64 6f 77  |... .Wimp_Window|
00001a10  4c 6f 61 64 28 77 69 6e  64 6f 77 24 29 0d 09 06  |Load(window$)...|
00001a20  39 3d a4 57 69 6d 70 5f  57 69 6e 64 6f 77 4c 6f  |9=.Wimp_WindowLo|
00001a30  61 64 46 72 6f 6d 28 77  69 6e 64 6f 77 24 2c 22  |adFrom(window$,"|
00001a40  3c 4f 62 65 79 24 44 69  72 3e 2e 54 65 6d 70 6c  |<Obey$Dir>.Templ|
00001a50  61 74 65 73 22 29 0d 09  10 05 3a 0d 09 1a 2d dd  |ates")....:...-.|
00001a60  20 a4 57 69 6d 70 5f 57  69 6e 64 6f 77 4c 6f 61  | .Wimp_WindowLoa|
00001a70  64 46 72 6f 6d 28 77 69  6e 64 6f 77 24 2c 74 65  |dFrom(window$,te|
00001a80  6d 70 6c 61 74 65 24 29  0d 09 24 08 ea 20 63 25  |mplate$)..$.. c%|
00001a90  0d 09 2e 25 c8 99 20 22  57 69 6d 70 5f 4f 70 65  |...%.. "Wimp_Ope|
00001aa0  6e 54 65 6d 70 6c 61 74  65 22 2c 2c 74 65 6d 70  |nTemplate",,temp|
00001ab0  6c 61 74 65 24 0d 09 38  4d c8 99 20 22 57 69 6d  |late$..8M.. "Wim|
00001ac0  70 5f 4c 6f 61 64 54 65  6d 70 6c 61 74 65 22 2c  |p_LoadTemplate",|
00001ad0  2c 77 69 6d 70 25 2c 69  63 6f 6e 73 25 2c 69 63  |,wimp%,icons%,ic|
00001ae0  6f 6e 5f 6d 65 6d 6f 72  79 25 2c 2d 31 2c 77 69  |on_memory%,-1,wi|
00001af0  6e 64 6f 77 24 2c 30 20  b8 20 2c 2c 69 63 6f 6e  |ndow$,0 . ,,icon|
00001b00  73 25 0d 09 42 25 e7 20  73 70 72 69 74 65 73 25  |s%..B%. sprites%|
00001b10  3c 3e 30 20 8c 20 77 69  6d 70 25 21 36 34 3d 73  |<>0 . wimp%!64=s|
00001b20  70 72 69 74 65 73 25 0d  09 4c 26 c8 99 20 22 57  |prites%..L&.. "W|
00001b30  69 6d 70 5f 43 72 65 61  74 65 57 69 6e 64 6f 77  |imp_CreateWindow|
00001b40  22 2c 2c 77 69 6d 70 25  20 b8 20 63 25 0d 09 56  |",,wimp% . c%..V|
00001b50  1b c8 99 20 22 57 69 6d  70 5f 43 6c 6f 73 65 54  |... "Wimp_CloseT|
00001b60  65 6d 70 6c 61 74 65 22  0d 09 60 07 3d 63 25 0d  |emplate"..`.=c%.|
00001b70  09 6a 05 3a 0d 09 74 19  dd 20 a4 57 69 6d 70 5f  |.j.:..t.. .Wimp_|
00001b80  57 69 6e 64 6f 77 58 4f  72 69 67 69 6e 0d 09 7e  |WindowXOrigin..~|
00001b90  18 3d 31 36 2b 77 69 6d  70 25 21 34 2d 77 69 6d  |.=16+wimp%!4-wim|
00001ba0  70 25 21 32 30 0d 09 88  05 3a 0d 09 92 19 dd 20  |p%!20....:..... |
00001bb0  a4 57 69 6d 70 5f 57 69  6e 64 6f 77 59 4f 72 69  |.Wimp_WindowYOri|
00001bc0  67 69 6e 0d 09 9c 1a 3d  2d 31 36 2b 77 69 6d 70  |gin....=-16+wimp|
00001bd0  25 21 31 36 2d 77 69 6d  70 25 21 32 34 0d 09 a6  |%!16-wimp%!24...|
00001be0  05 3a 0d 09 b0 25 dd 20  f2 57 69 6d 70 5f 57 69  |.:...%. .Wimp_Wi|
00001bf0  6e 64 6f 77 42 72 69 6e  67 54 6f 54 6f 70 28 77  |ndowBringToTop(w|
00001c00  69 6e 64 6f 77 25 29 0d  09 ba 12 21 77 69 6d 70  |indow%)....!wimp|
00001c10  25 3d 77 69 6e 64 6f 77  25 0d 09 c4 23 c8 99 20  |%=window%...#.. |
00001c20  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00001c30  74 61 74 65 22 2c 2c 77  69 6d 70 25 0d 09 ce 0f  |tate",,wimp%....|
00001c40  77 69 6d 70 25 21 32 38  3d 2d 31 0d 09 d8 1f c8  |wimp%!28=-1.....|
00001c50  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
00001c60  6f 77 22 2c 2c 77 69 6d  70 25 0d 09 e2 05 e1 0d  |ow",,wimp%......|
00001c70  09 ec 05 3a 0d 09 f6 21  dd 20 20 f2 57 69 6d 70  |...:...!.  .Wimp|
00001c80  5f 57 69 6e 64 6f 77 43  6c 6f 73 65 28 77 69 6e  |_WindowClose(win|
00001c90  64 6f 77 25 29 0d 0a 00  12 21 77 69 6d 70 25 3d  |dow%)....!wimp%=|
00001ca0  77 69 6e 64 6f 77 25 0d  0a 0a 20 c8 99 20 22 57  |window%... .. "W|
00001cb0  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
00001cc0  2c 2c 77 69 6d 70 25 0d  0a 14 05 e1 0d 0a 1e 05  |,,wimp%.........|
00001cd0  3a 0d 0a 28 24 dd 20 f2  57 69 6d 70 5f 57 69 6e  |:..($. .Wimp_Win|
00001ce0  64 6f 77 46 6f 72 63 65  44 72 61 77 28 77 69 6e  |dowForceDraw(win|
00001cf0  64 6f 77 25 29 0d 0a 32  10 c8 8e 20 77 69 6e 64  |dow%)..2... wind|
00001d00  6f 77 25 20 ca 0d 0a 3c  38 20 c9 20 2d 31 20 20  |ow% ...<8 . -1  |
00001d10  20 3a 20 c8 99 20 22 57  69 6d 70 5f 46 6f 72 63  | : .. "Wimp_Forc|
00001d20  65 52 65 64 72 61 77 22  2c 2d 31 2c 30 2c 30 2c  |eRedraw",-1,0,0,|
00001d30  32 2a 31 32 38 30 2c 32  2a 31 30 32 34 0d 0a 46  |2*1280,2*1024..F|
00001d40  39 20 7f 20 3a 20 c8 99  20 22 57 69 6d 70 5f 46  |9 . : .. "Wimp_F|
00001d50  6f 72 63 65 52 65 64 72  61 77 22 2c 77 69 6e 64  |orceRedraw",wind|
00001d60  6f 77 25 2c 30 2c 2d 32  2a 31 30 32 34 2c 32 2a  |ow%,0,-2*1024,2*|
00001d70  31 32 38 30 2c 30 0d 0a  50 05 cb 0d 0a 5a 05 e1  |1280,0..P....Z..|
00001d80  0d 0a 64 05 3a 0d 0a 6e  1f dd 20 f2 57 69 6d 70  |..d.:..n.. .Wimp|
00001d90  5f 57 69 6e 64 6f 77 4f  70 65 6e 28 77 69 6e 64  |_WindowOpen(wind|
00001da0  6f 77 25 29 0d 0a 78 12  21 77 69 6d 70 25 3d 77  |ow%)..x.!wimp%=w|
00001db0  69 6e 64 6f 77 25 0d 0a  82 23 c8 99 20 22 57 69  |indow%...#.. "Wi|
00001dc0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00001dd0  65 22 2c 2c 77 69 6d 70  25 0d 0a 8c 1f c8 99 20  |e",,wimp%...... |
00001de0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00001df0  22 2c 2c 77 69 6d 70 25  0d 0a 96 05 e1 0d 0a a0  |",,wimp%........|
00001e00  05 3a 0d 0a aa 15 dd 20  f2 57 69 6d 70 5f 44 72  |.:..... .Wimp_Dr|
00001e10  61 77 28 78 2c 79 29 0d  0a b4 1e 20 df 20 78 2d  |aw(x,y).... . x-|
00001e20  78 5f 6f 72 69 67 69 6e  25 2c 79 2d 79 5f 6f 72  |x_origin%,y-y_or|
00001e30  69 67 69 6e 25 0d 0a be  05 e1 0d 0a c8 05 3a 0d  |igin%.........:.|
00001e40  0a d2 15 dd 20 f2 57 69  6d 70 5f 4d 6f 76 65 28  |.... .Wimp_Move(|
00001e50  78 2c 79 29 0d 0a dc 1e  20 ec 20 78 2d 78 5f 6f  |x,y).... . x-x_o|
00001e60  72 69 67 69 6e 25 2c 79  5f 6f 72 69 67 69 6e 25  |rigin%,y_origin%|
00001e70  2d 79 0d 0a e6 05 e1 0d  0a f0 05 3a 0d 0a fa 1b  |-y.........:....|
00001e80  dd 20 f2 57 69 6d 70 5f  4c 69 6e 65 28 78 2c 79  |. .Wimp_Line(x,y|
00001e90  2c 78 31 2c 79 31 29 0d  0b 04 38 20 86 20 78 2d  |,x1,y1)...8 . x-|
00001ea0  78 5f 6f 72 69 67 69 6e  25 2c 79 2d 79 5f 6f 72  |x_origin%,y-y_or|
00001eb0  69 67 69 6e 25 2c 78 31  2d 78 5f 6f 72 69 67 69  |igin%,x1-x_origi|
00001ec0  6e 25 2c 79 31 2d 79 5f  6f 72 69 67 69 6e 25 0d  |n%,y1-y_origin%.|
00001ed0  0b 0e 05 e1 0d 0b 18 05  3a 0d 0b 22 06 f4 7c 0d  |........:.."..|.|
00001ee0  0b 2c 06 f4 7c 0d 0b 36  06 f4 7c 0d 0b 40 31 f4  |.,..|..6..|..@1.|
00001ef0  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  ||               |
00001f00  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
00001f10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 0b 4a 28  |------------..J(|
00001f20  f4 7c 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.|              |
00001f30  20 20 20 20 20 20 20 20  20 20 20 20 32 2e a0 49  |            2..I|
00001f40  63 6f 6e 73 0d 0b 54 31  f4 7c 20 20 20 20 20 20  |cons..T1.|      |
00001f50  20 20 20 20 20 20 20 20  20 20 20 20 2d 2d 2d 2d  |            ----|
00001f60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001f70  2d 2d 2d 2d 2d 0d 0b 5e  06 f4 7c 0d 0b 68 06 f4  |-----..^..|..h..|
00001f80  7c 0d 0b 72 3d f4 7c 20  20 20 20 20 20 20 20 20  ||..r=.|         |
00001f90  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00001fa0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001fb0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0b  |--------------..|
00001fc0  7c 06 f4 7c 0d 0b 86 28  f4 7c 20 20 20 20 20 20  ||..|...(.|      |
00001fd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001fe0  50 72 6f 63 65 64 75 72  65 73 20 3a 0d 0b 90 06  |Procedures :....|
00001ff0  f4 7c 0d 0b 9a 2b f4 7c  20 20 20 20 20 20 20 20  |.|...+.|        |
00002000  20 20 20 20 20 20 46 4e  57 69 6d 70 5f 49 63 6f  |      FNWimp_Ico|
00002010  6e 42 61 72 28 53 70 72  69 74 65 24 29 0d 0b a4  |nBar(Sprite$)...|
00002020  3c f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 20  |<.|             |
00002030  20 50 52 4f 43 57 69 6d  70 5f 49 63 6f 6e 43 61  | PROCWimp_IconCa|
00002040  72 65 74 28 77 69 6e 64  6f 77 25 2c 69 63 6f 6e  |ret(window%,icon|
00002050  25 2c 63 68 61 72 73 25  29 0d 0b ae 32 f4 7c 20  |%,chars%)...2.| |
00002060  20 20 20 20 20 20 20 20  20 20 20 20 20 46 4e 57  |             FNW|
00002070  69 6d 70 5f 49 63 6f 6e  54 65 78 74 28 77 69 6e  |imp_IconText(win|
00002080  64 6f 77 25 2c 69 63 6f  6e 25 29 0d 0b b8 38 f4  |dow%,icon%)...8.|
00002090  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 46  ||              F|
000020a0  4e 57 69 6d 70 5f 49 63  6f 6e 56 61 6c 69 64 61  |NWimp_IconValida|
000020b0  74 69 6f 6e 28 77 69 6e  64 6f 77 25 2c 69 63 6f  |tion(window%,ico|
000020c0  6e 25 29 0d 0b c2 37 f4  7c 20 20 20 20 20 20 20  |n%)...7.|       |
000020d0  20 20 20 20 20 20 20 50  52 4f 43 57 69 6d 70 5f  |       PROCWimp_|
000020e0  49 63 6f 6e 44 69 73 61  62 6c 65 28 77 69 6e 64  |IconDisable(wind|
000020f0  6f 77 25 2c 69 63 6f 6e  25 29 0d 0b cc 36 f4 7c  |ow%,icon%)...6.||
00002100  20 20 20 20 20 20 20 20  20 20 20 20 20 20 50 52  |              PR|
00002110  4f 43 57 69 6d 70 5f 49  63 6f 6e 45 6e 61 62 6c  |OCWimp_IconEnabl|
00002120  65 28 77 69 6e 64 6f 77  25 2c 69 63 6f 6e 25 29  |e(window%,icon%)|
00002130  0d 0b d6 3f f4 7c 20 20  20 20 20 20 20 20 20 20  |...?.|          |
00002140  20 20 20 20 46 4e 57 69  6d 70 5f 49 63 6f 6e 50  |    FNWimp_IconP|
00002150  75 74 53 70 72 69 74 65  28 77 69 6e 64 6f 77 25  |utSprite(window%|
00002160  2c 69 63 6f 6e 25 2c 73  70 72 69 74 65 24 29 0d  |,icon%,sprite$).|
00002170  0b e0 3d f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..=.|           |
00002180  20 20 20 50 52 4f 43 57  69 6d 70 5f 49 63 6f 6e  |   PROCWimp_Icon|
00002190  50 75 74 54 65 78 74 28  77 69 6e 64 6f 77 25 2c  |PutText(window%,|
000021a0  69 63 6f 6e 25 2c 74 65  78 74 24 29 0d 0b ea 06  |icon%,text$)....|
000021b0  f4 7c 0d 0b f4 3d f4 7c  20 20 20 20 20 20 20 20  |.|...=.|        |
000021c0  20 20 20 20 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |     -----------|
000021d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000021e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
000021f0  0b fe 06 f4 7c 0d 0c 08  05 3a 0d 0c 12 1c dd 20  |....|....:..... |
00002200  a4 57 69 6d 70 5f 49 63  6f 6e 42 61 72 28 53 70  |.Wimp_IconBar(Sp|
00002210  72 69 74 65 24 29 0d 0c  1c 0b ea 20 69 63 6f 6e  |rite$)..... icon|
00002220  25 0d 0c 26 0e 77 69 6d  70 25 21 30 3d 2d 31 0d  |%..&.wimp%!0=-1.|
00002230  0c 30 1d 77 69 6d 70 25  21 34 3d 30 20 20 20 20  |.0.wimp%!4=0    |
00002240  20 3a 20 77 69 6d 70 25  21 38 3d 30 0d 0c 3a 1d  | : wimp%!8=0..:.|
00002250  77 69 6d 70 25 21 31 32  3d 36 38 20 3a 20 77 69  |wimp%!12=68 : wi|
00002260  6d 70 25 21 31 36 3d 36  38 0d 0c 44 12 77 69 6d  |mp%!16=68..D.wim|
00002270  70 25 21 32 30 3d 26 33  30 30 32 0d 0c 4e 17 24  |p%!20=&3002..N.$|
00002280  28 77 69 6d 70 25 2b 32  34 29 3d 53 70 72 69 74  |(wimp%+24)=Sprit|
00002290  65 24 0d 0c 58 27 c8 99  20 22 57 69 6d 70 5f 43  |e$..X'.. "Wimp_C|
000022a0  72 65 61 74 65 49 63 6f  6e 22 2c 2c 77 69 6d 70  |reateIcon",,wimp|
000022b0  25 20 b8 20 69 63 6f 6e  25 0d 0c 62 0a 3d 69 63  |% . icon%..b.=ic|
000022c0  6f 6e 25 0d 0c 6c 05 3a  0d 0c 76 2b dd 20 f2 57  |on%..l.:..v+. .W|
000022d0  69 6d 70 5f 49 63 6f 6e  43 61 72 65 74 28 77 69  |imp_IconCaret(wi|
000022e0  6e 64 6f 77 25 2c 69 63  6f 6e 25 2c 63 68 61 72  |ndow%,icon%,char|
000022f0  73 25 29 0d 0c 80 38 c8  99 20 22 57 69 6d 70 5f  |s%)...8.. "Wimp_|
00002300  53 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |SetCaretPosition|
00002310  22 2c 77 69 6e 64 6f 77  25 2c 69 63 6f 6e 25 2c  |",window%,icon%,|
00002320  2c 2c 2d 31 2c 63 68 61  72 73 25 0d 0c 8a 05 e1  |,,-1,chars%.....|
00002330  0d 0c 94 05 3a 0d 0c 9e  23 dd 20 a4 57 69 6d 70  |....:...#. .Wimp|
00002340  5f 49 63 6f 6e 54 65 78  74 28 77 69 6e 64 6f 77  |_IconText(window|
00002350  25 2c 69 63 6f 6e 25 29  0d 0c a8 23 77 69 6d 70  |%,icon%)...#wimp|
00002360  25 21 30 3d 77 69 6e 64  6f 77 25 20 3a 20 77 69  |%!0=window% : wi|
00002370  6d 70 25 21 34 3d 69 63  6f 6e 25 0d 0c b2 21 c8  |mp%!4=icon%...!.|
00002380  99 20 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |. "Wimp_GetIconS|
00002390  74 61 74 65 22 2c 2c 77  69 6d 70 25 0d 0c bc 37  |tate",,wimp%...7|
000023a0  e7 20 28 28 77 69 6d 70  25 21 32 34 29 20 80 20  |. ((wimp%!24) . |
000023b0  26 31 30 30 29 3d 30 20  85 20 31 2c 22 49 63 6f  |&100)=0 . 1,"Ico|
000023c0  6e 20 69 73 6e 27 74 20  69 6e 64 69 72 65 63 74  |n isn't indirect|
000023d0  65 64 22 0d 0c c6 10 3d  24 28 77 69 6d 70 25 21  |ed"....=$(wimp%!|
000023e0  32 38 29 0d 0c d0 05 3a  0d 0c da 29 dd 20 a4 57  |28)....:...). .W|
000023f0  69 6d 70 5f 49 63 6f 6e  56 61 6c 69 64 61 74 69  |imp_IconValidati|
00002400  6f 6e 28 77 69 6e 64 6f  77 25 2c 69 63 6f 6e 25  |on(window%,icon%|
00002410  29 0d 0c e4 23 77 69 6d  70 25 21 30 3d 77 69 6e  |)...#wimp%!0=win|
00002420  64 6f 77 25 20 3a 20 77  69 6d 70 25 21 34 3d 69  |dow% : wimp%!4=i|
00002430  63 6f 6e 25 0d 0c ee 21  c8 99 20 22 57 69 6d 70  |con%...!.. "Wimp|
00002440  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00002450  77 69 6d 70 25 0d 0c f8  37 e7 20 28 28 77 69 6d  |wimp%...7. ((wim|
00002460  70 25 21 32 34 29 20 80  20 26 31 30 30 29 3d 30  |p%!24) . &100)=0|
00002470  20 85 20 31 2c 22 49 63  6f 6e 20 69 73 6e 27 74  | . 1,"Icon isn't|
00002480  20 69 6e 64 69 72 65 63  74 65 64 22 0d 0d 02 10  | indirected"....|
00002490  3d 24 28 77 69 6d 70 25  21 33 32 29 0d 0d 0c 05  |=$(wimp%!32)....|
000024a0  3a 0d 0d 16 26 dd 20 f2  57 69 6d 70 5f 49 63 6f  |:...&. .Wimp_Ico|
000024b0  6e 44 69 73 61 62 6c 65  28 77 69 6e 64 6f 77 25  |nDisable(window%|
000024c0  2c 69 63 6f 6e 25 29 0d  0d 20 23 77 69 6d 70 25  |,icon%).. #wimp%|
000024d0  21 30 3d 77 69 6e 64 6f  77 25 20 3a 20 77 69 6d  |!0=window% : wim|
000024e0  70 25 21 34 3d 69 63 6f  6e 25 0d 0d 2a 24 77 69  |p%!4=icon%..*$wi|
000024f0  6d 70 25 21 38 3d 31 3c  3c 32 32 20 20 20 3a 20  |mp%!8=1<<22   : |
00002500  77 69 6d 70 25 21 31 32  3d 31 3c 3c 32 32 0d 0d  |wimp%!12=1<<22..|
00002510  34 21 c8 99 20 22 57 69  6d 70 5f 53 65 74 49 63  |4!.. "Wimp_SetIc|
00002520  6f 6e 53 74 61 74 65 22  2c 2c 77 69 6d 70 25 0d  |onState",,wimp%.|
00002530  0d 3e 05 e1 0d 0d 48 05  3a 0d 0d 52 25 dd 20 f2  |.>....H.:..R%. .|
00002540  57 69 6d 70 5f 49 63 6f  6e 45 6e 61 62 6c 65 28  |Wimp_IconEnable(|
00002550  77 69 6e 64 6f 77 25 2c  69 63 6f 6e 25 29 0d 0d  |window%,icon%)..|
00002560  5c 23 77 69 6d 70 25 21  30 3d 77 69 6e 64 6f 77  |\#wimp%!0=window|
00002570  25 20 3a 20 77 69 6d 70  25 21 34 3d 69 63 6f 6e  |% : wimp%!4=icon|
00002580  25 0d 0d 66 24 77 69 6d  70 25 21 38 3d 30 20 20  |%..f$wimp%!8=0  |
00002590  20 20 20 20 20 3a 20 77  69 6d 70 25 21 31 32 3d  |     : wimp%!12=|
000025a0  31 3c 3c 32 32 0d 0d 70  21 c8 99 20 22 57 69 6d  |1<<22..p!.. "Wim|
000025b0  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
000025c0  2c 77 69 6d 70 25 0d 0d  7a 05 e1 0d 0d 84 05 3a  |,wimp%..z......:|
000025d0  0d 0d 8e 30 dd 20 f2 57  69 6d 70 5f 49 63 6f 6e  |...0. .Wimp_Icon|
000025e0  50 75 74 53 70 72 69 74  65 28 77 69 6e 64 6f 77  |PutSprite(window|
000025f0  25 2c 69 63 6f 6e 25 2c  73 70 72 69 74 65 24 29  |%,icon%,sprite$)|
00002600  0d 0d 98 21 77 69 6d 70  25 21 30 3d 77 69 6e 64  |...!wimp%!0=wind|
00002610  6f 77 25 3a 77 69 6d 70  25 21 34 3d 69 63 6f 6e  |ow%:wimp%!4=icon|
00002620  25 0d 0d a2 21 c8 99 20  22 57 69 6d 70 5f 47 65  |%...!.. "Wimp_Ge|
00002630  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 77 69 6d  |tIconState",,wim|
00002640  70 25 0d 0d ac 1f c8 99  20 22 57 69 6d 70 5f 44  |p%...... "Wimp_D|
00002650  65 6c 65 74 65 49 63 6f  6e 22 2c 2c 77 69 6d 70  |eleteIcon",,wimp|
00002660  25 0d 0d b6 3d 77 69 6d  70 25 21 34 3d 77 69 6d  |%...=wimp%!4=wim|
00002670  70 25 21 38 20 20 20 3a  20 77 69 6d 70 25 21 38  |p%!8   : wimp%!8|
00002680  3d 77 69 6d 70 25 21 31  32 20 20 3a 20 77 69 6d  |=wimp%!12  : wim|
00002690  70 25 21 31 32 3d 77 69  6d 70 25 21 31 36 0d 0d  |p%!12=wimp%!16..|
000026a0  c0 3f 77 69 6d 70 25 21  31 36 3d 77 69 6d 70 25  |.?wimp%!16=wimp%|
000026b0  21 32 30 20 3a 20 77 69  6d 70 25 21 32 30 3d 77  |!20 : wimp%!20=w|
000026c0  69 6d 70 25 21 32 34 20  3a 20 24 28 77 69 6d 70  |imp%!24 : $(wimp|
000026d0  25 2b 32 34 29 3d 73 70  72 69 74 65 24 0d 0d ca  |%+24)=sprite$...|
000026e0  27 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |'.. "Wimp_Create|
000026f0  49 63 6f 6e 22 2c 2c 77  69 6d 70 25 20 b8 20 69  |Icon",,wimp% . i|
00002700  63 6f 6e 25 0d 0d d4 43  c8 99 20 22 57 69 6d 70  |con%...C.. "Wimp|
00002710  5f 46 6f 72 63 65 52 65  64 72 61 77 22 2c 77 69  |_ForceRedraw",wi|
00002720  6d 70 25 21 30 2c 77 69  6d 70 25 21 34 2c 77 69  |mp%!0,wimp%!4,wi|
00002730  6d 70 25 21 38 2c 77 69  6d 70 25 21 31 32 2c 77  |mp%!8,wimp%!12,w|
00002740  69 6d 70 25 21 31 36 0d  0d de 05 e1 0d 0d e8 05  |imp%!16.........|
00002750  3a 0d 0d f2 2c dd 20 f2  57 69 6d 70 5f 49 63 6f  |:...,. .Wimp_Ico|
00002760  6e 50 75 74 54 65 78 74  28 77 69 6e 64 6f 77 25  |nPutText(window%|
00002770  2c 69 63 6f 6e 25 2c 74  65 78 74 24 29 0d 0d fc  |,icon%,text$)...|
00002780  08 ea 20 78 24 0d 0e 06  23 77 69 6d 70 25 21 30  |.. x$...#wimp%!0|
00002790  3d 77 69 6e 64 6f 77 25  20 3a 20 77 69 6d 70 25  |=window% : wimp%|
000027a0  21 34 3d 69 63 6f 6e 25  0d 0e 10 21 c8 99 20 22  |!4=icon%...!.. "|
000027b0  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
000027c0  65 22 2c 2c 77 69 6d 70  25 0d 0e 1a 37 e7 20 28  |e",,wimp%...7. (|
000027d0  28 77 69 6d 70 25 21 32  34 29 20 80 20 26 31 30  |(wimp%!24) . &10|
000027e0  30 29 3d 30 20 85 20 31  2c 22 49 63 6f 6e 20 69  |0)=0 . 1,"Icon i|
000027f0  73 6e 27 74 20 69 6e 64  69 72 65 63 74 65 64 22  |sn't indirected"|
00002800  0d 0e 24 15 24 28 77 69  6d 70 25 21 32 38 29 3d  |..$.$(wimp%!28)=|
00002810  74 65 78 74 24 0d 0e 2e  23 77 69 6d 70 25 21 30  |text$...#wimp%!0|
00002820  3d 77 69 6e 64 6f 77 25  20 3a 20 77 69 6d 70 25  |=window% : wimp%|
00002830  21 34 3d 69 63 6f 6e 25  0d 0e 38 1a 77 69 6d 70  |!4=icon%..8.wimp|
00002840  25 21 38 3d 30 20 3a 20  77 69 6d 70 25 21 31 32  |%!8=0 : wimp%!12|
00002850  3d 30 0d 0e 42 21 c8 99  20 22 57 69 6d 70 5f 53  |=0..B!.. "Wimp_S|
00002860  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 77 69  |etIconState",,wi|
00002870  6d 70 25 0d 0e 4c 05 e1  0d 0e 56 05 3a 0d 0e 60  |mp%..L....V.:..`|
00002880  06 f4 7c 0d 0e 6a 06 f4  7c 0d 0e 74 06 f4 7c 0d  |..|..j..|..t..|.|
00002890  0e 7e 31 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |.~1.|           |
000028a0  20 20 20 20 20 20 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |       ---------|
000028b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000028c0  0d 0e 88 28 f4 7c 20 20  20 20 20 20 20 20 20 20  |...(.|          |
000028d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000028e0  33 2e a0 4d 65 6e 75 73  0d 0e 92 31 f4 7c 20 20  |3..Menus...1.|  |
000028f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002900  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00002910  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 0e 9c 06 f4 7c 0d  |---------.....|.|
00002920  0e a6 06 f4 7c 0d 0e b0  3f f4 7c 20 20 20 20 20  |....|...?.|     |
00002930  20 20 20 20 20 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |      ----------|
00002940  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002960  2d 2d 2d 2d 0d 0e ba 06  f4 7c 0d 0e c4 28 f4 7c  |----.....|...(.||
00002970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002980  20 20 20 20 20 20 50 72  6f 63 65 64 75 72 65 73  |      Procedures|
00002990  20 3a 0d 0e ce 06 f4 7c  0d 0e d8 06 f4 7c 0d 0e  | :.....|.....|..|
000029a0  e2 2e f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |...|            |
000029b0  50 52 4f 43 57 69 6d 70  5f 4d 65 6e 75 41 64 6a  |PROCWimp_MenuAdj|
000029c0  75 73 74 4f 6e 28 6d 65  6e 75 25 29 0d 0e ec 2b  |ustOn(menu%)...+|
000029d0  f4 7c 20 20 20 20 20 20  20 20 20 20 20 20 46 4e  |.|            FN|
000029e0  57 69 6d 70 5f 4d 65 6e  75 43 68 6f 69 63 65 28  |Wimp_MenuChoice(|
000029f0  6c 65 76 65 6c 25 29 0d  0e f6 2a f4 7c 20 20 20  |level%)...*.|   |
00002a00  20 20 20 20 20 20 20 20  20 46 4e 57 69 6d 70 5f  |         FNWimp_|
00002a10  4d 65 6e 75 43 72 65 61  74 65 28 6d 65 6e 75 24  |MenuCreate(menu$|
00002a20  29 0d 0f 00 24 f4 7c 20  20 20 20 20 20 20 20 20  |)...$.|         |
00002a30  20 20 20 46 4e 57 69 6d  70 5f 4d 65 6e 75 43 6f  |   FNWimp_MenuCo|
00002a40  6c 6f 75 72 73 0d 0f 0a  32 f4 7c 20 20 20 20 20  |lours...2.|     |
00002a50  20 20 20 20 20 20 20 46  4e 57 69 6d 70 5f 4d 65  |       FNWimp_Me|
00002a60  6e 75 43 72 65 61 74 65  43 6f 6c 6f 75 72 73 28  |nuCreateColours(|
00002a70  74 69 74 6c 65 24 29 0d  0f 14 2f f4 7c 20 20 20  |title$).../.|   |
00002a80  20 20 20 20 20 20 20 20  20 46 4e 57 69 6d 70 5f  |         FNWimp_|
00002a90  4d 65 6e 75 4e 6f 4f 66  45 6e 74 72 69 65 73 28  |MenuNoOfEntries(|
00002aa0  6d 65 6e 75 24 29 0d 0f  1e 44 f4 7c 20 20 20 20  |menu$)...D.|    |
00002ab0  20 20 20 20 20 20 20 20  50 52 4f 43 57 69 6d 70  |        PROCWimp|
00002ac0  5f 4d 65 6e 75 42 61 63  6b 47 72 6f 75 6e 64 43  |_MenuBackGroundC|
00002ad0  6f 6c 6f 75 72 28 6d 65  6e 75 25 2c 69 74 65 6d  |olour(menu%,item|
00002ae0  25 2c 63 6f 6c 6f 75 72  25 29 0d 0f 28 32 f4 7c  |%,colour%)..(2.||
00002af0  20 20 20 20 20 20 20 20  20 20 20 20 50 52 4f 43  |            PROC|
00002b00  57 69 6d 70 5f 4d 65 6e  75 43 65 6e 74 72 65 28  |Wimp_MenuCentre(|
00002b10  6d 65 6e 75 25 2c 69 74  65 6d 25 29 0d 0f 32 24  |menu%,item%)..2$|
00002b20  f4 7c 20 20 20 20 20 20  20 20 20 20 20 20 50 52  |.|            PR|
00002b30  4f 43 57 69 6d 70 5f 4d  65 6e 75 43 6c 6f 73 65  |OCWimp_MenuClose|
00002b40  0d 0f 3c 33 f4 7c 20 20  20 20 20 20 20 20 20 20  |..<3.|          |
00002b50  20 20 50 52 4f 43 57 69  6d 70 5f 4d 65 6e 75 44  |  PROCWimp_MenuD|
00002b60  69 73 61 62 6c 65 28 6d  65 6e 75 25 2c 69 74 65  |isable(menu%,ite|
00002b70  6d 25 29 0d 0f 46 36 f4  7c 20 20 20 20 20 20 20  |m%)..F6.|       |
00002b80  20 20 20 20 20 50 52 4f  43 57 69 6d 70 5f 4d 65  |     PROCWimp_Me|
00002b90  6e 75 44 6f 74 74 65 64  4c 69 6e 65 28 6d 65 6e  |nuDottedLine(men|
00002ba0  75 25 2c 69 74 65 6d 25  29 0d 0f 50 32 f4 7c 20  |u%,item%)..P2.| |
00002bb0  20 20 20 20 20 20 20 20  20 20 20 50 52 4f 43 57  |           PROCW|
00002bc0  69 6d 70 5f 4d 65 6e 75  45 6e 61 62 6c 65 28 6d  |imp_MenuEnable(m|
00002bd0  65 6e 75 25 2c 69 74 65  6d 25 29 0d 0f 5a 44 f4  |enu%,item%)..ZD.|
00002be0  7c 20 20 20 20 20 20 20  20 20 20 20 20 50 52 4f  ||            PRO|
00002bf0  43 57 69 6d 70 5f 4d 65  6e 75 46 6f 72 65 67 72  |CWimp_MenuForegr|
00002c00  6f 75 6e 64 43 6f 6c 6f  75 72 28 6d 65 6e 75 25  |oundColour(menu%|
00002c10  2c 69 74 65 6d 25 2c 63  6f 6c 6f 75 72 25 29 0d  |,item%,colour%).|
00002c20  0f 64 38 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |.d8.|           |
00002c30  20 50 52 4f 43 57 69 6d  70 5f 4d 65 6e 75 47 6c  | PROCWimp_MenuGl|
00002c40  75 65 28 6d 65 6e 75 31  25 2c 69 74 65 6d 25 2c  |ue(menu1%,item%,|
00002c50  6d 65 6e 75 32 25 29 0d  0f 6e 36 f4 7c 20 20 20  |menu2%)..n6.|   |
00002c60  20 20 20 20 20 20 20 20  20 50 52 4f 43 57 69 6d  |         PROCWim|
00002c70  70 5f 4d 65 6e 75 49 74  65 6d 28 6d 65 6e 75 25  |p_MenuItem(menu%|
00002c80  2c 69 74 65 6d 25 2c 69  74 65 6d 24 29 0d 0f 78  |,item%,item$)..x|
00002c90  33 f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 50  |3.|            P|
00002ca0  52 4f 43 57 69 6d 70 5f  4d 65 6e 75 4d 65 73 73  |ROCWimp_MenuMess|
00002cb0  61 67 65 28 6d 65 6e 75  25 2c 69 74 65 6d 25 29  |age(menu%,item%)|
00002cc0  0d 0f 82 31 f4 7c 20 20  20 20 20 20 20 20 20 20  |...1.|          |
00002cd0  20 20 50 52 4f 43 57 69  6d 70 5f 4d 65 6e 75 50  |  PROCWimp_MenuP|
00002ce0  6f 70 55 70 28 4d 65 6e  75 25 2c 78 25 2c 79 25  |opUp(Menu%,x%,y%|
00002cf0  29 0d 0f 8c 2e f4 7c 20  20 20 20 20 20 20 20 20  |).....|         |
00002d00  20 20 20 50 52 4f 43 57  69 6d 70 5f 4d 65 6e 75  |   PROCWimp_Menu|
00002d10  50 6f 70 55 70 42 61 72  28 78 25 2c 79 25 29 0d  |PopUpBar(x%,y%).|
00002d20  0f 96 30 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..0.|           |
00002d30  20 50 52 4f 43 57 69 6d  70 5f 4d 65 6e 75 54 69  | PROCWimp_MenuTi|
00002d40  63 6b 28 6d 65 6e 75 25  2c 69 74 65 6d 25 29 0d  |ck(menu%,item%).|
00002d50  0f a0 32 f4 7c 20 20 20  20 20 20 20 20 20 20 20  |..2.|           |
00002d60  20 50 52 4f 43 57 69 6d  70 5f 4d 65 6e 75 54 69  | PROCWimp_MenuTi|
00002d70  74 6c 65 28 6d 65 6e 75  25 2c 74 69 74 6c 65 24  |tle(menu%,title$|
00002d80  29 0d 0f aa 4c f4 7c 20  20 20 20 20 20 20 20 20  |)...L.|         |
00002d90  20 20 20 50 52 4f 43 57  69 6d 70 5f 4d 65 6e 75  |   PROCWimp_Menu|
00002da0  57 72 69 74 65 28 6d 65  6e 75 25 2c 69 74 65 6d  |Write(menu%,item|
00002db0  25 2c 62 75 66 66 65 72  25 2c 76 61 6c 25 2c 42  |%,buffer%,val%,B|
00002dc0  75 66 66 65 72 4c 65 6e  67 74 68 25 29 0d 0f b4  |ufferLength%)...|
00002dd0  06 f4 7c 0d 0f be 3f f4  7c 20 20 20 20 20 20 20  |..|...?.|       |
00002de0  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00002df0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002e10  2d 2d 0d 0f c8 06 f4 7c  0d 0f d2 05 3a 0d 0f dc  |--.....|....:...|
00002e20  1f dd 20 f2 57 69 6d 70  5f 4d 65 6e 75 41 64 6a  |.. .Wimp_MenuAdj|
00002e30  75 73 74 4f 6e 28 6d 65  6e 75 25 29 0d 0f e6 2c  |ustOn(menu%)...,|
00002e40  c8 99 20 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |.. "Wimp_GetPoin|
00002e50  74 65 72 49 6e 66 6f 22  2c 2c 70 6f 69 6e 74 65  |terInfo",,pointe|
00002e60  72 5f 62 6c 6f 63 6b 25  0d 0f f0 5e e7 20 28 28  |r_block%...^. ((|
00002e70  70 6f 69 6e 74 65 72 5f  62 6c 6f 63 6b 25 21 38  |pointer_block%!8|
00002e80  29 80 31 29 3d 31 20 8c  20 c8 99 20 22 57 69 6d  |).1)=1 . .. "Wim|
00002e90  70 5f 43 72 65 61 74 65  4d 65 6e 75 22 2c 2c 6d  |p_CreateMenu",,m|
00002ea0  65 6e 75 25 2c 70 6f 69  6e 74 65 72 5f 62 6c 6f  |enu%,pointer_blo|
00002eb0  63 6b 25 21 30 2c 70 6f  69 6e 74 65 72 5f 62 6c  |ck%!0,pointer_bl|
00002ec0  6f 63 6b 25 21 34 0d 0f  fa 05 e1 0d 10 04 05 3a  |ock%!4.........:|
00002ed0  0d 10 0e 1e dd 20 a4 57  69 6d 70 5f 4d 65 6e 75  |..... .Wimp_Menu|
00002ee0  43 68 6f 69 63 65 28 6c  65 76 65 6c 25 29 0d 10  |Choice(level%)..|
00002ef0  18 19 3d 28 77 69 6d 70  25 21 28 34 2a 6c 65 76  |..=(wimp%!(4*lev|
00002f00  65 6c 25 29 29 2b 31 0d  10 22 05 3a 0d 10 2c 1d  |el%))+1..".:..,.|
00002f10  dd 20 a4 57 69 6d 70 5f  4d 65 6e 75 43 72 65 61  |. .Wimp_MenuCrea|
00002f20  74 65 28 6d 65 6e 75 24  29 0d 10 36 29 e7 20 6d  |te(menu$)..6). m|
00002f30  65 6e 75 24 3d 22 43 6f  6c 6f 75 72 73 22 20 8c  |enu$="Colours" .|
00002f40  3d a4 57 69 6d 70 5f 4d  65 6e 75 43 6f 6c 6f 75  |=.Wimp_MenuColou|
00002f50  72 73 0d 10 40 27 ea 20  6d 65 6e 75 25 2c 69 6e  |rs..@'. menu%,in|
00002f60  64 65 78 25 2c 77 69 64  74 68 25 2c 6c 65 6e 67  |dex%,width%,leng|
00002f70  74 68 25 2c 6b 25 2c 73  25 0d 10 4a 2e de 20 6d  |th%,k%,s%..J.. m|
00002f80  65 6e 75 25 20 32 38 2b  a4 57 69 6d 70 5f 4d 65  |enu% 28+.Wimp_Me|
00002f90  6e 75 4e 6f 4f 66 45 6e  74 72 69 65 73 28 6d 65  |nuNoOfEntries(me|
00002fa0  6e 75 24 29 2a 32 34 0d  10 54 37 6d 65 6e 75 25  |nu$)*24..T7menu%|
00002fb0  3f 31 32 3d 37 20 20 20  3a 20 6d 65 6e 75 25 3f  |?12=7   : menu%?|
00002fc0  31 33 3d 32 20 20 3a 20  6d 65 6e 75 25 3f 31 34  |13=2  : menu%?14|
00002fd0  3d 37 20 3a 6d 65 6e 75  25 3f 31 35 3d 30 0d 10  |=7 :menu%?15=0..|
00002fe0  5e 2b 6d 65 6e 75 25 21  31 36 3d 31 34 30 20 3a  |^+menu%!16=140 :|
00002ff0  20 6d 65 6e 75 25 21 32  30 3d 34 34 20 3a 20 6d  | menu%!20=44 : m|
00003000  65 6e 75 25 21 32 34 3d  30 0d 10 68 13 69 6e 64  |enu%!24=0..h.ind|
00003010  65 78 25 3d 6d 65 6e 75  25 2b 32 38 0d 10 72 20  |ex%=menu%+28..r |
00003020  24 6d 65 6e 75 25 3d c0  6d 65 6e 75 24 2c a7 6d  |$menu%=.menu$,.m|
00003030  65 6e 75 24 2c 22 5c 22  29 2d 31 29 0d 10 7c 23  |enu$,"\")-1)..|#|
00003040  77 69 64 74 68 25 3d a9  28 c0 6d 65 6e 75 24 2c  |width%=.(.menu$,|
00003050  a7 6d 65 6e 75 24 2c 22  5c 22 29 2d 31 29 29 0d  |.menu$,"\")-1)).|
00003060  10 86 24 6d 65 6e 75 24  2b 3d 22 5c 22 20 3a 20  |..$menu$+="\" : |
00003070  4d 65 6e 75 5f 4e 6f 4f  66 45 6e 74 72 69 65 73  |Menu_NoOfEntries|
00003080  25 3d 30 0d 10 90 10 c8  95 20 6d 65 6e 75 24 3c  |%=0...... menu$<|
00003090  3e 22 22 0d 10 9a 1f 6d  65 6e 75 24 3d c1 6d 65  |>""....menu$=.me|
000030a0  6e 75 24 2c a7 6d 65 6e  75 24 2c 22 5c 22 29 2b  |nu$,.menu$,"\")+|
000030b0  31 29 0d 10 a4 0e c8 8e  20 6d 65 6e 75 24 20 ca  |1)...... menu$ .|
000030c0  0d 10 ae 09 20 c9 20 22  22 0d 10 b8 08 20 7f 20  |.... . "".... . |
000030d0  3a 0d 10 c2 31 20 20 21  69 6e 64 65 78 25 3d 30  |:...1  !index%=0|
000030e0  20 3a 20 69 6e 64 65 78  25 21 34 3d 2d 31 20 3a  | : index%!4=-1 :|
000030f0  20 69 6e 64 65 78 25 21  38 3d 26 37 30 30 30 30  | index%!8=&70000|
00003100  32 31 0d 10 cc 1b 20 20  6c 65 6e 67 74 68 25 3d  |21....  length%=|
00003110  a7 6d 65 6e 75 24 2c 22  5c 22 29 2d 31 0d 10 d6  |.menu$,"\")-1...|
00003120  1e 20 20 6b 25 3d a7 c0  6d 65 6e 75 24 2c 6c 65  |.  k%=..menu$,le|
00003130  6e 67 74 68 25 29 2c 22  3e 22 29 0d 10 e0 0d 20  |ngth%),">").... |
00003140  20 c8 8e 20 6b 25 20 ca  0d 10 ea 0a 20 20 20 c9  | .. k% .....   .|
00003150  20 30 0d 10 f4 08 20 20  20 7f 0d 10 fe 25 20 20  | 0....   ....%  |
00003160  20 20 73 25 3d a0 28 c1  6d 65 6e 75 24 2c 6b 25  |  s%=.(.menu$,k%|
00003170  2b 31 2c 6c 65 6e 67 74  68 25 2d 6b 25 29 29 0d  |+1,length%-k%)).|
00003180  11 08 13 20 20 20 20 69  6e 64 65 78 25 21 34 3d  |...    index%!4=|
00003190  73 25 0d 11 12 14 20 20  20 20 6c 65 6e 67 74 68  |s%....    length|
000031a0  25 3d 6b 25 2d 31 0d 11  1c 07 20 20 cb 0d 11 26  |%=k%-1....  ...&|
000031b0  22 20 20 24 28 69 6e 64  65 78 25 2b 31 32 29 3d  |"  $(index%+12)=|
000031c0  c0 6d 65 6e 75 24 2c 6c  65 6e 67 74 68 25 29 0d  |.menu$,length%).|
000031d0  11 30 27 20 20 e7 20 6c  65 6e 67 74 68 25 3e 77  |.0'  . length%>w|
000031e0  69 64 74 68 25 20 8c 20  77 69 64 74 68 25 3d 6c  |idth% . width%=l|
000031f0  65 6e 67 74 68 25 0d 11  3a 10 20 20 69 6e 64 65  |ength%..:.  inde|
00003200  78 25 2b 3d 32 34 0d 11  44 05 cb 0d 11 4e 05 ce  |x%+=24..D....N..|
00003210  0d 11 58 1a 6d 65 6e 75  25 21 31 36 3d 31 36 2a  |..X.menu%!16=16*|
00003220  28 77 69 64 74 68 25 2b  31 29 0d 11 62 28 69 6e  |(width%+1)..b(in|
00003230  64 65 78 25 21 2d 32 34  3d 69 6e 64 65 78 25 21  |dex%!-24=index%!|
00003240  2d 32 34 20 84 20 26 38  30 20 3a 20 3d 6d 65 6e  |-24 . &80 : =men|
00003250  75 25 0d 11 6c 05 3a 0d  11 76 17 dd 20 a4 57 69  |u%..l.:..v.. .Wi|
00003260  6d 70 5f 4d 65 6e 75 43  6f 6c 6f 75 72 73 0d 11  |mp_MenuColours..|
00003270  80 21 3d a4 57 69 6d 70  5f 4d 65 6e 75 43 72 65  |.!=.Wimp_MenuCre|
00003280  61 74 65 43 6f 6c 6f 75  72 73 28 22 20 22 29 0d  |ateColours(" ").|
00003290  11 8a 05 3a 0d 11 94 25  dd 20 a4 57 69 6d 70 5f  |...:...%. .Wimp_|
000032a0  4d 65 6e 75 43 72 65 61  74 65 43 6f 6c 6f 75 72  |MenuCreateColour|
000032b0  73 28 74 69 74 6c 65 24  29 0d 11 9e 13 ea 20 78  |s(title$)..... x|
000032c0  24 2c 6d 65 6e 25 2c 6a  25 2c 69 25 0d 11 a8 36  |$,men%,j%,i%...6|
000032d0  78 24 3d 74 69 74 6c 65  24 2b 22 5c 30 5c 31 5c  |x$=title$+"\0\1\|
000032e0  32 5c 33 5c 34 5c 35 5c  36 5c 37 5c 38 5c 39 5c  |2\3\4\5\6\7\8\9\|
000032f0  31 30 5c 31 31 5c 31 32  5c 31 33 5c 31 34 5c 31  |10\11\12\13\14\1|
00003300  35 22 0d 11 b2 1d 6d 65  6e 25 3d a4 57 69 6d 70  |5"....men%=.Wimp|
00003310  5f 4d 65 6e 75 43 72 65  61 74 65 28 78 24 29 0d  |_MenuCreate(x$).|
00003320  11 bc 0f e3 20 69 25 3d  30 20 b8 20 31 35 0d 11  |.... i%=0 . 15..|
00003330  c6 0a c8 8e 20 b9 20 ca  0d 11 d0 28 c9 20 69 25  |.... . ....(. i%|
00003340  3c 34 2c 69 25 3d 39 2c  69 25 3d 31 32 2c 69 25  |<4,i%=9,i%=12,i%|
00003350  3d 31 34 2c 69 25 3d 31  35 20 3a 20 6a 25 3d 37  |=14,i%=15 : j%=7|
00003360  0d 11 da 0c 7f 20 3a 20  6a 25 3d 30 0d 11 e4 05  |..... : j%=0....|
00003370  cb 0d 11 ee 1c 6d 65 6e  25 3f 28 33 39 2b 69 25  |.....men%?(39+i%|
00003380  2a 32 34 29 3d 69 25 2a  31 36 2b 6a 25 0d 11 f8  |*24)=i%*16+j%...|
00003390  1f f2 57 69 6d 70 5f 4d  65 6e 75 43 65 6e 74 72  |..Wimp_MenuCentr|
000033a0  65 28 6d 65 6e 25 2c 69  25 2b 31 29 0d 12 02 05  |e(men%,i%+1)....|
000033b0  ed 0d 12 0c 09 3d 6d 65  6e 25 0d 12 16 05 3a 0d  |.....=men%....:.|
000033c0  12 20 22 dd 20 a4 57 69  6d 70 5f 4d 65 6e 75 4e  |. ". .Wimp_MenuN|
000033d0  6f 4f 66 45 6e 74 72 69  65 73 28 6d 65 6e 75 24  |oOfEntries(menu$|
000033e0  29 0d 12 2a 1a ea 20 6e  25 20 2c 6a 25 20 3a 20  |)..*.. n% ,j% : |
000033f0  6e 25 3d 30 20 3a 20 6a  25 3d 30 0d 12 34 05 f5  |n%=0 : j%=0..4..|
00003400  0d 12 3e 17 6a 25 3d a7  6d 65 6e 75 24 2c 22 5c  |..>.j%=.menu$,"\|
00003410  22 2c 6a 25 2b 31 29 0d  12 48 13 e7 20 6a 25 3c  |",j%+1)..H.. j%<|
00003420  3e 30 20 8c 20 6e 25 2b  3d 31 0d 12 52 0a fd 20  |>0 . n%+=1..R.. |
00003430  6a 25 3d 30 0d 12 5c 07  3d 6e 25 0d 12 66 05 3a  |j%=0..\.=n%..f.:|
00003440  0d 12 70 35 dd 20 f2 57  69 6d 70 5f 4d 65 6e 75  |..p5. .Wimp_Menu|
00003450  42 61 63 6b 47 72 6f 75  6e 64 43 6f 6c 6f 75 72  |BackGroundColour|
00003460  28 6d 65 6e 75 25 2c 69  74 65 6d 25 2c 63 6f 6c  |(menu%,item%,col|
00003470  6f 75 72 25 29 0d 12 7a  0e ea 20 66 6f 72 65 25  |our%)..z.. fore%|
00003480  2c 69 25 0d 12 84 26 66  6f 72 65 25 3d 28 6d 65  |,i%...&fore%=(me|
00003490  6e 75 25 3f 28 33 39 2b  28 69 74 65 6d 25 2d 31  |nu%?(39+(item%-1|
000034a0  29 2a 32 34 29 29 83 31  36 0d 12 8e 28 69 25 3d  |)*24)).16...(i%=|
000034b0  28 28 6d 65 6e 75 25 3f  28 33 39 2b 28 69 74 65  |((menu%?(39+(ite|
000034c0  6d 25 2d 31 29 2a 32 34  29 29 81 31 36 29 83 31  |m%-1)*24)).16).1|
000034d0  36 0d 12 98 2f 6d 65 6e  75 25 3f 28 33 39 2b 28  |6.../menu%?(39+(|
000034e0  69 74 65 6d 25 2d 31 29  2a 32 34 29 3d 66 6f 72  |item%-1)*24)=for|
000034f0  65 25 2b 31 36 2a 63 6f  6c 6f 75 72 25 2b 69 25  |e%+16*colour%+i%|
00003500  0d 12 a2 05 e1 0d 12 ac  05 3a 0d 12 b6 23 dd 20  |.........:...#. |
00003510  f2 57 69 6d 70 5f 4d 65  6e 75 43 65 6e 74 72 65  |.Wimp_MenuCentre|
00003520  28 6d 65 6e 75 25 2c 69  74 65 6d 25 29 0d 12 c0  |(menu%,item%)...|
00003530  3a 6d 65 6e 75 25 21 28  33 36 2b 28 69 74 65 6d  |:menu%!(36+(item|
00003540  25 2d 31 29 2a 32 34 29  3d 6d 65 6e 75 25 21 28  |%-1)*24)=menu%!(|
00003550  33 36 2b 28 69 74 65 6d  25 2d 31 29 2a 32 34 29  |36+(item%-1)*24)|
00003560  84 28 31 3c 3c 33 29 0d  12 ca 05 e1 0d 12 d4 05  |.(1<<3).........|
00003570  3a 0d 12 de 15 dd 20 f2  57 69 6d 70 5f 4d 65 6e  |:..... .Wimp_Men|
00003580  75 43 6c 6f 73 65 0d 12  e8 1b c8 99 20 22 57 69  |uClose...... "Wi|
00003590  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2d  |mp_CreateMenu",-|
000035a0  31 0d 12 f2 05 e1 0d 12  fc 05 3a 0d 13 06 24 dd  |1.........:...$.|
000035b0  20 f2 57 69 6d 70 5f 4d  65 6e 75 44 69 73 61 62  | .Wimp_MenuDisab|
000035c0  6c 65 28 6d 65 6e 75 25  2c 69 74 65 6d 25 29 0d  |le(menu%,item%).|
000035d0  13 10 3b 6d 65 6e 75 25  21 28 33 36 2b 28 69 74  |..;menu%!(36+(it|
000035e0  65 6d 25 2d 31 29 2a 32  34 29 3d 6d 65 6e 75 25  |em%-1)*24)=menu%|
000035f0  21 28 33 36 2b 28 69 74  65 6d 25 2d 31 29 2a 32  |!(36+(item%-1)*2|
00003600  34 29 84 28 31 3c 3c 32  32 29 0d 13 1a 05 e1 0d  |4).(1<<22)......|
00003610  13 24 05 3a 0d 13 2e 27  dd 20 f2 57 69 6d 70 5f  |.$.:...'. .Wimp_|
00003620  4d 65 6e 75 44 6f 74 74  65 64 4c 69 6e 65 28 6d  |MenuDottedLine(m|
00003630  65 6e 75 25 2c 69 74 65  6d 25 29 0d 13 38 37 6d  |enu%,item%)..87m|
00003640  65 6e 75 25 21 28 32 38  2b 28 69 74 65 6d 25 2d  |enu%!(28+(item%-|
00003650  31 29 2a 32 34 29 3d 28  6d 65 6e 75 25 21 28 32  |1)*24)=(menu%!(2|
00003660  38 2b 28 69 74 65 6d 25  2d 31 29 2a 32 34 29 29  |8+(item%-1)*24))|
00003670  84 32 0d 13 42 05 e1 0d  13 4c 05 3a 0d 13 56 23  |.2..B....L.:..V#|
00003680  dd 20 f2 57 69 6d 70 5f  4d 65 6e 75 45 6e 61 62  |. .Wimp_MenuEnab|
00003690  6c 65 28 6d 65 6e 75 25  2c 69 74 65 6d 25 29 0d  |le(menu%,item%).|
000036a0  13 60 22 f2 57 69 6d 70  5f 4d 65 6e 75 44 69 73  |.`".Wimp_MenuDis|
000036b0  61 62 6c 65 28 6d 65 6e  75 25 2c 69 74 65 6d 25  |able(menu%,item%|
000036c0  29 0d 13 6a 3b 6d 65 6e  75 25 21 28 33 36 2b 28  |)..j;menu%!(36+(|
000036d0  69 74 65 6d 25 2d 31 29  2a 32 34 29 3d 6d 65 6e  |item%-1)*24)=men|
000036e0  75 25 21 28 33 36 2b 28  69 74 65 6d 25 2d 31 29  |u%!(36+(item%-1)|
000036f0  2a 32 34 29 82 28 31 3c  3c 32 32 29 0d 13 74 05  |*24).(1<<22)..t.|
00003700  e1 0d 13 7e 05 3a 0d 13  88 35 dd 20 f2 57 69 6d  |...~.:...5. .Wim|
00003710  70 5f 4d 65 6e 75 46 6f  72 65 67 72 6f 75 6e 64  |p_MenuForeground|
00003720  43 6f 6c 6f 75 72 28 6d  65 6e 75 25 2c 69 74 65  |Colour(menu%,ite|
00003730  6d 25 2c 63 6f 6c 6f 75  72 25 29 0d 13 92 45 6d  |m%,colour%)...Em|
00003740  65 6e 75 25 3f 28 33 39  2b 28 69 74 65 6d 25 2d  |enu%?(39+(item%-|
00003750  31 29 2a 32 34 29 3d 63  6f 6c 6f 75 72 25 2b 31  |1)*24)=colour%+1|
00003760  36 2a 28 28 6d 65 6e 75  25 3f 28 33 39 2b 28 69  |6*((menu%?(39+(i|
00003770  74 65 6d 25 2d 31 29 2a  32 34 29 29 81 31 36 29  |tem%-1)*24)).16)|
00003780  0d 13 9c 05 e1 0d 13 a6  05 3a 0d 13 b0 29 dd 20  |.........:...). |
00003790  f2 57 69 6d 70 5f 4d 65  6e 75 47 6c 75 65 28 6d  |.Wimp_MenuGlue(m|
000037a0  65 6e 75 31 25 2c 69 74  65 6d 25 2c 6d 65 6e 75  |enu1%,item%,menu|
000037b0  32 25 29 0d 13 ba 1e 6d  65 6e 75 31 25 21 28 38  |2%)....menu1%!(8|
000037c0  2b 69 74 65 6d 25 2a 32  34 29 3d 6d 65 6e 75 32  |+item%*24)=menu2|
000037d0  25 0d 13 c4 05 e1 0d 13  ce 05 3a 0d 13 d8 27 dd  |%.........:...'.|
000037e0  20 f2 57 69 6d 70 5f 4d  65 6e 75 49 74 65 6d 28  | .Wimp_MenuItem(|
000037f0  6d 65 6e 75 25 2c 69 74  65 6d 25 2c 69 74 65 6d  |menu%,item%,item|
00003800  24 29 0d 13 e2 2c 24 28  6d 65 6e 75 25 2b 28 34  |$)...,$(menu%+(4|
00003810  30 2b 28 69 74 65 6d 25  2d 31 29 2a 32 34 29 29  |0+(item%-1)*24))|
00003820  3d c0 69 74 65 6d 24 2c  31 32 29 2b bd 30 0d 13  |=.item$,12)+.0..|
00003830  ec 05 e1 0d 13 f6 05 3a  0d 14 00 24 dd 20 f2 57  |.......:...$. .W|
00003840  69 6d 70 5f 4d 65 6e 75  4d 65 73 73 61 67 65 28  |imp_MenuMessage(|
00003850  6d 65 6e 75 25 2c 69 74  65 6d 25 29 0d 14 0a 3c  |menu%,item%)...<|
00003860  6d 65 6e 75 25 21 28 32  38 2b 28 69 74 65 6d 25  |menu%!(28+(item%|
00003870  2d 31 29 2a 32 34 29 3d  28 6d 65 6e 75 25 21 28  |-1)*24)=(menu%!(|
00003880  32 38 2b 28 69 74 65 6d  25 2d 31 29 2a 32 34 29  |28+(item%-1)*24)|
00003890  29 82 28 31 3c 3c 33 29  0d 14 14 05 e1 0d 14 1e  |).(1<<3)........|
000038a0  05 3a 0d 14 28 22 dd 20  f2 57 69 6d 70 5f 4d 65  |.:..(". .Wimp_Me|
000038b0  6e 75 50 6f 70 55 70 28  4d 65 6e 75 25 2c 78 25  |nuPopUp(Menu%,x%|
000038c0  2c 79 25 29 0d 14 32 0f  6d 65 6e 75 25 3d 4d 65  |,y%)..2.menu%=Me|
000038d0  6e 75 25 0d 14 3c 2b c8  99 20 22 57 69 6d 70 5f  |nu%..<+.. "Wimp_|
000038e0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 6d 65 6e  |CreateMenu",,men|
000038f0  75 25 2c 78 25 2d 36 34  2c 79 25 2b 32 30 0d 14  |u%,x%-64,y%+20..|
00003900  46 05 e1 0d 14 50 05 3a  0d 14 5a 1f dd 20 f2 57  |F....P.:..Z.. .W|
00003910  69 6d 70 5f 4d 65 6e 75  50 6f 70 55 70 42 61 72  |imp_MenuPopUpBar|
00003920  28 78 25 2c 79 25 29 0d  14 64 0f ea 20 6e 25 20  |(x%,y%)..d.. n% |
00003930  3a 20 6e 25 3d 30 0d 14  6e 2b c8 95 20 28 28 42  |: n%=0..n+.. ((B|
00003940  61 72 5f 4d 65 6e 75 25  21 28 32 38 2b 6e 25 2a  |ar_Menu%!(28+n%*|
00003950  32 34 29 29 80 25 31 30  30 30 30 30 30 30 29 3d  |24)).%10000000)=|
00003960  30 0d 14 78 09 6e 25 2b  3d 31 0d 14 82 05 ce 0d  |0..x.n%+=1......|
00003970  14 8c 32 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |..2.. "Wimp_Crea|
00003980  74 65 4d 65 6e 75 22 2c  2c 42 61 72 5f 4d 65 6e  |teMenu",,Bar_Men|
00003990  75 25 2c 78 25 2d 36 34  2c 39 36 2b 6e 25 2a 34  |u%,x%-64,96+n%*4|
000039a0  34 0d 14 96 13 6d 65 6e  75 25 3d 42 61 72 5f 4d  |4....menu%=Bar_M|
000039b0  65 6e 75 25 0d 14 a0 05  e1 0d 14 aa 05 3a 0d 14  |enu%.........:..|
000039c0  b4 21 dd 20 f2 57 69 6d  70 5f 4d 65 6e 75 54 69  |.!. .Wimp_MenuTi|
000039d0  63 6b 28 6d 65 6e 75 25  2c 69 74 65 6d 25 29 0d  |ck(menu%,item%).|
000039e0  14 be 37 6d 65 6e 75 25  21 28 32 38 2b 28 69 74  |..7menu%!(28+(it|
000039f0  65 6d 25 2d 31 29 2a 32  34 29 3d 28 6d 65 6e 75  |em%-1)*24)=(menu|
00003a00  25 21 28 32 38 2b 28 69  74 65 6d 25 2d 31 29 2a  |%!(28+(item%-1)*|
00003a10  32 34 29 29 82 31 0d 14  c8 05 e1 0d 14 d2 05 3a  |24)).1.........:|
00003a20  0d 14 dc 23 dd 20 f2 57  69 6d 70 5f 4d 65 6e 75  |...#. .Wimp_Menu|
00003a30  54 69 74 6c 65 28 6d 65  6e 75 25 2c 74 69 74 6c  |Title(menu%,titl|
00003a40  65 24 29 0d 14 e6 19 24  6d 65 6e 75 25 3d c0 74  |e$)....$menu%=.t|
00003a50  69 74 6c 65 24 2c 31 32  29 2b bd 30 0d 14 f0 05  |itle$,12)+.0....|
00003a60  e1 0d 14 fa 05 3a 0d 15  04 3d dd 20 f2 57 69 6d  |.....:...=. .Wim|
00003a70  70 5f 4d 65 6e 75 57 72  69 74 65 28 6d 65 6e 75  |p_MenuWrite(menu|
00003a80  25 2c 69 74 65 6d 25 2c  62 75 66 66 65 72 25 2c  |%,item%,buffer%,|
00003a90  76 61 6c 25 2c 42 75 66  66 65 72 4c 65 6e 67 74  |val%,BufferLengt|
00003aa0  68 25 29 0d 15 0e 37 6d  65 6e 75 25 21 28 32 38  |h%)...7menu%!(28|
00003ab0  2b 28 69 74 65 6d 25 2d  31 29 2a 32 34 29 3d 28  |+(item%-1)*24)=(|
00003ac0  6d 65 6e 75 25 21 28 32  38 2b 28 69 74 65 6d 25  |menu%!(28+(item%|
00003ad0  2d 31 29 2a 32 34 29 29  84 34 0d 15 18 38 6d 65  |-1)*24)).4...8me|
00003ae0  6e 75 25 21 28 33 36 2b  28 69 74 65 6d 25 2d 31  |nu%!(36+(item%-1|
00003af0  29 2a 32 34 29 3d 6d 65  6e 75 25 21 28 33 36 2b  |)*24)=menu%!(36+|
00003b00  28 69 74 65 6d 25 2d 31  29 2a 32 34 29 84 26 31  |(item%-1)*24).&1|
00003b10  30 30 0d 15 22 23 6d 65  6e 75 25 21 28 34 30 2b  |00.."#menu%!(40+|
00003b20  28 69 74 65 6d 25 2d 31  29 2a 32 34 29 3d 62 75  |(item%-1)*24)=bu|
00003b30  66 66 65 72 25 0d 15 2c  20 6d 65 6e 75 25 21 28  |ffer%.., menu%!(|
00003b40  34 34 2b 28 69 74 65 6d  25 2d 31 29 2a 32 34 29  |44+(item%-1)*24)|
00003b50  3d 76 61 6c 25 0d 15 36  29 6d 65 6e 75 25 21 28  |=val%..6)menu%!(|
00003b60  34 38 2b 28 69 74 65 6d  25 2d 31 29 2a 32 34 29  |48+(item%-1)*24)|
00003b70  3d 42 75 66 66 65 72 4c  65 6e 67 74 68 25 0d 15  |=BufferLength%..|
00003b80  40 05 e1 0d 15 4a 06 f4  7c 0d 15 54 06 f4 7c 0d  |@....J..|..T..|.|
00003b90  15 5e 06 f4 7c 0d 15 68  31 f4 7c 20 20 20 20 20  |.^..|..h1.|     |
00003ba0  20 20 20 20 20 20 20 20  20 20 20 20 20 2d 2d 2d  |             ---|
00003bb0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003bc0  2d 2d 2d 2d 2d 2d 0d 15  72 2a f4 7c 20 20 20 20  |------..r*.|    |
00003bd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003be0  20 20 20 20 20 20 34 2e  a0 53 70 72 69 74 65 73  |      4..Sprites|
00003bf0  0d 15 7c 31 f4 7c 20 20  20 20 20 20 20 20 20 20  |..|1.|          |
00003c00  20 20 20 20 20 20 20 20  2d 2d 2d 2d 2d 2d 2d 2d  |        --------|
00003c10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003c20  2d 0d 15 86 06 f4 7c 0d  15 90 06 f4 7c 0d 15 9a  |-.....|.....|...|
00003c30  3a f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 20  |:.|             |
00003c40  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
00003c50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003c60  2d 2d 2d 2d 2d 2d 2d 0d  15 a4 06 f4 7c 0d 15 ae  |-------.....|...|
00003c70  28 f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 20  |(.|             |
00003c80  20 20 20 20 20 20 20 20  20 50 72 6f 63 65 64 75  |         Procedu|
00003c90  72 65 73 20 3a 0d 15 b8  06 f4 7c 0d 15 c2 06 f4  |res :.....|.....|
00003ca0  7c 0d 15 cc 2c f4 7c 20  20 20 20 20 20 20 20 20  ||...,.|         |
00003cb0  20 20 20 20 20 20 20 20  20 50 52 4f 43 57 69 6d  |         PROCWim|
00003cc0  70 5f 53 70 72 69 74 65  73 4c 6f 61 64 0d 15 d6  |p_SpritesLoad...|
00003cd0  3a f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 20  |:.|             |
00003ce0  20 20 20 20 20 50 52 4f  43 57 69 6d 70 5f 53 70  |     PROCWimp_Sp|
00003cf0  72 69 74 65 73 50 61 74  68 4c 6f 61 64 28 70 61  |ritesPathLoad(pa|
00003d00  74 68 6e 61 6d 65 24 0d  15 e0 06 f4 7c 0d 15 ea  |thname$.....|...|
00003d10  06 f4 7c 0d 15 f4 06 f4  7c 0d 15 fe 3a f4 7c 20  |..|.....|...:.| |
00003d20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2d  |               -|
00003d30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003d50  2d 2d 2d 0d 16 08 06 f4  7c 0d 16 12 05 3a 0d 16  |---.....|....:..|
00003d60  1c 17 dd 20 f2 57 69 6d  70 5f 53 70 72 69 74 65  |... .Wimp_Sprite|
00003d70  73 4c 6f 61 64 0d 16 26  2f f2 57 69 6d 70 5f 53  |sLoad..&/.Wimp_S|
00003d80  70 72 69 74 65 73 50 61  74 68 4c 6f 61 64 28 22  |pritesPathLoad("|
00003d90  3c 4f 62 65 79 24 44 69  72 3e 2e 53 70 72 69 74  |<Obey$Dir>.Sprit|
00003da0  65 73 22 29 0d 16 30 05  e1 0d 16 3a 05 3a 0d 16  |es")..0....:.:..|
00003db0  44 26 dd 20 f2 57 69 6d  70 5f 53 70 72 69 74 65  |D&. .Wimp_Sprite|
00003dc0  73 50 61 74 68 4c 6f 61  64 28 70 61 74 68 6e 61  |sPathLoad(pathna|
00003dd0  6d 65 24 29 0d 16 4e 0a  ea 53 25 2c 54 25 0d 16  |me$)..N..S%,T%..|
00003de0  58 2c 53 25 3d 8e 22 3c  4f 62 65 79 24 44 69 72  |X,S%=."<Obey$Dir|
00003df0  3e 2e 53 70 72 69 74 65  73 22 3a 54 25 3d a2 23  |>.Sprites":T%=.#|
00003e00  53 25 2b 31 36 3a d9 23  53 25 0d 16 62 19 de 73  |S%+16:.#S%..b..s|
00003e10  70 72 69 74 65 73 25 54  25 2c 73 70 6e 61 6d 65  |prites%T%,spname|
00003e20  25 31 32 0d 16 6c 1d 21  73 70 72 69 74 65 73 25  |%12..l.!sprites%|
00003e30  3d 54 25 3a 73 70 72 69  74 65 73 25 21 38 3d 30  |=T%:sprites%!8=0|
00003e40  0d 16 76 21 c8 99 22 4f  53 5f 53 70 72 69 74 65  |..v!.."OS_Sprite|
00003e50  4f 70 22 2c 26 31 30 39  2c 73 70 72 69 74 65 73  |Op",&109,sprites|
00003e60  25 0d 16 80 2b c8 99 22  4f 53 5f 53 70 72 69 74  |%...+.."OS_Sprit|
00003e70  65 4f 70 22 2c 26 31 30  41 2c 73 70 72 69 74 65  |eOp",&10A,sprite|
00003e80  73 25 2c 70 61 74 68 6e  61 6d 65 24 0d 16 8a 05  |s%,pathname$....|
00003e90  e1 0d 16 94 05 3a 0d 16  9e 06 f4 7c 0d 16 a8 06  |.....:.....|....|
00003ea0  f4 7c 0d 16 b2 06 f4 7c  0d 16 bc 31 f4 7c 20 20  |.|.....|...1.|  |
00003eb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003ec0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003ed0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 16 c6 28 f4 7c 20  |---------...(.| |
00003ee0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003ef0  20 20 20 20 20 20 20 20  20 35 2e a0 46 69 6c 65  |         5..File|
00003f00  73 0d 16 d0 31 f4 7c 20  20 20 20 20 20 20 20 20  |s...1.|         |
00003f10  20 20 20 20 20 20 20 20  20 2d 2d 2d 2d 2d 2d 2d  |         -------|
00003f20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003f30  2d 2d 0d 16 da 06 f4 7c  0d 16 e4 06 f4 7c 0d 16  |--.....|.....|..|
00003f40  ee 35 f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.5.|            |
00003f50  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00003f60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003f70  2d 2d 2d 0d 16 f8 06 f4  7c 0d 17 02 28 f4 7c 20  |---.....|...(.| |
00003f80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003f90  20 20 20 20 20 50 72 6f  63 65 64 75 72 65 73 20  |     Procedures |
00003fa0  3a 0d 17 0c 06 f4 7c 0d  17 16 06 f4 7c 0d 17 20  |:.....|.....|.. |
00003fb0  2e f4 7c 20 20 20 20 20  20 20 20 20 20 20 20 20  |..|             |
00003fc0  20 20 20 20 20 46 4e 57  69 6d 70 5f 46 69 6c 65  |     FNWimp_File|
00003fd0  54 79 70 65 28 74 79 70  65 25 29 0d 17 2a 2e f4  |Type(type%)..*..|
00003fe0  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  ||               |
00003ff0  20 20 20 46 4e 57 69 6d  70 5f 47 65 74 46 69 6c  |   FNWimp_GetFil|
00004000  65 50 61 74 68 4e 61 6d  65 0d 17 34 32 f4 7c 20  |ePathName..42.| |
00004010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004020  20 46 4e 57 69 6d 70 5f  46 69 6c 65 4c 6f 61 64  | FNWimp_FileLoad|
00004030  28 70 61 74 68 6e 61 6d  65 24 29 0d 17 3e 39 f4  |(pathname$)..>9.|
00004040  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  ||               |
00004050  20 20 20 46 4e 57 69 6d  70 5f 47 65 74 53 74 72  |   FNWimp_GetStr|
00004060  69 6e 67 41 74 41 64 64  72 65 73 73 28 61 72 72  |ingAtAddress(arr|
00004070  61 79 25 29 0d 17 48 36  f4 7c 20 20 20 20 20 20  |ay%)..H6.|      |
00004080  20 20 20 20 20 20 20 20  20 20 20 20 46 4e 57 69  |            FNWi|
00004090  6d 70 5f 47 65 74 46 69  6c 65 46 72 6f 6d 50 61  |mp_GetFileFromPa|
000040a0  74 68 6e 61 6d 65 28 66  24 29 0d 17 52 32 f4 7c  |thname(f$)..R2.||
000040b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000040c0  20 20 50 52 4f 43 57 69  6d 70 5f 53 65 6e 64 54  |  PROCWimp_SendT|
000040d0  6f 45 64 69 74 28 66 69  6c 65 24 29 0d 17 5c 06  |oEdit(file$)..\.|
000040e0  f4 7c 0d 17 66 35 f4 7c  20 20 20 20 20 20 20 20  |.|..f5.|        |
000040f0  20 20 20 20 20 20 20 20  2d 2d 2d 2d 2d 2d 2d 2d  |        --------|
00004100  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00004110  2d 2d 2d 2d 2d 2d 2d 0d  17 70 06 f4 7c 0d 17 7a  |-------..p..|..z|
00004120  06 f4 7c 0d 17 84 06 f4  7c 0d 17 8e 05 3a 0d 17  |..|.....|....:..|
00004130  98 1b dd 20 a4 57 69 6d  70 5f 46 69 6c 65 54 79  |... .Wimp_FileTy|
00004140  70 65 28 74 79 70 65 25  29 0d 17 a2 0c c8 8e 74  |pe(type%)......t|
00004150  79 70 65 25 ca 0d 17 ac  11 c9 26 46 46 46 3a 3d  |ype%......&FFF:=|
00004160  22 54 65 78 74 22 0d 17  b6 11 c9 26 46 46 44 3a  |"Text".....&FFD:|
00004170  3d 22 44 61 74 61 22 0d  17 c0 12 c9 26 46 46 42  |="Data".....&FFB|
00004180  3a 3d 22 42 61 73 69 63  22 0d 17 ca 13 c9 26 46  |:="Basic".....&F|
00004190  46 39 3a 3d 22 53 70 72  69 74 65 22 0d 17 d4 14  |F9:="Sprite"....|
000041a0  c9 26 46 45 44 3a 3d 22  50 61 6c 65 74 74 65 22  |.&FED:="Palette"|
000041b0  0d 17 de 15 c9 26 46 45  43 3a 3d 22 54 65 6d 70  |.....&FEC:="Temp|
000041c0  6c 61 74 65 22 0d 17 e8  11 c9 26 41 46 46 3a 3d  |late".....&AFF:=|
000041d0  22 44 72 61 77 22 0d 17  f2 14 c9 26 31 30 30 30  |"Draw".....&1000|
000041e0  3a 3d 22 46 6f 6c 64 65  72 22 0d 17 fc 19 c9 26  |:="Folder".....&|
000041f0  32 30 30 30 3a 3d 22 41  70 70 6c 69 63 61 74 69  |2000:="Applicati|
00004200  6f 6e 22 0d 18 06 0f 7f  3d c3 7e 28 74 79 70 65  |on".....=.~(type|
00004210  25 29 0d 18 10 05 cb 0d  18 1a 05 3a 0d 18 24 1b  |%).........:..$.|
00004220  dd 20 a4 57 69 6d 70 5f  47 65 74 46 69 6c 65 50  |. .Wimp_GetFileP|
00004230  61 74 68 4e 61 6d 65 0d  18 2e 27 3d a4 57 69 6d  |athName...'=.Wim|
00004240  70 5f 47 65 74 53 74 72  69 6e 67 41 74 41 64 64  |p_GetStringAtAdd|
00004250  72 65 73 73 28 77 69 6d  70 25 2b 34 34 29 0d 18  |ress(wimp%+44)..|
00004260  38 05 3a 0d 18 42 1f dd  20 a4 57 69 6d 70 5f 46  |8.:..B.. .Wimp_F|
00004270  69 6c 65 4c 6f 61 64 28  70 61 74 68 6e 61 6d 65  |ileLoad(pathname|
00004280  24 29 0d 18 4c 10 ea 53  25 2c 54 25 2c 66 69 6c  |$)..L..S%,T%,fil|
00004290  65 25 0d 18 56 11 53 25  3d 8e 70 61 74 68 6e 61  |e%..V.S%=.pathna|
000042a0  6d 65 24 0d 18 60 0e 54  25 3d a2 23 53 25 2b 31  |me$..`.T%=.#S%+1|
000042b0  36 0d 18 6a 08 d9 23 53  25 0d 18 74 0c de 66 69  |6..j..#S%..t..fi|
000042c0  6c 65 25 54 25 0d 18 7e  22 ff 28 22 4c 4f 41 44  |le%T%..~".("LOAD|
000042d0  22 2b 70 61 74 68 6e 61  6d 65 24 2b 22 22 2b c3  |"+pathname$+""+.|
000042e0  7e 66 69 6c 65 25 29 0d  18 88 0a 3d 66 69 6c 65  |~file%)....=file|
000042f0  25 0d 18 92 05 3b 0d 18  9c 26 dd 20 a4 57 69 6d  |%....;...&. .Wim|
00004300  70 5f 47 65 74 53 74 72  69 6e 67 41 74 41 64 64  |p_GetStringAtAdd|
00004310  72 65 73 73 28 61 72 72  61 79 25 29 0d 18 a6 0d  |ress(array%)....|
00004320  ea 73 24 3a 73 24 3d 22  22 0d 18 b0 3c c8 95 28  |.s$:s$=""...<..(|
00004330  3f 61 72 72 61 79 25 3c  3e 31 33 29 80 28 3f 61  |?array%<>13).(?a|
00004340  72 72 61 79 25 3c 3e 30  29 3a 73 24 2b 3d bd 28  |rray%<>0):s$+=.(|
00004350  3f 61 72 72 61 79 25 29  3a 61 72 72 61 79 25 2b  |?array%):array%+|
00004360  3d 31 3a ce 3a 0d 18 ba  07 3d 73 24 0d 18 c4 05  |=1:.:....=s$....|
00004370  3a 0d 18 ce 23 dd 20 a4  57 69 6d 70 5f 47 65 74  |:...#. .Wimp_Get|
00004380  46 69 6c 65 46 72 6f 6d  50 61 74 68 6e 61 6d 65  |FileFromPathname|
00004390  28 66 24 29 0d 18 d8 11  c8 8e 20 a7 66 24 2c 22  |(f$)...... .f$,"|
000043a0  2e 22 29 20 ca 0d 18 e2  10 20 c9 20 30 20 20 20  |.") ..... . 0   |
000043b0  20 3a 3d 66 24 0d 18 ec  37 20 7f 20 3a 3d a4 57  | :=f$...7 . :=.W|
000043c0  69 6d 70 5f 47 65 74 46  69 6c 65 46 72 6f 6d 50  |imp_GetFileFromP|
000043d0  61 74 68 6e 61 6d 65 28  c2 66 24 2c a9 28 66 24  |athname(.f$,.(f$|
000043e0  29 2d a7 66 24 2c 22 2e  22 29 29 29 0d 18 f6 05  |)-.f$,".")))....|
000043f0  cb 0d 19 00 05 3a 0d 19  0a 1d dd 20 f2 57 69 6d  |.....:..... .Wim|
00004400  70 5f 53 65 6e 64 54 6f  45 64 69 74 28 66 69 6c  |p_SendToEdit(fil|
00004410  65 24 29 0d 19 14 08 ea  20 6e 25 0d 19 1e 15 77  |e$)..... n%....w|
00004420  69 6d 70 25 21 34 3d 26  36 43 43 30 31 43 30 43  |imp%!4=&6CC01C0C|
00004430  0d 19 28 0e 77 69 6d 70  25 21 31 36 3d 35 0d 19  |..(.wimp%!16=5..|
00004440  32 0e 77 69 6d 70 25 21  33 36 3d 30 0d 19 3c 11  |2.wimp%!36=0..<.|
00004450  77 69 6d 70 25 21 34 30  3d 26 46 46 46 0d 19 46  |wimp%!40=&FFF..F|
00004460  18 24 28 77 69 6d 70 25  2b 34 34 29 3d 66 69 6c  |.$(wimp%+44)=fil|
00004470  65 24 2b bd 30 0d 19 50  10 6e 25 3d a9 66 69 6c  |e$+.0..P.n%=.fil|
00004480  65 24 2b 34 35 0d 19 5a  2c e7 20 6e 25 83 34 20  |e$+45..Z,. n%.4 |
00004490  8c 20 21 77 69 6d 70 25  3d 34 2b 28 6e 25 3e 3e  |. !wimp%=4+(n%>>|
000044a0  32 29 3c 3c 32 20 8b 20  21 77 69 6d 70 25 3d 6e  |2)<<2 . !wimp%=n|
000044b0  25 0d 19 64 24 c8 99 20  22 57 69 6d 70 5f 53 65  |%..d$.. "Wimp_Se|
000044c0  6e 64 4d 65 73 73 61 67  65 22 2c 31 37 2c 77 69  |ndMessage",17,wi|
000044d0  6d 70 25 2c 30 0d 19 6e  05 e1 0d 19 78 05 3a 0d  |mp%,0..n....x.:.|
000044e0  19 82 06 f4 7c 0d 19 8c  06 f4 7c 0d 19 96 06 f4  |....|.....|.....|
000044f0  7c 0d 19 a0 31 f4 7c 20  20 20 20 20 20 20 20 20  ||...1.|         |
00004500  20 20 20 20 20 20 20 20  20 2d 2d 2d 2d 2d 2d 2d  |         -------|
00004510  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00004520  2d 2d 0d 19 aa 2c f4 7c  20 20 20 20 20 20 20 20  |--...,.|        |
00004530  20 20 20 20 20 20 20 20  20 20 20 20 20 20 36 2e  |              6.|
00004540  a0 4d 69 73 63 65 6c 6c  61 6e 65 6f 75 73 0d 19  |.Miscellaneous..|
00004550  b4 31 f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.1.|            |
00004560  20 20 20 20 20 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |      ----------|
00004570  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00004580  19 be 06 f4 7c 0d 19 c8  06 f4 7c 0d 19 d2 35 f4  |....|.....|...5.|
00004590  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  ||               |
000045a0  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | ---------------|
000045b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000045c0  0d 19 dc 06 f4 7c 0d 19  e6 28 f4 7c 20 20 20 20  |.....|...(.|    |
000045d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000045e0  20 20 50 72 6f 63 65 64  75 72 65 73 20 3a 0d 19  |  Procedures :..|
000045f0  f0 06 f4 7c 0d 19 fa 06  f4 7c 0d 1a 04 26 f4 7c  |...|.....|...&.||
00004600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004610  20 20 50 52 4f 43 57 69  6d 70 5f 53 74 61 72 74  |  PROCWimp_Start|
00004620  0d 1a 0e 2e f4 7c 20 20  20 20 20 20 20 20 20 20  |.....|          |
00004630  20 20 20 20 20 20 20 20  46 4e 57 69 6d 70 5f 42  |        FNWimp_B|
00004640  41 53 49 43 50 61 72 61  6d 65 74 65 72 73 0d 1a  |ASICParameters..|
00004650  18 32 f4 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.2.|            |
00004660  20 20 20 20 20 20 50 52  4f 43 57 69 6d 70 5f 53  |      PROCWimp_S|
00004670  65 74 45 76 65 6e 74 56  61 72 69 61 62 6c 65 73  |etEventVariables|
00004680  0d 1a 22 37 f4 7c 20 20  20 20 20 20 20 20 20 20  |.."7.|          |
00004690  20 20 20 20 20 20 20 20  50 52 4f 43 57 69 6d 70  |        PROCWimp|
000046a0  5f 45 72 72 6f 72 28 74  61 73 6b 25 2c 54 61 73  |_Error(task%,Tas|
000046b0  6b 4e 61 6d 65 24 29 0d  1a 2c 2a f4 7c 20 20 20  |kName$)..,*.|   |
000046c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 50  |               P|
000046d0  52 4f 43 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |ROCWimp_CloseDow|
000046e0  6e 0d 1a 36 25 f4 7c 20  20 20 20 20 20 20 20 20  |n..6%.|         |
000046f0  20 20 20 20 20 20 20 20  20 50 52 4f 43 57 69 6d  |         PROCWim|
00004700  70 5f 51 75 69 74 0d 1a  40 36 f4 7c 20 20 20 20  |p_Quit..@6.|    |
00004710  20 20 20 20 20 20 20 20  20 20 20 20 20 20 46 4e  |              FN|
00004720  57 69 6d 70 5f 52 65 61  64 56 61 72 69 61 62 6c  |Wimp_ReadVariabl|
00004730  65 28 56 61 72 69 61 62  6c 65 24 29 0d 1a 4a 06  |e(Variable$)..J.|
00004740  f4 7c 0d 1a 54 06 f4 7c  0d 1a 5e 35 f4 7c 20 20  |.|..T..|..^5.|  |
00004750  20 20 20 20 20 20 20 20  20 20 20 20 20 20 2d 2d  |              --|
00004760  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00004770  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 1a 68  |-------------..h|
00004780  06 f4 7c 0d 1a 72 05 3a  0d 1a 7c 11 dd 20 f2 57  |..|..r.:..|.. .W|
00004790  69 6d 70 5f 53 74 61 72  74 0d 1a 86 0e ea 20 76  |imp_Start..... v|
000047a0  65 72 73 69 6f 6e 25 0d  1a 90 1b f2 57 69 6d 70  |ersion%.....Wimp|
000047b0  5f 53 65 74 45 76 65 6e  74 56 61 72 69 61 62 6c  |_SetEventVariabl|
000047c0  65 73 0d 1a 9a 22 ee 20  85 20 f2 57 69 6d 70 5f  |es...". . .Wimp_|
000047d0  45 72 72 6f 72 28 74 61  73 6b 25 2c 74 61 73 6b  |Error(task%,task|
000047e0  24 29 3a e0 0d 1a a4 11  24 77 69 6d 70 25 3d 22  |$):.....$wimp%="|
000047f0  54 41 53 4b 22 0d 1a ae  39 c8 99 22 57 69 6d 70  |TASK"...9.."Wimp|
00004800  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 32 30 30  |_Initialise",200|
00004810  2c 21 77 69 6d 70 25 2c  74 61 73 6b 24 20 b8 20  |,!wimp%,task$ . |
00004820  76 65 72 73 69 6f 6e 25  2c 74 61 73 6b 25 0d 1a  |version%,task%..|
00004830  b8 05 e1 0d 1a c2 05 3a  0d 1a cc 1b dd 20 a4 57  |.......:..... .W|
00004840  69 6d 70 5f 42 41 53 49  43 50 61 72 61 6d 65 74  |imp_BASICParamet|
00004850  65 72 73 0d 1a d6 15 20  ea 20 63 6f 6d 24 2c 70  |ers.... . com$,p|
00004860  61 72 61 6d 24 2c 49 25  0d 1a e0 1a 20 c8 99 20  |aram$,I%.... .. |
00004870  22 4f 53 5f 47 65 74 45  6e 76 22 20 b8 20 63 6f  |"OS_GetEnv" . co|
00004880  6d 24 0d 1a ea 0f 20 70  61 72 61 6d 73 24 3d 22  |m$.... params$="|
00004890  22 0d 1a f4 18 20 49 25  3d a7 63 6f 6d 24 2c 22  |".... I%=.com$,"|
000048a0  20 2d 71 75 69 74 20 22  29 0d 1a fe 35 20 e7 20  | -quit ")...5 . |
000048b0  49 25 20 8c 20 70 61 72  61 6d 73 24 3d c1 63 6f  |I% . params$=.co|
000048c0  6d 24 2c a7 63 6f 6d 24  2c 22 20 22 2c 49 25 2b  |m$,.com$," ",I%+|
000048d0  a9 22 20 2d 71 75 69 74  20 22 29 2b 31 29 0d 1b  |." -quit ")+1)..|
000048e0  08 0c 3d 70 61 72 61 6d  73 24 0d 1b 12 05 3a 0d  |..=params$....:.|
000048f0  1b 1c 1d dd 20 f2 57 69  6d 70 5f 53 65 74 45 76  |.... .Wimp_SetEv|
00004900  65 6e 74 56 61 72 69 61  62 6c 65 73 0d 1b 26 1f  |entVariables..&.|
00004910  74 61 73 6b 24 3d a4 57  69 6d 70 5f 42 41 53 49  |task$=.Wimp_BASI|
00004920  43 50 61 72 61 6d 65 74  65 72 73 0d 1b 30 19 77  |CParameters..0.w|
00004930  69 6d 70 5f 6d 65 6d 6f  72 79 25 3d bb 28 74 61  |imp_memory%=.(ta|
00004940  73 6b 24 29 0d 1b 3a 15  c8 8e 20 77 69 6d 70 5f  |sk$)..:... wimp_|
00004950  6d 65 6d 6f 72 79 25 20  ca 0d 1b 44 0a 20 c9 20  |memory% ...D. . |
00004960  30 20 3a 0d 1b 4e 18 20  20 77 69 6d 70 5f 6d 65  |0 :..N.  wimp_me|
00004970  6d 6f 72 79 25 3d 26 31  30 30 30 0d 1b 58 14 20  |mory%=&1000..X. |
00004980  20 69 63 6f 6e 5f 6d 65  6d 6f 72 79 25 3d 30 0d  | icon_memory%=0.|
00004990  1b 62 06 20 7f 0d 1b 6c  2a 20 20 69 63 6f 6e 5f  |.b. ...l*  icon_|
000049a0  6d 65 6d 6f 72 79 25 3d  a7 74 61 73 6b 24 2c c3  |memory%=.task$,.|
000049b0  28 77 69 6d 70 5f 6d 65  6d 6f 72 79 25 29 29 0d  |(wimp_memory%)).|
000049c0  1b 76 2b 20 20 69 63 6f  6e 5f 6d 65 6d 6f 72 79  |.v+  icon_memory|
000049d0  25 3d a7 74 61 73 6b 24  2c 22 20 22 2c 69 63 6f  |%=.task$," ",ico|
000049e0  6e 5f 6d 65 6d 6f 72 79  25 29 0d 1b 80 31 20 20  |n_memory%)...1  |
000049f0  69 63 6f 6e 5f 6d 65 6d  6f 72 79 25 3d bb 28 c2  |icon_memory%=.(.|
00004a00  74 61 73 6b 24 2c a9 74  61 73 6b 24 2d 69 63 6f  |task$,.task$-ico|
00004a10  6e 5f 6d 65 6d 6f 72 79  25 29 29 0d 1b 8a 05 cb  |n_memory%)).....|
00004a20  0d 1b 94 2c de 20 77 69  6d 70 25 20 77 69 6d 70  |...,. wimp% wimp|
00004a30  5f 6d 65 6d 6f 72 79 25  2c 69 63 6f 6e 73 25 20  |_memory%,icons% |
00004a40  69 63 6f 6e 5f 6d 65 6d  6f 72 79 25 0d 1b 9e 17  |icon_memory%....|
00004a50  de 20 70 6f 69 6e 74 65  72 5f 62 6c 6f 63 6b 25  |. pointer_block%|
00004a60  20 32 30 0d 1b a8 24 69  63 6f 6e 5f 6d 65 6d 6f  | 20...$icon_memo|
00004a70  72 79 25 3d 69 63 6f 6e  73 25 2b 69 63 6f 6e 5f  |ry%=icons%+icon_|
00004a80  6d 65 6d 6f 72 79 25 0d  1b b2 2e 6e 75 6c 6c 25  |memory%....null%|
00004a90  3d 31 20 20 3a 64 72 61  77 25 3d 32 20 3a 20 20  |=1  :draw%=2 :  |
00004aa0  70 6f 69 6e 74 65 72 5f  6c 65 61 76 69 6e 67 25  |pointer_leaving%|
00004ab0  3d 31 3c 3c 34 0d 1b bc  31 70 6f 69 6e 74 65 72  |=1<<4...1pointer|
00004ac0  5f 65 6e 74 65 72 69 6e  67 25 3d 31 3c 3c 35 3a  |_entering%=1<<5:|
00004ad0  6d 6f 75 73 65 25 3d 31  3c 3c 36 3a 64 72 61 67  |mouse%=1<<6:drag|
00004ae0  25 3d 31 3c 3c 37 0d 1b  c6 26 6b 65 79 25 3d 31  |%=1<<7...&key%=1|
00004af0  3c 3c 38 3a 6d 65 6e 75  25 3d 31 3c 3c 39 3a 73  |<<8:menu%=1<<9:s|
00004b00  63 72 6f 6c 6c 25 3d 31  3c 3c 31 30 0d 1b d0 40  |croll%=1<<10...@|
00004b10  6c 6f 73 65 5f 63 61 72  65 74 25 3d 31 3c 3c 31  |lose_caret%=1<<1|
00004b20  31 3a 67 61 69 6e 5f 63  61 72 65 74 25 3d 31 3c  |1:gain_caret%=1<|
00004b30  3c 31 32 3a 6d 65 73 73  61 67 65 25 3d 28 31 3c  |<12:message%=(1<|
00004b40  3c 31 37 29 2b 28 31 3c  3c 31 38 29 0d 1b da 30  |<17)+(1<<18)...0|
00004b50  72 65 63 6f 72 64 65 72  25 3d 31 3c 3c 31 38 3a  |recorder%=1<<18:|
00004b60  61 63 6b 6e 6f 77 6c 65  64 67 65 25 3d 31 3c 3c  |acknowledge%=1<<|
00004b70  31 39 3a 77 69 6e 64 6f  77 25 3d 30 0d 1b e4 21  |19:window%=0...!|
00004b80  73 70 72 69 74 65 73 25  3d 30 3a 76 65 72 73 69  |sprites%=0:versi|
00004b90  6f 6e 25 3d 30 3a 74 61  73 6b 25 3d 30 0d 1b ee  |on%=0:task%=0...|
00004ba0  2a 42 61 72 5f 57 69 6e  64 6f 77 25 3d 2d 32 3a  |*Bar_Window%=-2:|
00004bb0  42 61 72 5f 49 63 6f 6e  25 3d 30 3a 42 61 72 5f  |Bar_Icon%=0:Bar_|
00004bc0  4d 65 6e 75 25 3d 30 0d  1b f8 2a 78 5f 6f 72 69  |Menu%=0...*x_ori|
00004bd0  67 69 6e 25 3d 30 3a 79  5f 6f 72 69 67 69 6e 25  |gin%=0:y_origin%|
00004be0  3d 30 3a 53 61 76 65 57  69 6e 64 6f 77 25 3d 2d  |=0:SaveWindow%=-|
00004bf0  33 0d 1c 02 33 6d 65 73  73 61 67 65 5f 71 75 69  |3...3message_qui|
00004c00  74 25 3d 30 3a 6d 65 73  73 61 67 65 5f 73 61 76  |t%=0:message_sav|
00004c10  65 25 3d 32 3a 6d 65 73  73 61 67 65 5f 6c 6f 61  |e%=2:message_loa|
00004c20  64 25 3d 33 0d 1c 0c 21  6d 6f 75 73 65 5f 62 75  |d%=3...!mouse_bu|
00004c30  74 74 6f 6e 25 3d 32 3a  73 61 76 65 5f 65 76 65  |tton%=2:save_eve|
00004c40  6e 74 25 3d 30 0d 1c 16  20 74 6f 70 5f 6c 69 6e  |nt%=0... top_lin|
00004c50  65 25 3d 30 20 3a 20 62  6f 74 74 6f 6d 5f 6c 69  |e%=0 : bottom_li|
00004c60  6e 65 25 3d 30 0d 1c 20  28 74 61 73 6b 24 3d a4  |ne%=0.. (task$=.|
00004c70  57 69 6d 70 5f 52 65 61  64 56 61 72 69 61 62 6c  |Wimp_ReadVariabl|
00004c80  65 28 22 4f 62 65 79 24  44 69 72 22 29 0d 1c 2a  |e("Obey$Dir")..*|
00004c90  2a 74 61 73 6b 24 3d a4  57 69 6d 70 5f 47 65 74  |*task$=.Wimp_Get|
00004ca0  46 69 6c 65 46 72 6f 6d  50 61 74 68 6e 61 6d 65  |FileFromPathname|
00004cb0  28 74 61 73 6b 24 29 0d  1c 34 05 e1 0d 1c 3e 05  |(task$)..4....>.|
00004cc0  3a 0d 1c 48 22 dd 20 f2  57 69 6d 70 5f 45 72 72  |:..H". .Wimp_Err|
00004cd0  6f 72 28 74 61 73 6b 25  2c 54 61 73 6b 4e 61 6d  |or(task%,TaskNam|
00004ce0  65 24 29 0d 1c 52 0a ea  58 24 2c 78 25 0d 1c 5c  |e$)..R..X$,x%..\|
00004cf0  09 ee 20 85 20 87 0d 1c  66 08 78 25 3d 9e 0d 1c  |.. . ...f.x%=...|
00004d00  70 1b 58 24 3d f6 24 2b  22 61 74 6c 69 6e 65 22  |p.X$=.$+"atline"|
00004d10  2b c3 28 78 25 81 31 30  29 0d 1c 7a 10 de 45 72  |+.(x%.10)..z..Er|
00004d20  72 6f 72 4d 73 67 25 33  36 0d 1c 84 83 45 72 72  |rorMsg%36....Err|
00004d30  6f 72 4d 73 67 25 21 30  3d 33 36 3a 45 72 72 6f  |orMsg%!0=36:Erro|
00004d40  72 4d 73 67 25 21 31 32  3d 30 3a 45 72 72 6f 72  |rMsg%!12=0:Error|
00004d50  4d 73 67 25 21 31 36 3d  26 38 31 30 38 30 3a 45  |Msg%!16=&81080:E|
00004d60  72 72 6f 72 4d 73 67 25  21 32 30 3d 78 25 3a 24  |rrorMsg%!20=x%:$|
00004d70  28 45 72 72 6f 72 4d 73  67 25 2b 32 34 29 3d 22  |(ErrorMsg%+24)="|
00004d80  21 52 75 6e 49 6d 61 67  65 22 3a c8 99 22 57 69  |!RunImage":.."Wi|
00004d90  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00004da0  31 37 2c 45 72 72 6f 72  4d 73 67 25 0d 1c 8e 23  |17,ErrorMsg%...#|
00004db0  f2 57 69 6d 70 5f 57 69  6e 64 6f 77 41 6c 65 72  |.Wimp_WindowAler|
00004dc0  74 28 54 61 73 6b 4e 61  6d 65 24 2c 58 24 29 0d  |t(TaskName$,X$).|
00004dd0  1c 98 13 f2 57 69 6d 70  5f 43 6c 6f 73 65 44 6f  |....Wimp_CloseDo|
00004de0  77 6e 0d 1c a2 05 e1 0d  1c ac 05 3a 0d 1c b6 15  |wn.........:....|
00004df0  dd 20 f2 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |. .Wimp_CloseDow|
00004e00  6e 0d 1c c0 23 c8 99 22  57 69 6d 70 5f 43 6c 6f  |n...#.."Wimp_Clo|
00004e10  73 65 44 6f 77 6e 22 2c  74 61 73 6b 25 2c 22 54  |seDown",task%,"T|
00004e20  41 53 4b 22 0d 1c ca 05  e1 0d 1c d4 05 3a 0d 1c  |ASK".........:..|
00004e30  de 10 dd 20 f2 57 69 6d  70 5f 51 75 69 74 0d 1c  |... .Wimp_Quit..|
00004e40  e8 10 20 66 69 6e 69 73  68 65 64 25 3d b9 0d 1c  |.. finished%=...|
00004e50  f2 05 e1 0d 1c fc 05 3a  0d 1d 06 23 dd 20 a4 57  |.......:...#. .W|
00004e60  69 6d 70 5f 52 65 61 64  56 61 72 69 61 62 6c 65  |imp_ReadVariable|
00004e70  28 56 61 72 69 61 62 6c  65 24 29 0d 1d 10 1b ea  |(Variable$).....|
00004e80  6c 65 6e 25 2c 72 65 73  75 6c 74 25 2c 76 61 72  |len%,result%,var|
00004e90  69 61 62 6c 65 25 0d 1d  1a 14 24 77 69 6d 70 25  |iable%....$wimp%|
00004ea0  3d 56 61 72 69 61 62 6c  65 24 0d 1d 24 33 c8 99  |=Variable$..$3..|
00004eb0  22 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |"OS_ReadVarVal",|
00004ec0  77 69 6d 70 25 2c 77 69  6d 70 25 2b 32 35 35 2c  |wimp%,wimp%+255,|
00004ed0  32 35 35 2c 2c 33 b8 2c  2c 6c 65 6e 25 0d 1d 2e  |255,,3.,,len%...|
00004ee0  17 77 69 6d 70 25 3f 28  6c 65 6e 25 2b 32 35 35  |.wimp%?(len%+255|
00004ef0  29 3d 31 33 0d 1d 38 11  3d 24 28 77 69 6d 70 25  |)=13..8.=$(wimp%|
00004f00  2b 32 35 35 29 0d 1d 42  05 3a 0d 1d 4c 06 f4 7c  |+255)..B.:..L..||
00004f10  0d 1d 56 06 f4 7c 0d 1d  60 06 f4 7c 0d 1d 6a 06  |..V..|..`..|..j.|
00004f20  f4 7c 0d 1d 74 29 f4 7c  20 20 20 20 20 20 20 20  |.|..t).|        |
00004f30  20 20 20 20 20 20 20 20  20 20 20 2d 2d 2d 2d 2d  |           -----|
00004f40  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 1d 7e 27 f4  |-----------..~'.|
00004f50  7c 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  ||               |
00004f60  20 20 20 20 20 20 57 69  6d 70 20 50 6f 6c 6c 69  |      Wimp Polli|
00004f70  6e 67 0d 1d 88 29 f4 7c  20 20 20 20 20 20 20 20  |ng...).|        |
00004f80  20 20 20 20 20 20 20 20  20 20 20 2d 2d 2d 2d 2d  |           -----|
00004f90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 1d 92 06 f4  |-----------.....|
00004fa0  7c 0d 1d 9c 06 f4 7c 0d  1d a6 05 3a 0d 1d b0 18  ||.....|....:....|
00004fb0  dd 20 f2 57 69 6d 70 5f  57 61 69 74 46 6f 72 45  |. .Wimp_WaitForE|
00004fc0  76 65 6e 74 0d 1d ba 0f  66 69 6e 69 73 68 65 64  |vent....finished|
00004fd0  25 3d a3 0d 1d c4 17 6d  61 73 6b 25 3d 25 31 31  |%=.....mask%=%11|
00004fe0  31 30 30 30 30 31 31 30  30 31 0d 1d ce 05 f5 0d  |1000011001......|
00004ff0  1d d8 27 20 c8 99 22 57  69 6d 70 5f 50 6f 6c 6c  |..' .."Wimp_Poll|
00005000  22 2c 6d 61 73 6b 25 2c  77 69 6d 70 25 20 b8 20  |",mask%,wimp% . |
00005010  65 76 65 6e 74 25 0d 1d  e2 10 20 c8 8e 20 65 76  |event%.... .. ev|
00005020  65 6e 74 25 20 ca 0d 1d  ec 0a 20 20 c9 20 30 3a  |ent% .....  . 0:|
00005030  0d 1d f6 2d 20 20 c9 20  31 3a 20 c8 99 22 57 69  |...-  . 1: .."Wi|
00005040  6d 70 5f 52 65 64 72 61  77 57 69 6e 64 6f 77 22  |mp_RedrawWindow"|
00005050  2c 2c 77 69 6d 70 25 b8  6d 6f 72 65 25 0d 1e 00  |,,wimp%.more%...|
00005060  2b 20 20 20 20 20 20 20  20 20 20 78 5f 6f 72 69  |+          x_ori|
00005070  67 69 6e 25 3d a4 57 69  6d 70 5f 57 69 6e 64 6f  |gin%=.Wimp_Windo|
00005080  77 58 4f 72 69 67 69 6e  0d 1e 0a 2b 20 20 20 20  |wXOrigin...+    |
00005090  20 20 20 20 20 20 79 5f  6f 72 69 67 69 6e 25 3d  |      y_origin%=|
000050a0  a4 57 69 6d 70 5f 57 69  6e 64 6f 77 59 4f 72 69  |.Wimp_WindowYOri|
000050b0  67 69 6e 0d 1e 14 15 20  20 20 20 20 20 20 20 20  |gin....         |
000050c0  20 c8 95 6d 6f 72 65 25  0d 1e 1e 2d f4 20 20 20  | ..more%...-.   |
000050d0  20 20 20 20 20 20 20 20  53 59 53 22 57 69 6d 70  |        SYS"Wimp|
000050e0  5f 42 6f 72 64 65 72 57  69 6e 64 6f 77 22 2c 2c  |_BorderWindow",,|
000050f0  77 69 6d 70 25 0d 1e 28  36 20 20 20 20 20 20 20  |wimp%..(6       |
00005100  20 20 20 20 62 6f 74 74  6f 6d 5f 6c 69 6e 65 25  |    bottom_line%|
00005110  3d 28 34 37 2b 79 5f 6f  72 69 67 69 6e 25 2d 77  |=(47+y_origin%-w|
00005120  69 6d 70 25 21 33 32 29  81 33 32 0d 1e 32 30 20  |imp%!32).32..20 |
00005130  20 20 20 20 20 20 20 20  20 20 74 6f 70 5f 6c 69  |          top_li|
00005140  6e 65 25 3d 28 79 5f 6f  72 69 67 69 6e 25 2d 77  |ne%=(y_origin%-w|
00005150  69 6d 70 25 21 34 30 29  81 33 32 0d 1e 3c 2a 20  |imp%!40).32..<* |
00005160  20 20 20 20 20 20 20 20  20 20 e7 20 74 6f 70 5f  |          . top_|
00005170  6c 69 6e 65 25 3c 30 20  8c 20 74 6f 70 5f 6c 69  |line%<0 . top_li|
00005180  6e 65 25 3d 30 0d 1e 46  23 20 20 20 20 20 20 20  |ne%=0..F#       |
00005190  20 20 20 20 f2 45 76 65  6e 74 5f 44 72 61 77 28  |    .Event_Draw(|
000051a0  77 69 6d 70 25 21 30 29  0d 1e 50 23 20 20 20 20  |wimp%!0)..P#    |
000051b0  20 20 20 20 20 20 20 f2  45 76 65 6e 74 5f 44 72  |       .Event_Dr|
000051c0  61 77 28 77 69 6d 70 25  21 30 29 0d 1e 5a 31 20  |aw(wimp%!0)..Z1 |
000051d0  20 20 20 20 20 20 20 20  20 20 c8 99 22 57 69 6d  |          .."Wim|
000051e0  70 5f 47 65 74 52 65 63  74 61 6e 67 6c 65 22 2c  |p_GetRectangle",|
000051f0  2c 77 69 6d 70 25 b8 6d  6f 72 65 25 0d 1e 64 0f  |,wimp%.more%..d.|
00005200  20 20 20 20 20 20 20 20  20 20 ce 0d 1e 6e 26 20  |          ...n& |
00005210  20 c9 32 20 3a 20 c8 99  20 22 57 69 6d 70 5f 4f  | .2 : .. "Wimp_O|
00005220  70 65 6e 57 69 6e 64 6f  77 22 2c 2c 77 69 6d 70  |penWindow",,wimp|
00005230  25 0d 1e 78 25 20 20 c9  33 20 3a 20 f2 45 76 65  |%..x%  .3 : .Eve|
00005240  6e 74 5f 57 69 6e 64 6f  77 43 6c 6f 73 65 28 21  |nt_WindowClose(!|
00005250  77 69 6d 70 25 29 0d 1e  82 27 20 20 20 20 20 20  |wimp%)...'      |
00005260  20 20 20 20 f2 57 69 6d  70 5f 57 69 6e 64 6f 77  |    .Wimp_Window|
00005270  43 6c 6f 73 65 28 21 77  69 6d 70 25 29 0d 1e 8c  |Close(!wimp%)...|
00005280  0a 20 20 c9 34 20 3a 0d  1e 96 0a 20 20 c9 35 20  |.  .4 :....  .5 |
00005290  3a 0d 1e a0 39 20 20 c9  36 20 3a 62 75 74 74 6f  |:...9  .6 :butto|
000052a0  6e 25 3d 77 69 6d 70 25  21 38 3a 77 69 6e 64 6f  |n%=wimp%!8:windo|
000052b0  77 25 3d 77 69 6d 70 25  21 31 32 3a 69 63 6f 6e  |w%=wimp%!12:icon|
000052c0  25 3d 77 69 6d 70 25 21  31 36 0d 1e aa 22 20 20  |%=wimp%!16..."  |
000052d0  20 20 20 20 20 20 20 78  25 3d 77 69 6d 70 25 21  |       x%=wimp%!|
000052e0  30 3a 79 25 3d 77 69 6d  70 25 21 34 0d 1e b4 19  |0:y%=wimp%!4....|
000052f0  20 20 20 20 20 20 20 20  20 c8 8e 20 62 75 74 74  |         .. butt|
00005300  6f 6e 25 20 ca 0d 1e be  34 20 20 20 20 20 20 20  |on% ....4       |
00005310  20 20 20 c9 32 20 20 20  20 3a f2 45 76 65 6e 74  |   .2    :.Event|
00005320  5f 50 6f 70 55 70 4d 65  6e 75 28 77 69 6e 64 6f  |_PopUpMenu(windo|
00005330  77 25 2c 78 25 2c 79 25  29 0d 1e c8 10 20 20 20  |w%,x%,y%)....   |
00005340  20 20 20 20 20 20 20 7f  3a 0d 1e d2 27 20 20 20  |       .:...'   |
00005350  20 20 20 20 20 20 20 c8  8e 20 a4 45 76 65 6e 74  |       .. .Event|
00005360  5f 53 61 76 65 28 77 69  6e 64 6f 77 25 29 20 ca  |_Save(window%) .|
00005370  0d 1e dc 12 20 20 20 20  20 20 20 20 20 20 20 c9  |....           .|
00005380  20 b9 0d 1e e6 1a 20 20  20 20 20 20 20 20 20 20  | .....          |
00005390  20 20 c8 8e 20 69 63 6f  6e 25 20 ca 0d 1e f0 16  |  .. icon% .....|
000053a0  20 20 20 20 20 20 20 20  20 20 20 20 20 c9 20 30  |             . 0|
000053b0  20 3a 0d 1e fa 3e 20 20  20 20 20 20 20 20 20 20  | :...>          |
000053c0  20 20 20 20 e7 20 62 75  74 74 6f 6e 25 20 80 20  |    . button% . |
000053d0  26 35 30 20 8c 20 f2 57  69 6d 70 50 6f 6c 6c 5f  |&50 . .WimpPoll_|
000053e0  44 72 61 67 42 6f 78 28  77 69 6e 64 6f 77 25 29  |DragBox(window%)|
000053f0  0d 1f 04 16 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00005400  20 c9 20 32 20 3a 0d 1f  0e 3e 20 20 20 20 20 20  | . 2 :...>      |
00005410  20 20 20 20 20 20 20 20  e7 20 62 75 74 74 6f 6e  |        . button|
00005420  25 20 80 20 35 20 8c 20  20 f2 57 69 6d 70 50 6f  |% . 5 .  .WimpPo|
00005430  6c 6c 5f 53 61 76 65 46  69 6c 65 28 77 69 6e 64  |ll_SaveFile(wind|
00005440  6f 77 25 29 0d 1f 18 11  20 20 20 20 20 20 20 20  |ow%)....        |
00005450  20 20 20 20 cb 0d 1f 22  12 20 20 20 20 20 20 20  |    ...".       |
00005460  20 20 20 20 c9 20 a3 0d  1f 2c 2c f4 20 20 20 20  |    . ...,,.    |
00005470  20 20 20 20 20 20 20 20  53 59 53 22 57 69 6d 70  |        SYS"Wimp|
00005480  5f 42 6f 72 64 65 72 49  63 6f 6e 22 2c 2c 77 69  |_BorderIcon",,wi|
00005490  6d 70 25 0d 1f 36 3e 20  20 20 20 20 20 20 20 20  |mp%..6>         |
000054a0  20 20 20 f2 45 76 65 6e  74 5f 4d 6f 75 73 65 43  |   .Event_MouseC|
000054b0  6c 69 63 6b 28 62 75 74  74 6f 6e 25 2c 77 69 6e  |lick(button%,win|
000054c0  64 6f 77 25 2c 69 63 6f  6e 25 2c 78 25 2c 79 25  |dow%,icon%,x%,y%|
000054d0  29 0d 1f 40 1a f4 20 20  20 20 20 20 20 20 20 20  |)..@..          |
000054e0  20 20 77 69 6d 70 25 21  38 3d 30 0d 1f 4a 2c f4  |  wimp%!8=0..J,.|
000054f0  20 20 20 20 20 20 20 20  20 20 20 20 53 59 53 22  |            SYS"|
00005500  57 69 6d 70 5f 42 6f 72  64 65 72 49 63 6f 6e 22  |Wimp_BorderIcon"|
00005510  2c 2c 77 69 6d 70 25 0d  1f 54 0f 20 20 20 20 20  |,,wimp%..T.     |
00005520  20 20 20 20 20 cb 0d 1f  5e 0e 20 20 20 20 20 20  |     ...^.      |
00005530  20 20 20 cb 0d 1f 68 1f  20 20 c9 37 20 3a f2 57  |   ...h.  .7 :.W|
00005540  69 6d 70 50 6f 6c 6c 5f  53 61 76 65 4d 65 73 73  |impPoll_SaveMess|
00005550  61 67 65 0d 1f 72 35 20  20 c9 38 20 3a 77 69 6e  |age..r5  .8 :win|
00005560  64 6f 77 25 3d 77 69 6d  70 25 21 30 3a 69 63 6f  |dow%=wimp%!0:ico|
00005570  6e 25 3d 77 69 6d 70 25  21 34 3a 6b 65 79 25 3d  |n%=wimp%!4:key%=|
00005580  77 69 6d 70 25 21 32 34  0d 1f 7c 26 20 20 20 20  |wimp%!24..|&    |
00005590  20 20 20 20 20 c8 8e 20  a4 45 76 65 6e 74 5f 53  |     .. .Event_S|
000055a0  61 76 65 28 77 69 6e 64  6f 77 25 29 20 ca 0d 1f  |ave(window%) ...|
000055b0  86 2f 20 20 20 20 20 20  20 20 20 20 c9 20 b9 20  |./          . . |
000055c0  3a 20 f2 57 69 6d 70 50  6f 6c 6c 5f 53 61 76 65  |: .WimpPoll_Save|
000055d0  46 69 6c 65 28 77 69 6e  64 6f 77 25 29 0d 1f 90  |File(window%)...|
000055e0  36 20 20 20 20 20 20 20  20 20 20 c9 20 a3 3a 20  |6          . .: |
000055f0  f2 45 76 65 6e 74 5f 4b  65 79 50 72 65 73 73 28  |.Event_KeyPress(|
00005600  77 69 6e 64 6f 77 25 2c  69 63 6f 6e 25 2c 6b 65  |window%,icon%,ke|
00005610  79 25 29 0d 1f 9a 0e 20  20 20 20 20 20 20 20 20  |y%)....         |
00005620  cb 0d 1f a4 22 20 20 c9  39 20 3a f2 45 76 65 6e  |...."  .9 :.Even|
00005630  74 5f 4d 65 6e 75 43 68  6f 69 63 65 28 6d 65 6e  |t_MenuChoice(men|
00005640  75 25 29 0d 1f ae 0a 20  20 c9 31 30 3a 0d 1f b8  |u%)....  .10:...|
00005650  0a 20 20 c9 31 31 3a 0d  1f c2 0a 20 20 c9 31 32  |.  .11:....  .12|
00005660  3a 0d 1f cc 18 20 20 c9  31 37 2c 31 38 3a 20 f4  |:....  .17,18: .|
00005670  20 6d 65 73 73 61 67 65  73 0d 1f d6 15 20 20 20  | messages....   |
00005680  20 c8 8e 20 77 69 6d 70  25 21 31 36 20 ca 0d 1f  | .. wimp%!16 ...|
00005690  e0 18 20 20 20 20 20 c9  20 30 3a 66 69 6e 69 73  |..     . 0:finis|
000056a0  68 65 64 25 3d b9 0d 1f  ea 0e 20 20 20 20 20 c9  |hed%=.....     .|
000056b0  20 31 20 3a 0d 1f f4 0e  20 20 20 20 20 c9 20 32  | 1 :....     . 2|
000056c0  20 3a 0d 1f fe 33 20 20  20 20 20 20 20 66 69 6c  | :...3       fil|
000056d0  65 24 3d a4 57 69 6d 70  5f 47 65 74 53 74 72 69  |e$=.Wimp_GetStri|
000056e0  6e 67 41 74 41 64 64 72  65 73 73 28 77 69 6d 70  |ngAtAddress(wimp|
000056f0  25 2b 34 34 29 0d 20 08  2b 20 20 20 20 20 20 20  |%+44). .+       |
00005700  f2 57 69 6d 70 5f 49 63  6f 6e 50 75 74 54 65 78  |.Wimp_IconPutTex|
00005710  74 28 73 61 76 65 25 2c  31 2c 66 69 6c 65 24 29  |t(save%,1,file$)|
00005720  0d 20 12 2a 20 20 20 20  20 20 20 f2 57 69 6d 70  |. .*       .Wimp|
00005730  5f 49 63 6f 6e 43 61 72  65 74 28 73 61 76 65 25  |_IconCaret(save%|
00005740  2c 31 2c a9 66 69 6c 65  24 29 0d 20 1c 27 20 20  |,1,.file$). .'  |
00005750  20 20 20 20 20 f2 45 76  65 6e 74 5f 53 61 76 65  |     .Event_Save|
00005760  46 69 6c 65 28 66 69 6c  65 24 2c 73 61 76 65 25  |File(file$,save%|
00005770  29 0d 20 26 0c 20 20 20  20 20 c9 20 33 0d 20 30  |). &.     . 3. 0|
00005780  55 20 20 20 20 20 f2 45  76 65 6e 74 5f 4c 6f 61  |U     .Event_Loa|
00005790  64 46 69 6c 65 28 a4 57  69 6d 70 5f 47 65 74 53  |dFile(.Wimp_GetS|
000057a0  74 72 69 6e 67 41 74 41  64 64 72 65 73 73 28 77  |tringAtAddress(w|
000057b0  69 6d 70 25 2b 34 34 29  2c a4 57 69 6d 70 5f 46  |imp%+44),.Wimp_F|
000057c0  69 6c 65 54 79 70 65 28  77 69 6d 70 25 21 34 30  |ileType(wimp%!40|
000057d0  29 29 0d 20 3a 09 20 20  20 20 cb 0d 20 44 0a 20  |)). :.    .. D. |
000057e0  20 c9 31 39 3a 0d 20 4e  06 20 cb 0d 20 58 0e fd  | .19:. N. .. X..|
000057f0  66 69 6e 69 73 68 65 64  25 0d 20 62 05 e1 0d 20  |finished%. b... |
00005800  6c 05 3a 0d 20 76 21 dd  20 f2 57 69 6d 70 50 6f  |l.:. v!. .WimpPo|
00005810  6c 6c 5f 53 61 76 65 46  69 6c 65 28 77 69 6e 64  |ll_SaveFile(wind|
00005820  6f 77 25 29 0d 20 80 07  ea 78 24 0d 20 8a 21 20  |ow%). ...x$. .! |
00005830  78 24 3d a4 57 69 6d 70  5f 49 63 6f 6e 54 65 78  |x$=.Wimp_IconTex|
00005840  74 28 77 69 6e 64 6f 77  25 2c 31 29 0d 20 94 12  |t(window%,1). ..|
00005850  20 c8 8e 20 a7 78 24 2c  22 2e 22 29 20 ca 0d 20  | .. .x$,".") .. |
00005860  9e 0d 20 20 c9 20 30 20  20 20 3a 0d 20 a8 4e 20  |..  . 0   :. .N |
00005870  20 20 f2 57 69 6d 70 5f  57 69 6e 64 6f 77 41 6c  |  .Wimp_WindowAl|
00005880  65 72 74 28 74 61 73 6b  24 2c 22 54 6f 20 73 61  |ert(task$,"To sa|
00005890  76 65 2c 20 64 72 61 67  20 74 68 65 20 69 63 6f  |ve, drag the ico|
000058a0  6e 20 74 6f 20 61 20 64  69 72 65 63 74 6f 72 79  |n to a directory|
000058b0  20 77 69 6e 64 6f 77 22  29 0d 20 b2 24 20 20 7f  | window"). .$  .|
000058c0  3a 20 f2 45 76 65 6e 74  5f 53 61 76 65 46 69 6c  |: .Event_SaveFil|
000058d0  65 28 78 24 2c 77 69 6e  64 6f 77 25 29 0d 20 bc  |e(x$,window%). .|
000058e0  06 20 cb 0d 20 c6 1b 20  c8 99 22 57 69 6d 70 5f  |. .. .. .."Wimp_|
000058f0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2d 31 0d 20  |CreateMenu",-1. |
00005900  d0 05 e1 0d 20 da 05 3a  0d 20 e4 20 dd 20 f2 57  |.... ..:. . . .W|
00005910  69 6d 70 50 6f 6c 6c 5f  44 72 61 67 42 6f 78 28  |impPoll_DragBox(|
00005920  77 69 6e 64 6f 77 25 29  0d 20 ee 0a ea 78 25 2c  |window%). ...x%,|
00005930  79 25 0d 20 f8 12 20 73  61 76 65 25 3d 77 69 6e  |y%. .. save%=win|
00005940  64 6f 77 25 0d 21 02 13  20 21 77 69 6d 70 25 3d  |dow%.!.. !wimp%=|
00005950  77 69 6e 64 6f 77 25 0d  21 0c 23 20 c8 99 22 57  |window%.!.# .."W|
00005960  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00005970  74 65 22 2c 2c 77 69 6d  70 25 0d 21 16 2d 20 78  |te",,wimp%.!.- x|
00005980  25 3d 77 69 6d 70 25 21  34 2d 77 69 6d 70 25 21  |%=wimp%!4-wimp%!|
00005990  32 30 3a 79 25 3d 77 69  6d 70 25 21 31 36 2d 77  |20:y%=wimp%!16-w|
000059a0  69 6d 70 25 21 32 34 0d  21 20 0e 20 77 69 6d 70  |imp%!24.! . wimp|
000059b0  25 21 34 3d 30 0d 21 2a  21 20 c8 99 22 57 69 6d  |%!4=0.!*! .."Wim|
000059c0  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
000059d0  2c 77 69 6d 70 25 0d 21  34 13 20 21 77 69 6d 70  |,wimp%.!4. !wimp|
000059e0  25 3d 77 69 6e 64 6f 77  25 0d 21 3e 0e 20 77 69  |%=window%.!>. wi|
000059f0  6d 70 25 21 34 3d 35 0d  21 48 2c 20 77 69 6d 70  |mp%!4=5.!H, wimp|
00005a00  25 21 38 3d 78 25 2b 77  69 6d 70 25 21 38 3a 77  |%!8=x%+wimp%!8:w|
00005a10  69 6d 70 25 21 31 32 3d  79 25 2b 77 69 6d 70 25  |imp%!12=y%+wimp%|
00005a20  21 31 32 0d 21 52 2e 20  77 69 6d 70 25 21 31 36  |!12.!R. wimp%!16|
00005a30  3d 78 25 2b 77 69 6d 70  25 21 31 36 3a 77 69 6d  |=x%+wimp%!16:wim|
00005a40  70 25 21 32 30 3d 79 25  2b 77 69 6d 70 25 21 32  |p%!20=y%+wimp%!2|
00005a50  30 0d 21 5c 1a 20 77 69  6d 70 25 21 32 34 3d 30  |0.!\. wimp%!24=0|
00005a60  3a 77 69 6d 70 25 21 32  38 3d 30 0d 21 66 2a 20  |:wimp%!28=0.!f* |
00005a70  77 69 6d 70 25 21 33 32  3d 26 37 46 46 46 46 46  |wimp%!32=&7FFFFF|
00005a80  46 46 3a 77 69 6d 70 25  21 33 36 3d 26 37 46 46  |FF:wimp%!36=&7FF|
00005a90  46 46 46 46 46 0d 21 70  1c 20 c8 99 22 57 69 6d  |FFFFF.!p. .."Wim|
00005aa0  70 5f 44 72 61 67 42 6f  78 22 2c 2c 77 69 6d 70  |p_DragBox",,wimp|
00005ab0  25 0d 21 7a 05 e1 0d 21  84 05 3a 0d 21 8e 1b dd  |%.!z...!..:.!...|
00005ac0  20 f2 57 69 6d 70 50 6f  6c 6c 5f 53 61 76 65 4d  | .WimpPoll_SaveM|
00005ad0  65 73 73 61 67 65 0d 21  98 1e ea 66 69 6c 65 24  |essage.!...file$|
00005ae0  2c 77 69 6e 64 6f 77 25  2c 69 63 6f 6e 25 2c 78  |,window%,icon%,x|
00005af0  25 2c 79 25 0d 21 a2 23  20 c8 99 22 57 69 6d 70  |%,y%.!.# .."Wimp|
00005b00  5f 47 65 74 50 6f 69 6e  74 65 72 49 6e 66 6f 22  |_GetPointerInfo"|
00005b10  2c 2c 77 69 6d 70 25 0d  21 ac 3a 20 77 69 6e 64  |,,wimp%.!.: wind|
00005b20  6f 77 25 3d 77 69 6d 70  25 21 31 32 3a 69 63 6f  |ow%=wimp%!12:ico|
00005b30  6e 25 3d 77 69 6d 70 25  21 31 36 3a 78 25 3d 77  |n%=wimp%!16:x%=w|
00005b40  69 6d 70 25 21 30 3a 79  25 3d 77 69 6d 70 25 21  |imp%!0:y%=wimp%!|
00005b50  34 0d 21 b6 44 20 66 69  6c 65 24 3d a4 57 69 6d  |4.!.D file$=.Wim|
00005b60  70 5f 47 65 74 46 69 6c  65 46 72 6f 6d 50 61 74  |p_GetFileFromPat|
00005b70  68 6e 61 6d 65 28 a4 57  69 6d 70 5f 49 63 6f 6e  |hname(.Wimp_Icon|
00005b80  54 65 78 74 28 53 61 76  65 5f 57 69 6e 64 6f 77  |Text(Save_Window|
00005b90  25 2c 31 29 29 0d 21 c0  15 20 77 69 6d 70 25 21  |%,1)).!.. wimp%!|
00005ba0  32 30 3d 77 69 6e 64 6f  77 25 0d 21 ca 13 20 77  |20=window%.!.. w|
00005bb0  69 6d 70 25 21 32 34 3d  69 63 6f 6e 25 0d 21 d4  |imp%!24=icon%.!.|
00005bc0  1c 20 77 69 6d 70 25 21  32 38 3d 78 25 3a 77 69  |. wimp%!28=x%:wi|
00005bd0  6d 70 25 21 33 32 3d 79  25 0d 21 de 15 20 77 69  |mp%!32=y%.!.. wi|
00005be0  6d 70 25 21 33 36 3d 6c  65 6e 67 74 68 25 0d 21  |mp%!36=length%.!|
00005bf0  e8 0f 20 77 69 6d 70 25  21 30 3d 36 34 0d 21 f2  |.. wimp%!0=64.!.|
00005c00  0f 20 77 69 6d 70 25 21  31 32 3d 30 0d 21 fc 0f  |. wimp%!12=0.!..|
00005c10  20 77 69 6d 70 25 21 31  36 3d 31 0d 22 06 12 20  | wimp%!16=1.".. |
00005c20  77 69 6d 70 25 21 34 30  3d 26 46 46 46 0d 22 10  |wimp%!40=&FFF.".|
00005c30  16 20 24 28 77 69 6d 70  25 2b 34 34 29 3d 66 69  |. $(wimp%+44)=fi|
00005c40  6c 65 24 0d 22 1a 34 20  c8 99 22 57 69 6d 70 5f  |le$.".4 .."Wimp_|
00005c50  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
00005c60  77 69 6d 70 25 2c 77 69  6d 70 25 21 32 30 2c 77  |wimp%,wimp%!20,w|
00005c70  69 6d 70 25 21 32 34 0d  22 24 05 e1 0d 22 2e 05  |imp%!24."$..."..|
00005c80  3a 0d ff                                          |:..|
00005c83