home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / c1 / c_impress / Sources / Wimp < prev    next >
Encoding:
Text File  |  1991-04-08  |  39.1 KB  |  28 lines

  1. 3:ô  ><BasicV$Lib>.Wimp  :  REM  Library routines. v0.073ô  MACHINE:  Archimedes3#ô  LANGUAGE: BBC BASIC V, v1.043"ô  AUTHOR:   Cy Booker,3,Gô            86 Church View, Main Road, Crockenhill, Swanley, Kent.36ô            BR8 8JW3@ô  FUNCTIONS:3Jô   Claim_Stack( size% )3T%ô   Custom_Error( flags%, text$ )3^Aô   Date                                              Version3hô   FileSize( n% )3rô   FixedFileSize( n% )3|ô   getname( ptr% )3ŷHô   PSR_V_set( flags% )                               After SYS call3‘ô   PSR_V_Set( flags% )3Œ,ô   Open_Window_Horz_Centered( window% )3¤'ô   Open_Window_Centered( window% )3®7ô   Query_Icon_BackCol_And_Delete( window%, icon% )3¸+ô   Query_Icon_Shaded( window%, icon% )3Â-ô   Query_Icon_Selected( window%, icon% )3Ìô   leaf( f$ )3Ö4ô   Load_Template( id$, rove%, sprite_pointer% )3à)ô   Read_String_Val( window%, icon% )3ê%ô   Read_String( window%, icon% )3ô"ô   XSizeof_File( file_name$ )3þKô   XSet_Colour( RETURN routine, RETURN colour )      ARM code producer4ô  :4ô  PROCEDURES:4Cô   Activate_Wimp()                                   Main loop4&1ô   alter_bit( RETURN word%, bit%, boolean% )40ô   Cancel_Stop()4:6ô   Check_Icon_In_Range( w%, icon%, mini%, maxi% )4D$ô   Claim_Null_Reason( reason$ )4Nô   Close_Window( window% )4X8ô   dim_array( RETURN start%, length%, RETURN end% )4bDô   Generic_Init_Wimp( name$, v%, s_v% )              Initialise4l1ô   Initiate_Drag( window%, icon%, routine$ )4vDô   Open_Pane_Underneath( window%, xmin%, ymin%, xmax%, stack% )4€&ô   Open_Window( window%, stack% )4⇩*ô   Query_Wimp_Global_Error( prefix$ )4“Hô   Rename_Icon( window%, icon%, sprite$ )            Non-indirected4fi&ô   Release_Null_Reason( reason$ )4¨&ô   Release_Stack( start%, size% )4²3ô   Send_Save( filetype%, file_name$, length% )4¼*ô   SetCaretPosition( window%, icon% )4Æ$ô   Set_Title( window%, title$ )4Ð>ô   Set_Window_Extent( window%, width%, height%, resize% )4Ú6ô   Set_Icon_Foreground( window%, icon%, colour% )4ä2ô   Set_Shade_Icon( window%, icon%, boolean% )4î3ô   Set_Select_Icon( window%, icon%, boolean% )4ø'ô   unselect_icon( window%, icon% )5%ô   select_icon( window%, icon% )5 (ô   Stop_Action( string$, routine$ )5<ô   Update_Icon( window%, icon%, number%, eor%, clear% )5 +ô   Update_String( window%, icon%, s$ )5*(ô   Wimp_Error_Block( error_block% )54!ô   Wimp_Error( num%, text$ )5>ô  :5Hô  VARIABLES:5R ô   Application$      "Edit"5\.ô   Version$          "0.12 (17-Apr-1969)"5f@ô   Wimp_Active%      Boolean, used in case of library error5pô   Task_Handle%5z5ô   W%                Wimp poll block (512 bytes)5☓ô  :5‰
  2. ô  NB:5—Gô   This is not amenable to compiling, because use procedures names5¢Jô   as string literals in the program to cope with drags/null reasons.5¬;ô   But can compact to reduce variable names (I think).5¶ô  :5Àô  UPDATES:5ÊFô   17.03.1991 CJB Added FN_Read_String_Val, FN_Query_Icon_Shaded,5ÔIô                  PROC_Set_Select_Icon, PROC_Set_Shade_Icon, altered5ÞBô                  FN_Query_Icon_Selected, so now should work!5èGô                  Added XSet_Colour, Query_Icon_BackCol_And_Delete5ò3ô                  Added PROC_Set_Window_Extent5üLô   30.03.1991 CJB Removed all references to old prog. PROC_Stop_Action,6?ô                  renamed, and now takes string parameter.6Gô   05.04.1991 CJB Added PROC_Set_Icon_Foreground, Library version.6Bô   06.04.1991 CJB Actually used 'em - so now slightly stable.6$@ô                  So ProgInfo window can have sprites file.6.Fô   07.04.1991 CJB If an error occured between Wimp_Initialise and68Cô                  Init_Menus, would get stuck in loop.  Cured.69Bô   08.04.1991 CJB Added FN_[Fixed]FileSize, PROC_Rename_Icon.6B:6LÝ ¤_Wimp_version  :  = 0076V:6`Ý ¤_hard_initialise_Wimp6jê Ŷ6t7î Ŷ ê ÷ Ŷ  :  ò_e( "%.Wimp: hard_initialise_Wimp" )6~"  ç ¤_LibHandler_version<012 …6⇦;    Ŷ 1, "Needs more recent version of the LibHandler."6‹  Í6†0  ò_load_library( "<BasicV$Lib>.Heap", 007 )6¦  Wimp_Active% = £6°   Wimp_Stack_End% = 4 * 10246º8  ò_Claim_Heap_Block( Wimp_Stack%, Wimp_Stack_End% )6Ä$  Wimp_Stack_End% += Wimp_Stack%6Î#  Wimp_Stack_Top% = Wimp_Stack%6Ø#  ò_Claim_Heap_Block( W%, 512 )6â  query_routine$ = ""6ì  dragged$ = ""6ö  dragged_button% = 07"  Application$ = "Application"7
  3. )  Version$     = "0.00 (01-Jan-1900)"7  Task_Handle% = -17  :7(  Wimp_Error_Fatal% = &96072  Wimp_Error%       = &9617<= 07F:7PKô *********************************************************************7ZKô ***                 Handy library routines                        ***7dKô *********************************************************************7n:7x Ý ¤_Date7ŵê t$7…  t$ = Á’$, 5, 11)7„  Át$, 3, 1) = "-"7   Át$, 7, 1) = "-"7ª= t$7´:7¾*Ý ¤_XSet_Colour( ø routine, ø colour )7È[OPT pass%7ÒALIGN:.colour EQUD 07Ü .routine7æ        STMFD   (sp)!, {R0}7ð        LDR     R0, colour7ú%        SWI     "XWimp_SetColour"8,        BLVS    Write_Global_Error_Block8        LDMFD   (sp)!, {R0}8        MOV     pc, link8"]8,= 086:8@E: ô  Explicitly sets / reset bit in a word, dependent on boolean.8J,Ý ò_alter_bit( ø word%, bit%, boolean% )8T   ç boolean% …8^%      word% = word% ☓ (1 << bit%)8h   Ì8r&      word% = word% € ¬(1 << bit%)8|   Í8ŷá8‘:8ŒK: ô  If SYS ... TO ... ; C%, Then this function will test for overflow.8¤Ý ¤_PSR_V_set( flags% )8®= (flags% € 1)<>08¸:8ÂÝ ¤_PSR_V_Set( flags% )8Ì= (flags% € 1)<>08Ö:8àD: ô  Reserve space for an array of length length%, but setting a8ê>: ô  variable to the end so can easily check for overflow.8ô,Ý ò_dim_array(ø start%, length%, ø end%)8þ   Þ start% length%9   end% = start% + length%9á9:9&Kô *********************************************************************90Kô ***                      Caret                                    ***9:Kô *********************************************************************9D:9N*Ý ò_SetCaretPosition( window%, icon% )9X^  È− "Wimp_SetCaretPosition", window%, icon%, -1, -1, -1, ©(¤_Read_String(window%, icon%))9bá9l:9vKô *********************************************************************9€Kô ***                        Windows                                ***9⇩Kô *********************************************************************9“:9fi&Ý ò_Open_Window( window%, stack% )9¨
  4. ê ptr%9²!  ptr% = ¤_Claim_Stack( 128 )9¼  !ptr% = window%9Æ%  È− "Wimp_GetWindowState",, ptr%9Р ptr%!28 = stack%9Ú!  È− "Wimp_OpenWindow",, ptr%9ä"  ò_Release_Stack( ptr%, 128 )9îá9ø::Ý ò_Close_Window( window% ):
  5. ê ptr%:!  ptr% = ¤_Claim_Stack( 128 ):   !ptr% = window%:*"  È− "Wimp_CloseWindow",, ptr%:4"  ò_Release_Stack( ptr%, 128 ):>á:H::R(Ý ò_Bring_Window_To_Front( window% ):\
  6. ê ptr%:f   ptr% = ¤_Claim_Stack( 64 ):p  !ptr% = window%:z%  È− "Wimp_GetWindowState",, ptr%:☓  ptr%!28 = -1:‰!  È− "Wimp_OpenWindow",, ptr%:—!  ò_Release_Stack( ptr%, 64 ):¢á:¬::¶ Ý ò_ReOpen_Window( window% ):À
  7. ê ptr%:Ê   ptr% = ¤_Claim_Stack( 64 ):Ô  !ptr% = window%:Þ%  È− "Wimp_GetWindowState",, ptr%:è!  È− "Wimp_OpenWindow",, ptr%:ò!  ò_Release_Stack( ptr%, 64 ):üá;:;,Ý ¤_Open_Window_Horz_Centered( window% );ê ptr%, w%;$#  ptr%   = ¤_Claim_Stack( 256 );.  ptr%!0 = window%;8K  È− "Wimp_GetWindowInfo",, ptr%       :  ô  Get Template defininition.;B  w% = ptr%!12 - ptr%!4;L  ptr%!0  = window%;V#  ptr%!4  = (logmaxx% - w%) Ŵ 2;`  ptr%!12 = ptr%!4 + w%;j  ptr%!20 = 0;t  ptr%!24 = 0;~K  ptr%!28 = -1                          :  ô  Open to front of display.;⇦!  È− "Wimp_OpenWindow",, ptr%;‹"  ò_Release_Stack( ptr%, 256 );†= ¹;¦:;°'Ý ¤_Open_Window_Centered( window% );ºê ptr%, w%, h%;Ä#  ptr%   = ¤_Claim_Stack( 256 );Π ptr%!0 = window%;ØK  È− "Wimp_GetWindowInfo",, ptr%       :  ô  Get Template defininition.;â  w% = ptr%!12 - ptr%!4;ì  h% = ptr%!16 - ptr%!8;ö  ptr%!0  = window%<#  ptr%!4  = (logmaxx% - w%) Ŵ 2<
  8. #  ptr%!8  = (logmaxy% - h%) Ŵ 2<  ptr%!12 = ptr%!4 + w%<  ptr%!16 = ptr%!8 + h%<(  ptr%!20 = 0<2  ptr%!24 = 0<<K  ptr%!28 = -1                          :  ô  Open to front of display.<F!  È− "Wimp_OpenWindow",, ptr%<P"  ò_Release_Stack( ptr%, 256 )<Z= ¹<d:<nI: ô  To be used when reset the title explicitly, window title must be<x: ô  indirected!<ŵ$Ý ò_Set_Title( window%, title$ )<…
  9. ê ptr%<„" ptr%   = ¤_Claim_Stack( 256 )<  ptr%!0 = window%<ª" È− "Wimp_GetWindowInfo",,ptr%<´ $(ptr%!76) = title$<¾ ptr%!0     = window%<È& È− "Wimp_GetWindowOutline",, ptr%<ÒD È− "Wimp_ForceRedraw", -1, ptr%!4, ptr%!16-40, ptr%!12, ptr%!16<Ü! ò_Release_Stack( ptr%, 256 )<æá<ð:<úE: ô  Given a window, re-set extent to width% by height% OS units.=H: ô  If this would result in a smaller window then, if resize%, then=J: ô  re-open the window in the middle of where it is, but "full size".=:=">Ý ò_Set_Window_Extent( window%, width%, height%, resize% )=,ê ptr%, w%, h%, mask%=6"  ptr%  = ¤_Claim_Stack( 222 )=@  !ptr% = window%=J%  È− "Wimp_GetWindowState",, ptr%=T  w% = (ptr%!12) - (ptr%!4)=^  h% = (ptr%!16) - (ptr%!8)=h0  ç ((width%<w%) ☓ (height%<h%)) € resize% …=r    ç width%<w% …=|(      mask%   = ¬((1 << ltopx%) - 1)=ŷ>      ptr%!4  = ((ptr%!4)+ (w% Ŵ 2)- (width% Ŵ 2)) € mask%=‘/      ptr%!12 = ((ptr%!4) + width%) € mask%=Œ        Í=¤    ç height%<h% …=®(      mask%   = ¬((1 << ltopy%) - 1)=¸?      ptr%!8  = ((ptr%!8)+ (h% Ŵ 2)- (height% Ŵ 2)) € mask%=Â0      ptr%!16 = ((ptr%!8) + height%) € mask%=Ì        Í=ÖI    È− "Wimp_OpenWindow",, ptr%        :  ô  SetExtent doesnt resize.=à  Í=ê  !ptr%   = 0=ô/  ptr%!4  = -height% € ¬((1 << ltopy%) - 1)=þ-  ptr%!8  = width% € ¬((1 << ltopx%) - 1)>  ptr%!12 = 0>(  È− "Wimp_SetExtent", window%, ptr%>"  ò_Release_Stack( ptr%, 222 )>&á>0:>:DÝ ò_Open_Pane_Underneath( window%, xmin%, ymin%, xmax%, stack% )>D
  10. ê ptr%>N!  ptr% = ¤_Claim_Stack( 512 )>X  !ptr% = window%>b$  È− "Wimp_GetWindowInfo",, ptr%>l  ptr%!16 = ymin% - 44>v%  ptr%!8  = (ptr%!16) + (ptr%!48)>€  ptr%!4  = xmin%>⇩5  ptr%!12 = ¤_min_int( xmax%, xmin% + (ptr%!52) )>“?  ptr%!20 = ¤_max_int( 0, (xmin% + (ptr%!52)) - (ptr%!12) )>fi  ptr%!24 = 0>¨  ptr%!28 = stack%>²!  È− "Wimp_OpenWindow",, ptr%>¼"  ò_Release_Stack( ptr%, 512 )>Æá>Ð:>ÚKô *********************************************************************>äKô ***                        Icons                                  ***>îKô *********************************************************************>ø:?'Ý ò_unselect_icon( window%, icon% )?
  11. ê ptr%?!  ptr% = ¤_Claim_Stack( 256 )?   ptr%!00 = window%?*  ptr%!04 = icon%?4%  ptr%!08 = 0           :  ô  Eor?>%  ptr%!12 = 1 << 21     :  ô  Bic?H#  È− "Wimp_SetIconState",, ptr%?R"  ò_Release_Stack( ptr%, 256 )?\á?f:?p%Ý ò_select_icon( window%, icon% )?z
  12. ê ptr%?☓!  ptr% = ¤_Claim_Stack( 256 )?‰  ptr%!00 = window%?—  ptr%!04 = icon%?¢%  ptr%!08 = 1 << 21     :  ô  Eor?¬%  ptr%!12 = 1 << 21     :  ô  Bic?¶#  È− "Wimp_SetIconState",, ptr%?À"  ò_Release_Stack( ptr%, 256 )?Êá?Ô:?Þ:Ý ò_Update_Icon(window%, icon%, number%, eor%, clear%)?è
  13. ê ptr%?ò$   ptr%    = ¤_Claim_Stack( 16 )?ü   ptr%!0  = window%@   ptr%!4  = icon%@    ptr%!8  = eor% << number%@"   ptr%!12 = clear% << number%@$$   È− "Wimp_SetIconState",, ptr%@."   ò_Release_Stack( ptr%, 16 )@8á@B:@L*: ô  Returns TRUE if icon is selected.@V-Ý ¤_Query_Icon_Selected( window%, icon% )@`ê ptr%, result%@j"  ptr%   = ¤_Claim_Stack( 64 )@t  !ptr%  = window%@~  ptr%!4 = icon%@⇦#  È− "Wimp_GetIconState",, ptr%@‹*  result% = ((ptr%!24) € (1 << 21))<>0@†!  ò_Release_Stack( ptr%, 64 )@¦= result%@°:@º3Ý ò_Set_Select_Icon( window%, icon%, boolean% )@Ä
  14. ê ptr%@Î#  ptr%    = ¤_Claim_Stack( 16 )@Ø  !ptr%   = window%@â  ptr%!4  = icon%@ì)  ptr%!8  = (boolean%<>0) € (1 << 21)@ö  ptr%!12 = 1 << 21A#  È− "Wimp_SetIconState",, ptr%A
  15. !  ò_Release_Stack( ptr%, 16 )AáA:A(2Ý ò_Set_Shade_Icon( window%, icon%, boolean% )A2
  16. ê ptr%A<#  ptr%    = ¤_Claim_Stack( 16 )AF  !ptr%   = window%AP  ptr%!4  = icon%AZ)  ptr%!8  = (boolean%<>0) € (1 << 22)Ad  ptr%!12 = 1 << 22An#  È− "Wimp_SetIconState",, ptr%Ax!  ò_Release_Stack( ptr%, 16 )AŵáA…:A„+Ý ¤_Query_Icon_Shaded( window%, icon% )A ê ptr%, result%Aª"  ptr%   = ¤_Claim_Stack( 64 )A´  !ptr%  = window%A¾  ptr%!4 = icon%AÈ#  È− "Wimp_GetIconState",, ptr%AÒ%  result% = (ptr%!24) € (1 << 22)AÜ!  ò_Release_Stack( ptr%, 64 )Aæ= result%<>0Að:Aú7Ý ¤_Query_Icon_BackCol_And_Delete( window%, icon% )Bê result%, ptr%B!  ptr% = ¤_Claim_Stack( 512 )B  !ptr% = window%B"  ptr%!4 = icon%B,#  È− "Wimp_GetIconState",, ptr%B6   result% = (ptr%!24) >>> 28B@!  È− "Wimp_DeleteIcon",, ptr%BJ"  ò_Release_Stack( ptr%, 512 )BT= result%B^:Bh6Ý ò_Set_Icon_Foreground( window%, icon%, colour% )Br
  17. ê ptr%B|#  ptr%    = ¤_Claim_Stack( 64 )Bŷ  ptr%!0  = window%B‘  ptr%!4  = icon%BŒ1  ptr%!8  = (colour% € &F) << 24      : ô EorB¤3  ptr%!12 = &F << 24                    : ô BicB®#  È− "Wimp_SetIconState",, ptr%B¸!  ò_Release_Stack( ptr%, 64 )BÂáBÌ:BÖ6Ý ò_Check_Icon_In_Range( w%, icon%, mini%, maxi% )Bàê x%Bê(  x% = »(¤_Read_String( w%, icon% ))Bô  ç x%<mini% ☓ x%>maxi% …Bþ7    x% = ¤_min_int( maxi%, ¤_max_int( mini%, x% ) )C+    ò_Update_String( w%, icon%, Ã(x%) )C  ÍCáC&:C05: ô Place icon on the right hand side of icon barC::CDÝ ò_Icon_Bar_IconCN
  18. ê ptr%CX!  ptr% = ¤_Claim_Stack( 512 )Cb   ptr%!0  = -1 : ptr%!4  = 0Cl!  ptr%!8  = 0  : ptr%!12 = 68Cv$  ptr%!16 = 68 : ptr%!20 = &3002C€$  $(ptr%+24) = "!"+ Application$C⇩2  È− "Wimp_CreateIcon",, ptr% ¸ Icon_Bar_Icon%C“"  ò_Release_Stack( ptr%, 512 )CfiáC¨:C²;: ô  The icon must be Sprite ONLY, NON-indirected data.C¼:CÆ.Ý ò_Rename_Icon( window%, icon%, sprite$ )CÐ0ê ptr%, xmin%, ymin%, xmax%, ymax%, xo%, yo%CÚ   ptr% = ¤_Claim_Stack( 64 )Cä  !ptr% = window%Cî  ptr%!4 = icon%Cø#  È− "Wimp_GetIconState",, ptr%D"  ç ((ptr%!24) € &103)<>&002 …D ;    Ŷ Wimp_Error_Fatal%, "Bad rename icon to "+ sprite$D  ÍD !  È− "Wimp_DeleteIcon",, ptr%D*  $(ptr%+28) = sprite$D4  ptr%!4 = window%D>#  È− "Wimp_CreateIcon",, ptr%+4DHG  È− "Wimp_ForceRedraw", window%, ptr%!8, ptr%!12, ptr%!16, ptr%!20DR!  ò_Release_Stack( ptr%, 64 )D\áDf:Dp.: ô  A simple wrap around the system call.Dz:D☓Ý ¤_FixedFileSize( n% )D‰ê ptr%, result$D—   ptr% = ¤_Claim_Stack( 64 )D¢0  È− "OS_ConvertFixedFileSize", n%, ptr%, 64D¬   result$ = ¤getname( ptr% )D¶!  ò_Release_Stack( ptr%, 64 )DÀ= result$DÊ:DÔ.: ô  A simple wrap around the system call.DÞ:DèÝ ¤_FileSize( n% )Dòê ptr%, result$Dü   ptr% = ¤_Claim_Stack( 64 )E+  È− "OS_ConvertFileSize", n%, ptr%, 64E   result$ = ¤getname( ptr% )E!  ò_Release_Stack( ptr%, 64 )E$= result$E.:E8Kô *********************************************************************EBKô ***                          Errors                               ***ELKô *********************************************************************EV:E`G: ô  Should be called from a generic error handler, that relays theEj1: ô  message via the standard wimp error box.Et7: ô  Exits after user has acknowledged the message.E~:E⇦!Ý ò_Wimp_Error( num%, text$ )E‹
  19. ê ptr%E†&  ptr%      = ¤_Claim_Stack( 300 )E¦  ptr%!0    = num%E°  $(ptr%+4) = text$+ ½(0)Eº   ò_Wimp_Error_Block( ptr% )EÄ"  ò_Release_Stack( ptr%, 300 )EÎáEØ:EâG: ô  Should be called from a generic error handler, that relays theEì1: ô  message via the standard wimp error box.Eö7: ô  Exits after user has acknowledged the message.F:F
  20. (Ý ò_Wimp_Error_Block( error_block% )F
  21. ê ptr%F  ç Wimp_Active%<-1 …F(E    ò_Close_All_Menus                :  ô  Remove menus on error.F2  ÍF<:  È− "Wimp_ReportError", error_block%, 1, Application$FFáFP:FZJ: ô  Use standard wimp error window, with window title "Message from "Fd: ô  + "<application>".Fn: ô  flags% == BitsFx+: ô           0       provide an OK boxFŵ.: ô           1       provide a Cancel boxF…D: ô           2       highlight Cancel (or OK if bit is cleared)F„I: ô           3       if error generated while a text-style window isF H: ô                   open (eg within a call to Wimp_CommandWindow),FªH: ô                   then don't produce the prompt "Press SPACE..."F´C: ô           4 {always} Don't prefix the application name withF¾7: ô                   "Error from" in the title barFÈK: ô           5       If neither box is clicked return immediately withFÒ>: ô                   zero result, leaving the window openFÜJ: ô           6       Select one of the boxes according to bits 0 & 1,Fæ5: ô                   close the window and returnFð0: ô           7-31    reserved, must be zeroFú:G%Ý ¤_Custom_Error( flags%, text$ )Gê ptr%, result%GD  ò_Close_All_Menus                 :  ô  Remove menus on error.G"&  ptr%      = ¤_Claim_Stack( 260 )G,  !ptr%     = 0G6  $(ptr%+4) = text$+ ½(0)G@_  È− "Wimp_ReportError", ptr%, (%10000 ☓ flags%), "Message from "+ Application$ ¸ , result%GJ"  ò_Release_Stack( ptr%, 260 )GT= result%G^:GhI: ô  This is used to relay error message (probably) generated from anGrG: ô  ARM routine.  These all set global_error_block, so use this toG|: ô  report a system error.Gŷ:G‘*Ý ò_Query_Wimp_Global_Error( prefix$ )GŒê a%G¤  a% = !global_error_blockG®  ç a%<>0 …G¸j    ò_Wimp_Error( 1, "A system error has occured: ("+ Ã(!a%)+ "): "+ prefix$+ ": "+ ¤getname(a% + 4) )G  ÍGÌáGÖ:GàL: ô  This is MY error reporting system, as opposed to the above one.  ItGêG: ô  uses the Query window found in the template file.  Because theGô-: ô  mouse is restricted, should be safe.GþK: ô  The routine$ is the name of a function "FN_Stop_Action_"+ routine$HJ: ô  that gets passed TRUE for a click on YES, or FALSE for a click onH : ô  NO.H:H&(Ý ò_Stop_Action( string$, routine$ )H0*ê min_x%, min_y%, max_x%, max_y%, ptr%H:!  ptr% = ¤_Claim_Stack( 284 )HD-  ò_Update_String( Query_W%, 1, string$ )HN      ï 7HX0  !ptr% = ¤_Open_Window_Centered( Query_W% )Hb  !ptr% = Query_W%Hl%  È− "Wimp_GetWindowState",, ptr%Hv  min_x% = ptr%!4H€  min_y% = ptr%!8H⇩  max_x% = ptr%!12H“  max_y% = ptr%!16Hfi  ptr%?0 = 1H¨3  ptr%?1 = min_x% ◰ 256 : ptr%?2 = min_x% Ŵ 256H²3  ptr%?3 = min_y% ◰ 256 : ptr%?4 = min_y% Ŵ 256H¼3  ptr%?5 = max_x% ◰ 256 : ptr%?6 = max_x% Ŵ 256HÆ3  ptr%?7 = max_y% ◰ 256 : ptr%?8 = max_y% Ŵ 256HР È− "OS_Word", 21, ptr%HÚ"  ò_Release_Stack( ptr%, 284 )Hä  query_action$ = routine$HîáHø:II: ô  Internal routine, that restores mouse bounding box (well it setsI J: ô  it to the whole screen, which should be good enough), and deletesI: ô  the error box.I :I*Ý ò_Cancel_StopI4
  22. ê ptr%I>!  ptr% = ¤_Claim_Stack( 256 )IH  ptr%?0 = 1IR  ptr%?1 = 0 : ptr%?2 = 0I\  ptr%?3 = 0 : ptr%?4 = 0If7  ptr%?5 = logmaxx% ◰ 256 : ptr%?6 = logmaxx% Ŵ 256Ip7  ptr%?7 = logmaxy% ◰ 256 : ptr%?8 = logmaxy% Ŵ 256Iz  È− "OS_Word", 21, ptr%I☓  !ptr% = Query_W%I‰"  È− "Wimp_CloseWindow",, ptr%I—"  ò_Release_Stack( ptr%, 256 )I¢áI¬:I¶L: ô  Query ONLY brought up by PROC_Stop_Action, this routine called whenIÀG: ô  main wimp poll detected a mouse click inside the Query window.IÊ:IÔ.Ý ò_Mouse_Click_Query( x%, y%, b%, icon% )IÞê ŶIè4î Ŷ ê ÷ Ŷ  :  ò_e( "%.Wimp: Mouse_Click_Query" )Iò  ò_Cancel_StopIüG  x% =  ("FN_Stop_Action_"+ query_action$+ "( "+ Ã(icon%=0)+ " )" )JáJ:J$Ý ¤_Stop_Action_( pressed_YES% )J$E  Ŷ Wimp_Error_Fatal%, "Illegal click in unclaimed query window."J.= £J8:JBH: ô Called when a "Save as" file name is invalid - because it has noJL5: ô leaf name (might be legal), or no period '.'.JVG: ô Brings up an error box (standard wimp) with a standard message.J`:JjÝ ò_Report_Bad_SaveAsJtX  x% = ¤_Custom_Error( %101, "To save, drag the file icon to a directory display." )J~áJ⇦:J‹Kô *********************************************************************J†Kô ***                         Strings                               ***J¦Kô *********************************************************************J°:Jº+: ô  Wimp text string --> BASIC string.JÄ:JÎÝ ¤getname(p%)JØê p$:p$=""JâÈ” ?p%>31Jì  p$+=½(?p%):p%+=1JöÎK=p$K
  23. :K0: ô  Returns string after last "." in input.K:K(Ý ¤leaf(f$)K2È” §f$,".")K<  f$=Áf$,§f$,".")+1)KFÎKP=f$KZ:Kd<: ô  Updates an indirected Text Icon, then redraws it byKn3: ô  Wimp_SetIconState with no change to flags.Kx:Kŵ+Ý ò_Update_String( window%, icon%, s$ )K…
  24. ê ptr%K„ ptr%=¤_Claim_Stack(256)K  ptr%!0=window%Kª ptr%!4=icon%K´! È− "Wimp_GetIconState",,ptr%K¾ $(ptr%!28)=s$KÈ' ò_Update_Icon(window%,icon%,1,0,0)KÒ% È− "Wimp_GetCaretPosition",,ptr%KÜ7 ç window%=ptr%!0 € icon%=ptr%!4 € ©(s$)<>ptr%!20 …KæG  È− "Wimp_SetCaretPosition",window%,icon%,-1,ptr%!12,ptr%!16,©(s$)Kð ÍKú! ò_Release_Stack( ptr%, 256 )LáL:L&: ô  Get the indirected icon text.L":L,#Ý ¤_Read_String(window%, icon%)L6ê ptr%, s$L@   ptr%   =¤_Claim_Stack(256)LJ  ptr%!0 =window%LT  ptr%!4 =icon%L^"  È− "Wimp_GetIconState",,ptr%Lh  s$ = ¤getname(ptr%!28)Lr"  ò_Release_Stack( ptr%, 256 )L|=s$Lŷ:L‘4:  ô  Get the VALue of the indirected icon text.LŒ:L¤)Ý ¤_Read_String_Val( window%, icon% )L®(= »(¤_Read_String( window%, icon% ))L¸:LÂKô *********************************************************************LÌKô ***                       Templates                               ***LÖKô *********************************************************************Là:LêH: ô  Primitive to load a named window from the (open) template file.Lô:Lþ4Ý ¤_Load_Template( id$, rove%, sprite_pointer% )Mê result%, r0%, C%M&  $template_name% = id$+ "*"+ ½(0)Ml  È− "XWimp_LoadTemplate",, template_file%, rove%, inddata_end%, -1, template_name% ¸ r0%,, indrove%; C%M&5  ç ¤_PSR_V_Set( C% ) … Ŷ !r0%, ¤getname( r0%+4 )M0'  ç ¤getname(template_name%)<>id$ …M:g    Ŷ Wimp_Error_Fatal%, "Template file corrupt, couldn't find window with '"+ id$+ "' identifier."MD  ÍMN)  template_file%!64 = sprite_pointer%MX7  È− "Wimp_CreateWindow",, template_file% ¸ result%Mb= result%Ml:MvJ: ô  This is used by template loader when loading in sprite / templateM€-: ô  file, though can be used else where.M⇩L: ô  Returns length of file [0, &7FFFFFFF], or -1 if file doesn't exist.M“:Mfi"Ý ¤_XSizeof_File( file_name$ )M¨ê r0%, length%, c%M²9  È− "XOS_File", 17, file_name$ ¸ r0%,,,, length%; c%M¼  ç ¤_PSR_V_Set(c%) …MÆc    Ŷ Wimp_Error_Fatal%, "Couldn't load in "+ ¤leaf( file_name$ )+ " file: "+ ¤getname( r0%+4 )MР ÍMÚ  ç r0%<>1 …Mä3    length% = -1        :  ô  Indicate missing.Mî  ÍMø= length%N:N Kô *********************************************************************NKô ***                       Local Stacks                            ***N Kô *********************************************************************N*:N4Ý ¤_Claim_Stack( size% )N>ê result%NH1  ç (Wimp_Stack_Top%+size%)<Wimp_Stack_End% …NR)    result%         = Wimp_Stack_Top%N\     Wimp_Stack_Top% += size%Nf  ÌNp/    Ŷ Wimp_Error_Fatal%, "Wimp Stack full."Nz  ÍN☓= result%N‰:N—&Ý ò_Release_Stack( start%, size% )N¢9  ç (start%<Wimp_Stack%) ☓ (start%>Wimp_Stack_End%) …N¬B    Ŷ Wimp_Error_Fatal%, "Release_Stack: Invalid stack chunk."N¶  ÌNÀ8    ç (size%<0) ☓ ((start%+size%)>Wimp_Stack_End%) …NÊC      Ŷ Wimp_Error_Fatal%, "Release_Stack: Invalid chunk size."NÔ        ÌNÞ"      Wimp_Stack_Top% -= size%Nè%      ç Wimp_Stack_Top%<>start% …Nò9        Ŷ Wimp_Error_Fatal%, "Release_Stack: Bad pop"Nü       ÍO        ÍO  ÍOáO$:O.Kô *********************************************************************O8Kô ***                   Generic Wimp Initialise                     ***OBKô *********************************************************************OLKô ***         CALLS                                                 ***OVKô ***                 PROC_Init_Menus                               ***O`Kô ***                 PROC_Init_Template                            ***OjKô ***         SETS                                                  ***OtKô ***                 Icon_Bar_Icon%                                ***O~Kô ***                 Application$                                  ***O⇦Kô ***                 Version$                                      ***O‹Kô ***                 Task_Handle%                                  ***O†Kô ***                 ProgInfo_W%                                   ***O¦Kô ***                 Query_W%                                      ***O°Kô ***                 Wimp_Poll_Mask%                               ***OºKô ***   ERROR Handler --> PROC_Wimp_Error( 0, REPORT$+ line )       ***OÄKô *********************************************************************OÎ3ô * IN   application name, version, sub-versionOØCô *      day of month [1, 31], month [1, 12], year {2/4 digits}Oâ:OìAÝ ò_Generic_Init_Wimp( name$, v%, s_v%, day%, month%, year% )Oö=  Version$ = Ã(v%)+ "."+ Ã(s_v%)+ " ("+ Â"0"+ Ã(day%), 2)P  Version$ += "-"P
  25. I  Version$ += Á"CBJanFebMarAprMayJunJulAugSepOctNovDec", month%*3, 3)P/  Version$ += "-"+ Â"19"+ Ã(year%), 4)+ ")"P  :P(  Application$ = name$P2  :P<D  È− "Wimp_Initialise", 200, &4B534154, name$ ¸ v%, Task_Handle%PF#  î Ŷ ò_Generic_Init_Wimp_ErrorPP  ç v%<200 …PZ`    Ŷ Wimp_Error_Fatal%, "Application requires a more recent version of the Window Manager."Pd  ÍPn  Wimp_Active% = ¹Px  :Pŵ  ò_Generic_Init_TemplateP…  ò_Init_MenusP„  :P G  Wimp_Active% = -2             :  ô  Now valid to close all menus.Pª  :P´A  ò_Icon_Bar_Icon            :  ô  Ensure something on there.P¾;  ò_Init_Null_Reason         :  ô  Sets Wimp_Poll_Mask%PÈ  :PÒ1  ò_Update_String( ProgInfo_W%, 7, Version$ )PÜ  :Pæ@  my_ref%    = -1               :  ô  For message protocols.Pð  save_ref%  = -1Pú  scrap_ref% = -1Q  :Q<  ò_Message_ModeChange       :  ô  Set up any variables.QáQ":Q,Ý ò_Generic_Init_Wimp_ErrorQ6;  ò_Wimp_Error( Wimp_Error_Fatal%, ö$+ " ["+ Ãfi+ "]." )Q@  ò_Wimp_CloseDownQJ  àQTáQ^:QhKô *********************************************************************QrKô ***                   Wimp Polling loop                           ***Q|Kô *********************************************************************QŷKô ***         CALLS                                                 ***Q‘Kô ***                 PROC_Null_Reason_Code           [internal]    ***QŒKô ***                 PROC_Redraw_Window_Request                    ***Q¤Kô ***                 PROC_Open_Window_Request                      ***Q®Kô ***                 PROC_Close_Window_Request                     ***Q¸Kô ***                 PROC_Pointer_Leaving_Window     [ignored]     ***QÂKô ***                 PROC_Pointer_Entering_Window    [ignored]     ***QÌKô ***                 PROC_Mouse_Click                              ***QÖKô ***                 PROC_User_Drag_Box              [internal]    ***QàKô ***                 PROC_Key_Pressed                              ***QêKô ***                 PROC_Menu_Selection                           ***QôKô ***                 PROC_Scroll_Request             [ignored]     ***QþKô ***                 PROC_Lose_Caret                 [ignored]     ***RKô ***                 PROC_Gain_Caret                 [ignored]     ***RKô ***                 PROC_User_Message               [internal]    ***RKô ***                 PROC_User_Message_Recorded      [internal]    ***R&Kô ***                 PROC_User_Message_Acknowledge   [ignored]     ***R0Kô ***         USES                                                  ***R:Kô ***                 Do_Wimp%                                      ***RDKô *********************************************************************RN:RXÝ ò_Activate_WimpRbê Action%, Do_Wimp%Rl  Do_Wimp% = ¹Rv  õR€5    È− "Wimp_Poll", Wimp_Poll_Mask%, W% ¸ Action%R⇩    È‰ Action% ÊR“!    É 0  : ò_Null_Reason_CodeRfi&    É 1  : ò_Redraw_Window_RequestR¨$    É 2  : ò_Open_Window_RequestR²%    É 3  : ò_Close_Window_RequestR¼'    É 4  : ò_Pointer_Leaving_WindowRÆ(    É 5  : ò_Pointer_Entering_WindowRР   É 6  : ò_Mouse_ClickRÚ    É 7  : ò_User_Drag_BoxRä    É 8  : ò_Key_PressedRî    É 9  : ò_Menu_SelectionRø    É 10 : ò_Scroll_RequestS    É 11 : ò_Lose_CaretS     É 12 : ò_Gain_CaretS    É 17 : ò_User_MessageS &    É 18 : ò_User_Message_RecordedS*)    É 19 : ò_User_Message_AcknowledgeS4        ËS>  ý ¬(Do_Wimp%)SHáSR:S\: ô  +0  = Window.Sf:SpÝ ò_Pointer_Leaving_WindowSzD  Ŷ Wimp_Error_Fatal%, "Unexpected Pointer_Leaving_Window poll."S☓áS‰:S—Ý ò_Pointer_Entering_WindowS¢E  Ŷ Wimp_Error_Fatal%, "Unexpected Pointer_Entering_Window poll."S¬áS¶:SÀ: ô  +0  = Window.SÊ1: ô  +4  = Visible area minimum x co-ordinateSÔ1: ô  +8  = Visible area minimum y co-ordinateSÞ1: ô  +12 = Visible area maximum x co-ordinateSè1: ô  +16 = Visible area maximum y co-ordinateSò;: ô  +20 = Scroll x offset relative to work area originSü;: ô  +24 = Scroll y offset relative to work area originTG: ô  +28 = Handle to open window behind (-1 means top of the windowT&: ô        stack, -2 means bottom)T!: ô  +32 = Scroll x directionT$!: ô  +36 = Scroll y directionT.: ô  These last two areT8I: ô           -2      Page left/down (click in scroll bar outer area)TB;: ô           -1      Left/down (click on scroll arrow)TL#: ô           0       No changeTV:: ô           +1      Right/up (click on scroll arrow)T`H: ô           +2      Page right/up (click in scroll bar outer area)Tj:TtÝ ò_Scroll_RequestT~<  Ŷ Wimp_Error_Fatal%, "Unexpected Scroll_Request poll."T⇦áT‹:T†B: ô  +0  = Window handle that had the input focus (-1 if none)T¦': ô  +4  = Icon handle (-1 if none)T°<: ô  +8  = X-offset of caret (relative to window origin)Tº<: ô  +12 = Y-offset of caret (relative to window origin)TÄ%: ô  +16 = Caret height and flagsTÎL: ô  +20 = Index of caret into string (or -1 if not in a writeable icon)TØL: ô  Event not generated if the input focus only changes position withinTâ: ô  the same window.Tì:TöÝ ò_Lose_CaretU8  Ŷ Wimp_Error_Fatal%, "Unexpected Lose_Caret poll."U
  26. áU:UÝ ò_Gain_CaretU(8  Ŷ Wimp_Error_Fatal%, "Unexpected Gain_Caret poll."U2áU<:UF Ý ò_User_Message_AcknowledgeUPáUZ:UdKô *********************************************************************UnKô ***                 Generic Template loader                       ***UxKô *********************************************************************UŵKô *** Loads a Sprites file, if it exists, into the heap at          ***U…Kô *** W_Sprites%.  Next it loads in the template file, and reads in ***U„Kô *** the standard Query_W% and ProgInfo_W% windows, before passing ***U Kô *** control to PROC_Init_Template.  This routine should call      ***UªKô *** PROC_Load_Template( id$, indrove%, <sprites> ), where sprites ***U´Kô *** would be either W_Sprites% or +1 (for wimp sprites).          ***U¾Kô *********************************************************************UÈ:UÒÝ ò_Generic_Init_TemplateUÜ>ê inddata_end%, inddata%, indrove%, length%, r0%, c%, ptr%Uæ+ê template_file%, file$, template_name%Uð  :Uú2  file$   = "<"+ Application$+ "$Dir>.Sprites"V'  length% = ¤_XSizeof_File( file$ )V  ç length%>0 …V6    ò_Claim_Heap_Block( W_Sprites%, length% + 16 )V"$    W_Sprites%!0  = length% + 16V,    W_Sprites%!4  = 0V6    W_Sprites%!8  = 16V@    W_Sprites%!12 = 16VJ<    È− "XOS_SpriteOp", &20A, W_Sprites%, file$ ¸ r0%; c%VT    ç ¤_PSR_V_Set(c%) …V^U      Ŷ Wimp_Error_Fatal%, "Couldn't load in Sprites file: "+ ¤getname( r0%+4 ) )Vh        ÍVr  ÌV|    W_Sprites% = 0Vŷ  ÍV‘  :VŒ4  file$   = "<"+ Application$+ "$Dir>.Templates"V¤'  length% = ¤_XSizeof_File( file$ )V®  ç length%<=0 …V¸<    Ŷ Wimp_Error_Fatal%, "Couldn't find Templates file."V  ÍVÌ-  ò_Claim_Heap_Block( inddata%, length% )VÖ'  inddata_end% = inddata% + length%Và3  ò_Claim_Heap_Block( template_file%, length% )Vê.  ò_Claim_Heap_Block( template_name%, 16 )Vô/  È− "XWimp_OpenTemplate",, file$ ¸ r0%; c%Vþ  ç ¤_PSR_V_Set(c%) …WT     Ŷ Wimp_Error_Fatal%, "Couldn't load in Templates file: "+ ¤getname( r0%+4 )W  ÍW  ç W_Sprites%>0 …W&I    ProgInfo_W% = ¤_Load_Template( "ProgInfo", inddata%, W_Sprites% )W0  ÌW:A    ProgInfo_W% = ¤_Load_Template( "ProgInfo", inddata%, +1 )WD  ÍWN<  Query_W%    = ¤_Load_Template( "Query", indrove%, +1 )WX  ò_Init_TemplateWb  È− "Wimp_CloseTemplate"Wl,  ò_Release_Heap_Block( template_name% )Wv,  ò_Release_Heap_Block( template_file% )W€áW⇩:W“Kô *********************************************************************WfiKô ***                 Null reason code handler                      ***W¨Kô *********************************************************************W²Kô *** A primitive "null reason" handler.  This allows an appl'tion  ***W¼Kô *** to have a queue of events to perform on a null reason.        ***WÆKô *** Better than nothing.                                          ***WÐKô *********************************************************************WÚ:WäÝ ò_Init_Null_ReasonWî  max_null_queue% = 10Wø-  Þ null_reason_queue$( max_null_queue% )X  null_reason$        = ""X   next_null_queue%    = 0X  do_next_null_queue% = 0X   :X*&  Wimp_Poll_Mask% = %1100000110001X4áX>:XHC: ô  Should really kill current null, or allow several at once.XR1: ô  This method is really a queueing system.X\H: ô  reason$ is the suffix of a function with a prefix _Null_Reason_XfI: ô  that should return TRUE if the routine should stop being called.Xp:Xz$Ý ò_Claim_Null_Reason( reason$ )X☓  ç null_reason$<>"" …X‰6    null_reason_queue$(next_null_queue%) = reason$X—,    ç next_null_queue%<max_null_queue% …X¢      next_null_queue% += 1X¬        ÍX¶  ÌXÀ    null_reason$ = reason$XÊ2    Wimp_Poll_Mask% = Wimp_Poll_Mask% € (¬(1))XÔ  ÍXÞáXè:Xò6: ô  Should really only ever be called internally.Xü:Y&Ý ò_Release_Null_Reason( reason$ )Y  ç next_null_queue%>0 …Y@    null_reason$ = null_reason_queue$( do_next_null_queue% )Y$/    ç do_next_null_queue%<max_null_queue% …Y."      do_next_null_queue% += 1Y8        ÍYB0    ç do_next_null_queue%=next_null_queue% …YL!      do_next_null_queue% = 0YV!      next_null_queue%    = 0Y`        ÍYj  ÌYt!    ç null_reason$<>reason$ …Y~N      Ŷ Wimp_Error_Fatal%, "Bad release null reason code ("+ reason$+ ")."Y⇦        ÍY‹    null_reason$ = ""Y†-    Wimp_Poll_Mask% = Wimp_Poll_Mask% ☓ 1Y¦  ÍY°áYº:YÄ): ô  Called from main wimp poll loop.YÎ=: ô  Only allow one routine per poll, named null_reason$.YØ:YâÝ ò_Null_Reason_CodeYìê ŶYö1î Ŷ ê ÷ Ŷ : ò_e( "%.Wimp: Null_Reason_Code" )Z,  ç  ("FN_Null_Reason_"+ null_reason$) …Z
  27. -    ò_Release_Null_Reason( null_reason$ )Z  ÍZáZ(:Z2Ý ¤_Null_Reason_Z<<  Ŷ Wimp_Error_Fatal%, "Bad Null Reason (not expected)."ZF= 0ZP:ZZKô *********************************************************************ZdKô ***               User Drag box handler code                      ***ZnKô *********************************************************************Zx:ZŵÝ ò_User_Drag_BoxZ…ê x%Z„ê ŶZ *î Ŷ ê ÷ Ŷ : ò_e( "%.Wimp: User_Drag" )Zª%  x% =  ("FN_Dragged_"+ dragged$)Z´!  ç dragged_button%<>(1*16) …Z¾    ò_Close_All_MenusZÈ  ÍZÒ,  È− "Wimp_DragBox",, -1 : dragged$ = ""ZÜáZæ:ZðÝ ¤_Dragged_Zúê ptr%, w%, i%[@  Ŷ Wimp_Error_Fatal%, "Bad User_Drag, dragged$ not set up."[= 0[:["H: ô  Called when noticed a mouse click of a "drag" type over a valid[,G: ô  icon, this will then cause "FN_Dragged_"+routine$ to be called[6": ô  when user stops the drag.[@:[J:Ý ò_Initiate_Drag( window%, icon%, button%, routine$ )[Tê ptr%, ptr2%, sx%, sy%[^!  ptr%  = ¤_Claim_Stack( 64 )[h"  ptr2% = ¤_Claim_Stack( 256 )[r  ptr%!0 = window%[|  ptr%!4 = icon%[ŷ#  È− "Wimp_GetIconState",, ptr%[‘  ptr2%!0 = window%[Œ&  È− "Wimp_GetWindowState",, ptr2%[¤  sx%     = ptr2%!20[®  sy%     = ptr2%!24[¸  ptr%!0  = window%[  ptr%!4  = 5[Ì;  ptr%!8  += ptr2%!4  - sx%           :  ô Min screen X[Ö;  ptr%!12 += ptr2%!16 - sy%           :  ô Min screen Y[à4  ptr%!16 += ptr2%!4  - sx%           :  ô Max X[ê4  ptr%!20 += ptr2%!16 - sy%           :  ô Max Y[ô  ptr%!24 = 0[þ  ptr%!28 = 0\  ptr%!32 = logmaxx%\  ptr%!36 = logmaxy%\  È− "Wimp_DragBox",, ptr%\&#  ò_Release_Stack( ptr2%, 256 )\0!  ò_Release_Stack( ptr%, 64 )\:  dragged$ = routine$\D  dragged_button% = button%\Ná\X:\bKô *********************************************************************\lKô ***                   Initiate a save                             ***\vKô *********************************************************************\€:\⇩I: ô  Usually used after a user has dragged a file icon from a Save as\“A: ô  sub-menu.  It is entered with the mouse pointer over the\fi1: ô  destination, which gets set the message.\¨:\²8Ý ò_Send_Save( filetype%, file_name$, file_length% )\¼"ê ptr%, window%, icon%, x%, y%\Æ!  ptr% = ¤_Claim_Stack( 320 )\Ð%  È− "Wimp_GetPointerInfo",, ptr%\Ú  x%      = !ptr%\ä  y%      = ptr%!4\î  window% = ptr%!12\ø  icon%   = ptr%!16])  !ptr%   = (©(file_name$) + 48) € -4]   ptr%!12 = 0]  ptr%!16 = 1]   ptr%!20 = window%]*  ptr%!24 = icon%]4  ptr%!28 = x%]>  ptr%!32 = y%]H  ptr%!36 = file_length%]R  ptr%!40 = filetype%]\$  $(ptr%+44) = file_name$ + ½(0)]f5  È− "Wimp_SendMessage", 17, ptr%, window%, icon%]p  save_ref% = ptr%!8]z"  ò_Release_Stack( ptr%, 320 )]☓á]‰:]—Kô *********************************************************************]¢Kô ***                 Wimp message handling                         ***]¬Kô *********************************************************************]¶Kô ***         CALLS                                                 ***]ÀKô ***                 PROC_Wimp_CloseDown                           ***]ÊKô ***                 PROC_Message_DataSave                         ***]ÔKô ***                 PROC_Message_DataSaveAck                      ***]ÞKô ***                 PROC_Message_DataLoad                         ***]èKô ***                 PROC_Message_DataLoadAck                      ***]òKô ***                 PROC_Message_DataOpen                         ***]üKô ***                 PROC_Message_PreQuit                          ***^Kô ***                 PROC_Message_Pallette           [ignored]     ***^Kô ***                 PROC_Message_Help                             ***^Kô ***                 PROC_Message_MenuWarning                      ***^$Kô ***                 PROC_Message_ModeChange                       ***^.Kô ***                 PROC_Message_SetSlot            [ignored]     ***^8Kô ***                 FN_Doc_Modified                               ***^BKô *********************************************************************^L:^VÝ ò_User_Message_Recorded^`ê Ŷ^j6î Ŷ ê ÷ Ŷ : ò_e( "%.Wimp: User_Message_Recorded" )^t  ò_User_Message^~á^⇦:^‹Ý ò_User_Message^†ê Ŷ^¦-î Ŷ ê ÷ Ŷ : ò_e( "%.Wimp: User_Message" )^°  È‰ W%!16 Ê^º#    É 0      : ò_Wimp_CloseDown^Ä%    É 1      : ò_Message_DataSave^Î(    É 2      : ò_Message_DataSaveAck^Ø%    É 3      : ò_Message_DataLoad^â(    É 4      : ò_Message_DataLoadAck^ì%    É 5      : ò_Message_DataOpen^ö$    É 8      : ò_Message_PreQuit_%    É 9      : ò_Message_Pallette_
  28. !    É &502   : ò_Message_Help_(    É &400C0 : ò_Message_MenuWarning_'    É &400C1 : ò_Message_ModeChange_($    É &400C5 : ò_Message_SetSlot_2  Ë_<á_F:_PÝ ò_Message_SetSlot_Zá_d:_nÝ ò_Message_Pallette_xá_ŵ:_…$ô Last line of <BasicV$Lib>.Wimpÿ