Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/Events
!AWJan95/Goodies/Event/Docs/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 » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 |
Filename: | !AWJan95/Goodies/Event/Docs/Events |
Read OK: | ✔ |
File size: | 3807 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. The button type of the filetype icon is automatically changed to click/drag. 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). Note that a click on a bump icon with ADJUST has the opposite effect to a click with SELECT. User FN1 (PROCshell_AttachBumpHandler) Params => int value int mouse button pressed (SELECT = 4, ADJUST = 1 <= 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 54 | is the case...T| 00001750 68 65 20 62 75 74 74 6f 6e 20 74 79 70 65 20 6f |he button type o| 00001760 66 20 74 68 65 20 66 69 6c 65 74 79 70 65 20 69 |f the filetype i| 00001770 63 6f 6e 20 69 73 20 61 75 74 6f 6d 61 74 69 63 |con is automatic| 00001780 61 6c 6c 79 0a 63 68 61 6e 67 65 64 20 74 6f 20 |ally.changed to | 00001790 63 6c 69 63 6b 2f 64 72 61 67 2e 0a 0a 55 73 65 |click/drag...Use| 000017a0 72 20 46 4e 20 28 50 52 4f 43 73 68 65 6c 6c 5f |r FN (PROCshell_| 000017b0 41 74 74 61 63 68 44 61 74 61 53 61 76 65 29 0a |AttachDataSave).| 000017c0 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 |Params =>. | 000017d0 20 20 20 73 74 72 20 66 75 6c 6c 20 66 69 6c 65 | str full file| 000017e0 6e 61 6d 65 20 6f 66 20 66 69 6c 65 0a 0a 54 68 |name of file..Th| 000017f0 69 73 20 66 75 6e 63 74 69 6f 6e 20 69 73 20 6e |is function is n| 00001800 6f 74 20 63 61 6c 6c 65 64 20 69 66 20 74 68 65 |ot called if the| 00001810 20 66 69 6c 65 20 69 73 20 73 74 6f 72 65 64 0a | file is stored.| 00001820 69 6e 20 61 20 68 65 61 70 20 62 6c 6f 63 6b 2e |in a heap block.| 00001830 20 49 6e 20 74 68 69 73 20 63 61 73 65 20 74 68 | In this case th| 00001840 65 20 77 68 6f 6c 65 20 63 6f 6e 74 65 6e 74 73 |e whole contents| 00001850 20 6f 66 0a 74 68 65 20 68 65 61 70 20 62 6c 6f | of.the heap blo| 00001860 63 6b 20 61 72 65 20 74 72 61 6e 73 66 65 72 72 |ck are transferr| 00001870 65 64 2e 0a 0a 45 73 74 69 6d 61 74 65 64 20 46 |ed...Estimated F| 00001880 69 6c 65 20 53 69 7a 65 73 0a 49 74 20 73 68 6f |ile Sizes.It sho| 00001890 75 6c 64 20 28 69 66 20 6f 74 68 65 72 20 61 70 |uld (if other ap| 000018a0 70 6c 69 63 61 74 69 6f 6e 73 20 61 72 65 20 77 |plications are w| 000018b0 72 69 74 74 65 6e 20 74 6f 0a 74 68 65 20 41 63 |ritten to.the Ac| 000018c0 6f 72 6e 20 67 75 69 64 65 6c 69 6e 65 73 21 29 |orn guidelines!)| 000018d0 20 6e 6f 74 20 6d 61 74 74 65 72 20 69 66 20 74 | not matter if t| 000018e0 68 69 73 20 65 73 74 69 6d 61 74 65 0a 69 73 20 |his estimate.is | 000018f0 69 6e 61 63 63 75 72 61 74 65 2e 20 48 6f 77 65 |inaccurate. Howe| 00001900 76 65 72 2c 20 66 69 6c 65 20 74 72 61 6e 73 66 |ver, file transf| 00001910 65 72 20 77 69 6c 6c 20 62 65 20 61 0a 6c 69 74 |er will be a.lit| 00001920 74 6c 65 20 66 61 73 74 65 72 20 69 66 20 69 74 |tle faster if it| 00001930 20 69 73 20 61 63 63 75 72 61 74 65 20 61 6e 64 | is accurate and| 00001940 20 70 72 6f 62 6c 65 6d 73 20 6d 61 79 0a 6f 63 | problems may.oc| 00001950 63 75 72 20 77 69 74 68 20 62 61 64 6c 79 20 77 |cur with badly w| 00001960 72 69 74 74 65 6e 20 61 70 70 6c 69 63 61 74 69 |ritten applicati| 00001970 6f 6e 73 20 69 66 20 69 74 20 69 73 20 6e 6f 74 |ons if it is not| 00001980 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |...-------------| 00001990 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000019b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f |-----------..PRO| 000019c0 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 43 6c 69 |Cshell_AttachCli| 000019d0 63 6b 53 65 6c 65 63 74 28 29 0a 50 61 72 61 6d |ckSelect().Param| 000019e0 73 20 3d 3e 20 20 20 20 0a 20 20 20 20 20 20 20 |s => . | 000019f0 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e | int window han| 00001a00 64 6c 65 20 20 20 20 20 20 20 0a 20 20 20 20 20 |dle . | 00001a10 20 20 20 20 69 6e 74 20 69 63 6f 6e 20 68 61 6e | int icon han| 00001a20 64 6c 65 20 0a 20 20 20 20 20 20 20 20 20 73 74 |dle . st| 00001a30 72 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 0a |r function name.| 00001a40 0a 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 68 |.User FN (PROCsh| 00001a50 65 6c 6c 5f 41 74 74 61 63 68 43 6c 69 63 6b 53 |ell_AttachClickS| 00001a60 65 6c 65 63 74 29 0a 50 61 72 61 6d 73 20 3d 3e |elect).Params =>| 00001a70 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 | . int w| 00001a80 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 20 20 |indow handle. | 00001a90 20 20 20 20 20 20 69 6e 74 20 69 63 6f 6e 20 68 | int icon h| 00001aa0 61 6e 64 6c 65 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d |andle..---------| 00001ab0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001ad0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |---------------.| 00001ae0 0a 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 |.PROCshell_Attac| 00001af0 68 43 6c 69 63 6b 41 64 6a 75 73 74 28 29 0a 50 |hClickAdjust().P| 00001b00 61 72 61 6d 73 20 3d 3e 20 20 20 20 20 0a 20 20 |arams => . | 00001b10 20 20 20 20 20 20 20 69 6e 74 20 77 69 6e 64 6f | int windo| 00001b20 77 20 68 61 6e 64 6c 65 20 20 20 20 20 20 20 20 |w handle | 00001b30 20 20 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | . int| 00001b40 20 69 63 6f 6e 20 68 61 6e 64 6c 65 20 20 0a 20 | icon handle . | 00001b50 20 20 20 20 20 20 20 20 73 74 72 20 66 75 6e 63 | str func| 00001b60 74 69 6f 6e 20 6e 61 6d 65 0a 0a 55 73 65 72 20 |tion name..User | 00001b70 46 4e 20 28 50 52 4f 43 73 68 65 6c 6c 5f 41 74 |FN (PROCshell_At| 00001b80 74 61 63 68 43 6c 69 63 6b 41 64 6a 75 73 74 29 |tachClickAdjust)| 00001b90 0a 50 61 72 61 6d 73 20 3d 3e 20 0a 20 20 20 20 |.Params => . | 00001ba0 20 20 20 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 | int window | 00001bb0 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 20 |handle. | 00001bc0 69 6e 74 20 69 63 6f 6e 20 68 61 6e 64 6c 65 0a |int icon handle.| 00001bd0 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.---------------| 00001be0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001c00 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 |---------..PROCs| 00001c10 68 65 6c 6c 5f 41 74 74 61 63 68 55 73 65 72 52 |hell_AttachUserR| 00001c20 65 64 72 61 77 28 29 0a 50 61 72 61 6d 73 20 3d |edraw().Params =| 00001c30 3e 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 |> . | 00001c40 20 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e 64 | int window hand| 00001c50 6c 65 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 |le . | 00001c60 20 20 73 74 72 20 66 75 6e 63 74 69 6f 6e 20 6e | str function n| 00001c70 61 6d 65 0a 0a 41 20 63 68 65 63 6b 20 69 73 20 |ame..A check is | 00001c80 6d 61 64 65 20 74 6f 20 65 6e 73 75 72 65 20 74 |made to ensure t| 00001c90 68 61 74 20 74 68 65 20 27 41 75 74 6f 20 72 65 |hat the 'Auto re| 00001ca0 64 72 61 77 27 20 66 6c 61 67 20 6f 66 0a 74 68 |draw' flag of.th| 00001cb0 65 20 77 69 6e 64 6f 77 20 69 73 20 6f 66 66 2c |e window is off,| 00001cc0 20 61 6e 64 20 74 68 65 20 66 6c 61 67 20 69 73 | and the flag is| 00001cd0 20 63 6c 65 61 72 65 64 20 61 75 74 6f 6d 61 74 | cleared automat| 00001ce0 69 63 61 6c 6c 79 0a 69 66 20 6e 65 63 65 73 73 |ically.if necess| 00001cf0 61 72 79 20 28 69 2e 65 2e 20 79 6f 75 20 64 6f |ary (i.e. you do| 00001d00 6e 27 74 20 68 61 76 65 20 74 6f 20 75 73 65 20 |n't have to use | 00001d10 21 46 6f 72 6d 45 64 20 6f 72 0a 73 69 6d 69 6c |!FormEd or.simil| 00001d20 61 72 20 74 6f 20 73 65 74 20 74 68 65 20 66 6c |ar to set the fl| 00001d30 61 67 20 63 6f 72 72 65 63 74 6c 79 29 0a 0a 55 |ag correctly)..U| 00001d40 73 65 72 20 46 4e 20 28 50 52 4f 43 73 68 65 6c |ser FN (PROCshel| 00001d50 6c 5f 41 74 74 61 63 68 55 73 65 72 52 65 64 72 |l_AttachUserRedr| 00001d60 61 77 29 0a 50 61 72 61 6d 73 20 3d 3e 20 0a 20 |aw).Params => . | 00001d70 20 20 20 20 20 20 20 20 69 6e 74 20 61 64 64 72 | int addr| 00001d80 65 73 73 20 6f 66 20 62 6c 6f 63 6b 20 72 65 74 |ess of block ret| 00001d90 75 72 6e 65 64 20 62 79 20 72 65 64 72 61 77 0a |urned by redraw.| 00001da0 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 71 | req| 00001db0 75 65 73 74 0a 20 20 20 20 20 20 20 20 20 69 6e |uest. in| 00001dc0 74 20 78 20 6f 72 69 67 69 6e 20 6f 66 20 77 69 |t x origin of wi| 00001dd0 6e 64 6f 77 20 28 73 63 72 65 65 6e 20 63 6f 6f |ndow (screen coo| 00001de0 72 64 73 29 0a 20 20 20 20 20 20 20 20 20 69 6e |rds). in| 00001df0 74 20 79 20 6f 72 69 67 69 6e 20 6f 66 20 77 69 |t y origin of wi| 00001e00 6e 64 6f 77 20 28 73 63 72 65 65 6e 20 63 6f 6f |ndow (screen coo| 00001e10 72 64 73 29 0a 20 0a 54 68 65 20 66 75 6e 63 74 |rds). .The funct| 00001e20 69 6f 6e 20 74 6f 20 63 61 6c 6c 20 77 68 65 6e |ion to call when| 00001e30 20 61 20 72 65 64 72 61 77 20 72 65 71 75 65 73 | a redraw reques| 00001e40 74 0a 69 73 20 6d 61 64 65 2e 0a 0a 2d 2d 2d 2d |t.is made...----| 00001e50 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001e80 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 00001e90 41 74 74 61 63 68 44 72 61 67 28 29 0a 50 61 72 |AttachDrag().Par| 00001ea0 61 6d 73 20 3d 3e 20 20 20 20 20 20 20 20 0a 20 |ams => . | 00001eb0 20 20 20 20 20 20 20 20 69 6e 74 20 77 69 6e 64 | int wind| 00001ec0 6f 77 20 68 61 6e 64 6c 65 20 20 20 20 20 20 20 |ow handle | 00001ed0 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 | . int i| 00001ee0 63 6f 6e 20 68 61 6e 64 6c 65 20 20 20 20 20 0a |con handle .| 00001ef0 20 20 20 20 20 20 20 20 20 73 74 72 20 66 75 6e | str fun| 00001f00 63 74 69 6f 6e 20 6e 61 6d 65 0a 0a 0a 55 73 65 |ction name...Use| 00001f10 72 20 46 4e 20 28 46 4e 73 68 65 6c 6c 5f 41 74 |r FN (FNshell_At| 00001f20 74 61 63 68 44 72 61 67 29 0a 50 61 72 61 6d 73 |tachDrag).Params| 00001f30 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | =>. int| 00001f40 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 20 6f | window handle o| 00001f50 76 65 72 20 77 68 69 63 68 20 64 72 61 67 0a 20 |ver which drag. | 00001f60 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 72 | star| 00001f70 74 65 64 0a 20 20 20 20 20 20 20 20 20 69 6e 74 |ted. int| 00001f80 20 69 63 6f 6e 20 68 61 6e 64 6c 65 20 6f 76 65 | icon handle ove| 00001f90 72 20 77 68 69 63 68 20 64 72 61 67 20 77 61 73 |r which drag was| 00001fa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 |. st| 00001fb0 61 72 74 65 64 20 28 2d 31 20 66 6f 72 20 6e 6f |arted (-1 for no| 00001fc0 20 69 63 6f 6e 29 0a 20 0a 2d 2d 2d 2d 2d 2d 2d | icon). .-------| 00001fd0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002000 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 |-..PROCshell_Att| 00002010 61 63 68 48 65 6c 70 54 61 67 28 29 0a 50 61 72 |achHelpTag().Par| 00002020 61 6d 73 20 3d 3e 20 20 20 20 20 20 20 20 20 0a |ams => .| 00002030 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 69 6e | int win| 00002040 64 6f 77 20 68 61 6e 64 6c 65 20 20 20 20 20 20 |dow handle | 00002050 20 20 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | . int| 00002060 20 69 63 6f 6e 20 68 61 6e 64 6c 65 20 20 20 20 | icon handle | 00002070 20 20 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 | . str | 00002080 3c 6d 65 73 73 61 67 65 20 74 61 67 3d 3e 4d 65 |<message tag=>Me| 00002090 73 73 61 67 65 54 61 67 3e 0a 0a 4e 6f 74 65 20 |ssageTag>..Note | 000020a0 74 68 61 74 20 61 6e 79 20 6d 65 73 73 61 67 65 |that any message| 000020b0 20 74 61 67 73 20 66 6f 75 6e 64 20 69 6e 20 69 | tags found in i| 000020c0 63 6f 6e 0a 76 61 6c 69 64 61 74 69 6f 6e 20 73 |con.validation s| 000020d0 74 72 69 6e 67 73 20 6f 76 65 72 72 69 64 65 20 |trings override | 000020e0 74 61 67 73 20 73 65 74 20 75 70 20 62 79 0a 74 |tags set up by.t| 000020f0 68 69 73 20 72 6f 75 74 69 6e 65 2e 0a 0a 2d 2d |his routine...--| 00002100 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002130 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 57 69 6d 70 |------..PROCWimp| 00002140 43 6c 6f 73 65 44 6f 77 6e 0a 50 61 72 61 6d 73 |CloseDown.Params| 00002150 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 4e 6f 6e | =>. Non| 00002160 65 0a 0a 4e 6f 74 20 75 73 65 64 20 69 6e 20 45 |e..Not used in E| 00002170 76 6e 74 53 68 65 6c 6c 20 6c 69 62 72 61 72 79 |vntShell library| 00002180 20 2d 20 75 73 65 20 3c 50 52 4f 43 73 68 65 6c | - use <PROCshel| 00002190 6c 5f 57 69 6d 70 43 6c 6f 73 65 44 6f 77 6e 5f |l_WimpCloseDown_| 000021a0 49 3e 20 69 6e 73 74 65 61 64 2e 0a 0a 2d 2d 2d |I> instead...---| 000021b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000021e0 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c |-----..PROCshell| 000021f0 5f 57 69 6d 70 43 6c 6f 73 65 44 6f 77 6e 5f 49 |_WimpCloseDown_I| 00002200 0a 50 61 72 61 6d 73 20 3d 3e 20 0a 20 20 20 20 |.Params => . | 00002210 20 20 20 20 20 4e 6f 6e 65 0a 0a 43 61 6c 6c 65 | None..Calle| 00002220 64 20 77 68 65 6e 20 74 68 65 20 61 70 70 6c 69 |d when the appli| 00002230 63 61 74 69 6f 6e 20 73 68 75 74 73 20 64 6f 77 |cation shuts dow| 00002240 6e 20 28 74 68 65 20 6c 69 62 72 61 72 79 20 63 |n (the library c| 00002250 61 6c 6c 73 0a 74 68 69 73 20 61 75 74 6f 6d 61 |alls.this automa| 00002260 74 69 63 61 6c 6c 79 29 0a 0a 2d 2d 2d 2d 2d 2d |tically)..------| 00002270 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000022a0 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 41 74 |--..PROCshell_At| 000022b0 74 61 63 68 42 75 6d 70 48 61 6e 64 6c 65 72 28 |tachBumpHandler(| 000022c0 29 0a 50 61 72 61 6d 73 20 3d 3e 20 20 20 20 20 |).Params => | 000022d0 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 20 77 |. int w| 000022e0 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 20 20 |indow handle. | 000022f0 20 20 20 20 20 20 69 6e 74 20 20 69 63 6f 6e 20 | int icon | 00002300 68 61 6e 64 6c 65 20 28 64 69 73 70 6c 61 79 20 |handle (display | 00002310 76 61 6c 75 65 29 0a 20 20 20 20 20 20 20 20 20 |value). | 00002320 69 6e 74 20 20 69 63 6f 6e 20 68 61 6e 64 6c 65 |int icon handle| 00002330 20 28 69 6e 63 72 65 6d 65 6e 74 20 76 61 6c 75 | (increment valu| 00002340 65 29 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |e). int | 00002350 20 69 63 6f 6e 20 68 61 6e 64 6c 65 20 28 64 65 | icon handle (de| 00002360 63 72 65 6d 65 6e 74 20 76 61 6c 75 65 29 0a 20 |crement value). | 00002370 20 20 20 20 20 20 20 20 69 6e 74 20 20 6c 6f 77 | int low| 00002380 65 72 20 6c 69 6d 69 74 0a 20 20 20 20 20 20 20 |er limit. | 00002390 20 20 69 6e 74 20 20 75 70 70 65 72 20 6c 69 6d | int upper lim| 000023a0 69 74 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |it. int | 000023b0 20 73 74 65 70 0a 20 20 20 20 20 20 20 20 20 62 | step. b| 000023c0 6f 6f 6c 20 77 72 61 70 20 66 6c 61 67 0a 20 20 |ool wrap flag. | 000023d0 20 20 20 20 20 20 20 73 74 72 20 20 66 75 6e 63 | str func| 000023e0 74 69 6f 6e 20 6e 61 6d 65 20 31 20 28 63 61 6e |tion name 1 (can| 000023f0 20 62 65 20 22 22 29 0a 20 20 20 20 20 20 20 20 | be ""). | 00002400 20 73 74 72 20 20 66 75 6e 63 74 69 6f 6e 20 6e | str function n| 00002410 61 6d 65 20 32 20 28 63 61 6e 20 62 65 20 22 22 |ame 2 (can be ""| 00002420 29 0a 0a 42 75 6d 70 20 69 63 6f 6e 73 20 61 72 |)..Bump icons ar| 00002430 65 20 74 68 65 20 61 72 72 6f 77 73 20 74 68 61 |e the arrows tha| 00002440 74 20 61 6c 6c 6f 77 20 79 6f 75 20 74 6f 20 61 |t allow you to a| 00002450 6c 74 65 72 20 74 68 65 0a 76 61 6c 75 65 20 64 |lter the.value d| 00002460 69 73 70 6c 61 79 65 64 20 69 6e 20 61 6e 20 69 |isplayed in an i| 00002470 63 6f 6e 20 28 75 73 75 61 6c 6c 79 20 62 75 74 |con (usually but| 00002480 20 6e 6f 74 20 6e 65 63 65 73 73 61 72 69 6c 79 | not necessarily| 00002490 0a 61 20 77 72 69 74 61 62 6c 65 20 6f 6e 65 29 |.a writable one)| 000024a0 2e 20 4e 6f 74 65 20 74 68 61 74 20 61 20 63 6c |. Note that a cl| 000024b0 69 63 6b 20 6f 6e 20 61 20 62 75 6d 70 20 69 63 |ick on a bump ic| 000024c0 6f 6e 20 77 69 74 68 0a 41 44 4a 55 53 54 20 68 |on with.ADJUST h| 000024d0 61 73 20 74 68 65 20 6f 70 70 6f 73 69 74 65 20 |as the opposite | 000024e0 65 66 66 65 63 74 20 74 6f 20 61 20 63 6c 69 63 |effect to a clic| 000024f0 6b 20 77 69 74 68 20 53 45 4c 45 43 54 2e 0a 0a |k with SELECT...| 00002500 55 73 65 72 20 46 4e 31 20 28 50 52 4f 43 73 68 |User FN1 (PROCsh| 00002510 65 6c 6c 5f 41 74 74 61 63 68 42 75 6d 70 48 61 |ell_AttachBumpHa| 00002520 6e 64 6c 65 72 29 0a 50 61 72 61 6d 73 20 3d 3e |ndler).Params =>| 00002530 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 76 | . int v| 00002540 61 6c 75 65 0a 20 20 20 20 20 20 20 20 20 69 6e |alue. in| 00002550 74 20 6d 6f 75 73 65 20 62 75 74 74 6f 6e 20 70 |t mouse button p| 00002560 72 65 73 73 65 64 20 28 53 45 4c 45 43 54 20 3d |ressed (SELECT =| 00002570 20 34 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | 4,. | 00002580 20 41 44 4a 55 53 54 20 3d 20 31 0a 20 20 20 20 | ADJUST = 1. | 00002590 20 20 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 73 | <=. s| 000025a0 74 72 20 63 6f 6e 76 65 72 74 65 64 20 76 61 6c |tr converted val| 000025b0 75 65 0a 0a 54 68 69 73 20 66 75 6e 63 74 69 6f |ue..This functio| 000025c0 6e 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f |n is called befo| 000025d0 72 65 20 74 68 65 20 6e 65 77 20 76 61 6c 75 65 |re the new value| 000025e0 0a 69 73 20 70 6c 61 63 65 64 20 69 6e 20 74 68 |.is placed in th| 000025f0 65 20 64 69 73 70 6c 61 79 20 69 63 6f 6e 2e 20 |e display icon. | 00002600 0a 0a 41 6e 20 65 78 61 6d 70 6c 65 20 77 6f 75 |..An example wou| 00002610 6c 64 20 62 65 20 63 6f 6e 76 65 72 74 69 6e 67 |ld be converting| 00002620 20 61 6e 20 69 6e 74 65 67 65 72 0a 76 61 6c 75 | an integer.valu| 00002630 65 20 74 6f 20 74 68 65 20 66 6f 72 6d 61 74 20 |e to the format | 00002640 30 68 30 30 20 28 69 2e 65 20 68 6f 75 72 73 20 |0h00 (i.e hours | 00002650 61 6e 64 20 6d 69 6e 73 29 2e 0a 0a 44 45 46 20 |and mins)...DEF | 00002660 46 4e 5f 64 69 73 5f 66 6e 28 76 61 6c 25 29 0a |FN_dis_fn(val%).| 00002670 3d 53 54 52 24 28 76 61 6c 25 44 49 56 36 30 29 |=STR$(val%DIV60)| 00002680 2b 22 68 22 2b 52 49 47 48 54 24 28 22 30 30 22 |+"h"+RIGHT$("00"| 00002690 2b 53 54 52 24 28 76 61 6c 25 4d 4f 44 36 30 29 |+STR$(val%MOD60)| 000026a0 2c 32 29 0a 0a 53 65 65 20 74 68 65 20 21 56 42 |,2)..See the !VB| 000026b0 61 73 65 32 20 64 65 6d 6f 20 61 70 70 2e 0a 0a |ase2 demo app...| 000026c0 55 73 65 72 20 46 4e 32 20 28 50 52 4f 43 73 68 |User FN2 (PROCsh| 000026d0 65 6c 6c 5f 41 74 74 61 63 68 42 75 6d 70 48 61 |ell_AttachBumpHa| 000026e0 6e 64 6c 65 72 29 0a 50 61 72 61 6d 73 20 3d 3e |ndler).Params =>| 000026f0 20 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 76 | . str v| 00002700 61 6c 75 65 20 74 6f 20 64 65 63 6f 64 65 0a 0a |alue to decode..| 00002710 20 20 20 20 20 20 20 3c 3d 0a 20 20 20 20 20 20 | <=. | 00002720 20 20 20 69 6e 74 20 63 6f 6e 76 65 72 74 65 64 | int converted| 00002730 20 76 61 6c 75 65 0a 0a 54 68 69 73 20 66 75 6e | value..This fun| 00002740 63 74 69 6f 6e 20 69 73 20 63 61 6c 6c 65 64 20 |ction is called | 00002750 62 65 66 6f 72 65 20 74 68 65 20 6e 65 77 20 76 |before the new v| 00002760 61 6c 75 65 0a 69 73 20 70 6c 61 63 65 64 20 69 |alue.is placed i| 00002770 6e 20 74 68 65 20 64 69 73 70 6c 61 79 20 69 63 |n the display ic| 00002780 6f 6e 2e 0a 0a 41 6e 20 65 78 61 6d 70 6c 65 20 |on...An example | 00002790 77 6f 75 6c 64 20 62 65 20 63 6f 6e 76 65 72 74 |would be convert| 000027a0 69 6e 67 20 61 20 73 74 72 69 6e 67 20 22 30 68 |ing a string "0h| 000027b0 30 30 22 0a 62 61 63 6b 20 74 6f 20 61 6e 20 69 |00".back to an i| 000027c0 6e 74 65 67 65 72 20 76 61 6c 75 65 2e 0a 0a 44 |nteger value...D| 000027d0 45 46 20 46 4e 5f 64 65 63 6f 64 65 5f 64 69 73 |EF FN_decode_dis| 000027e0 28 76 61 6c 24 29 0a 3d 56 41 4c 28 76 61 6c 24 |(val$).=VAL(val$| 000027f0 29 2a 36 30 2b 56 41 4c 28 52 49 47 48 54 24 28 |)*60+VAL(RIGHT$(| 00002800 76 61 6c 24 2c 32 29 29 0a 0a 53 65 65 20 74 68 |val$,2))..See th| 00002810 65 20 21 56 42 61 73 65 32 20 64 65 6d 6f 20 61 |e !VBase2 demo a| 00002820 70 70 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |pp...-----------| 00002830 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002850 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 |-------------..P| 00002860 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 48 |ROCshell_AttachH| 00002870 6f 74 4b 65 79 28 29 0a 50 61 72 61 6d 73 20 3d |otKey().Params =| 00002880 3e 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 20 |>. str | 00002890 6b 65 79 0a 20 20 20 20 20 20 20 20 20 62 6f 6f |key. boo| 000028a0 6c 20 73 68 69 66 74 20 66 6c 61 67 0a 20 20 20 |l shift flag. | 000028b0 20 20 20 20 20 20 62 6f 6f 6c 20 63 74 72 6c 20 | bool ctrl | 000028c0 20 66 6c 61 67 0a 20 20 20 20 20 20 20 20 20 62 | flag. b| 000028d0 6f 6f 6c 20 61 6c 74 20 20 20 66 6c 61 67 0a 20 |ool alt flag. | 000028e0 20 20 20 20 20 20 20 20 73 74 72 20 20 77 69 6e | str win| 000028f0 64 6f 77 20 69 64 65 6e 74 69 66 69 65 72 0a 20 |dow identifier. | 00002900 20 20 20 20 20 20 20 20 69 6e 74 20 20 77 69 6e | int win| 00002910 64 6f 77 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 |dow handle. | 00002920 20 20 20 20 73 74 72 20 20 66 75 6e 63 74 69 6f | str functio| 00002930 6e 20 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 20 |n name. | 00002940 73 74 72 20 20 66 75 6e 63 74 69 6f 6e 20 6e 61 |str function na| 00002950 6d 65 0a 0a 53 65 74 73 20 75 70 20 61 20 27 68 |me..Sets up a 'h| 00002960 6f 74 6b 65 79 27 20 65 76 65 6e 74 2e 20 46 75 |otkey' event. Fu| 00002970 6e 63 74 69 6f 6e 20 6b 65 79 73 20 46 30 2d 46 |nction keys F0-F| 00002980 31 31 0a 28 6e 6f 74 65 20 4e 4f 54 20 46 31 32 |11.(note NOT F12| 00002990 20 61 73 20 74 68 65 20 74 61 73 6b 20 6d 61 6e | as the task man| 000029a0 61 67 65 72 20 75 73 65 73 20 69 74 20 75 6e 64 |ager uses it und| 000029b0 65 72 0a 52 49 53 43 2d 4f 53 20 33 29 20 61 72 |er.RISC-OS 3) ar| 000029c0 65 20 73 75 70 70 6f 72 74 65 64 2e 0a 0a 55 73 |e supported...Us| 000029d0 65 72 20 46 4e 20 28 50 52 4f 43 73 68 65 6c 6c |er FN (PROCshell| 000029e0 5f 41 74 74 61 63 68 48 6f 74 4b 65 79 29 0a 50 |_AttachHotKey).P| 000029f0 61 72 61 6d 73 20 3d 3e 20 0a 20 20 20 20 20 20 |arams => . | 00002a00 20 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 | int window ha| 00002a10 6e 64 6c 65 0a 20 0a 54 68 65 20 66 75 6e 63 74 |ndle. .The funct| 00002a20 69 6f 6e 20 74 6f 20 63 61 6c 6c 20 62 65 66 6f |ion to call befo| 00002a30 72 65 20 6f 70 65 6e 69 6e 67 20 74 68 65 20 77 |re opening the w| 00002a40 69 6e 64 6f 77 2e 0a 41 20 66 75 6e 63 74 69 6f |indow..A functio| 00002a50 6e 20 6e 61 6d 65 20 6f 66 20 22 22 20 6d 61 79 |n name of "" may| 00002a60 20 62 65 20 75 73 65 64 20 69 66 20 79 6f 75 20 | be used if you | 00002a70 64 6f 6e 27 74 0a 6e 65 65 64 20 74 6f 20 63 61 |don't.need to ca| 00002a80 6c 6c 20 61 20 66 75 6e 63 74 69 6f 6e 2e 20 54 |ll a function. T| 00002a90 68 69 73 20 77 6f 75 6c 64 20 6e 6f 72 6d 61 6c |his would normal| 00002aa0 6c 79 20 62 65 0a 75 73 65 64 20 74 6f 20 66 69 |ly be.used to fi| 00002ab0 6c 6c 20 69 6e 20 69 63 6f 6e 20 66 69 65 6c 64 |ll in icon field| 00002ac0 73 20 61 6e 64 20 73 65 74 20 74 68 65 20 73 74 |s and set the st| 00002ad0 61 74 65 0a 6f 66 20 72 61 64 69 6f 20 62 75 74 |ate.of radio but| 00002ae0 74 6f 6e 73 0a 0a 55 73 65 72 20 46 4e 20 28 50 |tons..User FN (P| 00002af0 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 48 |ROCshell_AttachH| 00002b00 6f 74 4b 65 79 29 0a 50 61 72 61 6d 73 20 3d 3e |otKey).Params =>| 00002b10 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 | . int w| 00002b20 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 0a 54 |indow handle. .T| 00002b30 68 65 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 63 |he function to c| 00002b40 61 6c 6c 20 61 66 74 65 72 20 6f 70 65 6e 69 6e |all after openin| 00002b50 67 20 74 68 65 20 77 69 6e 64 6f 77 2e 0a 41 20 |g the window..A | 00002b60 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 20 6f 66 |function name of| 00002b70 20 22 22 20 6d 61 79 20 62 65 20 75 73 65 64 20 | "" may be used | 00002b80 69 66 20 79 6f 75 20 64 6f 6e 27 74 0a 6e 65 65 |if you don't.nee| 00002b90 64 20 74 6f 20 63 61 6c 6c 20 61 20 66 75 6e 63 |d to call a func| 00002ba0 74 69 6f 6e 2e 0a 0a 4b 65 79 20 28 50 52 4f 43 |tion...Key (PROC| 00002bb0 73 68 65 6c 6c 5f 41 74 74 61 63 68 48 6f 74 4b |shell_AttachHotK| 00002bc0 65 79 29 0a 54 68 65 20 6b 65 79 20 73 74 72 69 |ey).The key stri| 00002bd0 6e 67 20 6e 6f 72 6d 61 6c 6c 79 20 63 6f 6e 73 |ng normally cons| 00002be0 69 73 74 73 20 6f 66 20 6f 6e 65 20 41 53 43 49 |ists of one ASCI| 00002bf0 49 0a 63 68 61 72 61 63 74 65 72 20 69 2e 65 2e |I.character i.e.| 00002c00 20 22 52 22 2e 20 57 68 65 6e 20 74 68 65 20 63 | "R". When the c| 00002c10 74 72 6c 20 66 6c 61 67 20 69 73 20 73 65 74 0a |trl flag is set.| 00002c20 74 68 69 73 20 77 6f 75 6c 64 20 63 61 75 73 65 |this would cause| 00002c30 20 74 68 65 20 61 63 74 69 6f 6e 73 20 74 6f 20 | the actions to | 00002c40 62 65 20 63 61 72 72 69 65 64 20 6f 75 74 0a 77 |be carried out.w| 00002c50 68 65 6e 20 43 54 52 4c 2d 52 20 69 73 20 70 72 |hen CTRL-R is pr| 00002c60 65 73 73 65 64 2e 0a 0a 54 68 65 20 73 74 72 69 |essed...The stri| 00002c70 6e 67 20 6d 61 79 20 61 6c 73 6f 20 63 6f 6e 74 |ng may also cont| 00002c80 61 69 6e 20 22 46 31 22 20 74 6f 20 22 46 31 31 |ain "F1" to "F11| 00002c90 22 20 74 6f 0a 61 6c 6c 6f 77 20 66 75 6e 63 74 |" to.allow funct| 00002ca0 69 6f 6e 20 6b 65 79 73 20 74 6f 20 62 65 20 75 |ion keys to be u| 00002cb0 73 65 64 2e 20 4e 6f 20 63 68 65 63 6b 69 6e 67 |sed. No checking| 00002cc0 20 69 73 0a 70 65 72 66 6f 72 6d 65 64 20 6f 6e | is.performed on| 00002cd0 20 74 68 65 20 73 74 72 69 6e 67 2e 0a 0a 57 69 | the string...Wi| 00002ce0 6e 64 6f 77 20 28 50 52 4f 43 73 68 65 6c 6c 5f |ndow (PROCshell_| 00002cf0 41 74 74 61 63 68 48 6f 74 4b 65 79 29 0a 54 68 |AttachHotKey).Th| 00002d00 65 20 77 69 6e 64 6f 77 20 69 64 65 6e 74 69 66 |e window identif| 00002d10 69 65 72 20 73 70 65 63 69 66 69 65 73 20 74 68 |ier specifies th| 00002d20 65 20 6e 61 6d 65 0a 6f 66 20 74 68 65 20 77 69 |e name.of the wi| 00002d30 6e 64 6f 77 20 79 6f 75 20 77 61 6e 74 20 74 6f |ndow you want to| 00002d40 20 61 70 70 65 61 72 20 77 68 65 6e 20 74 68 65 | appear when the| 00002d50 0a 6b 65 79 70 72 65 73 73 20 69 73 20 72 65 63 |.keypress is rec| 00002d60 65 69 76 65 64 2e 20 54 68 69 73 20 70 61 72 61 |eived. This para| 00002d70 6d 65 74 65 72 20 69 73 0a 6f 70 74 69 6f 6e 61 |meter is.optiona| 00002d80 6c 20 61 73 20 79 6f 75 20 6d 69 67 68 74 20 6e |l as you might n| 00002d90 6f 74 20 61 6c 77 61 79 73 20 77 61 6e 74 20 74 |ot always want t| 00002da0 6f 0a 6f 70 65 6e 20 61 20 77 69 6e 64 6f 77 2e |o.open a window.| 00002db0 0a 0a 54 68 65 20 77 69 6e 64 6f 77 20 69 73 20 |..The window is | 00002dc0 61 20 27 64 79 6e 61 6d 69 63 27 20 64 69 61 6c |a 'dynamic' dial| 00002dd0 6f 67 20 62 6f 78 20 77 68 69 63 68 0a 77 69 6c |og box which.wil| 00002de0 6c 20 64 69 73 61 70 70 65 61 72 20 77 68 65 6e |l disappear when| 00002df0 20 3c 45 53 43 3e 20 69 73 20 70 72 65 73 73 65 | <ESC> is presse| 00002e00 64 20 61 6e 64 0a 69 73 20 6f 70 65 6e 65 64 20 |d and.is opened | 00002e10 69 6e 20 73 75 63 68 20 61 20 70 6f 73 69 74 69 |in such a positi| 00002e20 6f 6e 20 74 68 61 74 20 74 68 65 20 6d 6f 75 73 |on that the mous| 00002e30 65 0a 70 6f 69 6e 74 65 72 20 69 73 20 69 6e 20 |e.pointer is in | 00002e40 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 74 68 |the middle of th| 00002e50 65 20 77 69 6e 64 6f 77 0a 28 77 68 65 72 65 20 |e window.(where | 00002e60 70 6f 73 73 69 62 6c 65 29 2e 0a 0a 57 69 6e 64 |possible)...Wind| 00002e70 6f 77 20 48 61 6e 64 6c 65 20 28 73 68 65 6c 6c |ow Handle (shell| 00002e80 5f 41 74 74 61 63 68 48 6f 74 4b 65 79 29 0a 57 |_AttachHotKey).W| 00002e90 68 65 6e 20 74 68 69 73 20 69 73 20 3e 30 20 74 |hen this is >0 t| 00002ea0 68 65 6e 20 74 68 65 20 77 69 6e 64 6f 77 0a 63 |hen the window.c| 00002eb0 72 65 61 74 65 64 20 77 69 6c 6c 20 62 65 20 73 |reated will be s| 00002ec0 74 61 74 69 63 20 69 2e 65 2e 20 69 74 20 77 69 |tatic i.e. it wi| 00002ed0 6c 6c 20 6e 6f 74 0a 62 65 20 72 65 6d 6f 76 65 |ll not.be remove| 00002ee0 64 20 77 68 65 6e 20 74 68 65 20 6d 6f 75 73 65 |d when the mouse| 00002ef0 20 69 73 20 63 6c 69 63 6b 65 64 0a 6f 75 74 73 | is clicked.outs| 00002f00 69 64 65 20 69 74 2c 20 6f 72 20 77 68 65 6e 20 |ide it, or when | 00002f10 3c 45 53 43 3e 20 69 73 20 70 72 65 73 73 65 64 |<ESC> is pressed| 00002f20 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |...-------------| 00002f30 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002f50 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f |-----------..PRO| 00002f60 43 73 68 65 6c 6c 5f 44 6f 42 61 63 6b 67 72 6f |Cshell_DoBackgro| 00002f70 75 6e 64 54 61 73 6b 0a 50 61 72 61 6d 73 20 3d |undTask.Params =| 00002f80 3e 0a 20 20 20 20 20 20 20 20 20 4e 6f 6e 65 0a |>. None.| 00002f90 0a 43 61 6c 6c 65 64 20 65 76 65 72 79 74 69 6d |.Called everytim| 00002fa0 65 20 61 20 6e 75 6c 6c 20 72 65 61 73 6f 6e 20 |e a null reason | 00002fb0 63 6f 64 65 20 69 73 20 72 65 63 65 69 76 65 64 |code is received| 00002fc0 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..--------------| 00002fd0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002ff0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 |----------..PROC| 00003000 73 68 65 6c 6c 5f 48 61 6e 64 6c 65 55 6e 6b 6e |shell_HandleUnkn| 00003010 6f 77 6e 4d 65 73 73 61 67 65 28 29 0a 50 61 72 |ownMessage().Par| 00003020 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 |ams =>. | 00003030 69 6e 74 20 61 64 64 72 65 73 73 20 6f 66 20 6d |int address of m| 00003040 65 73 73 61 67 65 20 62 6c 6f 63 6b 0a 0a 43 61 |essage block..Ca| 00003050 6c 6c 65 64 20 65 76 65 72 79 20 74 69 6d 65 20 |lled every time | 00003060 61 6e 20 75 6e 6b 6e 6f 77 6e 20 6d 65 73 73 61 |an unknown messa| 00003070 67 65 20 69 73 20 72 65 63 65 69 76 65 64 2e 0a |ge is received..| 00003080 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.---------------| 00003090 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000030b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 |---------..PROCs| 000030c0 68 65 6c 6c 5f 41 74 74 61 63 68 43 6c 6f 73 65 |hell_AttachClose| 000030d0 57 69 6e 64 6f 77 48 61 6e 64 6c 65 72 28 29 0a |WindowHandler().| 000030e0 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 |Params =>. | 000030f0 20 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 | int window ha| 00003100 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 20 73 74 |ndle. st| 00003110 72 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 0a |r function name.| 00003120 0a 52 65 67 69 73 74 65 72 73 20 61 20 66 75 6e |.Registers a fun| 00003130 63 74 69 6f 6e 20 6e 61 6d 65 20 74 6f 20 62 65 |ction name to be| 00003140 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 61 6e 20 | called when an | 00003150 0a 43 6c 6f 73 65 57 69 6e 64 6f 77 20 6d 65 73 |.CloseWindow mes| 00003160 73 61 67 65 20 69 73 20 72 65 63 65 69 76 65 64 |sage is received| 00003170 2e 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c |. This is useful| 00003180 0a 74 6f 20 70 72 65 76 65 6e 74 20 74 68 65 20 |.to prevent the | 00003190 77 69 6e 64 6f 77 20 63 6c 6f 73 69 6e 67 20 69 |window closing i| 000031a0 66 20 73 6f 20 64 6f 69 6e 67 0a 77 6f 75 6c 64 |f so doing.would| 000031b0 20 69 6e 76 6f 6c 76 65 20 6c 6f 73 73 20 6f 66 | involve loss of| 000031c0 20 64 61 74 61 2e 0a 0a 54 68 69 73 20 6d 65 73 | data...This mes| 000031d0 73 61 67 65 20 69 73 20 69 73 73 75 65 64 20 77 |sage is issued w| 000031e0 68 65 6e 20 74 68 65 20 77 69 6e 64 6f 77 20 63 |hen the window c| 000031f0 6c 6f 73 65 0a 69 63 6f 6e 20 69 73 20 63 6c 69 |lose.icon is cli| 00003200 63 6b 65 64 20 6f 6e 2e 0a 0a 55 73 65 72 20 46 |cked on...User F| 00003210 4e 20 28 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 |N (PROCshell_Att| 00003220 61 63 68 43 6c 6f 73 65 57 69 6e 64 6f 77 48 61 |achCloseWindowHa| 00003230 6e 64 6c 65 72 29 0a 50 61 72 61 6d 73 20 3d 3e |ndler).Params =>| 00003240 20 0a 20 20 20 20 20 20 20 20 20 4e 6f 6e 65 20 | . None | 00003250 0a 0a 20 20 20 20 20 20 20 3c 3d 0a 20 20 20 20 |.. <=. | 00003260 20 20 20 20 20 62 6f 6f 6c 20 30 20 74 6f 20 64 | bool 0 to d| 00003270 69 73 61 6c 6c 6f 77 20 63 6c 6f 73 65 2c 20 6e |isallow close, n| 00003280 6f 6e 20 30 20 74 6f 0a 20 20 20 20 20 20 20 20 |on 0 to. | 00003290 20 20 20 20 20 20 63 6c 6f 73 65 0a 0a 2d 2d 2d | close..---| 000032a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000032d0 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c |-----..PROCshell| 000032e0 5f 41 74 74 61 63 68 4f 70 65 6e 57 69 6e 64 6f |_AttachOpenWindo| 000032f0 77 48 61 6e 64 6c 65 72 28 29 0a 50 61 72 61 6d |wHandler().Param| 00003300 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e |s =>. in| 00003310 74 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a |t window handle.| 00003320 20 20 20 20 20 20 20 20 20 73 74 72 20 66 75 6e | str fun| 00003330 63 74 69 6f 6e 20 6e 61 6d 65 0a 0a 52 65 67 69 |ction name..Regi| 00003340 73 74 65 72 73 20 61 20 66 75 6e 63 74 69 6f 6e |sters a function| 00003350 20 6e 61 6d 65 20 74 6f 20 62 65 20 63 61 6c 6c | name to be call| 00003360 65 64 20 77 68 65 6e 20 61 6e 20 0a 4f 70 65 6e |ed when an .Open| 00003370 57 69 6e 64 6f 77 20 6d 65 73 73 61 67 65 20 69 |Window message i| 00003380 73 20 72 65 63 65 69 76 65 64 2e 20 54 68 69 73 |s received. This| 00003390 20 69 73 20 75 73 65 66 75 6c 0a 73 6f 20 74 68 | is useful.so th| 000033a0 61 74 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 |at the applicati| 000033b0 6f 6e 20 63 61 6e 20 73 65 74 20 61 20 66 6c 61 |on can set a fla| 000033c0 67 20 74 6f 0a 61 76 6f 69 64 20 64 6f 69 6e 67 |g to.avoid doing| 000033d0 20 77 69 6e 64 6f 77 20 72 65 64 72 61 77 73 20 | window redraws | 000033e0 77 68 69 6c 65 20 74 68 65 20 77 69 6e 64 6f 77 |while the window| 000033f0 20 69 73 0a 63 6c 6f 73 65 64 20 66 6f 72 20 65 | is.closed for e| 00003400 78 61 6d 70 6c 65 2e 0a 0a 54 68 69 73 20 6d 65 |xample...This me| 00003410 73 73 61 67 65 20 69 73 20 69 73 73 75 65 64 20 |ssage is issued | 00003420 77 68 65 6e 20 74 68 65 20 77 69 6e 64 6f 77 20 |when the window | 00003430 69 73 0a 64 72 61 67 67 65 64 20 61 72 6f 75 6e |is.dragged aroun| 00003440 64 20 74 68 65 20 73 63 72 65 65 6e 20 61 73 20 |d the screen as | 00003450 77 65 6c 6c 20 61 73 20 77 68 65 6e 0a 74 68 65 |well as when.the| 00003460 20 70 72 6f 67 72 61 6d 20 6f 70 65 6e 73 20 74 | program opens t| 00003470 68 65 20 77 69 6e 64 6f 77 2e 20 59 6f 75 20 73 |he window. You s| 00003480 68 6f 75 6c 64 20 61 76 6f 69 64 0a 64 6f 69 6e |hould avoid.doin| 00003490 67 20 74 69 6d 65 20 63 6f 6e 73 75 6d 69 6e 67 |g time consuming| 000034a0 20 73 74 75 66 66 20 69 6e 20 74 68 65 20 66 75 | stuff in the fu| 000034b0 6e 63 74 69 6f 6e 20 74 68 61 74 0a 69 73 20 63 |nction that.is c| 000034c0 61 6c 6c 65 64 20 74 68 65 72 65 66 6f 72 65 2e |alled therefore.| 000034d0 0a 0a 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 |..User FN (PROCs| 000034e0 68 65 6c 6c 5f 41 74 74 61 63 68 4f 70 65 6e 57 |hell_AttachOpenW| 000034f0 69 6e 64 6f 77 48 61 6e 64 6c 65 72 29 0a 50 61 |indowHandler).Pa| 00003500 72 61 6d 73 20 3d 3e 20 0a 20 20 20 20 20 20 20 |rams => . | 00003510 20 20 4e 6f 6e 65 20 0a 0a 20 20 20 20 20 20 20 | None .. | 00003520 3c 3d 0a 20 20 20 20 20 20 20 20 20 62 6f 6f 6c |<=. bool| 00003530 20 30 20 74 6f 20 64 69 73 61 6c 6c 6f 77 20 6f | 0 to disallow o| 00003540 70 65 6e 2c 20 6e 6f 6e 20 30 20 74 6f 0a 20 20 |pen, non 0 to. | 00003550 20 20 20 20 20 20 20 20 20 20 20 20 6f 70 65 6e | open| 00003560 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a |. .| 00003570 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000035a0 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 |--------..PROCsh| 000035b0 65 6c 6c 5f 41 74 74 61 63 68 50 72 65 51 75 69 |ell_AttachPreQui| 000035c0 74 48 61 6e 64 6c 65 72 28 29 0a 50 61 72 61 6d |tHandler().Param| 000035d0 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 73 74 |s =>. st| 000035e0 72 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 0a |r function name.| 000035f0 0a 52 65 67 69 73 74 65 72 73 20 61 20 66 75 6e |.Registers a fun| 00003600 63 74 69 6f 6e 20 6e 61 6d 65 20 74 6f 20 62 65 |ction name to be| 00003610 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 61 20 0a | called when a .| 00003620 50 72 65 51 75 69 74 20 6d 65 73 73 61 67 65 20 |PreQuit message | 00003630 69 73 20 72 65 63 65 69 76 65 64 2e 20 54 68 69 |is received. Thi| 00003640 73 20 67 69 76 65 73 20 74 68 65 0a 61 70 70 6c |s gives the.appl| 00003650 69 63 61 74 69 6f 6e 20 61 20 63 68 61 6e 63 65 |ication a chance| 00003660 20 74 6f 20 73 61 76 65 20 64 61 74 61 20 6f 72 | to save data or| 00003670 20 61 62 6f 72 74 0a 74 68 65 20 73 68 75 74 64 | abort.the shutd| 00003680 6f 77 6e 2e 0a 0a 54 68 69 73 20 6d 65 73 73 61 |own...This messa| 00003690 67 65 20 69 73 20 69 73 73 75 65 64 20 77 68 65 |ge is issued whe| 000036a0 6e 20 74 68 65 20 74 61 73 6b 20 69 73 20 71 75 |n the task is qu| 000036b0 69 74 0a 66 72 6f 6d 20 74 68 65 20 54 61 73 6b |it.from the Task| 000036c0 20 4d 61 6e 61 67 65 72 2c 20 6f 72 20 77 68 65 | Manager, or whe| 000036d0 6e 20 43 54 52 4c 2d 53 48 49 46 54 2d 46 31 32 |n CTRL-SHIFT-F12| 000036e0 0a 69 73 20 70 72 65 73 73 65 64 20 28 75 6e 64 |.is pressed (und| 000036f0 65 72 20 52 49 53 43 20 4f 53 20 33 29 2e 0a 0a |er RISC OS 3)...| 00003700 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 68 65 |User FN (PROCshe| 00003710 6c 6c 5f 41 74 74 61 63 68 50 72 65 51 75 69 74 |ll_AttachPreQuit| 00003720 48 61 6e 64 6c 65 72 29 0a 50 61 72 61 6d 73 20 |Handler).Params | 00003730 3d 3e 20 0a 20 20 20 20 20 20 20 20 20 4e 6f 6e |=> . Non| 00003740 65 20 0a 0a 20 20 20 20 20 20 20 3c 3d 0a 20 20 |e .. <=. | 00003750 20 20 20 20 20 20 20 62 6f 6f 6c 20 6e 6f 6e 20 | bool non | 00003760 30 20 74 6f 20 61 6c 6c 6f 77 20 71 75 69 74 2c |0 to allow quit,| 00003770 20 30 20 74 6f 0a 20 20 20 20 20 20 20 20 20 20 | 0 to. | 00003780 20 20 20 20 63 61 6e 63 65 6c 20 71 75 69 74 0a | cancel quit.| 00003790 0a 54 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 69 |.This function i| 000037a0 73 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 61 20 |s called when a | 000037b0 50 72 65 51 75 69 74 0a 6d 65 73 73 61 67 65 20 |PreQuit.message | 000037c0 69 73 20 72 65 63 65 69 76 65 64 2e 0a 0a 2d 2d |is received...--| 000037d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003800 2d 2d 2d 2d 2d 2d 0a |------.| 00003807