Home » Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s » Shareware/Event/Documents/!EShellDoc/TextHelp/Events

Shareware/Event/Documents/!EShellDoc/TextHelp/Events

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

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

Tape/disk: Home » Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s
Filename: Shareware/Event/Documents/!EShellDoc/TextHelp/Events
Read OK:
File size: 3711 bytes
Load address: 0000
Exec address: 0000
File contents
PROCshell_AttachPaletteChangeHandler()
Params =>
         str function name

Registers a function name to be called when a PaletteChange
message is received. This occurs when the user has finished
dragging the sliders on the Palette application, or when a
new palette is loaded. It is also called when the handler is
set up so that the user application can note the current
parameters.

Note that this message is not issued when the screen mode
changes, so tasks interested in colour mapping changes should
call PROCshell_AttachModeChangeHandler as well.

User FN (PROCshell_AttachPaletteChangeHandler)
Params =>
         None

This function is called when a PaletteChange message is
received and also when PROCshell_AttachPaletteChangeHandler
is called.

--------------------------------------------------------

PROCshell_AttachModeChangeHandler()
Params =>
         str function name

Registers a function name to be called when a ModeChange
message is received. This allows the application to check
any mode-specific parameters such as screen width etc. It
is also called when the handler is set up so that the user
application can note the current parameters.

User FN (PROCshell_AttachModeChangeHandler) 
Params => 
         None 
 
This function is called when a ModeChange message is
received and also when PROCshell_AttachModeChangeHandler
is called

--------------------------------------------------------

PROCshell_AttachTaskInitialiseHandler()
Params =>
         str function name

Registers a function name to be called when a TaskInitialise
message is received. This allows the application to keep
track of any new tasks started after it.

User FN (PROCshell_AttachTaskInitialiseHandler) 
Params => 
         None 
 
This function is called when a TaskInitialise  message is
received.

--------------------------------------------------------

PROCshell_AttachTaskCloseDownHandler()
Params =>
         str function name

Registers a function name to be called when a TaskCloseDown
message is received.This message is sent when a task (other
than the current one) is killed.

User FN (PROCshell_AttachTaskCloseDownHandler)
Params => 
         None 
 
This function is called when a TaskCloseDown message is
received.

--------------------------------------------------------

PROCshell_AttachPane()
Params =>
         int window handle
         int pane handle
         int pane flags
         int x offset of pane relative to parent window
         int y offset of pane relative to parent window

Pane Flags (PROCshell_AttachPane)
0 = attached to parent window work area
1 = not used
2 = attached to left edge
3 = attached to bottom edge
4 = attached to right edge
5 = attached to top edge

If necessary the window flags of the pane window are
changed so that the 'pane' bit is on and the 'moveable'
bit is off, so that editing the template file is not
required.

--------------------------------------------------------

PROCshell_AttachDataLoad()
Attaches a dataload handler to a window/icon pair.

Params =>
         int  window handle
         int  icon handle
         int  filetype to recognise and optionally
              load (see no load flag)
         str  function name
         bool no load flag

Note that it is possible to call this function for
the same window/icon pair more than once giving
different filetypes (and function names if required)
to allow the handling of multiple filetypes.

User FN (PROCshell_AttachDataLoad)
Params =>
         int address file has been loaded at
         int filetype of file
         str full pathname of file
         int file size (from dataload message)

Note that if the event was attached with the
no load flag set to TRUE the address will
be -1 and the user application is expected to
actually load the file.

DataLoad 'No Load' flag
FALSE = data file is loaded in a heap block and
        the name and address is returned to the
        user application.

TRUE  = only the data file name and type is
        returned to the user application.

This flag is provided for maximum flexibility
when dealing with drag loads. When you are
converting an existing program to run under the
EvntShell system you may already have a working
load routine. In this case set the flag to TRUE
and when a drag load occurs your application will
be told the filename, which may then be loaded
and processed as required.

When this flag is FALSE the library routines will
reserve a memory block for the file and load it
automatically.

For the technical of you out there the library
stores the status of the no load flag in the top
bit of the filetype number. This will end in tears
when RISC-OS 4 comes out...

--------------------------------------------------------

PROCshell_AttachDataSave()
Attaches a datasave handler to a window/icon pair. A
typical use would be in a 'Save As' dialog box, the
icon handle being that of the 'File Type' icon.
 
Params =>
         int window handle
         int icon handle
         int address of heapblock holding data or
             the estimated file size
         int file type for saved file
         int icon nr of filename icon
         str function name (optional if data
             is held in a heapblock)

If icon 0 in the window is clicked on then a check
is made that the filename icon contains a valid
path name, generating an error if it does not.

Note that the third parameter can point to a heap
block containing the data to save which means that
the data must exist in the block (or at least the
block must exist and be the correct size) before
this routine is called. If this parameter is >&8000
it is taken to be a pointer to the heap block , and
the name of the function to perform the save is
optional.

Alternatively this parameter can be an estimated
file size (i.e. <&8000) in which case the user
function may write directly into the file whose
name is given as a parameter to the function. RAM
transfer is not possible if this is the case.

User FN (PROCshell_AttachDataSave)
Params =>
         str full filename of file

This function is not called if the file is stored
in a heap block. In this case the whole contents of
the heap block are transferred.

Estimated File Sizes
It should (if other applications are written to
the Acorn guidelines!) not matter if this estimate
is inaccurate. However, file transfer will be a
little faster if it is accurate and problems may
occur with badly written applications if it is not.

--------------------------------------------------------

PROCshell_AttachClickSelect()
Params =>    
         int window handle       
         int icon handle 
         str function name

User FN (PROCshell_AttachClickSelect)
Params => 
         int window handle
         int icon handle

--------------------------------------------------------

PROCshell_AttachClickAdjust()
Params =>     
         int window handle           
         int icon handle  
         str function name

User FN (PROCshell_AttachClickAdjust)
Params => 
         int window handle
         int icon handle

--------------------------------------------------------

PROCshell_AttachUserRedraw()
Params =>      
         int window handle      
         str function name

A check is made to ensure that the 'Auto redraw' flag of
the window is off, and the flag is cleared automatically
if necessary (i.e. you don't have to use !FormEd or
similar to set the flag correctly)

User FN (PROCshell_AttachUserRedraw)
Params => 
         int address of block returned by redraw
             request
         int x origin of window (screen coords)
         int y origin of window (screen coords)
 
The function to call when a redraw request
is made.

--------------------------------------------------------

PROCshell_AttachDrag()
Params =>        
         int window handle        
         int icon handle     
         str function name


User FN (FNshell_AttachDrag)
Params =>
         int window handle over which drag
             started
         int icon handle over which drag was
             started (-1 for no icon)
 
--------------------------------------------------------

PROCshell_AttachHelpTag()
Params =>         
         int window handle         
         int icon handle      
         str <message tag=>MessageTag>

Note that any message tags found in icon
validation strings override tags set up by
this routine.

--------------------------------------------------------

PROCWimpCloseDown
Params =>
         None

Not used in EvntShell library - use <PROCshell_WimpCloseDown_I> instead.

--------------------------------------------------------

PROCshell_WimpCloseDown_I
Params => 
         None

Called when the application shuts down (the library calls
this automatically)

--------------------------------------------------------

PROCshell_AttachBumpHandler()
Params =>     
         int  window handle
         int  icon handle (display value)
         int  icon handle (increment value)
         int  icon handle (decrement value)
         int  lower limit
         int  upper limit
         int  step
         bool wrap flag
         str  function name 1 (can be "")
         str  function name 2 (can be "")

Bump icons are the arrows that allow you to alter the
value displayed in an icon (usually but not necessarily
a writable one)

User FN1 (PROCshell_AttachBumpHandler)
Params => 
         int value

       <=
         str converted value

This function is called before the new value
is placed in the display icon. 

An example would be converting an integer
value to the format 0h00 (i.e hours and mins).

DEF FN_dis_fn(val%)
=STR$(val%DIV60)+"h"+RIGHT$("00"+STR$(val%MOD60),2)

See the !VBase2 demo app.

User FN2 (PROCshell_AttachBumpHandler)
Params => 
         str value to decode

       <=
         int converted value

This function is called before the new value
is placed in the display icon.

An example would be converting a string "0h00"
back to an integer value.

DEF FN_decode_dis(val$)
=VAL(val$)*60+VAL(RIGHT$(val$,2))

See the !VBase2 demo app.

--------------------------------------------------------

PROCshell_AttachHotKey()
Params =>
         str  key
         bool shift flag
         bool ctrl  flag
         bool alt   flag
         str  window identifier
         int  window handle
         str  function name
         str  function name

Sets up a 'hotkey' event. Function keys F0-F11
(note NOT F12 as the task manager uses it under
RISC-OS 3) are supported.

User FN (PROCshell_AttachHotKey)
Params => 
         int window handle
 
The function to call before opening the window.
A function name of "" may be used if you don't
need to call a function. This would normally be
used to fill in icon fields and set the state
of radio buttons

User FN (PROCshell_AttachHotKey)
Params => 
         int window handle
 
The function to call after opening the window.
A function name of "" may be used if you don't
need to call a function.Key (PROCshell_AttachHotKey)
The key string normally consists of one ASCII
character i.e. "R". When the ctrl flag is set
this would cause the actions to be carried out
when CTRL-R is pressed.

The string may also contain "F1" to "F11" to
allow function keys to be used. No checking is
performed on the string.Window (PROCshell_AttachHotKey)
The window identifier specifies the name
of the window you want to appear when the
keypress is received. This parameter is
optional as you might not always want to
open a window.

The window is a 'dynamic' dialog box which
will disappear when <ESC> is pressed and
is opened in such a position that the mouse
pointer is in the middle of the window
(where possible).

Window Handle (shell_AttachHotKey)
When this is >0 then the window
created will be static i.e. it will not
be removed when the mouse is clicked
outside it, or when <ESC> is pressed.

--------------------------------------------------------

PROCshell_DoBackgroundTask
Params =>
         None

Called everytime a null reason code is received

--------------------------------------------------------

PROCshell_HandleUnknownMessage()
Params =>
         int address of message block

Called every time an unknown message is received.

--------------------------------------------------------

PROCshell_AttachCloseWindowHandler()
Params =>
         int window handle
         str function name

Registers a function name to be called when an 
CloseWindow message is received. This is useful
to prevent the window closing if so doing
would involve loss of data.

This message is issued when the window close
icon is clicked on.

User FN (PROCshell_AttachCloseWindowHandler)
Params => 
         None 

       <=
         bool 0 to disallow close, non 0 to
              close

--------------------------------------------------------

PROCshell_AttachOpenWindowHandler()
Params =>
         int window handle
         str function name

Registers a function name to be called when an 
OpenWindow message is received. This is useful
so that the application can set a flag to
avoid doing window redraws while the window is
closed for example.

This message is issued when the window is
dragged around the screen as well as when
the program opens the window. You should avoid
doing time consuming stuff in the function that
is called therefore.

User FN (PROCshell_AttachOpenWindowHandler)
Params => 
         None 

       <=
         bool 0 to disallow open, non 0 to
              open
              
--------------------------------------------------------

PROCshell_AttachPreQuitHandler()
Params =>
         str function name

Registers a function name to be called when a 
PreQuit message is received. This gives the
application a chance to save data or abort
the shutdown.

This message is issued when the task is quit
from the Task Manager, or when CTRL-SHIFT-F12
is pressed (under RISC OS 3).

User FN (PROCshell_AttachPreQuitHandler)
Params => 
         None 

       <=
         bool non 0 to allow quit, 0 to
              cancel quit

This function is called when a PreQuit
message is received.

--------------------------------------------------------
00000000  0a 50 52 4f 43 73 68 65  6c 6c 5f 41 74 74 61 63  |.PROCshell_Attac|
00000010  68 50 61 6c 65 74 74 65  43 68 61 6e 67 65 48 61  |hPaletteChangeHa|
00000020  6e 64 6c 65 72 28 29 0a  50 61 72 61 6d 73 20 3d  |ndler().Params =|
00000030  3e 0a 20 20 20 20 20 20  20 20 20 73 74 72 20 66  |>.         str f|
00000040  75 6e 63 74 69 6f 6e 20  6e 61 6d 65 0a 0a 52 65  |unction name..Re|
00000050  67 69 73 74 65 72 73 20  61 20 66 75 6e 63 74 69  |gisters a functi|
00000060  6f 6e 20 6e 61 6d 65 20  74 6f 20 62 65 20 63 61  |on name to be ca|
00000070  6c 6c 65 64 20 77 68 65  6e 20 61 20 50 61 6c 65  |lled when a Pale|
00000080  74 74 65 43 68 61 6e 67  65 0a 6d 65 73 73 61 67  |tteChange.messag|
00000090  65 20 69 73 20 72 65 63  65 69 76 65 64 2e 20 54  |e is received. T|
000000a0  68 69 73 20 6f 63 63 75  72 73 20 77 68 65 6e 20  |his occurs when |
000000b0  74 68 65 20 75 73 65 72  20 68 61 73 20 66 69 6e  |the user has fin|
000000c0  69 73 68 65 64 0a 64 72  61 67 67 69 6e 67 20 74  |ished.dragging t|
000000d0  68 65 20 73 6c 69 64 65  72 73 20 6f 6e 20 74 68  |he sliders on th|
000000e0  65 20 50 61 6c 65 74 74  65 20 61 70 70 6c 69 63  |e Palette applic|
000000f0  61 74 69 6f 6e 2c 20 6f  72 20 77 68 65 6e 20 61  |ation, or when a|
00000100  0a 6e 65 77 20 70 61 6c  65 74 74 65 20 69 73 20  |.new palette is |
00000110  6c 6f 61 64 65 64 2e 20  49 74 20 69 73 20 61 6c  |loaded. It is al|
00000120  73 6f 20 63 61 6c 6c 65  64 20 77 68 65 6e 20 74  |so called when t|
00000130  68 65 20 68 61 6e 64 6c  65 72 20 69 73 0a 73 65  |he handler is.se|
00000140  74 20 75 70 20 73 6f 20  74 68 61 74 20 74 68 65  |t up so that the|
00000150  20 75 73 65 72 20 61 70  70 6c 69 63 61 74 69 6f  | user applicatio|
00000160  6e 20 63 61 6e 20 6e 6f  74 65 20 74 68 65 20 63  |n can note the c|
00000170  75 72 72 65 6e 74 0a 70  61 72 61 6d 65 74 65 72  |urrent.parameter|
00000180  73 2e 0a 0a 4e 6f 74 65  20 74 68 61 74 20 74 68  |s...Note that th|
00000190  69 73 20 6d 65 73 73 61  67 65 20 69 73 20 6e 6f  |is message is no|
000001a0  74 20 69 73 73 75 65 64  20 77 68 65 6e 20 74 68  |t issued when th|
000001b0  65 20 73 63 72 65 65 6e  20 6d 6f 64 65 0a 63 68  |e screen mode.ch|
000001c0  61 6e 67 65 73 2c 20 73  6f 20 74 61 73 6b 73 20  |anges, so tasks |
000001d0  69 6e 74 65 72 65 73 74  65 64 20 69 6e 20 63 6f  |interested in co|
000001e0  6c 6f 75 72 20 6d 61 70  70 69 6e 67 20 63 68 61  |lour mapping cha|
000001f0  6e 67 65 73 20 73 68 6f  75 6c 64 0a 63 61 6c 6c  |nges should.call|
00000200  20 50 52 4f 43 73 68 65  6c 6c 5f 41 74 74 61 63  | PROCshell_Attac|
00000210  68 4d 6f 64 65 43 68 61  6e 67 65 48 61 6e 64 6c  |hModeChangeHandl|
00000220  65 72 20 61 73 20 77 65  6c 6c 2e 0a 0a 55 73 65  |er as well...Use|
00000230  72 20 46 4e 20 28 50 52  4f 43 73 68 65 6c 6c 5f  |r FN (PROCshell_|
00000240  41 74 74 61 63 68 50 61  6c 65 74 74 65 43 68 61  |AttachPaletteCha|
00000250  6e 67 65 48 61 6e 64 6c  65 72 29 0a 50 61 72 61  |ngeHandler).Para|
00000260  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 4e  |ms =>.         N|
00000270  6f 6e 65 0a 0a 54 68 69  73 20 66 75 6e 63 74 69  |one..This functi|
00000280  6f 6e 20 69 73 20 63 61  6c 6c 65 64 20 77 68 65  |on is called whe|
00000290  6e 20 61 20 50 61 6c 65  74 74 65 43 68 61 6e 67  |n a PaletteChang|
000002a0  65 20 6d 65 73 73 61 67  65 20 69 73 0a 72 65 63  |e message is.rec|
000002b0  65 69 76 65 64 20 61 6e  64 20 61 6c 73 6f 20 77  |eived and also w|
000002c0  68 65 6e 20 50 52 4f 43  73 68 65 6c 6c 5f 41 74  |hen PROCshell_At|
000002d0  74 61 63 68 50 61 6c 65  74 74 65 43 68 61 6e 67  |tachPaletteChang|
000002e0  65 48 61 6e 64 6c 65 72  0a 69 73 20 63 61 6c 6c  |eHandler.is call|
000002f0  65 64 2e 0a 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ed...-----------|
00000300  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000320  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 50  |-------------..P|
00000330  52 4f 43 73 68 65 6c 6c  5f 41 74 74 61 63 68 4d  |ROCshell_AttachM|
00000340  6f 64 65 43 68 61 6e 67  65 48 61 6e 64 6c 65 72  |odeChangeHandler|
00000350  28 29 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |().Params =>.   |
00000360  20 20 20 20 20 20 73 74  72 20 66 75 6e 63 74 69  |      str functi|
00000370  6f 6e 20 6e 61 6d 65 0a  0a 52 65 67 69 73 74 65  |on name..Registe|
00000380  72 73 20 61 20 66 75 6e  63 74 69 6f 6e 20 6e 61  |rs a function na|
00000390  6d 65 20 74 6f 20 62 65  20 63 61 6c 6c 65 64 20  |me to be called |
000003a0  77 68 65 6e 20 61 20 4d  6f 64 65 43 68 61 6e 67  |when a ModeChang|
000003b0  65 0a 6d 65 73 73 61 67  65 20 69 73 20 72 65 63  |e.message is rec|
000003c0  65 69 76 65 64 2e 20 54  68 69 73 20 61 6c 6c 6f  |eived. This allo|
000003d0  77 73 20 74 68 65 20 61  70 70 6c 69 63 61 74 69  |ws the applicati|
000003e0  6f 6e 20 74 6f 20 63 68  65 63 6b 0a 61 6e 79 20  |on to check.any |
000003f0  6d 6f 64 65 2d 73 70 65  63 69 66 69 63 20 70 61  |mode-specific pa|
00000400  72 61 6d 65 74 65 72 73  20 73 75 63 68 20 61 73  |rameters such as|
00000410  20 73 63 72 65 65 6e 20  77 69 64 74 68 20 65 74  | screen width et|
00000420  63 2e 20 49 74 0a 69 73  20 61 6c 73 6f 20 63 61  |c. It.is also ca|
00000430  6c 6c 65 64 20 77 68 65  6e 20 74 68 65 20 68 61  |lled when the ha|
00000440  6e 64 6c 65 72 20 69 73  20 73 65 74 20 75 70 20  |ndler is set up |
00000450  73 6f 20 74 68 61 74 20  74 68 65 20 75 73 65 72  |so that the user|
00000460  0a 61 70 70 6c 69 63 61  74 69 6f 6e 20 63 61 6e  |.application can|
00000470  20 6e 6f 74 65 20 74 68  65 20 63 75 72 72 65 6e  | note the curren|
00000480  74 20 70 61 72 61 6d 65  74 65 72 73 2e 0a 0a 55  |t parameters...U|
00000490  73 65 72 20 46 4e 20 28  50 52 4f 43 73 68 65 6c  |ser FN (PROCshel|
000004a0  6c 5f 41 74 74 61 63 68  4d 6f 64 65 43 68 61 6e  |l_AttachModeChan|
000004b0  67 65 48 61 6e 64 6c 65  72 29 20 0a 50 61 72 61  |geHandler) .Para|
000004c0  6d 73 20 3d 3e 20 0a 20  20 20 20 20 20 20 20 20  |ms => .         |
000004d0  4e 6f 6e 65 20 0a 20 0a  54 68 69 73 20 66 75 6e  |None . .This fun|
000004e0  63 74 69 6f 6e 20 69 73  20 63 61 6c 6c 65 64 20  |ction is called |
000004f0  77 68 65 6e 20 61 20 4d  6f 64 65 43 68 61 6e 67  |when a ModeChang|
00000500  65 20 6d 65 73 73 61 67  65 20 69 73 0a 72 65 63  |e message is.rec|
00000510  65 69 76 65 64 20 61 6e  64 20 61 6c 73 6f 20 77  |eived and also w|
00000520  68 65 6e 20 50 52 4f 43  73 68 65 6c 6c 5f 41 74  |hen PROCshell_At|
00000530  74 61 63 68 4d 6f 64 65  43 68 61 6e 67 65 48 61  |tachModeChangeHa|
00000540  6e 64 6c 65 72 0a 69 73  20 63 61 6c 6c 65 64 0a  |ndler.is called.|
00000550  0a 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00000560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000580  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 50 52 4f 43 73  |---------..PROCs|
00000590  68 65 6c 6c 5f 41 74 74  61 63 68 54 61 73 6b 49  |hell_AttachTaskI|
000005a0  6e 69 74 69 61 6c 69 73  65 48 61 6e 64 6c 65 72  |nitialiseHandler|
000005b0  28 29 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |().Params =>.   |
000005c0  20 20 20 20 20 20 73 74  72 20 66 75 6e 63 74 69  |      str functi|
000005d0  6f 6e 20 6e 61 6d 65 0a  0a 52 65 67 69 73 74 65  |on name..Registe|
000005e0  72 73 20 61 20 66 75 6e  63 74 69 6f 6e 20 6e 61  |rs a function na|
000005f0  6d 65 20 74 6f 20 62 65  20 63 61 6c 6c 65 64 20  |me to be called |
00000600  77 68 65 6e 20 61 20 54  61 73 6b 49 6e 69 74 69  |when a TaskIniti|
00000610  61 6c 69 73 65 0a 6d 65  73 73 61 67 65 20 69 73  |alise.message is|
00000620  20 72 65 63 65 69 76 65  64 2e 20 54 68 69 73 20  | received. This |
00000630  61 6c 6c 6f 77 73 20 74  68 65 20 61 70 70 6c 69  |allows the appli|
00000640  63 61 74 69 6f 6e 20 74  6f 20 6b 65 65 70 0a 74  |cation to keep.t|
00000650  72 61 63 6b 20 6f 66 20  61 6e 79 20 6e 65 77 20  |rack of any new |
00000660  74 61 73 6b 73 20 73 74  61 72 74 65 64 20 61 66  |tasks started af|
00000670  74 65 72 20 69 74 2e 0a  0a 55 73 65 72 20 46 4e  |ter it...User FN|
00000680  20 28 50 52 4f 43 73 68  65 6c 6c 5f 41 74 74 61  | (PROCshell_Atta|
00000690  63 68 54 61 73 6b 49 6e  69 74 69 61 6c 69 73 65  |chTaskInitialise|
000006a0  48 61 6e 64 6c 65 72 29  20 0a 50 61 72 61 6d 73  |Handler) .Params|
000006b0  20 3d 3e 20 0a 20 20 20  20 20 20 20 20 20 4e 6f  | => .         No|
000006c0  6e 65 20 0a 20 0a 54 68  69 73 20 66 75 6e 63 74  |ne . .This funct|
000006d0  69 6f 6e 20 69 73 20 63  61 6c 6c 65 64 20 77 68  |ion is called wh|
000006e0  65 6e 20 61 20 54 61 73  6b 49 6e 69 74 69 61 6c  |en a TaskInitial|
000006f0  69 73 65 20 20 6d 65 73  73 61 67 65 20 69 73 0a  |ise  message is.|
00000700  72 65 63 65 69 76 65 64  2e 0a 0a 2d 2d 2d 2d 2d  |received...-----|
00000710  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000740  2d 2d 2d 0a 0a 50 52 4f  43 73 68 65 6c 6c 5f 41  |---..PROCshell_A|
00000750  74 74 61 63 68 54 61 73  6b 43 6c 6f 73 65 44 6f  |ttachTaskCloseDo|
00000760  77 6e 48 61 6e 64 6c 65  72 28 29 0a 50 61 72 61  |wnHandler().Para|
00000770  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 73  |ms =>.         s|
00000780  74 72 20 66 75 6e 63 74  69 6f 6e 20 6e 61 6d 65  |tr function name|
00000790  0a 0a 52 65 67 69 73 74  65 72 73 20 61 20 66 75  |..Registers a fu|
000007a0  6e 63 74 69 6f 6e 20 6e  61 6d 65 20 74 6f 20 62  |nction name to b|
000007b0  65 20 63 61 6c 6c 65 64  20 77 68 65 6e 20 61 20  |e called when a |
000007c0  54 61 73 6b 43 6c 6f 73  65 44 6f 77 6e 0a 6d 65  |TaskCloseDown.me|
000007d0  73 73 61 67 65 20 69 73  20 72 65 63 65 69 76 65  |ssage is receive|
000007e0  64 2e 54 68 69 73 20 6d  65 73 73 61 67 65 20 69  |d.This message i|
000007f0  73 20 73 65 6e 74 20 77  68 65 6e 20 61 20 74 61  |s sent when a ta|
00000800  73 6b 20 28 6f 74 68 65  72 0a 74 68 61 6e 20 74  |sk (other.than t|
00000810  68 65 20 63 75 72 72 65  6e 74 20 6f 6e 65 29 20  |he current one) |
00000820  69 73 20 6b 69 6c 6c 65  64 2e 0a 0a 55 73 65 72  |is killed...User|
00000830  20 46 4e 20 28 50 52 4f  43 73 68 65 6c 6c 5f 41  | FN (PROCshell_A|
00000840  74 74 61 63 68 54 61 73  6b 43 6c 6f 73 65 44 6f  |ttachTaskCloseDo|
00000850  77 6e 48 61 6e 64 6c 65  72 29 0a 50 61 72 61 6d  |wnHandler).Param|
00000860  73 20 3d 3e 20 0a 20 20  20 20 20 20 20 20 20 4e  |s => .         N|
00000870  6f 6e 65 20 0a 20 0a 54  68 69 73 20 66 75 6e 63  |one . .This func|
00000880  74 69 6f 6e 20 69 73 20  63 61 6c 6c 65 64 20 77  |tion is called w|
00000890  68 65 6e 20 61 20 54 61  73 6b 43 6c 6f 73 65 44  |hen a TaskCloseD|
000008a0  6f 77 6e 20 6d 65 73 73  61 67 65 20 69 73 0a 72  |own message is.r|
000008b0  65 63 65 69 76 65 64 2e  0a 0a 2d 2d 2d 2d 2d 2d  |eceived...------|
000008c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000008f0  2d 2d 0a 0a 50 52 4f 43  73 68 65 6c 6c 5f 41 74  |--..PROCshell_At|
00000900  74 61 63 68 50 61 6e 65  28 29 0a 50 61 72 61 6d  |tachPane().Param|
00000910  73 20 3d 3e 0a 20 20 20  20 20 20 20 20 20 69 6e  |s =>.         in|
00000920  74 20 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |t window handle.|
00000930  20 20 20 20 20 20 20 20  20 69 6e 74 20 70 61 6e  |         int pan|
00000940  65 20 68 61 6e 64 6c 65  0a 20 20 20 20 20 20 20  |e handle.       |
00000950  20 20 69 6e 74 20 70 61  6e 65 20 66 6c 61 67 73  |  int pane flags|
00000960  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 78 20  |.         int x |
00000970  6f 66 66 73 65 74 20 6f  66 20 70 61 6e 65 20 72  |offset of pane r|
00000980  65 6c 61 74 69 76 65 20  74 6f 20 70 61 72 65 6e  |elative to paren|
00000990  74 20 77 69 6e 64 6f 77  0a 20 20 20 20 20 20 20  |t window.       |
000009a0  20 20 69 6e 74 20 79 20  6f 66 66 73 65 74 20 6f  |  int y offset o|
000009b0  66 20 70 61 6e 65 20 72  65 6c 61 74 69 76 65 20  |f pane relative |
000009c0  74 6f 20 70 61 72 65 6e  74 20 77 69 6e 64 6f 77  |to parent window|
000009d0  0a 0a 50 61 6e 65 20 46  6c 61 67 73 20 28 50 52  |..Pane Flags (PR|
000009e0  4f 43 73 68 65 6c 6c 5f  41 74 74 61 63 68 50 61  |OCshell_AttachPa|
000009f0  6e 65 29 0a 30 20 3d 20  61 74 74 61 63 68 65 64  |ne).0 = attached|
00000a00  20 74 6f 20 70 61 72 65  6e 74 20 77 69 6e 64 6f  | to parent windo|
00000a10  77 20 77 6f 72 6b 20 61  72 65 61 0a 31 20 3d 20  |w work area.1 = |
00000a20  6e 6f 74 20 75 73 65 64  0a 32 20 3d 20 61 74 74  |not used.2 = att|
00000a30  61 63 68 65 64 20 74 6f  20 6c 65 66 74 20 65 64  |ached to left ed|
00000a40  67 65 0a 33 20 3d 20 61  74 74 61 63 68 65 64 20  |ge.3 = attached |
00000a50  74 6f 20 62 6f 74 74 6f  6d 20 65 64 67 65 0a 34  |to bottom edge.4|
00000a60  20 3d 20 61 74 74 61 63  68 65 64 20 74 6f 20 72  | = attached to r|
00000a70  69 67 68 74 20 65 64 67  65 0a 35 20 3d 20 61 74  |ight edge.5 = at|
00000a80  74 61 63 68 65 64 20 74  6f 20 74 6f 70 20 65 64  |tached to top ed|
00000a90  67 65 0a 0a 49 66 20 6e  65 63 65 73 73 61 72 79  |ge..If necessary|
00000aa0  20 74 68 65 20 77 69 6e  64 6f 77 20 66 6c 61 67  | the window flag|
00000ab0  73 20 6f 66 20 74 68 65  20 70 61 6e 65 20 77 69  |s of the pane wi|
00000ac0  6e 64 6f 77 20 61 72 65  0a 63 68 61 6e 67 65 64  |ndow are.changed|
00000ad0  20 73 6f 20 74 68 61 74  20 74 68 65 20 27 70 61  | so that the 'pa|
00000ae0  6e 65 27 20 62 69 74 20  69 73 20 6f 6e 20 61 6e  |ne' bit is on an|
00000af0  64 20 74 68 65 20 27 6d  6f 76 65 61 62 6c 65 27  |d the 'moveable'|
00000b00  0a 62 69 74 20 69 73 20  6f 66 66 2c 20 73 6f 20  |.bit is off, so |
00000b10  74 68 61 74 20 65 64 69  74 69 6e 67 20 74 68 65  |that editing the|
00000b20  20 74 65 6d 70 6c 61 74  65 20 66 69 6c 65 20 69  | template file i|
00000b30  73 20 6e 6f 74 0a 72 65  71 75 69 72 65 64 2e 0a  |s not.required..|
00000b40  0a 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00000b50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000b70  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 50 52 4f 43 73  |---------..PROCs|
00000b80  68 65 6c 6c 5f 41 74 74  61 63 68 44 61 74 61 4c  |hell_AttachDataL|
00000b90  6f 61 64 28 29 0a 41 74  74 61 63 68 65 73 20 61  |oad().Attaches a|
00000ba0  20 64 61 74 61 6c 6f 61  64 20 68 61 6e 64 6c 65  | dataload handle|
00000bb0  72 20 74 6f 20 61 20 77  69 6e 64 6f 77 2f 69 63  |r to a window/ic|
00000bc0  6f 6e 20 70 61 69 72 2e  0a 0a 50 61 72 61 6d 73  |on pair...Params|
00000bd0  20 3d 3e 0a 20 20 20 20  20 20 20 20 20 69 6e 74  | =>.         int|
00000be0  20 20 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |  window handle.|
00000bf0  20 20 20 20 20 20 20 20  20 69 6e 74 20 20 69 63  |         int  ic|
00000c00  6f 6e 20 68 61 6e 64 6c  65 0a 20 20 20 20 20 20  |on handle.      |
00000c10  20 20 20 69 6e 74 20 20  66 69 6c 65 74 79 70 65  |   int  filetype|
00000c20  20 74 6f 20 72 65 63 6f  67 6e 69 73 65 20 61 6e  | to recognise an|
00000c30  64 20 6f 70 74 69 6f 6e  61 6c 6c 79 0a 20 20 20  |d optionally.   |
00000c40  20 20 20 20 20 20 20 20  20 20 20 6c 6f 61 64 20  |           load |
00000c50  28 73 65 65 20 6e 6f 20  6c 6f 61 64 20 66 6c 61  |(see no load fla|
00000c60  67 29 0a 20 20 20 20 20  20 20 20 20 73 74 72 20  |g).         str |
00000c70  20 66 75 6e 63 74 69 6f  6e 20 6e 61 6d 65 0a 20  | function name. |
00000c80  20 20 20 20 20 20 20 20  62 6f 6f 6c 20 6e 6f 20  |        bool no |
00000c90  6c 6f 61 64 20 66 6c 61  67 0a 0a 4e 6f 74 65 20  |load flag..Note |
00000ca0  74 68 61 74 20 69 74 20  69 73 20 70 6f 73 73 69  |that it is possi|
00000cb0  62 6c 65 20 74 6f 20 63  61 6c 6c 20 74 68 69 73  |ble to call this|
00000cc0  20 66 75 6e 63 74 69 6f  6e 20 66 6f 72 0a 74 68  | function for.th|
00000cd0  65 20 73 61 6d 65 20 77  69 6e 64 6f 77 2f 69 63  |e same window/ic|
00000ce0  6f 6e 20 70 61 69 72 20  6d 6f 72 65 20 74 68 61  |on pair more tha|
00000cf0  6e 20 6f 6e 63 65 20 67  69 76 69 6e 67 0a 64 69  |n once giving.di|
00000d00  66 66 65 72 65 6e 74 20  66 69 6c 65 74 79 70 65  |fferent filetype|
00000d10  73 20 28 61 6e 64 20 66  75 6e 63 74 69 6f 6e 20  |s (and function |
00000d20  6e 61 6d 65 73 20 69 66  20 72 65 71 75 69 72 65  |names if require|
00000d30  64 29 0a 74 6f 20 61 6c  6c 6f 77 20 74 68 65 20  |d).to allow the |
00000d40  68 61 6e 64 6c 69 6e 67  20 6f 66 20 6d 75 6c 74  |handling of mult|
00000d50  69 70 6c 65 20 66 69 6c  65 74 79 70 65 73 2e 0a  |iple filetypes..|
00000d60  0a 55 73 65 72 20 46 4e  20 28 50 52 4f 43 73 68  |.User FN (PROCsh|
00000d70  65 6c 6c 5f 41 74 74 61  63 68 44 61 74 61 4c 6f  |ell_AttachDataLo|
00000d80  61 64 29 0a 50 61 72 61  6d 73 20 3d 3e 0a 20 20  |ad).Params =>.  |
00000d90  20 20 20 20 20 20 20 69  6e 74 20 61 64 64 72 65  |       int addre|
00000da0  73 73 20 66 69 6c 65 20  68 61 73 20 62 65 65 6e  |ss file has been|
00000db0  20 6c 6f 61 64 65 64 20  61 74 0a 20 20 20 20 20  | loaded at.     |
00000dc0  20 20 20 20 69 6e 74 20  66 69 6c 65 74 79 70 65  |    int filetype|
00000dd0  20 6f 66 20 66 69 6c 65  0a 20 20 20 20 20 20 20  | of file.       |
00000de0  20 20 73 74 72 20 66 75  6c 6c 20 70 61 74 68 6e  |  str full pathn|
00000df0  61 6d 65 20 6f 66 20 66  69 6c 65 0a 20 20 20 20  |ame of file.    |
00000e00  20 20 20 20 20 69 6e 74  20 66 69 6c 65 20 73 69  |     int file si|
00000e10  7a 65 20 28 66 72 6f 6d  20 64 61 74 61 6c 6f 61  |ze (from dataloa|
00000e20  64 20 6d 65 73 73 61 67  65 29 0a 0a 4e 6f 74 65  |d message)..Note|
00000e30  20 74 68 61 74 20 69 66  20 74 68 65 20 65 76 65  | that if the eve|
00000e40  6e 74 20 77 61 73 20 61  74 74 61 63 68 65 64 20  |nt was attached |
00000e50  77 69 74 68 20 74 68 65  0a 6e 6f 20 6c 6f 61 64  |with the.no load|
00000e60  20 66 6c 61 67 20 73 65  74 20 74 6f 20 54 52 55  | flag set to TRU|
00000e70  45 20 74 68 65 20 61 64  64 72 65 73 73 20 77 69  |E the address wi|
00000e80  6c 6c 0a 62 65 20 2d 31  20 61 6e 64 20 74 68 65  |ll.be -1 and the|
00000e90  20 75 73 65 72 20 61 70  70 6c 69 63 61 74 69 6f  | user applicatio|
00000ea0  6e 20 69 73 20 65 78 70  65 63 74 65 64 20 74 6f  |n is expected to|
00000eb0  0a 61 63 74 75 61 6c 6c  79 20 6c 6f 61 64 20 74  |.actually load t|
00000ec0  68 65 20 66 69 6c 65 2e  0a 0a 44 61 74 61 4c 6f  |he file...DataLo|
00000ed0  61 64 20 27 4e 6f 20 4c  6f 61 64 27 20 66 6c 61  |ad 'No Load' fla|
00000ee0  67 0a 46 41 4c 53 45 20  3d 20 64 61 74 61 20 66  |g.FALSE = data f|
00000ef0  69 6c 65 20 69 73 20 6c  6f 61 64 65 64 20 69 6e  |ile is loaded in|
00000f00  20 61 20 68 65 61 70 20  62 6c 6f 63 6b 20 61 6e  | a heap block an|
00000f10  64 0a 20 20 20 20 20 20  20 20 74 68 65 20 6e 61  |d.        the na|
00000f20  6d 65 20 61 6e 64 20 61  64 64 72 65 73 73 20 69  |me and address i|
00000f30  73 20 72 65 74 75 72 6e  65 64 20 74 6f 20 74 68  |s returned to th|
00000f40  65 0a 20 20 20 20 20 20  20 20 75 73 65 72 20 61  |e.        user a|
00000f50  70 70 6c 69 63 61 74 69  6f 6e 2e 0a 0a 54 52 55  |pplication...TRU|
00000f60  45 20 20 3d 20 6f 6e 6c  79 20 74 68 65 20 64 61  |E  = only the da|
00000f70  74 61 20 66 69 6c 65 20  6e 61 6d 65 20 61 6e 64  |ta file name and|
00000f80  20 74 79 70 65 20 69 73  0a 20 20 20 20 20 20 20  | type is.       |
00000f90  20 72 65 74 75 72 6e 65  64 20 74 6f 20 74 68 65  | returned to the|
00000fa0  20 75 73 65 72 20 61 70  70 6c 69 63 61 74 69 6f  | user applicatio|
00000fb0  6e 2e 0a 0a 54 68 69 73  20 66 6c 61 67 20 69 73  |n...This flag is|
00000fc0  20 70 72 6f 76 69 64 65  64 20 66 6f 72 20 6d 61  | provided for ma|
00000fd0  78 69 6d 75 6d 20 66 6c  65 78 69 62 69 6c 69 74  |ximum flexibilit|
00000fe0  79 0a 77 68 65 6e 20 64  65 61 6c 69 6e 67 20 77  |y.when dealing w|
00000ff0  69 74 68 20 64 72 61 67  20 6c 6f 61 64 73 2e 20  |ith drag loads. |
00001000  57 68 65 6e 20 79 6f 75  20 61 72 65 0a 63 6f 6e  |When you are.con|
00001010  76 65 72 74 69 6e 67 20  61 6e 20 65 78 69 73 74  |verting an exist|
00001020  69 6e 67 20 70 72 6f 67  72 61 6d 20 74 6f 20 72  |ing program to r|
00001030  75 6e 20 75 6e 64 65 72  20 74 68 65 0a 45 76 6e  |un under the.Evn|
00001040  74 53 68 65 6c 6c 20 73  79 73 74 65 6d 20 79 6f  |tShell system yo|
00001050  75 20 6d 61 79 20 61 6c  72 65 61 64 79 20 68 61  |u may already ha|
00001060  76 65 20 61 20 77 6f 72  6b 69 6e 67 0a 6c 6f 61  |ve a working.loa|
00001070  64 20 72 6f 75 74 69 6e  65 2e 20 49 6e 20 74 68  |d routine. In th|
00001080  69 73 20 63 61 73 65 20  73 65 74 20 74 68 65 20  |is case set the |
00001090  66 6c 61 67 20 74 6f 20  54 52 55 45 0a 61 6e 64  |flag to TRUE.and|
000010a0  20 77 68 65 6e 20 61 20  64 72 61 67 20 6c 6f 61  | when a drag loa|
000010b0  64 20 6f 63 63 75 72 73  20 79 6f 75 72 20 61 70  |d occurs your ap|
000010c0  70 6c 69 63 61 74 69 6f  6e 20 77 69 6c 6c 0a 62  |plication will.b|
000010d0  65 20 74 6f 6c 64 20 74  68 65 20 66 69 6c 65 6e  |e told the filen|
000010e0  61 6d 65 2c 20 77 68 69  63 68 20 6d 61 79 20 74  |ame, which may t|
000010f0  68 65 6e 20 62 65 20 6c  6f 61 64 65 64 0a 61 6e  |hen be loaded.an|
00001100  64 20 70 72 6f 63 65 73  73 65 64 20 61 73 20 72  |d processed as r|
00001110  65 71 75 69 72 65 64 2e  0a 0a 57 68 65 6e 20 74  |equired...When t|
00001120  68 69 73 20 66 6c 61 67  20 69 73 20 46 41 4c 53  |his flag is FALS|
00001130  45 20 74 68 65 20 6c 69  62 72 61 72 79 20 72 6f  |E the library ro|
00001140  75 74 69 6e 65 73 20 77  69 6c 6c 0a 72 65 73 65  |utines will.rese|
00001150  72 76 65 20 61 20 6d 65  6d 6f 72 79 20 62 6c 6f  |rve a memory blo|
00001160  63 6b 20 66 6f 72 20 74  68 65 20 66 69 6c 65 20  |ck for the file |
00001170  61 6e 64 20 6c 6f 61 64  20 69 74 0a 61 75 74 6f  |and load it.auto|
00001180  6d 61 74 69 63 61 6c 6c  79 2e 0a 0a 46 6f 72 20  |matically...For |
00001190  74 68 65 20 74 65 63 68  6e 69 63 61 6c 20 6f 66  |the technical of|
000011a0  20 79 6f 75 20 6f 75 74  20 74 68 65 72 65 20 74  | you out there t|
000011b0  68 65 20 6c 69 62 72 61  72 79 0a 73 74 6f 72 65  |he library.store|
000011c0  73 20 74 68 65 20 73 74  61 74 75 73 20 6f 66 20  |s the status of |
000011d0  74 68 65 20 6e 6f 20 6c  6f 61 64 20 66 6c 61 67  |the no load flag|
000011e0  20 69 6e 20 74 68 65 20  74 6f 70 0a 62 69 74 20  | in the top.bit |
000011f0  6f 66 20 74 68 65 20 66  69 6c 65 74 79 70 65 20  |of the filetype |
00001200  6e 75 6d 62 65 72 2e 20  54 68 69 73 20 77 69 6c  |number. This wil|
00001210  6c 20 65 6e 64 20 69 6e  20 74 65 61 72 73 0a 77  |l end in tears.w|
00001220  68 65 6e 20 52 49 53 43  2d 4f 53 20 34 20 63 6f  |hen RISC-OS 4 co|
00001230  6d 65 73 20 6f 75 74 2e  2e 2e 0a 0a 2d 2d 2d 2d  |mes out.....----|
00001240  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001270  2d 2d 2d 2d 0a 0a 50 52  4f 43 73 68 65 6c 6c 5f  |----..PROCshell_|
00001280  41 74 74 61 63 68 44 61  74 61 53 61 76 65 28 29  |AttachDataSave()|
00001290  0a 41 74 74 61 63 68 65  73 20 61 20 64 61 74 61  |.Attaches a data|
000012a0  73 61 76 65 20 68 61 6e  64 6c 65 72 20 74 6f 20  |save handler to |
000012b0  61 20 77 69 6e 64 6f 77  2f 69 63 6f 6e 20 70 61  |a window/icon pa|
000012c0  69 72 2e 20 41 0a 74 79  70 69 63 61 6c 20 75 73  |ir. A.typical us|
000012d0  65 20 77 6f 75 6c 64 20  62 65 20 69 6e 20 61 20  |e would be in a |
000012e0  27 53 61 76 65 20 41 73  27 20 64 69 61 6c 6f 67  |'Save As' dialog|
000012f0  20 62 6f 78 2c 20 74 68  65 0a 69 63 6f 6e 20 68  | box, the.icon h|
00001300  61 6e 64 6c 65 20 62 65  69 6e 67 20 74 68 61 74  |andle being that|
00001310  20 6f 66 20 74 68 65 20  27 46 69 6c 65 20 54 79  | of the 'File Ty|
00001320  70 65 27 20 69 63 6f 6e  2e 0a 20 0a 50 61 72 61  |pe' icon.. .Para|
00001330  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 69  |ms =>.         i|
00001340  6e 74 20 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |nt window handle|
00001350  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 69 63  |.         int ic|
00001360  6f 6e 20 68 61 6e 64 6c  65 0a 20 20 20 20 20 20  |on handle.      |
00001370  20 20 20 69 6e 74 20 61  64 64 72 65 73 73 20 6f  |   int address o|
00001380  66 20 68 65 61 70 62 6c  6f 63 6b 20 68 6f 6c 64  |f heapblock hold|
00001390  69 6e 67 20 64 61 74 61  20 6f 72 0a 20 20 20 20  |ing data or.    |
000013a0  20 20 20 20 20 20 20 20  20 74 68 65 20 65 73 74  |         the est|
000013b0  69 6d 61 74 65 64 20 66  69 6c 65 20 73 69 7a 65  |imated file size|
000013c0  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 66 69  |.         int fi|
000013d0  6c 65 20 74 79 70 65 20  66 6f 72 20 73 61 76 65  |le type for save|
000013e0  64 20 66 69 6c 65 0a 20  20 20 20 20 20 20 20 20  |d file.         |
000013f0  69 6e 74 20 69 63 6f 6e  20 6e 72 20 6f 66 20 66  |int icon nr of f|
00001400  69 6c 65 6e 61 6d 65 20  69 63 6f 6e 0a 20 20 20  |ilename icon.   |
00001410  20 20 20 20 20 20 73 74  72 20 66 75 6e 63 74 69  |      str functi|
00001420  6f 6e 20 6e 61 6d 65 20  28 6f 70 74 69 6f 6e 61  |on name (optiona|
00001430  6c 20 69 66 20 64 61 74  61 0a 20 20 20 20 20 20  |l if data.      |
00001440  20 20 20 20 20 20 20 69  73 20 68 65 6c 64 20 69  |       is held i|
00001450  6e 20 61 20 68 65 61 70  62 6c 6f 63 6b 29 0a 0a  |n a heapblock)..|
00001460  49 66 20 69 63 6f 6e 20  30 20 69 6e 20 74 68 65  |If icon 0 in the|
00001470  20 77 69 6e 64 6f 77 20  69 73 20 63 6c 69 63 6b  | window is click|
00001480  65 64 20 6f 6e 20 74 68  65 6e 20 61 20 63 68 65  |ed on then a che|
00001490  63 6b 0a 69 73 20 6d 61  64 65 20 74 68 61 74 20  |ck.is made that |
000014a0  74 68 65 20 66 69 6c 65  6e 61 6d 65 20 69 63 6f  |the filename ico|
000014b0  6e 20 63 6f 6e 74 61 69  6e 73 20 61 20 76 61 6c  |n contains a val|
000014c0  69 64 0a 70 61 74 68 20  6e 61 6d 65 2c 20 67 65  |id.path name, ge|
000014d0  6e 65 72 61 74 69 6e 67  20 61 6e 20 65 72 72 6f  |nerating an erro|
000014e0  72 20 69 66 20 69 74 20  64 6f 65 73 20 6e 6f 74  |r if it does not|
000014f0  2e 0a 0a 4e 6f 74 65 20  74 68 61 74 20 74 68 65  |...Note that the|
00001500  20 74 68 69 72 64 20 70  61 72 61 6d 65 74 65 72  | third parameter|
00001510  20 63 61 6e 20 70 6f 69  6e 74 20 74 6f 20 61 20  | can point to a |
00001520  68 65 61 70 0a 62 6c 6f  63 6b 20 63 6f 6e 74 61  |heap.block conta|
00001530  69 6e 69 6e 67 20 74 68  65 20 64 61 74 61 20 74  |ining the data t|
00001540  6f 20 73 61 76 65 20 77  68 69 63 68 20 6d 65 61  |o save which mea|
00001550  6e 73 20 74 68 61 74 0a  74 68 65 20 64 61 74 61  |ns that.the data|
00001560  20 6d 75 73 74 20 65 78  69 73 74 20 69 6e 20 74  | must exist in t|
00001570  68 65 20 62 6c 6f 63 6b  20 28 6f 72 20 61 74 20  |he block (or at |
00001580  6c 65 61 73 74 20 74 68  65 0a 62 6c 6f 63 6b 20  |least the.block |
00001590  6d 75 73 74 20 65 78 69  73 74 20 61 6e 64 20 62  |must exist and b|
000015a0  65 20 74 68 65 20 63 6f  72 72 65 63 74 20 73 69  |e the correct si|
000015b0  7a 65 29 20 62 65 66 6f  72 65 0a 74 68 69 73 20  |ze) before.this |
000015c0  72 6f 75 74 69 6e 65 20  69 73 20 63 61 6c 6c 65  |routine is calle|
000015d0  64 2e 20 49 66 20 74 68  69 73 20 70 61 72 61 6d  |d. If this param|
000015e0  65 74 65 72 20 69 73 20  3e 26 38 30 30 30 0a 69  |eter is >&8000.i|
000015f0  74 20 69 73 20 74 61 6b  65 6e 20 74 6f 20 62 65  |t is taken to be|
00001600  20 61 20 70 6f 69 6e 74  65 72 20 74 6f 20 74 68  | a pointer to th|
00001610  65 20 68 65 61 70 20 62  6c 6f 63 6b 20 2c 20 61  |e heap block , a|
00001620  6e 64 0a 74 68 65 20 6e  61 6d 65 20 6f 66 20 74  |nd.the name of t|
00001630  68 65 20 66 75 6e 63 74  69 6f 6e 20 74 6f 20 70  |he function to p|
00001640  65 72 66 6f 72 6d 20 74  68 65 20 73 61 76 65 20  |erform the save |
00001650  69 73 0a 6f 70 74 69 6f  6e 61 6c 2e 0a 0a 41 6c  |is.optional...Al|
00001660  74 65 72 6e 61 74 69 76  65 6c 79 20 74 68 69 73  |ternatively this|
00001670  20 70 61 72 61 6d 65 74  65 72 20 63 61 6e 20 62  | parameter can b|
00001680  65 20 61 6e 20 65 73 74  69 6d 61 74 65 64 0a 66  |e an estimated.f|
00001690  69 6c 65 20 73 69 7a 65  20 28 69 2e 65 2e 20 3c  |ile size (i.e. <|
000016a0  26 38 30 30 30 29 20 69  6e 20 77 68 69 63 68 20  |&8000) in which |
000016b0  63 61 73 65 20 74 68 65  20 75 73 65 72 0a 66 75  |case the user.fu|
000016c0  6e 63 74 69 6f 6e 20 6d  61 79 20 77 72 69 74 65  |nction may write|
000016d0  20 64 69 72 65 63 74 6c  79 20 69 6e 74 6f 20 74  | directly into t|
000016e0  68 65 20 66 69 6c 65 20  77 68 6f 73 65 0a 6e 61  |he file whose.na|
000016f0  6d 65 20 69 73 20 67 69  76 65 6e 20 61 73 20 61  |me is given as a|
00001700  20 70 61 72 61 6d 65 74  65 72 20 74 6f 20 74 68  | parameter to th|
00001710  65 20 66 75 6e 63 74 69  6f 6e 2e 20 52 41 4d 0a  |e function. RAM.|
00001720  74 72 61 6e 73 66 65 72  20 69 73 20 6e 6f 74 20  |transfer is not |
00001730  70 6f 73 73 69 62 6c 65  20 69 66 20 74 68 69 73  |possible if this|
00001740  20 69 73 20 74 68 65 20  63 61 73 65 2e 0a 0a 55  | is the case...U|
00001750  73 65 72 20 46 4e 20 28  50 52 4f 43 73 68 65 6c  |ser FN (PROCshel|
00001760  6c 5f 41 74 74 61 63 68  44 61 74 61 53 61 76 65  |l_AttachDataSave|
00001770  29 0a 50 61 72 61 6d 73  20 3d 3e 0a 20 20 20 20  |).Params =>.    |
00001780  20 20 20 20 20 73 74 72  20 66 75 6c 6c 20 66 69  |     str full fi|
00001790  6c 65 6e 61 6d 65 20 6f  66 20 66 69 6c 65 0a 0a  |lename of file..|
000017a0  54 68 69 73 20 66 75 6e  63 74 69 6f 6e 20 69 73  |This function is|
000017b0  20 6e 6f 74 20 63 61 6c  6c 65 64 20 69 66 20 74  | not called if t|
000017c0  68 65 20 66 69 6c 65 20  69 73 20 73 74 6f 72 65  |he file is store|
000017d0  64 0a 69 6e 20 61 20 68  65 61 70 20 62 6c 6f 63  |d.in a heap bloc|
000017e0  6b 2e 20 49 6e 20 74 68  69 73 20 63 61 73 65 20  |k. In this case |
000017f0  74 68 65 20 77 68 6f 6c  65 20 63 6f 6e 74 65 6e  |the whole conten|
00001800  74 73 20 6f 66 0a 74 68  65 20 68 65 61 70 20 62  |ts of.the heap b|
00001810  6c 6f 63 6b 20 61 72 65  20 74 72 61 6e 73 66 65  |lock are transfe|
00001820  72 72 65 64 2e 0a 0a 45  73 74 69 6d 61 74 65 64  |rred...Estimated|
00001830  20 46 69 6c 65 20 53 69  7a 65 73 0a 49 74 20 73  | File Sizes.It s|
00001840  68 6f 75 6c 64 20 28 69  66 20 6f 74 68 65 72 20  |hould (if other |
00001850  61 70 70 6c 69 63 61 74  69 6f 6e 73 20 61 72 65  |applications are|
00001860  20 77 72 69 74 74 65 6e  20 74 6f 0a 74 68 65 20  | written to.the |
00001870  41 63 6f 72 6e 20 67 75  69 64 65 6c 69 6e 65 73  |Acorn guidelines|
00001880  21 29 20 6e 6f 74 20 6d  61 74 74 65 72 20 69 66  |!) not matter if|
00001890  20 74 68 69 73 20 65 73  74 69 6d 61 74 65 0a 69  | this estimate.i|
000018a0  73 20 69 6e 61 63 63 75  72 61 74 65 2e 20 48 6f  |s inaccurate. Ho|
000018b0  77 65 76 65 72 2c 20 66  69 6c 65 20 74 72 61 6e  |wever, file tran|
000018c0  73 66 65 72 20 77 69 6c  6c 20 62 65 20 61 0a 6c  |sfer will be a.l|
000018d0  69 74 74 6c 65 20 66 61  73 74 65 72 20 69 66 20  |ittle faster if |
000018e0  69 74 20 69 73 20 61 63  63 75 72 61 74 65 20 61  |it is accurate a|
000018f0  6e 64 20 70 72 6f 62 6c  65 6d 73 20 6d 61 79 0a  |nd problems may.|
00001900  6f 63 63 75 72 20 77 69  74 68 20 62 61 64 6c 79  |occur with badly|
00001910  20 77 72 69 74 74 65 6e  20 61 70 70 6c 69 63 61  | written applica|
00001920  74 69 6f 6e 73 20 69 66  20 69 74 20 69 73 20 6e  |tions if it is n|
00001930  6f 74 2e 0a 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ot...-----------|
00001940  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001960  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 50  |-------------..P|
00001970  52 4f 43 73 68 65 6c 6c  5f 41 74 74 61 63 68 43  |ROCshell_AttachC|
00001980  6c 69 63 6b 53 65 6c 65  63 74 28 29 0a 50 61 72  |lickSelect().Par|
00001990  61 6d 73 20 3d 3e 20 20  20 20 0a 20 20 20 20 20  |ams =>    .     |
000019a0  20 20 20 20 69 6e 74 20  77 69 6e 64 6f 77 20 68  |    int window h|
000019b0  61 6e 64 6c 65 20 20 20  20 20 20 20 0a 20 20 20  |andle       .   |
000019c0  20 20 20 20 20 20 69 6e  74 20 69 63 6f 6e 20 68  |      int icon h|
000019d0  61 6e 64 6c 65 20 0a 20  20 20 20 20 20 20 20 20  |andle .         |
000019e0  73 74 72 20 66 75 6e 63  74 69 6f 6e 20 6e 61 6d  |str function nam|
000019f0  65 0a 0a 55 73 65 72 20  46 4e 20 28 50 52 4f 43  |e..User FN (PROC|
00001a00  73 68 65 6c 6c 5f 41 74  74 61 63 68 43 6c 69 63  |shell_AttachClic|
00001a10  6b 53 65 6c 65 63 74 29  0a 50 61 72 61 6d 73 20  |kSelect).Params |
00001a20  3d 3e 20 0a 20 20 20 20  20 20 20 20 20 69 6e 74  |=> .         int|
00001a30  20 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 20  | window handle. |
00001a40  20 20 20 20 20 20 20 20  69 6e 74 20 69 63 6f 6e  |        int icon|
00001a50  20 68 61 6e 64 6c 65 0a  0a 2d 2d 2d 2d 2d 2d 2d  | handle..-------|
00001a60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001a90  2d 0a 0a 50 52 4f 43 73  68 65 6c 6c 5f 41 74 74  |-..PROCshell_Att|
00001aa0  61 63 68 43 6c 69 63 6b  41 64 6a 75 73 74 28 29  |achClickAdjust()|
00001ab0  0a 50 61 72 61 6d 73 20  3d 3e 20 20 20 20 20 0a  |.Params =>     .|
00001ac0  20 20 20 20 20 20 20 20  20 69 6e 74 20 77 69 6e  |         int win|
00001ad0  64 6f 77 20 68 61 6e 64  6c 65 20 20 20 20 20 20  |dow handle      |
00001ae0  20 20 20 20 20 0a 20 20  20 20 20 20 20 20 20 69  |     .         i|
00001af0  6e 74 20 69 63 6f 6e 20  68 61 6e 64 6c 65 20 20  |nt icon handle  |
00001b00  0a 20 20 20 20 20 20 20  20 20 73 74 72 20 66 75  |.         str fu|
00001b10  6e 63 74 69 6f 6e 20 6e  61 6d 65 0a 0a 55 73 65  |nction name..Use|
00001b20  72 20 46 4e 20 28 50 52  4f 43 73 68 65 6c 6c 5f  |r FN (PROCshell_|
00001b30  41 74 74 61 63 68 43 6c  69 63 6b 41 64 6a 75 73  |AttachClickAdjus|
00001b40  74 29 0a 50 61 72 61 6d  73 20 3d 3e 20 0a 20 20  |t).Params => .  |
00001b50  20 20 20 20 20 20 20 69  6e 74 20 77 69 6e 64 6f  |       int windo|
00001b60  77 20 68 61 6e 64 6c 65  0a 20 20 20 20 20 20 20  |w handle.       |
00001b70  20 20 69 6e 74 20 69 63  6f 6e 20 68 61 6e 64 6c  |  int icon handl|
00001b80  65 0a 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |e..-------------|
00001b90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001bb0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 50 52 4f  |-----------..PRO|
00001bc0  43 73 68 65 6c 6c 5f 41  74 74 61 63 68 55 73 65  |Cshell_AttachUse|
00001bd0  72 52 65 64 72 61 77 28  29 0a 50 61 72 61 6d 73  |rRedraw().Params|
00001be0  20 3d 3e 20 20 20 20 20  20 0a 20 20 20 20 20 20  | =>      .      |
00001bf0  20 20 20 69 6e 74 20 77  69 6e 64 6f 77 20 68 61  |   int window ha|
00001c00  6e 64 6c 65 20 20 20 20  20 20 0a 20 20 20 20 20  |ndle      .     |
00001c10  20 20 20 20 73 74 72 20  66 75 6e 63 74 69 6f 6e  |    str function|
00001c20  20 6e 61 6d 65 0a 0a 41  20 63 68 65 63 6b 20 69  | name..A check i|
00001c30  73 20 6d 61 64 65 20 74  6f 20 65 6e 73 75 72 65  |s made to ensure|
00001c40  20 74 68 61 74 20 74 68  65 20 27 41 75 74 6f 20  | that the 'Auto |
00001c50  72 65 64 72 61 77 27 20  66 6c 61 67 20 6f 66 0a  |redraw' flag of.|
00001c60  74 68 65 20 77 69 6e 64  6f 77 20 69 73 20 6f 66  |the window is of|
00001c70  66 2c 20 61 6e 64 20 74  68 65 20 66 6c 61 67 20  |f, and the flag |
00001c80  69 73 20 63 6c 65 61 72  65 64 20 61 75 74 6f 6d  |is cleared autom|
00001c90  61 74 69 63 61 6c 6c 79  0a 69 66 20 6e 65 63 65  |atically.if nece|
00001ca0  73 73 61 72 79 20 28 69  2e 65 2e 20 79 6f 75 20  |ssary (i.e. you |
00001cb0  64 6f 6e 27 74 20 68 61  76 65 20 74 6f 20 75 73  |don't have to us|
00001cc0  65 20 21 46 6f 72 6d 45  64 20 6f 72 0a 73 69 6d  |e !FormEd or.sim|
00001cd0  69 6c 61 72 20 74 6f 20  73 65 74 20 74 68 65 20  |ilar to set the |
00001ce0  66 6c 61 67 20 63 6f 72  72 65 63 74 6c 79 29 0a  |flag correctly).|
00001cf0  0a 55 73 65 72 20 46 4e  20 28 50 52 4f 43 73 68  |.User FN (PROCsh|
00001d00  65 6c 6c 5f 41 74 74 61  63 68 55 73 65 72 52 65  |ell_AttachUserRe|
00001d10  64 72 61 77 29 0a 50 61  72 61 6d 73 20 3d 3e 20  |draw).Params => |
00001d20  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 61 64  |.         int ad|
00001d30  64 72 65 73 73 20 6f 66  20 62 6c 6f 63 6b 20 72  |dress of block r|
00001d40  65 74 75 72 6e 65 64 20  62 79 20 72 65 64 72 61  |eturned by redra|
00001d50  77 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 72  |w.             r|
00001d60  65 71 75 65 73 74 0a 20  20 20 20 20 20 20 20 20  |equest.         |
00001d70  69 6e 74 20 78 20 6f 72  69 67 69 6e 20 6f 66 20  |int x origin of |
00001d80  77 69 6e 64 6f 77 20 28  73 63 72 65 65 6e 20 63  |window (screen c|
00001d90  6f 6f 72 64 73 29 0a 20  20 20 20 20 20 20 20 20  |oords).         |
00001da0  69 6e 74 20 79 20 6f 72  69 67 69 6e 20 6f 66 20  |int y origin of |
00001db0  77 69 6e 64 6f 77 20 28  73 63 72 65 65 6e 20 63  |window (screen c|
00001dc0  6f 6f 72 64 73 29 0a 20  0a 54 68 65 20 66 75 6e  |oords). .The fun|
00001dd0  63 74 69 6f 6e 20 74 6f  20 63 61 6c 6c 20 77 68  |ction to call wh|
00001de0  65 6e 20 61 20 72 65 64  72 61 77 20 72 65 71 75  |en a redraw requ|
00001df0  65 73 74 0a 69 73 20 6d  61 64 65 2e 0a 0a 2d 2d  |est.is made...--|
00001e00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001e30  2d 2d 2d 2d 2d 2d 0a 0a  50 52 4f 43 73 68 65 6c  |------..PROCshel|
00001e40  6c 5f 41 74 74 61 63 68  44 72 61 67 28 29 0a 50  |l_AttachDrag().P|
00001e50  61 72 61 6d 73 20 3d 3e  20 20 20 20 20 20 20 20  |arams =>        |
00001e60  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 77 69  |.         int wi|
00001e70  6e 64 6f 77 20 68 61 6e  64 6c 65 20 20 20 20 20  |ndow handle     |
00001e80  20 20 20 0a 20 20 20 20  20 20 20 20 20 69 6e 74  |   .         int|
00001e90  20 69 63 6f 6e 20 68 61  6e 64 6c 65 20 20 20 20  | icon handle    |
00001ea0  20 0a 20 20 20 20 20 20  20 20 20 73 74 72 20 66  | .         str f|
00001eb0  75 6e 63 74 69 6f 6e 20  6e 61 6d 65 0a 0a 0a 55  |unction name...U|
00001ec0  73 65 72 20 46 4e 20 28  46 4e 73 68 65 6c 6c 5f  |ser FN (FNshell_|
00001ed0  41 74 74 61 63 68 44 72  61 67 29 0a 50 61 72 61  |AttachDrag).Para|
00001ee0  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 69  |ms =>.         i|
00001ef0  6e 74 20 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |nt window handle|
00001f00  20 6f 76 65 72 20 77 68  69 63 68 20 64 72 61 67  | over which drag|
00001f10  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 73 74  |.             st|
00001f20  61 72 74 65 64 0a 20 20  20 20 20 20 20 20 20 69  |arted.         i|
00001f30  6e 74 20 69 63 6f 6e 20  68 61 6e 64 6c 65 20 6f  |nt icon handle o|
00001f40  76 65 72 20 77 68 69 63  68 20 64 72 61 67 20 77  |ver which drag w|
00001f50  61 73 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |as.             |
00001f60  73 74 61 72 74 65 64 20  28 2d 31 20 66 6f 72 20  |started (-1 for |
00001f70  6e 6f 20 69 63 6f 6e 29  0a 20 0a 2d 2d 2d 2d 2d  |no icon). .-----|
00001f80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001fb0  2d 2d 2d 0a 0a 50 52 4f  43 73 68 65 6c 6c 5f 41  |---..PROCshell_A|
00001fc0  74 74 61 63 68 48 65 6c  70 54 61 67 28 29 0a 50  |ttachHelpTag().P|
00001fd0  61 72 61 6d 73 20 3d 3e  20 20 20 20 20 20 20 20  |arams =>        |
00001fe0  20 0a 20 20 20 20 20 20  20 20 20 69 6e 74 20 77  | .         int w|
00001ff0  69 6e 64 6f 77 20 68 61  6e 64 6c 65 20 20 20 20  |indow handle    |
00002000  20 20 20 20 20 0a 20 20  20 20 20 20 20 20 20 69  |     .         i|
00002010  6e 74 20 69 63 6f 6e 20  68 61 6e 64 6c 65 20 20  |nt icon handle  |
00002020  20 20 20 20 0a 20 20 20  20 20 20 20 20 20 73 74  |    .         st|
00002030  72 20 3c 6d 65 73 73 61  67 65 20 74 61 67 3d 3e  |r <message tag=>|
00002040  4d 65 73 73 61 67 65 54  61 67 3e 0a 0a 4e 6f 74  |MessageTag>..Not|
00002050  65 20 74 68 61 74 20 61  6e 79 20 6d 65 73 73 61  |e that any messa|
00002060  67 65 20 74 61 67 73 20  66 6f 75 6e 64 20 69 6e  |ge tags found in|
00002070  20 69 63 6f 6e 0a 76 61  6c 69 64 61 74 69 6f 6e  | icon.validation|
00002080  20 73 74 72 69 6e 67 73  20 6f 76 65 72 72 69 64  | strings overrid|
00002090  65 20 74 61 67 73 20 73  65 74 20 75 70 20 62 79  |e tags set up by|
000020a0  0a 74 68 69 73 20 72 6f  75 74 69 6e 65 2e 0a 0a  |.this routine...|
000020b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000020e0  2d 2d 2d 2d 2d 2d 2d 2d  0a 0a 50 52 4f 43 57 69  |--------..PROCWi|
000020f0  6d 70 43 6c 6f 73 65 44  6f 77 6e 0a 50 61 72 61  |mpCloseDown.Para|
00002100  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 4e  |ms =>.         N|
00002110  6f 6e 65 0a 0a 4e 6f 74  20 75 73 65 64 20 69 6e  |one..Not used in|
00002120  20 45 76 6e 74 53 68 65  6c 6c 20 6c 69 62 72 61  | EvntShell libra|
00002130  72 79 20 2d 20 75 73 65  20 3c 50 52 4f 43 73 68  |ry - use <PROCsh|
00002140  65 6c 6c 5f 57 69 6d 70  43 6c 6f 73 65 44 6f 77  |ell_WimpCloseDow|
00002150  6e 5f 49 3e 20 69 6e 73  74 65 61 64 2e 0a 0a 2d  |n_I> instead...-|
00002160  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002190  2d 2d 2d 2d 2d 2d 2d 0a  0a 50 52 4f 43 73 68 65  |-------..PROCshe|
000021a0  6c 6c 5f 57 69 6d 70 43  6c 6f 73 65 44 6f 77 6e  |ll_WimpCloseDown|
000021b0  5f 49 0a 50 61 72 61 6d  73 20 3d 3e 20 0a 20 20  |_I.Params => .  |
000021c0  20 20 20 20 20 20 20 4e  6f 6e 65 0a 0a 43 61 6c  |       None..Cal|
000021d0  6c 65 64 20 77 68 65 6e  20 74 68 65 20 61 70 70  |led when the app|
000021e0  6c 69 63 61 74 69 6f 6e  20 73 68 75 74 73 20 64  |lication shuts d|
000021f0  6f 77 6e 20 28 74 68 65  20 6c 69 62 72 61 72 79  |own (the library|
00002200  20 63 61 6c 6c 73 0a 74  68 69 73 20 61 75 74 6f  | calls.this auto|
00002210  6d 61 74 69 63 61 6c 6c  79 29 0a 0a 2d 2d 2d 2d  |matically)..----|
00002220  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002250  2d 2d 2d 2d 0a 0a 50 52  4f 43 73 68 65 6c 6c 5f  |----..PROCshell_|
00002260  41 74 74 61 63 68 42 75  6d 70 48 61 6e 64 6c 65  |AttachBumpHandle|
00002270  72 28 29 0a 50 61 72 61  6d 73 20 3d 3e 20 20 20  |r().Params =>   |
00002280  20 20 0a 20 20 20 20 20  20 20 20 20 69 6e 74 20  |  .         int |
00002290  20 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 20  | window handle. |
000022a0  20 20 20 20 20 20 20 20  69 6e 74 20 20 69 63 6f  |        int  ico|
000022b0  6e 20 68 61 6e 64 6c 65  20 28 64 69 73 70 6c 61  |n handle (displa|
000022c0  79 20 76 61 6c 75 65 29  0a 20 20 20 20 20 20 20  |y value).       |
000022d0  20 20 69 6e 74 20 20 69  63 6f 6e 20 68 61 6e 64  |  int  icon hand|
000022e0  6c 65 20 28 69 6e 63 72  65 6d 65 6e 74 20 76 61  |le (increment va|
000022f0  6c 75 65 29 0a 20 20 20  20 20 20 20 20 20 69 6e  |lue).         in|
00002300  74 20 20 69 63 6f 6e 20  68 61 6e 64 6c 65 20 28  |t  icon handle (|
00002310  64 65 63 72 65 6d 65 6e  74 20 76 61 6c 75 65 29  |decrement value)|
00002320  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 20 6c  |.         int  l|
00002330  6f 77 65 72 20 6c 69 6d  69 74 0a 20 20 20 20 20  |ower limit.     |
00002340  20 20 20 20 69 6e 74 20  20 75 70 70 65 72 20 6c  |    int  upper l|
00002350  69 6d 69 74 0a 20 20 20  20 20 20 20 20 20 69 6e  |imit.         in|
00002360  74 20 20 73 74 65 70 0a  20 20 20 20 20 20 20 20  |t  step.        |
00002370  20 62 6f 6f 6c 20 77 72  61 70 20 66 6c 61 67 0a  | bool wrap flag.|
00002380  20 20 20 20 20 20 20 20  20 73 74 72 20 20 66 75  |         str  fu|
00002390  6e 63 74 69 6f 6e 20 6e  61 6d 65 20 31 20 28 63  |nction name 1 (c|
000023a0  61 6e 20 62 65 20 22 22  29 0a 20 20 20 20 20 20  |an be "").      |
000023b0  20 20 20 73 74 72 20 20  66 75 6e 63 74 69 6f 6e  |   str  function|
000023c0  20 6e 61 6d 65 20 32 20  28 63 61 6e 20 62 65 20  | name 2 (can be |
000023d0  22 22 29 0a 0a 42 75 6d  70 20 69 63 6f 6e 73 20  |"")..Bump icons |
000023e0  61 72 65 20 74 68 65 20  61 72 72 6f 77 73 20 74  |are the arrows t|
000023f0  68 61 74 20 61 6c 6c 6f  77 20 79 6f 75 20 74 6f  |hat allow you to|
00002400  20 61 6c 74 65 72 20 74  68 65 0a 76 61 6c 75 65  | alter the.value|
00002410  20 64 69 73 70 6c 61 79  65 64 20 69 6e 20 61 6e  | displayed in an|
00002420  20 69 63 6f 6e 20 28 75  73 75 61 6c 6c 79 20 62  | icon (usually b|
00002430  75 74 20 6e 6f 74 20 6e  65 63 65 73 73 61 72 69  |ut not necessari|
00002440  6c 79 0a 61 20 77 72 69  74 61 62 6c 65 20 6f 6e  |ly.a writable on|
00002450  65 29 0a 0a 55 73 65 72  20 46 4e 31 20 28 50 52  |e)..User FN1 (PR|
00002460  4f 43 73 68 65 6c 6c 5f  41 74 74 61 63 68 42 75  |OCshell_AttachBu|
00002470  6d 70 48 61 6e 64 6c 65  72 29 0a 50 61 72 61 6d  |mpHandler).Param|
00002480  73 20 3d 3e 20 0a 20 20  20 20 20 20 20 20 20 69  |s => .         i|
00002490  6e 74 20 76 61 6c 75 65  0a 0a 20 20 20 20 20 20  |nt value..      |
000024a0  20 3c 3d 0a 20 20 20 20  20 20 20 20 20 73 74 72  | <=.         str|
000024b0  20 63 6f 6e 76 65 72 74  65 64 20 76 61 6c 75 65  | converted value|
000024c0  0a 0a 54 68 69 73 20 66  75 6e 63 74 69 6f 6e 20  |..This function |
000024d0  69 73 20 63 61 6c 6c 65  64 20 62 65 66 6f 72 65  |is called before|
000024e0  20 74 68 65 20 6e 65 77  20 76 61 6c 75 65 0a 69  | the new value.i|
000024f0  73 20 70 6c 61 63 65 64  20 69 6e 20 74 68 65 20  |s placed in the |
00002500  64 69 73 70 6c 61 79 20  69 63 6f 6e 2e 20 0a 0a  |display icon. ..|
00002510  41 6e 20 65 78 61 6d 70  6c 65 20 77 6f 75 6c 64  |An example would|
00002520  20 62 65 20 63 6f 6e 76  65 72 74 69 6e 67 20 61  | be converting a|
00002530  6e 20 69 6e 74 65 67 65  72 0a 76 61 6c 75 65 20  |n integer.value |
00002540  74 6f 20 74 68 65 20 66  6f 72 6d 61 74 20 30 68  |to the format 0h|
00002550  30 30 20 28 69 2e 65 20  68 6f 75 72 73 20 61 6e  |00 (i.e hours an|
00002560  64 20 6d 69 6e 73 29 2e  0a 0a 44 45 46 20 46 4e  |d mins)...DEF FN|
00002570  5f 64 69 73 5f 66 6e 28  76 61 6c 25 29 0a 3d 53  |_dis_fn(val%).=S|
00002580  54 52 24 28 76 61 6c 25  44 49 56 36 30 29 2b 22  |TR$(val%DIV60)+"|
00002590  68 22 2b 52 49 47 48 54  24 28 22 30 30 22 2b 53  |h"+RIGHT$("00"+S|
000025a0  54 52 24 28 76 61 6c 25  4d 4f 44 36 30 29 2c 32  |TR$(val%MOD60),2|
000025b0  29 0a 0a 53 65 65 20 74  68 65 20 21 56 42 61 73  |)..See the !VBas|
000025c0  65 32 20 64 65 6d 6f 20  61 70 70 2e 0a 0a 55 73  |e2 demo app...Us|
000025d0  65 72 20 46 4e 32 20 28  50 52 4f 43 73 68 65 6c  |er FN2 (PROCshel|
000025e0  6c 5f 41 74 74 61 63 68  42 75 6d 70 48 61 6e 64  |l_AttachBumpHand|
000025f0  6c 65 72 29 0a 50 61 72  61 6d 73 20 3d 3e 20 0a  |ler).Params => .|
00002600  20 20 20 20 20 20 20 20  20 73 74 72 20 76 61 6c  |         str val|
00002610  75 65 20 74 6f 20 64 65  63 6f 64 65 0a 0a 20 20  |ue to decode..  |
00002620  20 20 20 20 20 3c 3d 0a  20 20 20 20 20 20 20 20  |     <=.        |
00002630  20 69 6e 74 20 63 6f 6e  76 65 72 74 65 64 20 76  | int converted v|
00002640  61 6c 75 65 0a 0a 54 68  69 73 20 66 75 6e 63 74  |alue..This funct|
00002650  69 6f 6e 20 69 73 20 63  61 6c 6c 65 64 20 62 65  |ion is called be|
00002660  66 6f 72 65 20 74 68 65  20 6e 65 77 20 76 61 6c  |fore the new val|
00002670  75 65 0a 69 73 20 70 6c  61 63 65 64 20 69 6e 20  |ue.is placed in |
00002680  74 68 65 20 64 69 73 70  6c 61 79 20 69 63 6f 6e  |the display icon|
00002690  2e 0a 0a 41 6e 20 65 78  61 6d 70 6c 65 20 77 6f  |...An example wo|
000026a0  75 6c 64 20 62 65 20 63  6f 6e 76 65 72 74 69 6e  |uld be convertin|
000026b0  67 20 61 20 73 74 72 69  6e 67 20 22 30 68 30 30  |g a string "0h00|
000026c0  22 0a 62 61 63 6b 20 74  6f 20 61 6e 20 69 6e 74  |".back to an int|
000026d0  65 67 65 72 20 76 61 6c  75 65 2e 0a 0a 44 45 46  |eger value...DEF|
000026e0  20 46 4e 5f 64 65 63 6f  64 65 5f 64 69 73 28 76  | FN_decode_dis(v|
000026f0  61 6c 24 29 0a 3d 56 41  4c 28 76 61 6c 24 29 2a  |al$).=VAL(val$)*|
00002700  36 30 2b 56 41 4c 28 52  49 47 48 54 24 28 76 61  |60+VAL(RIGHT$(va|
00002710  6c 24 2c 32 29 29 0a 0a  53 65 65 20 74 68 65 20  |l$,2))..See the |
00002720  21 56 42 61 73 65 32 20  64 65 6d 6f 20 61 70 70  |!VBase2 demo app|
00002730  2e 0a 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...-------------|
00002740  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002760  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 50 52 4f  |-----------..PRO|
00002770  43 73 68 65 6c 6c 5f 41  74 74 61 63 68 48 6f 74  |Cshell_AttachHot|
00002780  4b 65 79 28 29 0a 50 61  72 61 6d 73 20 3d 3e 0a  |Key().Params =>.|
00002790  20 20 20 20 20 20 20 20  20 73 74 72 20 20 6b 65  |         str  ke|
000027a0  79 0a 20 20 20 20 20 20  20 20 20 62 6f 6f 6c 20  |y.         bool |
000027b0  73 68 69 66 74 20 66 6c  61 67 0a 20 20 20 20 20  |shift flag.     |
000027c0  20 20 20 20 62 6f 6f 6c  20 63 74 72 6c 20 20 66  |    bool ctrl  f|
000027d0  6c 61 67 0a 20 20 20 20  20 20 20 20 20 62 6f 6f  |lag.         boo|
000027e0  6c 20 61 6c 74 20 20 20  66 6c 61 67 0a 20 20 20  |l alt   flag.   |
000027f0  20 20 20 20 20 20 73 74  72 20 20 77 69 6e 64 6f  |      str  windo|
00002800  77 20 69 64 65 6e 74 69  66 69 65 72 0a 20 20 20  |w identifier.   |
00002810  20 20 20 20 20 20 69 6e  74 20 20 77 69 6e 64 6f  |      int  windo|
00002820  77 20 68 61 6e 64 6c 65  0a 20 20 20 20 20 20 20  |w handle.       |
00002830  20 20 73 74 72 20 20 66  75 6e 63 74 69 6f 6e 20  |  str  function |
00002840  6e 61 6d 65 0a 20 20 20  20 20 20 20 20 20 73 74  |name.         st|
00002850  72 20 20 66 75 6e 63 74  69 6f 6e 20 6e 61 6d 65  |r  function name|
00002860  0a 0a 53 65 74 73 20 75  70 20 61 20 27 68 6f 74  |..Sets up a 'hot|
00002870  6b 65 79 27 20 65 76 65  6e 74 2e 20 46 75 6e 63  |key' event. Func|
00002880  74 69 6f 6e 20 6b 65 79  73 20 46 30 2d 46 31 31  |tion keys F0-F11|
00002890  0a 28 6e 6f 74 65 20 4e  4f 54 20 46 31 32 20 61  |.(note NOT F12 a|
000028a0  73 20 74 68 65 20 74 61  73 6b 20 6d 61 6e 61 67  |s the task manag|
000028b0  65 72 20 75 73 65 73 20  69 74 20 75 6e 64 65 72  |er uses it under|
000028c0  0a 52 49 53 43 2d 4f 53  20 33 29 20 61 72 65 20  |.RISC-OS 3) are |
000028d0  73 75 70 70 6f 72 74 65  64 2e 0a 0a 55 73 65 72  |supported...User|
000028e0  20 46 4e 20 28 50 52 4f  43 73 68 65 6c 6c 5f 41  | FN (PROCshell_A|
000028f0  74 74 61 63 68 48 6f 74  4b 65 79 29 0a 50 61 72  |ttachHotKey).Par|
00002900  61 6d 73 20 3d 3e 20 0a  20 20 20 20 20 20 20 20  |ams => .        |
00002910  20 69 6e 74 20 77 69 6e  64 6f 77 20 68 61 6e 64  | int window hand|
00002920  6c 65 0a 20 0a 54 68 65  20 66 75 6e 63 74 69 6f  |le. .The functio|
00002930  6e 20 74 6f 20 63 61 6c  6c 20 62 65 66 6f 72 65  |n to call before|
00002940  20 6f 70 65 6e 69 6e 67  20 74 68 65 20 77 69 6e  | opening the win|
00002950  64 6f 77 2e 0a 41 20 66  75 6e 63 74 69 6f 6e 20  |dow..A function |
00002960  6e 61 6d 65 20 6f 66 20  22 22 20 6d 61 79 20 62  |name of "" may b|
00002970  65 20 75 73 65 64 20 69  66 20 79 6f 75 20 64 6f  |e used if you do|
00002980  6e 27 74 0a 6e 65 65 64  20 74 6f 20 63 61 6c 6c  |n't.need to call|
00002990  20 61 20 66 75 6e 63 74  69 6f 6e 2e 20 54 68 69  | a function. Thi|
000029a0  73 20 77 6f 75 6c 64 20  6e 6f 72 6d 61 6c 6c 79  |s would normally|
000029b0  20 62 65 0a 75 73 65 64  20 74 6f 20 66 69 6c 6c  | be.used to fill|
000029c0  20 69 6e 20 69 63 6f 6e  20 66 69 65 6c 64 73 20  | in icon fields |
000029d0  61 6e 64 20 73 65 74 20  74 68 65 20 73 74 61 74  |and set the stat|
000029e0  65 0a 6f 66 20 72 61 64  69 6f 20 62 75 74 74 6f  |e.of radio butto|
000029f0  6e 73 0a 0a 55 73 65 72  20 46 4e 20 28 50 52 4f  |ns..User FN (PRO|
00002a00  43 73 68 65 6c 6c 5f 41  74 74 61 63 68 48 6f 74  |Cshell_AttachHot|
00002a10  4b 65 79 29 0a 50 61 72  61 6d 73 20 3d 3e 20 0a  |Key).Params => .|
00002a20  20 20 20 20 20 20 20 20  20 69 6e 74 20 77 69 6e  |         int win|
00002a30  64 6f 77 20 68 61 6e 64  6c 65 0a 20 0a 54 68 65  |dow handle. .The|
00002a40  20 66 75 6e 63 74 69 6f  6e 20 74 6f 20 63 61 6c  | function to cal|
00002a50  6c 20 61 66 74 65 72 20  6f 70 65 6e 69 6e 67 20  |l after opening |
00002a60  74 68 65 20 77 69 6e 64  6f 77 2e 0a 41 20 66 75  |the window..A fu|
00002a70  6e 63 74 69 6f 6e 20 6e  61 6d 65 20 6f 66 20 22  |nction name of "|
00002a80  22 20 6d 61 79 20 62 65  20 75 73 65 64 20 69 66  |" may be used if|
00002a90  20 79 6f 75 20 64 6f 6e  27 74 0a 6e 65 65 64 20  | you don't.need |
00002aa0  74 6f 20 63 61 6c 6c 20  61 20 66 75 6e 63 74 69  |to call a functi|
00002ab0  6f 6e 2e 4b 65 79 20 28  50 52 4f 43 73 68 65 6c  |on.Key (PROCshel|
00002ac0  6c 5f 41 74 74 61 63 68  48 6f 74 4b 65 79 29 0a  |l_AttachHotKey).|
00002ad0  54 68 65 20 6b 65 79 20  73 74 72 69 6e 67 20 6e  |The key string n|
00002ae0  6f 72 6d 61 6c 6c 79 20  63 6f 6e 73 69 73 74 73  |ormally consists|
00002af0  20 6f 66 20 6f 6e 65 20  41 53 43 49 49 0a 63 68  | of one ASCII.ch|
00002b00  61 72 61 63 74 65 72 20  69 2e 65 2e 20 22 52 22  |aracter i.e. "R"|
00002b10  2e 20 57 68 65 6e 20 74  68 65 20 63 74 72 6c 20  |. When the ctrl |
00002b20  66 6c 61 67 20 69 73 20  73 65 74 0a 74 68 69 73  |flag is set.this|
00002b30  20 77 6f 75 6c 64 20 63  61 75 73 65 20 74 68 65  | would cause the|
00002b40  20 61 63 74 69 6f 6e 73  20 74 6f 20 62 65 20 63  | actions to be c|
00002b50  61 72 72 69 65 64 20 6f  75 74 0a 77 68 65 6e 20  |arried out.when |
00002b60  43 54 52 4c 2d 52 20 69  73 20 70 72 65 73 73 65  |CTRL-R is presse|
00002b70  64 2e 0a 0a 54 68 65 20  73 74 72 69 6e 67 20 6d  |d...The string m|
00002b80  61 79 20 61 6c 73 6f 20  63 6f 6e 74 61 69 6e 20  |ay also contain |
00002b90  22 46 31 22 20 74 6f 20  22 46 31 31 22 20 74 6f  |"F1" to "F11" to|
00002ba0  0a 61 6c 6c 6f 77 20 66  75 6e 63 74 69 6f 6e 20  |.allow function |
00002bb0  6b 65 79 73 20 74 6f 20  62 65 20 75 73 65 64 2e  |keys to be used.|
00002bc0  20 4e 6f 20 63 68 65 63  6b 69 6e 67 20 69 73 0a  | No checking is.|
00002bd0  70 65 72 66 6f 72 6d 65  64 20 6f 6e 20 74 68 65  |performed on the|
00002be0  20 73 74 72 69 6e 67 2e  57 69 6e 64 6f 77 20 28  | string.Window (|
00002bf0  50 52 4f 43 73 68 65 6c  6c 5f 41 74 74 61 63 68  |PROCshell_Attach|
00002c00  48 6f 74 4b 65 79 29 0a  54 68 65 20 77 69 6e 64  |HotKey).The wind|
00002c10  6f 77 20 69 64 65 6e 74  69 66 69 65 72 20 73 70  |ow identifier sp|
00002c20  65 63 69 66 69 65 73 20  74 68 65 20 6e 61 6d 65  |ecifies the name|
00002c30  0a 6f 66 20 74 68 65 20  77 69 6e 64 6f 77 20 79  |.of the window y|
00002c40  6f 75 20 77 61 6e 74 20  74 6f 20 61 70 70 65 61  |ou want to appea|
00002c50  72 20 77 68 65 6e 20 74  68 65 0a 6b 65 79 70 72  |r when the.keypr|
00002c60  65 73 73 20 69 73 20 72  65 63 65 69 76 65 64 2e  |ess is received.|
00002c70  20 54 68 69 73 20 70 61  72 61 6d 65 74 65 72 20  | This parameter |
00002c80  69 73 0a 6f 70 74 69 6f  6e 61 6c 20 61 73 20 79  |is.optional as y|
00002c90  6f 75 20 6d 69 67 68 74  20 6e 6f 74 20 61 6c 77  |ou might not alw|
00002ca0  61 79 73 20 77 61 6e 74  20 74 6f 0a 6f 70 65 6e  |ays want to.open|
00002cb0  20 61 20 77 69 6e 64 6f  77 2e 0a 0a 54 68 65 20  | a window...The |
00002cc0  77 69 6e 64 6f 77 20 69  73 20 61 20 27 64 79 6e  |window is a 'dyn|
00002cd0  61 6d 69 63 27 20 64 69  61 6c 6f 67 20 62 6f 78  |amic' dialog box|
00002ce0  20 77 68 69 63 68 0a 77  69 6c 6c 20 64 69 73 61  | which.will disa|
00002cf0  70 70 65 61 72 20 77 68  65 6e 20 3c 45 53 43 3e  |ppear when <ESC>|
00002d00  20 69 73 20 70 72 65 73  73 65 64 20 61 6e 64 0a  | is pressed and.|
00002d10  69 73 20 6f 70 65 6e 65  64 20 69 6e 20 73 75 63  |is opened in suc|
00002d20  68 20 61 20 70 6f 73 69  74 69 6f 6e 20 74 68 61  |h a position tha|
00002d30  74 20 74 68 65 20 6d 6f  75 73 65 0a 70 6f 69 6e  |t the mouse.poin|
00002d40  74 65 72 20 69 73 20 69  6e 20 74 68 65 20 6d 69  |ter is in the mi|
00002d50  64 64 6c 65 20 6f 66 20  74 68 65 20 77 69 6e 64  |ddle of the wind|
00002d60  6f 77 0a 28 77 68 65 72  65 20 70 6f 73 73 69 62  |ow.(where possib|
00002d70  6c 65 29 2e 0a 0a 57 69  6e 64 6f 77 20 48 61 6e  |le)...Window Han|
00002d80  64 6c 65 20 28 73 68 65  6c 6c 5f 41 74 74 61 63  |dle (shell_Attac|
00002d90  68 48 6f 74 4b 65 79 29  0a 57 68 65 6e 20 74 68  |hHotKey).When th|
00002da0  69 73 20 69 73 20 3e 30  20 74 68 65 6e 20 74 68  |is is >0 then th|
00002db0  65 20 77 69 6e 64 6f 77  0a 63 72 65 61 74 65 64  |e window.created|
00002dc0  20 77 69 6c 6c 20 62 65  20 73 74 61 74 69 63 20  | will be static |
00002dd0  69 2e 65 2e 20 69 74 20  77 69 6c 6c 20 6e 6f 74  |i.e. it will not|
00002de0  0a 62 65 20 72 65 6d 6f  76 65 64 20 77 68 65 6e  |.be removed when|
00002df0  20 74 68 65 20 6d 6f 75  73 65 20 69 73 20 63 6c  | the mouse is cl|
00002e00  69 63 6b 65 64 0a 6f 75  74 73 69 64 65 20 69 74  |icked.outside it|
00002e10  2c 20 6f 72 20 77 68 65  6e 20 3c 45 53 43 3e 20  |, or when <ESC> |
00002e20  69 73 20 70 72 65 73 73  65 64 2e 0a 0a 2d 2d 2d  |is pressed...---|
00002e30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002e60  2d 2d 2d 2d 2d 0a 0a 50  52 4f 43 73 68 65 6c 6c  |-----..PROCshell|
00002e70  5f 44 6f 42 61 63 6b 67  72 6f 75 6e 64 54 61 73  |_DoBackgroundTas|
00002e80  6b 0a 50 61 72 61 6d 73  20 3d 3e 0a 20 20 20 20  |k.Params =>.    |
00002e90  20 20 20 20 20 4e 6f 6e  65 0a 0a 43 61 6c 6c 65  |     None..Calle|
00002ea0  64 20 65 76 65 72 79 74  69 6d 65 20 61 20 6e 75  |d everytime a nu|
00002eb0  6c 6c 20 72 65 61 73 6f  6e 20 63 6f 64 65 20 69  |ll reason code i|
00002ec0  73 20 72 65 63 65 69 76  65 64 0a 0a 2d 2d 2d 2d  |s received..----|
00002ed0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002f00  2d 2d 2d 2d 0a 0a 50 52  4f 43 73 68 65 6c 6c 5f  |----..PROCshell_|
00002f10  48 61 6e 64 6c 65 55 6e  6b 6e 6f 77 6e 4d 65 73  |HandleUnknownMes|
00002f20  73 61 67 65 28 29 0a 50  61 72 61 6d 73 20 3d 3e  |sage().Params =>|
00002f30  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 61 64  |.         int ad|
00002f40  64 72 65 73 73 20 6f 66  20 6d 65 73 73 61 67 65  |dress of message|
00002f50  20 62 6c 6f 63 6b 0a 0a  43 61 6c 6c 65 64 20 65  | block..Called e|
00002f60  76 65 72 79 20 74 69 6d  65 20 61 6e 20 75 6e 6b  |very time an unk|
00002f70  6e 6f 77 6e 20 6d 65 73  73 61 67 65 20 69 73 20  |nown message is |
00002f80  72 65 63 65 69 76 65 64  2e 0a 0a 2d 2d 2d 2d 2d  |received...-----|
00002f90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002fc0  2d 2d 2d 0a 0a 50 52 4f  43 73 68 65 6c 6c 5f 41  |---..PROCshell_A|
00002fd0  74 74 61 63 68 43 6c 6f  73 65 57 69 6e 64 6f 77  |ttachCloseWindow|
00002fe0  48 61 6e 64 6c 65 72 28  29 0a 50 61 72 61 6d 73  |Handler().Params|
00002ff0  20 3d 3e 0a 20 20 20 20  20 20 20 20 20 69 6e 74  | =>.         int|
00003000  20 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 20  | window handle. |
00003010  20 20 20 20 20 20 20 20  73 74 72 20 66 75 6e 63  |        str func|
00003020  74 69 6f 6e 20 6e 61 6d  65 0a 0a 52 65 67 69 73  |tion name..Regis|
00003030  74 65 72 73 20 61 20 66  75 6e 63 74 69 6f 6e 20  |ters a function |
00003040  6e 61 6d 65 20 74 6f 20  62 65 20 63 61 6c 6c 65  |name to be calle|
00003050  64 20 77 68 65 6e 20 61  6e 20 0a 43 6c 6f 73 65  |d when an .Close|
00003060  57 69 6e 64 6f 77 20 6d  65 73 73 61 67 65 20 69  |Window message i|
00003070  73 20 72 65 63 65 69 76  65 64 2e 20 54 68 69 73  |s received. This|
00003080  20 69 73 20 75 73 65 66  75 6c 0a 74 6f 20 70 72  | is useful.to pr|
00003090  65 76 65 6e 74 20 74 68  65 20 77 69 6e 64 6f 77  |event the window|
000030a0  20 63 6c 6f 73 69 6e 67  20 69 66 20 73 6f 20 64  | closing if so d|
000030b0  6f 69 6e 67 0a 77 6f 75  6c 64 20 69 6e 76 6f 6c  |oing.would invol|
000030c0  76 65 20 6c 6f 73 73 20  6f 66 20 64 61 74 61 2e  |ve loss of data.|
000030d0  0a 0a 54 68 69 73 20 6d  65 73 73 61 67 65 20 69  |..This message i|
000030e0  73 20 69 73 73 75 65 64  20 77 68 65 6e 20 74 68  |s issued when th|
000030f0  65 20 77 69 6e 64 6f 77  20 63 6c 6f 73 65 0a 69  |e window close.i|
00003100  63 6f 6e 20 69 73 20 63  6c 69 63 6b 65 64 20 6f  |con is clicked o|
00003110  6e 2e 0a 0a 55 73 65 72  20 46 4e 20 28 50 52 4f  |n...User FN (PRO|
00003120  43 73 68 65 6c 6c 5f 41  74 74 61 63 68 43 6c 6f  |Cshell_AttachClo|
00003130  73 65 57 69 6e 64 6f 77  48 61 6e 64 6c 65 72 29  |seWindowHandler)|
00003140  0a 50 61 72 61 6d 73 20  3d 3e 20 0a 20 20 20 20  |.Params => .    |
00003150  20 20 20 20 20 4e 6f 6e  65 20 0a 0a 20 20 20 20  |     None ..    |
00003160  20 20 20 3c 3d 0a 20 20  20 20 20 20 20 20 20 62  |   <=.         b|
00003170  6f 6f 6c 20 30 20 74 6f  20 64 69 73 61 6c 6c 6f  |ool 0 to disallo|
00003180  77 20 63 6c 6f 73 65 2c  20 6e 6f 6e 20 30 20 74  |w close, non 0 t|
00003190  6f 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |o.              |
000031a0  63 6c 6f 73 65 0a 0a 2d  2d 2d 2d 2d 2d 2d 2d 2d  |close..---------|
000031b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000031d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |---------------.|
000031e0  0a 50 52 4f 43 73 68 65  6c 6c 5f 41 74 74 61 63  |.PROCshell_Attac|
000031f0  68 4f 70 65 6e 57 69 6e  64 6f 77 48 61 6e 64 6c  |hOpenWindowHandl|
00003200  65 72 28 29 0a 50 61 72  61 6d 73 20 3d 3e 0a 20  |er().Params =>. |
00003210  20 20 20 20 20 20 20 20  69 6e 74 20 77 69 6e 64  |        int wind|
00003220  6f 77 20 68 61 6e 64 6c  65 0a 20 20 20 20 20 20  |ow handle.      |
00003230  20 20 20 73 74 72 20 66  75 6e 63 74 69 6f 6e 20  |   str function |
00003240  6e 61 6d 65 0a 0a 52 65  67 69 73 74 65 72 73 20  |name..Registers |
00003250  61 20 66 75 6e 63 74 69  6f 6e 20 6e 61 6d 65 20  |a function name |
00003260  74 6f 20 62 65 20 63 61  6c 6c 65 64 20 77 68 65  |to be called whe|
00003270  6e 20 61 6e 20 0a 4f 70  65 6e 57 69 6e 64 6f 77  |n an .OpenWindow|
00003280  20 6d 65 73 73 61 67 65  20 69 73 20 72 65 63 65  | message is rece|
00003290  69 76 65 64 2e 20 54 68  69 73 20 69 73 20 75 73  |ived. This is us|
000032a0  65 66 75 6c 0a 73 6f 20  74 68 61 74 20 74 68 65  |eful.so that the|
000032b0  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 63 61 6e  | application can|
000032c0  20 73 65 74 20 61 20 66  6c 61 67 20 74 6f 0a 61  | set a flag to.a|
000032d0  76 6f 69 64 20 64 6f 69  6e 67 20 77 69 6e 64 6f  |void doing windo|
000032e0  77 20 72 65 64 72 61 77  73 20 77 68 69 6c 65 20  |w redraws while |
000032f0  74 68 65 20 77 69 6e 64  6f 77 20 69 73 0a 63 6c  |the window is.cl|
00003300  6f 73 65 64 20 66 6f 72  20 65 78 61 6d 70 6c 65  |osed for example|
00003310  2e 0a 0a 54 68 69 73 20  6d 65 73 73 61 67 65 20  |...This message |
00003320  69 73 20 69 73 73 75 65  64 20 77 68 65 6e 20 74  |is issued when t|
00003330  68 65 20 77 69 6e 64 6f  77 20 69 73 0a 64 72 61  |he window is.dra|
00003340  67 67 65 64 20 61 72 6f  75 6e 64 20 74 68 65 20  |gged around the |
00003350  73 63 72 65 65 6e 20 61  73 20 77 65 6c 6c 20 61  |screen as well a|
00003360  73 20 77 68 65 6e 0a 74  68 65 20 70 72 6f 67 72  |s when.the progr|
00003370  61 6d 20 6f 70 65 6e 73  20 74 68 65 20 77 69 6e  |am opens the win|
00003380  64 6f 77 2e 20 59 6f 75  20 73 68 6f 75 6c 64 20  |dow. You should |
00003390  61 76 6f 69 64 0a 64 6f  69 6e 67 20 74 69 6d 65  |avoid.doing time|
000033a0  20 63 6f 6e 73 75 6d 69  6e 67 20 73 74 75 66 66  | consuming stuff|
000033b0  20 69 6e 20 74 68 65 20  66 75 6e 63 74 69 6f 6e  | in the function|
000033c0  20 74 68 61 74 0a 69 73  20 63 61 6c 6c 65 64 20  | that.is called |
000033d0  74 68 65 72 65 66 6f 72  65 2e 0a 0a 55 73 65 72  |therefore...User|
000033e0  20 46 4e 20 28 50 52 4f  43 73 68 65 6c 6c 5f 41  | FN (PROCshell_A|
000033f0  74 74 61 63 68 4f 70 65  6e 57 69 6e 64 6f 77 48  |ttachOpenWindowH|
00003400  61 6e 64 6c 65 72 29 0a  50 61 72 61 6d 73 20 3d  |andler).Params =|
00003410  3e 20 0a 20 20 20 20 20  20 20 20 20 4e 6f 6e 65  |> .         None|
00003420  20 0a 0a 20 20 20 20 20  20 20 3c 3d 0a 20 20 20  | ..       <=.   |
00003430  20 20 20 20 20 20 62 6f  6f 6c 20 30 20 74 6f 20  |      bool 0 to |
00003440  64 69 73 61 6c 6c 6f 77  20 6f 70 65 6e 2c 20 6e  |disallow open, n|
00003450  6f 6e 20 30 20 74 6f 0a  20 20 20 20 20 20 20 20  |on 0 to.        |
00003460  20 20 20 20 20 20 6f 70  65 6e 0a 20 20 20 20 20  |      open.     |
00003470  20 20 20 20 20 20 20 20  20 0a 2d 2d 2d 2d 2d 2d  |         .------|
00003480  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000034b0  2d 2d 0a 0a 50 52 4f 43  73 68 65 6c 6c 5f 41 74  |--..PROCshell_At|
000034c0  74 61 63 68 50 72 65 51  75 69 74 48 61 6e 64 6c  |tachPreQuitHandl|
000034d0  65 72 28 29 0a 50 61 72  61 6d 73 20 3d 3e 0a 20  |er().Params =>. |
000034e0  20 20 20 20 20 20 20 20  73 74 72 20 66 75 6e 63  |        str func|
000034f0  74 69 6f 6e 20 6e 61 6d  65 0a 0a 52 65 67 69 73  |tion name..Regis|
00003500  74 65 72 73 20 61 20 66  75 6e 63 74 69 6f 6e 20  |ters a function |
00003510  6e 61 6d 65 20 74 6f 20  62 65 20 63 61 6c 6c 65  |name to be calle|
00003520  64 20 77 68 65 6e 20 61  20 0a 50 72 65 51 75 69  |d when a .PreQui|
00003530  74 20 6d 65 73 73 61 67  65 20 69 73 20 72 65 63  |t message is rec|
00003540  65 69 76 65 64 2e 20 54  68 69 73 20 67 69 76 65  |eived. This give|
00003550  73 20 74 68 65 0a 61 70  70 6c 69 63 61 74 69 6f  |s the.applicatio|
00003560  6e 20 61 20 63 68 61 6e  63 65 20 74 6f 20 73 61  |n a chance to sa|
00003570  76 65 20 64 61 74 61 20  6f 72 20 61 62 6f 72 74  |ve data or abort|
00003580  0a 74 68 65 20 73 68 75  74 64 6f 77 6e 2e 0a 0a  |.the shutdown...|
00003590  54 68 69 73 20 6d 65 73  73 61 67 65 20 69 73 20  |This message is |
000035a0  69 73 73 75 65 64 20 77  68 65 6e 20 74 68 65 20  |issued when the |
000035b0  74 61 73 6b 20 69 73 20  71 75 69 74 0a 66 72 6f  |task is quit.fro|
000035c0  6d 20 74 68 65 20 54 61  73 6b 20 4d 61 6e 61 67  |m the Task Manag|
000035d0  65 72 2c 20 6f 72 20 77  68 65 6e 20 43 54 52 4c  |er, or when CTRL|
000035e0  2d 53 48 49 46 54 2d 46  31 32 0a 69 73 20 70 72  |-SHIFT-F12.is pr|
000035f0  65 73 73 65 64 20 28 75  6e 64 65 72 20 52 49 53  |essed (under RIS|
00003600  43 20 4f 53 20 33 29 2e  0a 0a 55 73 65 72 20 46  |C OS 3)...User F|
00003610  4e 20 28 50 52 4f 43 73  68 65 6c 6c 5f 41 74 74  |N (PROCshell_Att|
00003620  61 63 68 50 72 65 51 75  69 74 48 61 6e 64 6c 65  |achPreQuitHandle|
00003630  72 29 0a 50 61 72 61 6d  73 20 3d 3e 20 0a 20 20  |r).Params => .  |
00003640  20 20 20 20 20 20 20 4e  6f 6e 65 20 0a 0a 20 20  |       None ..  |
00003650  20 20 20 20 20 3c 3d 0a  20 20 20 20 20 20 20 20  |     <=.        |
00003660  20 62 6f 6f 6c 20 6e 6f  6e 20 30 20 74 6f 20 61  | bool non 0 to a|
00003670  6c 6c 6f 77 20 71 75 69  74 2c 20 30 20 74 6f 0a  |llow quit, 0 to.|
00003680  20 20 20 20 20 20 20 20  20 20 20 20 20 20 63 61  |              ca|
00003690  6e 63 65 6c 20 71 75 69  74 0a 0a 54 68 69 73 20  |ncel quit..This |
000036a0  66 75 6e 63 74 69 6f 6e  20 69 73 20 63 61 6c 6c  |function is call|
000036b0  65 64 20 77 68 65 6e 20  61 20 50 72 65 51 75 69  |ed when a PreQui|
000036c0  74 0a 6d 65 73 73 61 67  65 20 69 73 20 72 65 63  |t.message is rec|
000036d0  65 69 76 65 64 2e 0a 0a  2d 2d 2d 2d 2d 2d 2d 2d  |eived...--------|
000036e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003710  0a                                                |.|
00003711