Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 » StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/WimpLib

StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/WimpLib

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

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

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2
Filename: StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/WimpLib
Read OK:
File size: 805C bytes
Load address: 0000
Exec address: 0000
File contents
HELP(�����,����$DIR$�� G����?r,PROCh8G���&�?r�FN�lG���*���	!Root�vG����kI�menucontrolX{F���_��AAtoggleflag�{F������AUhelpformat�|F���P��einfoDIR$,,LF���Mp�M�initlibrary�F����q�M�notemessaget	F����M�errorHF������MLibmenu�F������M�menuHF���0��M�recreatemenu�F������MRclosewinD
F�����MPopenwin�
F�����M�openwinatXF�����Mlopenwincentre�F�����Mforceredraw�F����{O�winsetextent�F����M�openwinto\F���_��M|releasefontmenu�F���{��M�menutick�F���{��M�menushadetF�����/��setmenutextdF���J��MFdeleteicon�F����{O�readhelpxF�����M�sendhelp@F�����Maopenmessages�F������MoclosemessagesF������M�releaseftmenu�F���-��M�iconshadexF����M�iconstate@F���^�F�seticonbitLF���G�M}redrawicon�F���"�M�seticontext� F����H	�dragiconp!F���T<�}windowtitle�"F���i,�M�readtaskarea�#F����e�M�setcaretend�$F����m�M�setcaretposx%F����A:R�getcaretpos0&F���Ӆ�M�getptrpos�&F����A���writecmos�'F����vO�menuuntick�(F���_�M�seticonvalidl)G���?��makestatusfileT+F�����M~closestatusfile�+F���⪋O�statusput�,F����O�statusoption�-F����‹O�statusnextx.F���_��M�releasex/F���%�M�pressicon0F���ô�Ostatusflag1F���b25SCshowfreeP3F������S�eerror<5F���y���dragsave7F�����VresizewintoDATA�PROCinitlibrary
#Parent !Root
Initialises library variables.

Call this routine at the start of any program that uses the WimpLib file.
DATA�PROCnotemessage(number)
#Parent !Root
=>	{/}number{/}	message number

Mark the given message as receiveable. Used for RISC OS 3 applications.
DATA�PROCerror
#Parent !Root
Called at any basic error. eg {fCode}ON ERROR PROCerror:GOTO ????{f}
ERROR numbers &800+
#Indent 2
0 = OK
1 = Cancel
2 = OK and Cancel (to quit)
#Indent
Cancel only sets the {/}quit%{/} variable to TRUE and the calling routine will therefore need to exit if this is set, however holding Shift-Ctrl-Q whilst clicking a button will exit the program. If Cancel is clicked, then the system variable Error$ will be set to the error message.
DATALPROCibmenu
#Parent !Root
Create an iconbar menu from {/}ibmenu%{/}.
DATA�PROCmenu(menu,x,y)
#Parent !Root
=>	{/}menu{/}	pointer to menu
	{/}x{/}		x co-ordinate, or -1 for mouse position
	{/}y{/}		y co-ordinate
	
Create a menu at co-ords given.
DATA�PROCrecreatemenu
#Parent !Root
Recreate the previous menu created in its previous location. Only works if PROCmenu or PROCibmenu has been called previously.
DATARPROCclosewin(win)
#Parent !Root
=>	{/}win{/}	window handle

Close window.
DATAPPROCopenwin(win)
#Parent !Root
=>	{/}win{/}	window handle

Open window.
DATA�PROCopenwinat(win,x,y)
#Parent !Root
#Wrap Off
=>	{/}win{/}	window handle
	{/}x{/}		left of window on screen
	{/}y{/}		top of window on screen

Open window positioning top-left corner.
DATAlPROCopenwincentre(win)
#Parent !Root
=>	{/}win{/}	window handle

Open window centred on the screen.
DATAPROCforceredraw(win,l,t,r,b)
#Parent !Root
=>	{/}win{/}	window handle, or -1 for whole screen
	{/}l{/}		left of redraw box
	{/}t{/}		top of redraw box
	{/}r{/}		right of redraw box
	{/}b{/}		bottom of redraw box

Redraw the specified window within the specified co-ordinates.DATA�PROCwinsetextent(win,l,t,r,b)
#Parent !Root
=>	{/}win{/}	window handle
	{/}l{/}		left of extent
	{/}t{/}		top of extent
	{/}r{/}		right of extent
	{/}b{/}		bottom of extent
	
Set the maximum extent of window (TWA). If any of the variables are -1 then they are not changed.

In WimpLib2 this uses <Wimp_GetWindowInfo=>SWI:Wimp_GetWindowInfo> which returns the entire window block including icons to b%, therefore it is vital that the block has sufficient space to store them.
DATA�PROCopenwinto(win,l,t,r,b)
#Parent !Root
=>	{/}win{/}	window handle
	{/}l{/}		left of VWA in TWA
	{/}t{/}		top of VWA in TWA.
	{/}r{/}		right of VWA in TWA
	{/}b{/}		bottom of VWA in TWA.

Open window at position within TWA.

Window does not move, but its size is altered to difference between l&r and t&b. Top-left of VWA is positioned to tl.
If rb = -1 then no actual size change, just position.
DATA|PROCreleasefontmenu
#Parent !Root
Release memory used by <FNgetfontmenu>.

This must be done before a program exits.DATA�PROCmenutick(menu,number,toggle)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}number{/}	option to change
	{/}toggle{/}	<flag=>toggleflag> for whether to tick

Tick/untick option on menu.
DATA�PROCmenushade(menu,number,toggle)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}number{/}	option to alter
	{/}toggle{/}	<flag=>toggleflag> for whether to shade

Shade/unshade option on menu.
DATA�PROCsetmenutext(menu,number,text$)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}number{/}	option number
	{/}text${/}	new text

Set the text for option on menu. Text must fit into space allocated - no checks are performed.
DATAFPROCdeleteicon(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle

Delete icon from window.

Note: The icon is deleted, but space is still allocated to it in the window block, hence if a new icon is created the new icon will take the space allocated to the previous icon and hence it's handle.
DATA�PROCreadhelp(win,icon,to)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
	{/}to{/}	task handle to send message to

Read help from application and send it back.

Usually called with 
{fCode}RESTORE datastatements: PROCreadhelp(b%!32,b%!36,b%!4){f}.
Menus are responded to correctly and give messages under RO3. See <PROCsendhelp> for more information.
WimpLib2 has no support for menu help.

Click <here=>helpformat> for DATA format.
DATA�PROCsendhelp(help$,to)
#Parent !Root
=>	{/}help${/}	Message to send
	{/}to{/}	task to send to

Send help to application.

<Special codes=>SWI:Wimp_UM503Codes> may be used under RO3 !Help or !QuickHlp. In addition to the !Help codes :
�String$� will include string {/}string${/}
>token[:subst1[:subst2[:subst3]]] will look-up the token in the MessageTrans file.

If the is no full stop at the end of the line (or before |M) then one will be added.
DATAaPROCopenmessages
#Parent !Root
Open a MessageTrans file (Appdir$+".Messages") for input.
DATAoPROCclosemessages
#Parent !Root
Close the MessageTrans file previously opened with <PROCopenmessages>.
DATA�PROCreleaseftmenu
#Parent !Root
Releases the space used by the filetype menu as created by <FNcreateftmenu>.

This must be done before a program exits.
DATA�PROCiconshade(win,icon,toggle)
#Parent !Root
=>	{/}window{/}	window handle
	{/}icon{/}	icon handle
	{/}toggle{/}	<flag=>toggleflag> for whether to shade

Shade, unshade or toggle an icon.
DATA�PROCiconstate(win,icon,toggle)
#Parent !Root
=>	{/}window{/}	window handle
	{/}icon{/}	icon handle
	{/}toggle{/}	<flag=>toggleflag> for whether to select

Select, unselect or toggle an icon.
DATAPROCseticonbit(win,icon,bit,toggle)
#Parent !Root
=>	{/}window{/}	window handle
	{/}icon{/}	icon handle
	{/}bit{/}	<bit=>SWI:wimp_iconflags> to change
	{/}toggle{/}	<flag=>toggleflag> for whether to shade

Set/unset/toggle a particular bit in an icon's flags
DATA}PROCredrawicon(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle

Redraw the specified icon.DATA�PROCseticontext(win,icon,text$)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
	{/}text${/}	new text

Set icon's text string (only for indirected sprites).

Note: Do not overrun maximum length of indirection buffer.
DATA�PROCdragicon(window,icon,flag)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
	{/}flag{/}	TRUE to restrict to the window

Start a drag of an icon.
DATA}PROCwindowtitle(win,title$)
#Parent !Root
=>	{/}win{/}	window handle
	{/}title${/}	new title of window

Set title of window. Indirection must be used for title bar.

In WimpLib2 this uses <Wimp_GetWindowInfo=>SWI:Wimp_GetWindowInfo> which returns the entire window block including icons to {/}b%{/}, therefore it is vital that the block has sufficient space to store them.
DATA�PROCreadtaskarea(task,loc,to,len)
#Parent !Root
=>	{/}task{/}	source application's handle
	{/}loc{/}	address in source
	{/}to{/}	address in our application
	{/}len{/}	length to read

Read a block from given task into application space.
DATA�PROCsetcaretend(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle

Set the carets location as the end of the text in the specified icon.
DATA�PROCsetcaretpos(win,icon,chars)
#Parent !Root
=>	{/}win{/}	window handle, or -1 to lose
	{/}icon{/}	icon handle
	{/}chars{/}	number of characters

Set the carets location as the specified number of characters into the icon.
DATA�PROCgetcaretpos(win,icon,chars)
#Parent !Root
<=	{/}win{/}	window handle
	{/}icon{/}	icon handle
	{/}chars{/}	character offset into string

Return the location of the caret.
DATA�PROCgetptrpos(x,y,win,icon)
#Parent !Root
<=	{/}x{/}		mouse x
	{/}y{/}		mouse y
	{/}win{/}	window handle
	{/}icon{/}	icon handle

Return the location of the pointer.
DATA�PROCwritecmos(byte,value)
#Parent !Root
#Wrap off
=>	{/}byte{/}	<CMOS byte to change=>SWI:os_bytecmos>
	{/}value{/}	new value of byte
#Wrap

Write a byte of configuration info into CMOS RAM.
DATA�PROCmenuuntick(menu,start,end)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}start{/}	option to start at
	{/}end{/}	option to end at, or -1 for end of menu

Unticks all the options between those specified (inclusive).
DATA�PROCseticonvalid(win,icon,valid$)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
	{/}valid${/}	new validation string

Set icon's validation string. Do not overrun validation strings buffer.
DATA�PROCmakestatusfile(file$)
#Parent !Root
=>	{/}file${/}	file to create

Begin making a status file for use by this program alone (or <!Config+=>ConfigPlus:info> if supported).

The file is created with type text and headed with {/}Appname${/} to mark it as belonging to this application.

Related commands :
#Tab;Indent 2
<PROCstatusput>		stores a string
<PROCstatusoption>	stores a variable
<PROCstatusflag>	stores a flag
<PROCclosestatusfile>	finishes making the file.
#Indent
DATA~PROCclosestatusfile
#Parent !Root
Close a status file previously opened by <PROCmakestatusfile> or <FNreadstatusfile>
DATA�PROCstatusput(tag$,value$)
#Parent !Root
=>	{/}tag${/}	tag code
	{/}value${/}	value to store

Store a string in the status file with reference tag.

This will be stored in the file as :
  {fCode}\<tag$>:\<value$>{f}
DATA�PROCstatusoption(tag$,value)
#Parent !Root
=>	{/}tag${/}	tag code
	{/}value{/}	value to store

Store a variable in the status file with reference tag.

This will be stored in the file as :
  {fCode}\<tag$>:%\<value>{f}
DATA�PROCstatusnext(tag$,value$)
#Parent !Root
#Wrap off
<=	{/}tag${/}	tag code, or *E*N*D* if EOF
	{/}value${/}	value
#Wrap

This returns the next tag and value in the file. Comment lines preceeded by # will be ignored.
DATA�PROCrelease(pointer) - WimpLib version
#Parent !Root
=>	{/}pointer{/}	pointer to block
<=	-1 to indicate to block.

Release a claimed block of RMA. 

Note: This call is replaced in HeapLib by a Heap claim <PROCrelease=>HeapLib:PROCrelease> call.DATA�PROCpressicon(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle

Press an icon for about � second and release.DATAPROCstatusflag(tag$,flag)
#Parent !Root
=>	{/}tag${/}	tag code
	{/}flag{/}	flag to store

Store a flag in the status file with reference tag.

This will be stored in the file as :
#Tab
  {fCode}\<tag$>:%On{f}		if TRUE
  {fCode}\<tag$>:%Off{f}	if FALSE
DATACPROCshowfree
#Parent !Root
This call displays on the window {/}infobox%{/} the amount of space taken up by the program, variables and free space. If the <Heap Library=>HeapLib:!Root> is installed, then information on the heap will also be displayed. Note that any libraries installed will be included in the variable usage entry.

This is best used during testing if the user clicks on the {/}infobox%{/} window

Note: The window should really be one from the Skeleton application as this has the correct number of icons in the correct places with the correct validation.DATA�PROCeerror
#Parent !Root
This is the single tasking version of PROCerror for running (strangely) in the desktop environment. Mostly it is used for debugging purposes.

Usually there are numerous variables you need to initialise before the Wimp is set up for use and therefore a different error handler is required. Usage is usually :

{fCode}ON ERROR PROCeerror:END{f}

The Error$ and Error$Task variables are set up correctly and the error is displayed in a standard Wimp error box.DATA�PROCdragsave(window,icon,type,size)
#Parent !Root
=>	{/}win{/}	window handle of save box we came from
	{/}icon{/}	icon handle of filename icon (usually 2)
	{/}type{/}	<filetype=>Filetypes:!Root>
	{/}size{/}	estimated size of the file (or -1 if unknown)

Initiates the DataSave protocol after a drag has been completed. You should listen for a <DataSaveAck=>SWI:Wimp_UM2> message for success, or a acknowledged (reason 19) <DataSave=>SWI:Wimp_UM1> for failure.
DATAVPROCresizewinto(win,l,t,r,b)
#Parent !Root
=>	{/}win{/}	window handle
	{/}l{/}		left of TWA
	{/}t{/}		top of TWA
	{/}r{/}		right of TWA
	{/}b{/}		bottom of TWA

Resizes window on screen to the size given.

Window will not change in size, unless it is currently at full size in which case it will change to the new size of the window.
DIR$�� ?G�����Idecodemenu$AF�����M	getfontmenu0BF���T��M�menuticked�BF����M�menushaded�CF������M�getmenutext,DF���@4�Nscreateicon�FG���0�4%?CreateIconBarIcon�IF���V��M�indirect�JF���Ev�M
loadtemplate�KF���K{�M�loadsprites(LG����s?msgtokenhMF���P��McreateftmenupNF���i�M�msgtextPF����QU�createmenu�PF���y��M�systemvar�QF����)�string0TRF������M�geticonstate�RF����M�geticontext�SF�����M�geticonvalidXTF���UH�Mqlower�TF����J�Mnupper<UF���mL�MNtidy�VF���~�M�GetEnvtWF����{O�filetype(XF����r�M�filelength�XF����եerrorbox�YF���}�_N�claim�ZF���R|O�taskname�[F������M�windowtask\F���&�readtaskstring�\F���bC�M�backofwinstack�]F����Z�M�winstacknextL^F���m�M�leafname�^F����a�M�pathnameh_F���۫{Olongfilenamex`F���U��M�readcmos(aF����j�M�swinumber�aF����N�M�stripspaces`bF���}Q�MsubstvarsldF���&Z�M�substvarspfF����gstrans�fF����Oreadstatusfile�hF����ЋO�statusget�iF���$�O�statusgetv8jF���j�{ObasetypeDkF�����{O%findtaskllF����֋O�statusgetflagDATAFNdecodemenu(menu)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
<=	string created from menu entries

Return menu string from data stored at b%, using menu as template. Font menus are handled correctly and will return strings for use in <Font_FindFont=>SWI:Font_FindFont>. Keyboard shortcuts will be removed if they are recognised. This includes all the keys prefixed by ^ or the up arrow, plus those described in <FNcreatemenu=>menucontrol>.

Use curmenu% if created using <PROCibmenu> or <PROCmenu>.
DATA	FNgetfontmenu
#Parent !Root
#Wrap off
\<=	pointer to menu block of font menu
	or -1 if not enough space
#Wrap

Return location of font menu. Block is stored in RMA (unless <HeapLib=>HeapLib:!Root> installed) and must be released with <PROCreleasefontmenu>.
DATA�FNmenuticked(menu,item)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}item{/}	option to check
\<=	TRUE if item is ticked

Check if menu item is ticked.
DATA�FNmenushaded(menu,item)
#Parent !Root
=>	{/}menu{/}	pointer to menu block
	{/}item{/}	option to check
\<=	TRUE if item is shaded

Check if menu item is shaded.
DATA�FNgetmenutext(menu,number)
#Parent !Root
=>	{/}menu{/}	pointer to menu
	{/}number{/}	option number to read
\<=	text of option

Read the text from option on menu.
DATAsFNcreateicon(win,x,y,width,height,title$,valid$,col,esg,but,flags)
#Parent !Root
=>	{/}win{/}	window handle
	{/}x{/}		left of icon
	{/}y{/}		top of icon
	{/}width{/}	width of icon across
	{/}height{/}	height of icon down
	{/}title${/}	text string, or CHR$(0) for a full path name
	{/}valid${/}	validation string or null for none
	{/}col{/}	colour of icon &BF (B=background, F=foreground) or font handle
	{/}ESG{/}	Exculsive Selection Group or 0 for none
	{/}but{/}	<button type=>SWI:Wimp_iconbutton> (0-15)
	{/}flags{/}	other <flags=>SWI:Wimp_iconflags> {fCode}%AFVHB00{f} (A=Font, F=Filled, B=Border)

Create an icon.
DATA?FNCreateIconBarIcon(sprite$,name$,position)
#Parent !Root
=>	{/}sprite${/}	sprite to use (from wimp pool)
	{/}name${/}	text to appear under icon (or null)
	{/}position{/}	<iconbar position=>.position>

Create an icon for the icon bar.
#Subpage position
FNCreateIconBarIcon postion
This is a masked byte to indicate the position you wish the icon to take on the iconbar. The low byte is the absolute <position as given to Wimp_CreateIcon=>SWI:Wimp_CreateIcon.position>, and the next byte(s) up the parameter. For <priorities=>SWI:Wimp_CreateIcon.priorities>, this will be shifted up by 16 bits; for icons, this is the icon number.

Therefore to create an icon to the right of icon 7 on the iconbar you would use a value of &0704, and to create an icon on the left of the icon bar with priority &78000000 you would use &7807.DATA�FNindirect(text$)
#Parent !Root
=>	{/}text${/}	string to indirect
\<=	pointer to string, 0 if null string

Place string in indirection buffer. Generate errors if no more room.
DATA
FNloadtemplate(name$,spriteblock)
#Parent !Root
=>	{/}name${/}		name of template to load
	{/}spriteblock{/}	pointer to block, or 1 for wimp pool
<=	pointer to window block

Load named template and create window. (File to be accessed is Appdir$+".Templates")
DATA�FNloadsprites(file$)
#Parent !Root
=>	{/}file${/}	name of file
<=	pointer to sprite area

Load sprite file into a new area.
DATA?FNmsgtoken(token$)
#Parent !Root
=>	{/}token${/}	token to look up

Translate a token to a message. Parameters for substitution are passed using :'s between them. If you wish to supply a parameter with :'s in, then you should prefix it with a | character. This will cause the rest of the line to be substituted.
DATAFNcreateftmenu
#Parent !Root
\<=	pointer to menu block of filetype menu

Creates a filetype menu and returns a pointer to its structure. Block is stored in RMA (unless <HeapLib=>HeapLib:!Root> is installed) and must be released with <PROCreleaseftmenu>.
DATA�FNmsgtext(text$)
#Parent !Root
=>	{/}text${/}	text to process
\<=	text string

Process text and return string from Messages file if appropriate.

If prefixed by a > symbol the rest of the line will be passed on to <FNmsgtoken> and processed by the MessageTrans module. This is usually used where it is possible for a text entry to be literal or taken from a messages file. The <FNerrorbox> routine is a good example.
DATA�FNcreatemenu(menu$)
#Parent !Root
#Wrap Off
=>	{/}menu${/}	<control string=>menucontrol>
\<=	pointer to menu block
	{/}options%{/}	number of options on menu
#Wrap On

Create a menu given a control string.
DATA�FNsystemvar(variable$)
#Parent !Root
#Wrap Off
=>	{/}variable${/}	system variable name
<=	value or null if non-existant.

Return the value of a system variable as a string.DATA�FNstring0(location)
#Parent !Root
=>	{/}location{/}	pointer to string to return
<=	string at location

Return 0-terminated (or ctrl-terminated) string at location.
DATA�FNgeticonstate(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
\<=	TRUE if icon selected

Is the icon selected ?DATA�FNgeticontext(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
\<=	text string for icon (or sprite if only sprite)

Return text from icon.
DATA�FNgeticonvalid(win,icon)
#Parent !Root
=>	{/}win{/}	window handle
	{/}icon{/}	icon handle
\<=	validation string

Return icon's validation string. An error will occur if direct string.
DATAqFNlower(a$)
#Parent !Root
=>	{/}a${/}	string
<=	string in lower case

Return given string in lower case.
DATAnFNupper(a$)
#Parent !Root
=>	{/}a${/}	string
<=	upper case string

Return given string in upper case.
DATANFNtidy(a$)
#Parent !Root
=>	{/}a${/}	string
<=	tidied string

Return given string in tidy format. All characters are lower case, except the first and those succeeding non-alphabetic characters, which are upper case. Apostrophes are considered to be alphabetic characters and therefore "THERE'S" will be returned as "There's".
DATA�FNGetEnv
#Parent !Root
<=	environment string stripped of loader

This is the string which is used to load the application. It may contain any string which is be acted upon on startup, eg. a file to load or options to set.
DATA�FNfiletype(file$)
#Parent !Root
=>	{/}file${/}	filename
<=	-2 if not found
	-1 if untyped
	0-&FFF if typed
	&1000 if directory or image
	
Return the file type of a file.
DATA�FNfilelength(file$)
#Parent !Root
=>	{/}file${/}	file to check
<=	length of file, or -1 if not found

Return the length of a file.
DATAFNerrorbox(title$,message$,flags)
#Parent !Root
=>	{/}title${/}	title of window
	{/}message${/}	message within window
	{/}flags{/}	Wimp_ReportError <flags=>SWI:Wimp_ReportError0>
<=	1 for OK
	2 for Cancel

Create an error box with up to 2 buttons.
DATA�FNclaim(size) - WimpLib version
#Parent !Root
=>	{/}size{/}	size of block
<=	pointer to block, or -1 if no room

Claim a block of RMA.

Note: This call is replaced in HeapLib by a Heap claim <FNclaim=>HeapLib:FNclaim> call.
DATA�FNtaskname(task)
#Parent !Root
=>	{/}task{/}	task handle
<=	tasks name, or "None" if invalid

Return a given tasks name.

WimpLib2 always returns "Unknown", as <TaskManager_TaskNameFromHandle=>SWI:TaskManager_TaskNameFromHandle> is not supported.DATA�FNwindowtask(win)
#Parent !Root
=>	{/}win{/}	window handle
<=	task handle of owner

Return task handle who owns window.
DATA�FNreadtaskstring(task,loc)
#Parent !Root
=>	{/}task{/}	task handle to read
	{/}loc{/}	location of string in task

Read a ctrl-terminated string from task at location loc.
DATA�FNbackofwinstack
#Parent !Root
<=	handle of back at back of stack

Return window handle of back of window stack.

Note: infobox% must be a valid window for this to work, (preferable a sub-menu window).
DATA�FNwinstacknext(win)
#Parent !Root
=>	{/}win{/}	window handle
<=	window handle, or -1 if at front

Return window handle of next window in front of specified.
DATA�FNleafname(file$)
#Parent !Root
=>	{/}file${/}	file
<=	leaf of filename

Return the leafname of the specified file path.
DATA�FNpathname(file$)
#Parent !Root
=>	{/}file${/}	filename
<=	pathname of filename, or @ if none

Return the pathname of the specified file path.
DATAFNlongfilename(file$)
#Parent !Root
=>	{/}file${/}	file to change
<=	full filename

Return the full pathname of the file. This performs canonicalisation of the filename.

WimpLib2 returns {/}file${/}, because <OS_FSControl,37=>SWI:os_fscontrol37> is not supported.DATA�FNreadcmos(byte)
#Parent !Root
#Wrap off
=>	{/}byte{/}	<CMOS byte to read=>SWI:os_bytecmos>
<=	value of byte
#Wrap

Read a byte of configuration info from CMOS RAM.
DATA�FNswinumber(swi$)
#Parent !Root
=>	{/}swi${/}	SWI name
<=	SWI number

Return SWI number code of the specified SWI string.
DATA�FNstripspaces(text$)
#Parent !Root
=>	{/}text${/}	string to strip
<=	string without any padding spaces

Returns string without any spaces on either the left or right sides.DATAFNsubstvars(text$)
#Parent !Root
=>	{/}text${/}	string to process
<=	substituted text

Performs variable substitution on a string. Variable names are delimited by � symbols and may be either strings or values.

For example :

{fCode}FNsubstvars("�city$� is the capital of France"){f} => {fCode}"Paris is the capital of France"{f}
if city$ = {fCode}"Paris"{f}.

{fCode}FNsubstvars("�city$� has �pop� people in it"){f} => {fCode}"Paris has 61000 people in it"{f}
if city$ = {fCode}"Paris"{f} and pop = {fCode}61000{f}DATA�FNsubstvarsp(text$,prefix$)
#Parent !Root
=>	{/}text${/}	string to process
<=	substituted string

Performs variable substitution on string using a prefix. Substitution is as in <FNsubstvars>, except that variable substituted is prefixed by the string {/}prefix${/}

So {fCode}FNsubstvarsp("Hello �name$�","your"){f} would return {fCode}"Hello Justin"{f} if yourname$ contained {fCode}"Justin"{f}DATA�FNgstrans(text$)
#Parent !Root
=>	{/}text${/}	string to process
<=	GSTrans'ed string

Performs a <OS_GSTrans=>SWI:OS_GSTrans> call on string to convert '|' control codes to real codes.DATAFNreadstatusfile(file$)
#Parent !Root
=>	{/}file${/}	filename to open
<=	TRUE = all ok, FALSE = error occured

Opens a status file and returns its success in doing so. Reasons for errors include the file not existing, being a directory or belonging to another application. Usually the file should have the leaf Options.

Related commands :
#Tab;Indent 2
<PROCstatusnext>	reads the next entry
<FNstatusget>		reads a string
<FNstatusgetv>		reads a variable
<FNstatusgetflag>	reads a flag
<PROCclosestatusfile>	finishes reading the file.
DATA�FNstatusget(code$)
#Parent !Root
=>	{/}tag${/}	tag code
<=	string under tag code, or *E*N*D* if not found

This function returns the string value of tag from the status file.
DATA�FNstatusgetv(tag$)
#Parent !Root
#Wrap off
=>	{/}tag${/}	tag code
<=	value of tag, or 0 if not found.
#Wrap

Return a tagged value from status file.
DATAFNbasetype(file$)
#Parent !Root
=>	{/}file${/}	filename
<=	-2 if not found
	-1 if file
	0-&FFF if image
	&1000 if directory
	
Return the file type of an image file or directory

In WimpLib2 this does not return the image type because images are not supported.DATA%FNfindtask(task$)
#Parent !Root
=>	{/}task${/}	task name
<=	task handle, or -1 if not found

Search for a given task and return the first tasks handle whose name matches.

WimpLib2 will always return -1, as <TaskManager_EnumerateTasks=>SWI:TaskManager_EnumerateTasks> is not supported.DATA�FNstatusgetflag(tag$)
#Parent !Root
#Wrap off
=>	{/}tag${/}	tag code
<=	TRUE or FALSE
#Wrap

Return a tagged flag from status file.
DATA�	WimpLib routines
Main application
#Indent 2
#Table Columns 3
<PROCinitlibrary>
<PROCnotemessage>
<FNloadtemplate>
<FNloadsprites>
<FNGetEnv>
<FNsystemvar>
<PROCerror>
<PROCeerror>
<FNerrorbox>
<PROCshowfree>
#EndTable
#Indent

Menu manipulation
#Indent 2
#Table Columns 3
<FNcreatemenu>
<FNindirect>
<PROCibmenu>
<PROCmenu>
<PROCrecreatemenu>
<PROCmenuuntick>
<PROCmenutick>
<PROCmenushade>
<FNmenuticked>
<FNmenushaded>
<PROCsetmenutext>
<FNgetmenutext>
<FNdecodemenu>
<FNgetfontmenu>
<PROCreleasefontmenu>
<FNcreateftmenu>
<PROCreleaseftmenu>
#EndTable
#Indent

Window manipulation
#Indent 2
#Table Columns 3
<PROCclosewin>
<PROCopenwin>
<PROCopenwinat>
<PROCopenwincentre>
<PROCopenwinto>
<PROCresizewinto>
<PROCwinsetextent>
<PROCforceredraw>
<PROCwindowtitle>
#EndTable
#Indent

Icon manipulation
#Indent 2
#Table Columns 3
<FNcreateicon>
<PROCdeleteicon>
<FNCreateIconBarIcon>
<PROCiconshade>
<PROCiconstate>
<PROCseticonbit>
<FNgeticonstate>
<PROCredrawicon>
<FNgeticontext>
<PROCseticontext>
<FNgeticonvalid>
<PROCseticonvalid>
<PROCdragicon>
<PROCdragsave>
<PROCpressicon>
#EndTable
#Indent

!Help responsive routines
#Indent 2
#Table Columns 3
<PROCreadhelp>
<PROCsendhelp>
#EndTable
#Indent

MessageTrans interface routines
#Indent 2
#Table Columns 2
<PROCopenmessages>
<PROCclosemessages>
<FNmsgtoken>
<FNmsgtext>
#EndTable
#Indent

String manipulation
#Indent 2
#Table Columns 3
<FNstring0>
<FNlower>
<FNupper>
<FNtidy>
<FNstripspaces>
<FNsubstvars>
<FNsubstvarsp>
<FNgstrans>
<FNswinumber>
#EndTable
#Indent

File information routines
#Indent 2
#Table Columns 3
<FNfiletype>
<FNbasetype>
<FNfilelength>
<FNleafname>
<FNpathname>
<FNlongfilename>
#EndTable
#Indent

Module workspace manipulation
#Indent 2
#Table Columns 2
<FNclaim>
<PROCrelease>
#EndTable
#Indent

Task interaction routines
#Indent 2
#Table Columns 3
<FNtaskname>
<FNwindowtask>
<FNfindtask>
<FNreadtaskstring>
<PROCreadtaskarea>
<FNbackofwinstack>
<FNwinstacknext>
#EndTable
#Indent

Caret and pointer control routines
#Indent 2
#Table Columns 2
<PROCsetcaretend>
<PROCsetcaretpos>
<PROCgetcaretpos>
<PROCgetptrpos>
#EndTable
#Indent

Configuration settings control
#Indent 2
#Table Columns 2
<FNreadcmos>
<PROCwritecmos>
#EndTable
#Indent

Status file control routines
#Indent 2
#Table Columns 3
<PROCmakestatusfile>
<PROCclosestatusfile>
<FNreadstatusfile>
<PROCstatusput>
<PROCstatusoption>
<PROCstatusflag>
<PROCstatusnext>
<FNstatusget>
<FNstatusgetv>
<FNstatusgetflag>
#EndTable
#Indent

<Information=>info> on WimpLib
DATA�Menu control strings
BNF defines as (/ is OR, | is |) :
Menu	::=	\<Title>/\<Option>
Option	::=	\<Item>/\<Item>{fCode}|{f}\<Option>
Item	::=	\<Name>/\<Name>{fCode}]{f}\<Flags>
Flags	::=	\<Flag>/\<Flag>{fCode},{f}\<Flags>
Flag	::=	{fCode}T{f}/{fCode}D{f}/{fCode}W{f}/{fCode}M{f}/{fCode}S{f}/{fCode}K{f}<\<key\>=>.keys>/{fCode}>{f}\<Menu%>/{fCode}}{f}\<Sprite>

Comma is not required if single letter flags used. Sprite is in Wimp pool and if it does not start with sm then is shrunk to half size.

Example : {fCode}Applic|Info]>infobox%|Quit{f}

Menu% is pointer to window/menu structure.

T for ticked
D for dotted underneath
W for writable
M for message when opening
S for shaded
K for keyboard shortcut (following)
\> followed by variable for sub-menu ({fCode}Item]>submenu%|{f})
} followed by a sprite name ({fCode}Item]}sprite|{f})
#Subpage keys
FNcreatemenu key short-cuts
Keys may be :
#Indent 2;Table Columns 4
F1-F12
Esc
Del
Ins
End
Hom
Cpy
Prt
Tab
Ret
#EndTable
#Indent

Anything prefixed by ^, � or �^. The up arrow will be substituted for � when creating menus. When you decode menus keystrokes will be removed from the <FNdecodemenu> string.
DATAAToggle values
Value	Meaning
#Line
0	Unset
1	Set
2	Toggle
DATAUPROCreadhelp format
#Wrap Off
Main windows :
#Indent 2
\{ window, help message for no icon
  \{ icon number, message } repeated
} repeated
-2, message for icon bar }
-1,-1 to end
#Indent

Format for menu help :
#Indent 2
\{ menu, -1,-1,-1
	\{ opt1,opt2,opt3,help
or	-1,string,-1,help } repeated
} repeated
-2,-2,-2,-2 to end
#Indent
DATAeWimpLib help
#Align Centre
{fh3}JFShared WimpLib v1.58/1.54{f}
#Align Left

The Wimp Library is a Basic Library file which provides simple procedure calls to implement Wimp operations. In conjunction with the JFShared skeleton application this provides a very simple way of creating applications. This help file details the routines provided in WimpLib and WimpLib2 (the RiscOS 2 specific version) with descriptions of the implementation of both.

The WimpLibrary is referenced by \<BasicLibrary$File> and should be loaded with :
{fCode}LIBRARY "\<BasicLibrary$File>":PROCinitlibrary{f}

The JFShared application is � <Justin Fletcher=>Filetypes:Authors_JustinFletcher>, 1995 and is released into the Public Domain with the same restrictions as subsist in most PD software. This includes the fact that when distributed the entire application must remain intact.
00000000  48 45 4c 50 28 00 00 00  cb 00 00 00 ff ff ff ff  |HELP(...........|
00000010  2c 00 00 00 00 fd ff ff  00 00 00 00 ec 00 00 00  |,...............|
00000020  00 01 00 00 00 00 00 00  24 00 00 00 44 49 52 24  |........$...DIR$|
00000030  f4 00 00 00 f4 00 00 00  20 01 00 00 47 fd ff ff  |........ ...G...|
00000040  ef b1 3f 72 2c 07 00 00  13 01 00 00 00 00 00 00  |..?r,...........|
00000050  50 52 4f 43 00 00 00 00  68 38 00 00 47 fd ff ff  |PROC....h8..G...|
00000060  26 b7 3f 72 b8 06 00 00  13 01 00 00 00 00 00 00  |&.?r............|
00000070  46 4e 00 00 f8 6c 00 00  47 fd ff ff 2a a2 ec 15  |FN...l..G...*...|
00000080  d3 09 00 00 13 00 00 00  00 00 00 00 21 52 6f 6f  |............!Roo|
00000090  74 00 00 00 cc 76 00 00  47 fd ff ff dd 6b 49 02  |t....v..G....kI.|
000000a0  89 04 00 00 13 00 00 00  00 00 00 00 6d 65 6e 75  |............menu|
000000b0  63 6f 6e 74 72 6f 6c 00  58 7b 00 00 46 fd ff ff  |control.X{..F...|
000000c0  5f a6 ae 41 41 00 00 00  13 00 00 00 00 00 00 00  |_..AA...........|
000000d0  74 6f 67 67 6c 65 66 6c  61 67 00 00 9c 7b 00 00  |toggleflag...{..|
000000e0  46 fd ff ff a2 a6 b4 41  55 01 00 00 13 00 00 00  |F......AU.......|
000000f0  00 00 00 00 68 65 6c 70  66 6f 72 6d 61 74 00 00  |....helpformat..|
00000100  f4 7c 00 00 46 fd ff ff  16 50 fe fa 65 03 00 00  |.|..F....P..e...|
00000110  13 00 00 00 00 00 00 00  69 6e 66 6f 00 00 00 00  |........info....|
00000120  44 49 52 24 2c 07 00 00  2c 07 00 00 4c 08 00 00  |DIR$,...,...L...|
00000130  46 ff ff ff 4d 70 f6 4d  90 00 00 00 13 00 00 00  |F...Mp.M........|
00000140  00 00 00 00 69 6e 69 74  6c 69 62 72 61 72 79 00  |....initlibrary.|
00000150  dc 08 00 00 46 ff ff ff  e9 71 f6 4d 96 00 00 00  |....F....q.M....|
00000160  13 00 00 00 00 00 00 00  6e 6f 74 65 6d 65 73 73  |........notemess|
00000170  61 67 65 00 74 09 00 00  46 ff ff ff e7 83 f6 4d  |age.t...F......M|
00000180  d4 01 00 00 13 00 00 00  00 00 00 00 65 72 72 6f  |............erro|
00000190  72 00 00 00 48 0b 00 00  46 ff ff ff 90 8f f6 4d  |r...H...F......M|
000001a0  4c 00 00 00 13 00 00 00  00 00 00 00 69 62 6d 65  |L...........ibme|
000001b0  6e 75 00 00 94 0b 00 00  46 ff ff ff 85 91 f6 4d  |nu......F......M|
000001c0  b3 00 00 00 13 00 00 00  00 00 00 00 6d 65 6e 75  |............menu|
000001d0  00 00 00 00 48 0c 00 00  46 ff ff ff 30 93 f6 4d  |....H...F...0..M|
000001e0  a5 00 00 00 13 00 00 00  00 00 00 00 72 65 63 72  |............recr|
000001f0  65 61 74 65 6d 65 6e 75  00 00 00 00 f0 0c 00 00  |eatemenu........|
00000200  46 ff ff ff aa be f6 4d  52 00 00 00 13 00 00 00  |F......MR.......|
00000210  00 00 00 00 63 6c 6f 73  65 77 69 6e 00 00 00 00  |....closewin....|
00000220  44 0d 00 00 46 ff ff ff  d6 c0 f6 4d 50 00 00 00  |D...F......MP...|
00000230  13 00 00 00 00 00 00 00  6f 70 65 6e 77 69 6e 00  |........openwin.|
00000240  94 0d 00 00 46 ff ff ff  eb c3 f6 4d c1 00 00 00  |....F......M....|
00000250  13 00 00 00 00 00 00 00  6f 70 65 6e 77 69 6e 61  |........openwina|
00000260  74 00 00 00 58 0e 00 00  46 ff ff ff b8 c5 f6 4d  |t...X...F......M|
00000270  6c 00 00 00 13 00 00 00  00 00 00 00 6f 70 65 6e  |l...........open|
00000280  77 69 6e 63 65 6e 74 72  65 00 00 00 c4 0e 00 00  |wincentre.......|
00000290  46 ff ff ff 0e a5 f8 4d  1b 01 00 00 13 00 00 00  |F......M........|
000002a0  00 00 00 00 66 6f 72 63  65 72 65 64 72 61 77 00  |....forceredraw.|
000002b0  e0 0f 00 00 46 ff ff ff  18 f8 7b 4f e3 01 00 00  |....F.....{O....|
000002c0  13 00 00 00 00 00 00 00  77 69 6e 73 65 74 65 78  |........winsetex|
000002d0  74 65 6e 74 00 00 00 00  c4 11 00 00 46 ff ff ff  |tent........F...|
000002e0  07 c7 f6 4d 96 01 00 00  13 00 00 00 00 00 00 00  |...M............|
000002f0  6f 70 65 6e 77 69 6e 74  6f 00 00 00 5c 13 00 00  |openwinto...\...|
00000300  46 ff ff ff 5f b4 f6 4d  7c 00 00 00 13 00 00 00  |F..._..M|.......|
00000310  00 00 00 00 72 65 6c 65  61 73 65 66 6f 6e 74 6d  |....releasefontm|
00000320  65 6e 75 00 d8 13 00 00  46 ff ff ff 7b a1 f6 4d  |enu.....F...{..M|
00000330  cc 00 00 00 13 00 00 00  00 00 00 00 6d 65 6e 75  |............menu|
00000340  74 69 63 6b 00 00 00 00  a4 14 00 00 46 ff ff ff  |tick........F...|
00000350  7b a3 f6 4d cf 00 00 00  13 00 00 00 00 00 00 00  |{..M............|
00000360  6d 65 6e 75 73 68 61 64  65 00 00 00 74 15 00 00  |menushade...t...|
00000370  46 ff ff ff 81 ce 2f b7  ef 00 00 00 13 00 00 00  |F...../.........|
00000380  00 00 00 00 73 65 74 6d  65 6e 75 74 65 78 74 00  |....setmenutext.|
00000390  64 16 00 00 46 ff ff ff  4a b3 f8 4d 46 01 00 00  |d...F...J..MF...|
000003a0  13 00 00 00 00 00 00 00  64 65 6c 65 74 65 69 63  |........deleteic|
000003b0  6f 6e 00 00 ac 17 00 00  46 ff ff ff f5 13 7b 4f  |on......F.....{O|
000003c0  cb 01 00 00 13 00 00 00  00 00 00 00 72 65 61 64  |............read|
000003d0  68 65 6c 70 00 00 00 00  78 19 00 00 46 ff ff ff  |help....x...F...|
000003e0  d9 f9 f8 4d c7 01 00 00  13 00 00 00 00 00 00 00  |...M............|
000003f0  73 65 6e 64 68 65 6c 70  00 00 00 00 40 1b 00 00  |sendhelp....@...|
00000400  46 ff ff ff 16 fd f8 4d  61 00 00 00 13 00 00 00  |F......Ma.......|
00000410  00 00 00 00 6f 70 65 6e  6d 65 73 73 61 67 65 73  |....openmessages|
00000420  00 00 00 00 a4 1b 00 00  46 ff ff ff a9 ff f8 4d  |........F......M|
00000430  6f 00 00 00 13 00 00 00  00 00 00 00 63 6c 6f 73  |o...........clos|
00000440  65 6d 65 73 73 61 67 65  73 00 00 00 14 1c 00 00  |emessages.......|
00000450  46 ff ff ff fe bc f6 4d  a0 00 00 00 13 00 00 00  |F......M........|
00000460  00 00 00 00 72 65 6c 65  61 73 65 66 74 6d 65 6e  |....releaseftmen|
00000470  75 00 00 00 b4 1c 00 00  46 ff ff ff 2d b9 f8 4d  |u.......F...-..M|
00000480  c4 00 00 00 13 00 00 00  00 00 00 00 69 63 6f 6e  |............icon|
00000490  73 68 61 64 65 00 00 00  78 1d 00 00 46 ff ff ff  |shade...x...F...|
000004a0  f2 ba f8 4d c7 00 00 00  13 00 00 00 00 00 00 00  |...M............|
000004b0  69 63 6f 6e 73 74 61 74  65 00 00 00 40 1e 00 00  |iconstate...@...|
000004c0  46 ff ff ff 5e ae 46 bf  0b 01 00 00 13 00 00 00  |F...^.F.........|
000004d0  00 00 00 00 73 65 74 69  63 6f 6e 62 69 74 00 00  |....seticonbit..|
000004e0  4c 1f 00 00 46 ff ff ff  47 c6 f8 4d 7d 00 00 00  |L...F...G..M}...|
000004f0  13 00 00 00 00 00 00 00  72 65 64 72 61 77 69 63  |........redrawic|
00000500  6f 6e 00 00 cc 1f 00 00  46 ff ff ff 22 cc f8 4d  |on......F..."..M|
00000510  f2 00 00 00 13 00 00 00  00 00 00 00 73 65 74 69  |............seti|
00000520  63 6f 6e 74 65 78 74 00  c0 20 00 00 46 ff ff ff  |context.. ..F...|
00000530  c0 48 09 eb ad 00 00 00  13 00 00 00 00 00 00 00  |.H..............|
00000540  64 72 61 67 69 63 6f 6e  00 00 00 00 70 21 00 00  |dragicon....p!..|
00000550  46 ff ff ff 54 3c 1b eb  7d 01 00 00 13 00 00 00  |F...T<..}.......|
00000560  00 00 00 00 77 69 6e 64  6f 77 74 69 74 6c 65 00  |....windowtitle.|
00000570  f0 22 00 00 46 ff ff ff  69 2c f5 4d f4 00 00 00  |."..F...i,.M....|
00000580  13 00 00 00 00 00 00 00  72 65 61 64 74 61 73 6b  |........readtask|
00000590  61 72 65 61 00 00 00 00  e4 23 00 00 46 ff ff ff  |area.....#..F...|
000005a0  bb 65 f5 4d aa 00 00 00  13 00 00 00 00 00 00 00  |.e.M............|
000005b0  73 65 74 63 61 72 65 74  65 6e 64 00 90 24 00 00  |setcaretend..$..|
000005c0  46 ff ff ff f7 6d f5 4d  e8 00 00 00 13 00 00 00  |F....m.M........|
000005d0  00 00 00 00 73 65 74 63  61 72 65 74 70 6f 73 00  |....setcaretpos.|
000005e0  78 25 00 00 46 ff ff ff  fb 41 3a 52 b6 00 00 00  |x%..F....A:R....|
000005f0  13 00 00 00 00 00 00 00  67 65 74 63 61 72 65 74  |........getcaret|
00000600  70 6f 73 00 30 26 00 00  46 ff ff ff d3 85 f5 4d  |pos.0&..F......M|
00000610  ae 00 00 00 13 00 00 00  00 00 00 00 67 65 74 70  |............getp|
00000620  74 72 70 6f 73 00 00 00  e0 26 00 00 46 ff ff ff  |trpos....&..F...|
00000630  ab 41 9f cc c7 00 00 00  13 00 00 00 00 00 00 00  |.A..............|
00000640  77 72 69 74 65 63 6d 6f  73 00 00 00 a8 27 00 00  |writecmos....'..|
00000650  46 ff ff ff 02 fd 76 4f  ea 00 00 00 13 00 00 00  |F.....vO........|
00000660  00 00 00 00 6d 65 6e 75  75 6e 74 69 63 6b 00 00  |....menuuntick..|
00000670  94 28 00 00 46 ff ff ff  5f d7 f8 4d d8 00 00 00  |.(..F..._..M....|
00000680  13 00 00 00 00 00 00 00  73 65 74 69 63 6f 6e 76  |........seticonv|
00000690  61 6c 69 64 00 00 00 00  6c 29 00 00 47 ff ff ff  |alid....l)..G...|
000006a0  3f 16 c3 1e e6 01 00 00  13 00 00 00 00 00 00 00  |?...............|
000006b0  6d 61 6b 65 73 74 61 74  75 73 66 69 6c 65 00 00  |makestatusfile..|
000006c0  54 2b 00 00 46 ff ff ff  ff c3 f5 4d 7e 00 00 00  |T+..F......M~...|
000006d0  13 00 00 00 00 00 00 00  63 6c 6f 73 65 73 74 61  |........closesta|
000006e0  74 75 73 66 69 6c 65 00  d4 2b 00 00 46 ff ff ff  |tusfile..+..F...|
000006f0  e2 aa 8b 4f e0 00 00 00  13 00 00 00 00 00 00 00  |...O............|
00000700  73 74 61 74 75 73 70 75  74 00 00 00 b4 2c 00 00  |statusput....,..|
00000710  46 ff ff ff f3 9c 8b 4f  e3 00 00 00 13 00 00 00  |F......O........|
00000720  00 00 00 00 73 74 61 74  75 73 6f 70 74 69 6f 6e  |....statusoption|
00000730  00 00 00 00 98 2d 00 00  46 ff ff ff a3 c2 8b 4f  |.....-..F......O|
00000740  e0 00 00 00 13 00 00 00  00 00 00 00 73 74 61 74  |............stat|
00000750  75 73 6e 65 78 74 00 00  78 2e 00 00 46 ff ff ff  |usnext..x...F...|
00000760  5f 9a f4 4d fd 00 00 00  13 00 00 00 00 00 00 00  |_..M............|
00000770  72 65 6c 65 61 73 65 00  78 2f 00 00 46 ff ff ff  |release.x/..F...|
00000780  25 e0 f8 4d 8f 00 00 00  13 00 00 00 00 00 00 00  |%..M............|
00000790  70 72 65 73 73 69 63 6f  6e 00 00 00 08 30 00 00  |pressicon....0..|
000007a0  46 ff ff ff c3 b4 8b 4f  04 01 00 00 13 00 00 00  |F......O........|
000007b0  00 00 00 00 73 74 61 74  75 73 66 6c 61 67 00 00  |....statusflag..|
000007c0  0c 31 00 00 46 ff ff ff  62 32 35 53 43 02 00 00  |.1..F...b25SC...|
000007d0  13 00 00 00 00 00 00 00  73 68 6f 77 66 72 65 65  |........showfree|
000007e0  00 00 00 00 50 33 00 00  46 ff ff ff e4 e4 cb 53  |....P3..F......S|
000007f0  eb 01 00 00 13 00 00 00  00 00 00 00 65 65 72 72  |............eerr|
00000800  6f 72 00 00 3c 35 00 00  46 ff ff ff 79 02 fb df  |or..<5..F...y...|
00000810  d4 01 00 00 13 00 00 00  00 00 00 00 64 72 61 67  |............drag|
00000820  73 61 76 65 00 00 00 00  10 37 00 00 46 ff ff ff  |save.....7..F...|
00000830  ec 91 fe fa 56 01 00 00  13 00 00 00 00 00 00 00  |....V...........|
00000840  72 65 73 69 7a 65 77 69  6e 74 6f 00 44 41 54 41  |resizewinto.DATA|
00000850  90 00 00 00 50 52 4f 43  69 6e 69 74 6c 69 62 72  |....PROCinitlibr|
00000860  61 72 79 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |ary.#Parent !Roo|
00000870  74 0a 49 6e 69 74 69 61  6c 69 73 65 73 20 6c 69  |t.Initialises li|
00000880  62 72 61 72 79 20 76 61  72 69 61 62 6c 65 73 2e  |brary variables.|
00000890  0a 0a 43 61 6c 6c 20 74  68 69 73 20 72 6f 75 74  |..Call this rout|
000008a0  69 6e 65 20 61 74 20 74  68 65 20 73 74 61 72 74  |ine at the start|
000008b0  20 6f 66 20 61 6e 79 20  70 72 6f 67 72 61 6d 20  | of any program |
000008c0  74 68 61 74 20 75 73 65  73 20 74 68 65 20 57 69  |that uses the Wi|
000008d0  6d 70 4c 69 62 20 66 69  6c 65 2e 0a 44 41 54 41  |mpLib file..DATA|
000008e0  96 00 00 00 50 52 4f 43  6e 6f 74 65 6d 65 73 73  |....PROCnotemess|
000008f0  61 67 65 28 6e 75 6d 62  65 72 29 0a 23 50 61 72  |age(number).#Par|
00000900  65 6e 74 20 21 52 6f 6f  74 0a 3d 3e 09 7b 2f 7d  |ent !Root.=>.{/}|
00000910  6e 75 6d 62 65 72 7b 2f  7d 09 6d 65 73 73 61 67  |number{/}.messag|
00000920  65 20 6e 75 6d 62 65 72  0a 0a 4d 61 72 6b 20 74  |e number..Mark t|
00000930  68 65 20 67 69 76 65 6e  20 6d 65 73 73 61 67 65  |he given message|
00000940  20 61 73 20 72 65 63 65  69 76 65 61 62 6c 65 2e  | as receiveable.|
00000950  20 55 73 65 64 20 66 6f  72 20 52 49 53 43 20 4f  | Used for RISC O|
00000960  53 20 33 20 61 70 70 6c  69 63 61 74 69 6f 6e 73  |S 3 applications|
00000970  2e 0a 00 00 44 41 54 41  d4 01 00 00 50 52 4f 43  |....DATA....PROC|
00000980  65 72 72 6f 72 0a 23 50  61 72 65 6e 74 20 21 52  |error.#Parent !R|
00000990  6f 6f 74 0a 43 61 6c 6c  65 64 20 61 74 20 61 6e  |oot.Called at an|
000009a0  79 20 62 61 73 69 63 20  65 72 72 6f 72 2e 20 65  |y basic error. e|
000009b0  67 20 7b 66 43 6f 64 65  7d 4f 4e 20 45 52 52 4f  |g {fCode}ON ERRO|
000009c0  52 20 50 52 4f 43 65 72  72 6f 72 3a 47 4f 54 4f  |R PROCerror:GOTO|
000009d0  20 3f 3f 3f 3f 7b 66 7d  0a 45 52 52 4f 52 20 6e  | ????{f}.ERROR n|
000009e0  75 6d 62 65 72 73 20 26  38 30 30 2b 0a 23 49 6e  |umbers &800+.#In|
000009f0  64 65 6e 74 20 32 0a 30  20 3d 20 4f 4b 0a 31 20  |dent 2.0 = OK.1 |
00000a00  3d 20 43 61 6e 63 65 6c  0a 32 20 3d 20 4f 4b 20  |= Cancel.2 = OK |
00000a10  61 6e 64 20 43 61 6e 63  65 6c 20 28 74 6f 20 71  |and Cancel (to q|
00000a20  75 69 74 29 0a 23 49 6e  64 65 6e 74 0a 43 61 6e  |uit).#Indent.Can|
00000a30  63 65 6c 20 6f 6e 6c 79  20 73 65 74 73 20 74 68  |cel only sets th|
00000a40  65 20 7b 2f 7d 71 75 69  74 25 7b 2f 7d 20 76 61  |e {/}quit%{/} va|
00000a50  72 69 61 62 6c 65 20 74  6f 20 54 52 55 45 20 61  |riable to TRUE a|
00000a60  6e 64 20 74 68 65 20 63  61 6c 6c 69 6e 67 20 72  |nd the calling r|
00000a70  6f 75 74 69 6e 65 20 77  69 6c 6c 20 74 68 65 72  |outine will ther|
00000a80  65 66 6f 72 65 20 6e 65  65 64 20 74 6f 20 65 78  |efore need to ex|
00000a90  69 74 20 69 66 20 74 68  69 73 20 69 73 20 73 65  |it if this is se|
00000aa0  74 2c 20 68 6f 77 65 76  65 72 20 68 6f 6c 64 69  |t, however holdi|
00000ab0  6e 67 20 53 68 69 66 74  2d 43 74 72 6c 2d 51 20  |ng Shift-Ctrl-Q |
00000ac0  77 68 69 6c 73 74 20 63  6c 69 63 6b 69 6e 67 20  |whilst clicking |
00000ad0  61 20 62 75 74 74 6f 6e  20 77 69 6c 6c 20 65 78  |a button will ex|
00000ae0  69 74 20 74 68 65 20 70  72 6f 67 72 61 6d 2e 20  |it the program. |
00000af0  49 66 20 43 61 6e 63 65  6c 20 69 73 20 63 6c 69  |If Cancel is cli|
00000b00  63 6b 65 64 2c 20 74 68  65 6e 20 74 68 65 20 73  |cked, then the s|
00000b10  79 73 74 65 6d 20 76 61  72 69 61 62 6c 65 20 45  |ystem variable E|
00000b20  72 72 6f 72 24 20 77 69  6c 6c 20 62 65 20 73 65  |rror$ will be se|
00000b30  74 20 74 6f 20 74 68 65  20 65 72 72 6f 72 20 6d  |t to the error m|
00000b40  65 73 73 61 67 65 2e 0a  44 41 54 41 4c 00 00 00  |essage..DATAL...|
00000b50  50 52 4f 43 69 62 6d 65  6e 75 0a 23 50 61 72 65  |PROCibmenu.#Pare|
00000b60  6e 74 20 21 52 6f 6f 74  0a 43 72 65 61 74 65 20  |nt !Root.Create |
00000b70  61 6e 20 69 63 6f 6e 62  61 72 20 6d 65 6e 75 20  |an iconbar menu |
00000b80  66 72 6f 6d 20 7b 2f 7d  69 62 6d 65 6e 75 25 7b  |from {/}ibmenu%{|
00000b90  2f 7d 2e 0a 44 41 54 41  b3 00 00 00 50 52 4f 43  |/}..DATA....PROC|
00000ba0  6d 65 6e 75 28 6d 65 6e  75 2c 78 2c 79 29 0a 23  |menu(menu,x,y).#|
00000bb0  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
00000bc0  7b 2f 7d 6d 65 6e 75 7b  2f 7d 09 70 6f 69 6e 74  |{/}menu{/}.point|
00000bd0  65 72 20 74 6f 20 6d 65  6e 75 0a 09 7b 2f 7d 78  |er to menu..{/}x|
00000be0  7b 2f 7d 09 09 78 20 63  6f 2d 6f 72 64 69 6e 61  |{/}..x co-ordina|
00000bf0  74 65 2c 20 6f 72 20 2d  31 20 66 6f 72 20 6d 6f  |te, or -1 for mo|
00000c00  75 73 65 20 70 6f 73 69  74 69 6f 6e 0a 09 7b 2f  |use position..{/|
00000c10  7d 79 7b 2f 7d 09 09 79  20 63 6f 2d 6f 72 64 69  |}y{/}..y co-ordi|
00000c20  6e 61 74 65 0a 09 0a 43  72 65 61 74 65 20 61 20  |nate...Create a |
00000c30  6d 65 6e 75 20 61 74 20  63 6f 2d 6f 72 64 73 20  |menu at co-ords |
00000c40  67 69 76 65 6e 2e 0a 00  44 41 54 41 a5 00 00 00  |given...DATA....|
00000c50  50 52 4f 43 72 65 63 72  65 61 74 65 6d 65 6e 75  |PROCrecreatemenu|
00000c60  0a 23 50 61 72 65 6e 74  20 21 52 6f 6f 74 0a 52  |.#Parent !Root.R|
00000c70  65 63 72 65 61 74 65 20  74 68 65 20 70 72 65 76  |ecreate the prev|
00000c80  69 6f 75 73 20 6d 65 6e  75 20 63 72 65 61 74 65  |ious menu create|
00000c90  64 20 69 6e 20 69 74 73  20 70 72 65 76 69 6f 75  |d in its previou|
00000ca0  73 20 6c 6f 63 61 74 69  6f 6e 2e 20 4f 6e 6c 79  |s location. Only|
00000cb0  20 77 6f 72 6b 73 20 69  66 20 50 52 4f 43 6d 65  | works if PROCme|
00000cc0  6e 75 20 6f 72 20 50 52  4f 43 69 62 6d 65 6e 75  |nu or PROCibmenu|
00000cd0  20 68 61 73 20 62 65 65  6e 20 63 61 6c 6c 65 64  | has been called|
00000ce0  20 70 72 65 76 69 6f 75  73 6c 79 2e 0a 00 00 00  | previously.....|
00000cf0  44 41 54 41 52 00 00 00  50 52 4f 43 63 6c 6f 73  |DATAR...PROCclos|
00000d00  65 77 69 6e 28 77 69 6e  29 0a 23 50 61 72 65 6e  |ewin(win).#Paren|
00000d10  74 20 21 52 6f 6f 74 0a  3d 3e 09 7b 2f 7d 77 69  |t !Root.=>.{/}wi|
00000d20  6e 7b 2f 7d 09 77 69 6e  64 6f 77 20 68 61 6e 64  |n{/}.window hand|
00000d30  6c 65 0a 0a 43 6c 6f 73  65 20 77 69 6e 64 6f 77  |le..Close window|
00000d40  2e 0a 00 00 44 41 54 41  50 00 00 00 50 52 4f 43  |....DATAP...PROC|
00000d50  6f 70 65 6e 77 69 6e 28  77 69 6e 29 0a 23 50 61  |openwin(win).#Pa|
00000d60  72 65 6e 74 20 21 52 6f  6f 74 0a 3d 3e 09 7b 2f  |rent !Root.=>.{/|
00000d70  7d 77 69 6e 7b 2f 7d 09  77 69 6e 64 6f 77 20 68  |}win{/}.window h|
00000d80  61 6e 64 6c 65 0a 0a 4f  70 65 6e 20 77 69 6e 64  |andle..Open wind|
00000d90  6f 77 2e 0a 44 41 54 41  c1 00 00 00 50 52 4f 43  |ow..DATA....PROC|
00000da0  6f 70 65 6e 77 69 6e 61  74 28 77 69 6e 2c 78 2c  |openwinat(win,x,|
00000db0  79 29 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |y).#Parent !Root|
00000dc0  0a 23 57 72 61 70 20 4f  66 66 0a 3d 3e 09 7b 2f  |.#Wrap Off.=>.{/|
00000dd0  7d 77 69 6e 7b 2f 7d 09  77 69 6e 64 6f 77 20 68  |}win{/}.window h|
00000de0  61 6e 64 6c 65 0a 09 7b  2f 7d 78 7b 2f 7d 09 09  |andle..{/}x{/}..|
00000df0  6c 65 66 74 20 6f 66 20  77 69 6e 64 6f 77 20 6f  |left of window o|
00000e00  6e 20 73 63 72 65 65 6e  0a 09 7b 2f 7d 79 7b 2f  |n screen..{/}y{/|
00000e10  7d 09 09 74 6f 70 20 6f  66 20 77 69 6e 64 6f 77  |}..top of window|
00000e20  20 6f 6e 20 73 63 72 65  65 6e 0a 0a 4f 70 65 6e  | on screen..Open|
00000e30  20 77 69 6e 64 6f 77 20  70 6f 73 69 74 69 6f 6e  | window position|
00000e40  69 6e 67 20 74 6f 70 2d  6c 65 66 74 20 63 6f 72  |ing top-left cor|
00000e50  6e 65 72 2e 0a 00 00 00  44 41 54 41 6c 00 00 00  |ner.....DATAl...|
00000e60  50 52 4f 43 6f 70 65 6e  77 69 6e 63 65 6e 74 72  |PROCopenwincentr|
00000e70  65 28 77 69 6e 29 0a 23  50 61 72 65 6e 74 20 21  |e(win).#Parent !|
00000e80  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 77 69 6e 7b 2f  |Root.=>.{/}win{/|
00000e90  7d 09 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |}.window handle.|
00000ea0  0a 4f 70 65 6e 20 77 69  6e 64 6f 77 20 63 65 6e  |.Open window cen|
00000eb0  74 72 65 64 20 6f 6e 20  74 68 65 20 73 63 72 65  |tred on the scre|
00000ec0  65 6e 2e 0a 44 41 54 41  1b 01 00 00 50 52 4f 43  |en..DATA....PROC|
00000ed0  66 6f 72 63 65 72 65 64  72 61 77 28 77 69 6e 2c  |forceredraw(win,|
00000ee0  6c 2c 74 2c 72 2c 62 29  0a 23 50 61 72 65 6e 74  |l,t,r,b).#Parent|
00000ef0  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 77 69 6e  | !Root.=>.{/}win|
00000f00  7b 2f 7d 09 77 69 6e 64  6f 77 20 68 61 6e 64 6c  |{/}.window handl|
00000f10  65 2c 20 6f 72 20 2d 31  20 66 6f 72 20 77 68 6f  |e, or -1 for who|
00000f20  6c 65 20 73 63 72 65 65  6e 0a 09 7b 2f 7d 6c 7b  |le screen..{/}l{|
00000f30  2f 7d 09 09 6c 65 66 74  20 6f 66 20 72 65 64 72  |/}..left of redr|
00000f40  61 77 20 62 6f 78 0a 09  7b 2f 7d 74 7b 2f 7d 09  |aw box..{/}t{/}.|
00000f50  09 74 6f 70 20 6f 66 20  72 65 64 72 61 77 20 62  |.top of redraw b|
00000f60  6f 78 0a 09 7b 2f 7d 72  7b 2f 7d 09 09 72 69 67  |ox..{/}r{/}..rig|
00000f70  68 74 20 6f 66 20 72 65  64 72 61 77 20 62 6f 78  |ht of redraw box|
00000f80  0a 09 7b 2f 7d 62 7b 2f  7d 09 09 62 6f 74 74 6f  |..{/}b{/}..botto|
00000f90  6d 20 6f 66 20 72 65 64  72 61 77 20 62 6f 78 0a  |m of redraw box.|
00000fa0  0a 52 65 64 72 61 77 20  74 68 65 20 73 70 65 63  |.Redraw the spec|
00000fb0  69 66 69 65 64 20 77 69  6e 64 6f 77 20 77 69 74  |ified window wit|
00000fc0  68 69 6e 20 74 68 65 20  73 70 65 63 69 66 69 65  |hin the specifie|
00000fd0  64 20 63 6f 2d 6f 72 64  69 6e 61 74 65 73 2e 00  |d co-ordinates..|
00000fe0  44 41 54 41 e3 01 00 00  50 52 4f 43 77 69 6e 73  |DATA....PROCwins|
00000ff0  65 74 65 78 74 65 6e 74  28 77 69 6e 2c 6c 2c 74  |etextent(win,l,t|
00001000  2c 72 2c 62 29 0a 23 50  61 72 65 6e 74 20 21 52  |,r,b).#Parent !R|
00001010  6f 6f 74 0a 3d 3e 09 7b  2f 7d 77 69 6e 7b 2f 7d  |oot.=>.{/}win{/}|
00001020  09 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 09  |.window handle..|
00001030  7b 2f 7d 6c 7b 2f 7d 09  09 6c 65 66 74 20 6f 66  |{/}l{/}..left of|
00001040  20 65 78 74 65 6e 74 0a  09 7b 2f 7d 74 7b 2f 7d  | extent..{/}t{/}|
00001050  09 09 74 6f 70 20 6f 66  20 65 78 74 65 6e 74 0a  |..top of extent.|
00001060  09 7b 2f 7d 72 7b 2f 7d  09 09 72 69 67 68 74 20  |.{/}r{/}..right |
00001070  6f 66 20 65 78 74 65 6e  74 0a 09 7b 2f 7d 62 7b  |of extent..{/}b{|
00001080  2f 7d 09 09 62 6f 74 74  6f 6d 20 6f 66 20 65 78  |/}..bottom of ex|
00001090  74 65 6e 74 0a 09 0a 53  65 74 20 74 68 65 20 6d  |tent...Set the m|
000010a0  61 78 69 6d 75 6d 20 65  78 74 65 6e 74 20 6f 66  |aximum extent of|
000010b0  20 77 69 6e 64 6f 77 20  28 54 57 41 29 2e 20 49  | window (TWA). I|
000010c0  66 20 61 6e 79 20 6f 66  20 74 68 65 20 76 61 72  |f any of the var|
000010d0  69 61 62 6c 65 73 20 61  72 65 20 2d 31 20 74 68  |iables are -1 th|
000010e0  65 6e 20 74 68 65 79 20  61 72 65 20 6e 6f 74 20  |en they are not |
000010f0  63 68 61 6e 67 65 64 2e  0a 0a 49 6e 20 57 69 6d  |changed...In Wim|
00001100  70 4c 69 62 32 20 74 68  69 73 20 75 73 65 73 20  |pLib2 this uses |
00001110  3c 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 49  |<Wimp_GetWindowI|
00001120  6e 66 6f 3d 3e 53 57 49  3a 57 69 6d 70 5f 47 65  |nfo=>SWI:Wimp_Ge|
00001130  74 57 69 6e 64 6f 77 49  6e 66 6f 3e 20 77 68 69  |tWindowInfo> whi|
00001140  63 68 20 72 65 74 75 72  6e 73 20 74 68 65 20 65  |ch returns the e|
00001150  6e 74 69 72 65 20 77 69  6e 64 6f 77 20 62 6c 6f  |ntire window blo|
00001160  63 6b 20 69 6e 63 6c 75  64 69 6e 67 20 69 63 6f  |ck including ico|
00001170  6e 73 20 74 6f 20 62 25  2c 20 74 68 65 72 65 66  |ns to b%, theref|
00001180  6f 72 65 20 69 74 20 69  73 20 76 69 74 61 6c 20  |ore it is vital |
00001190  74 68 61 74 20 74 68 65  20 62 6c 6f 63 6b 20 68  |that the block h|
000011a0  61 73 20 73 75 66 66 69  63 69 65 6e 74 20 73 70  |as sufficient sp|
000011b0  61 63 65 20 74 6f 20 73  74 6f 72 65 20 74 68 65  |ace to store the|
000011c0  6d 2e 0a 00 44 41 54 41  96 01 00 00 50 52 4f 43  |m...DATA....PROC|
000011d0  6f 70 65 6e 77 69 6e 74  6f 28 77 69 6e 2c 6c 2c  |openwinto(win,l,|
000011e0  74 2c 72 2c 62 29 0a 23  50 61 72 65 6e 74 20 21  |t,r,b).#Parent !|
000011f0  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 77 69 6e 7b 2f  |Root.=>.{/}win{/|
00001200  7d 09 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |}.window handle.|
00001210  09 7b 2f 7d 6c 7b 2f 7d  09 09 6c 65 66 74 20 6f  |.{/}l{/}..left o|
00001220  66 20 56 57 41 20 69 6e  20 54 57 41 0a 09 7b 2f  |f VWA in TWA..{/|
00001230  7d 74 7b 2f 7d 09 09 74  6f 70 20 6f 66 20 56 57  |}t{/}..top of VW|
00001240  41 20 69 6e 20 54 57 41  2e 0a 09 7b 2f 7d 72 7b  |A in TWA...{/}r{|
00001250  2f 7d 09 09 72 69 67 68  74 20 6f 66 20 56 57 41  |/}..right of VWA|
00001260  20 69 6e 20 54 57 41 0a  09 7b 2f 7d 62 7b 2f 7d  | in TWA..{/}b{/}|
00001270  09 09 62 6f 74 74 6f 6d  20 6f 66 20 56 57 41 20  |..bottom of VWA |
00001280  69 6e 20 54 57 41 2e 0a  0a 4f 70 65 6e 20 77 69  |in TWA...Open wi|
00001290  6e 64 6f 77 20 61 74 20  70 6f 73 69 74 69 6f 6e  |ndow at position|
000012a0  20 77 69 74 68 69 6e 20  54 57 41 2e 0a 0a 57 69  | within TWA...Wi|
000012b0  6e 64 6f 77 20 64 6f 65  73 20 6e 6f 74 20 6d 6f  |ndow does not mo|
000012c0  76 65 2c 20 62 75 74 20  69 74 73 20 73 69 7a 65  |ve, but its size|
000012d0  20 69 73 20 61 6c 74 65  72 65 64 20 74 6f 20 64  | is altered to d|
000012e0  69 66 66 65 72 65 6e 63  65 20 62 65 74 77 65 65  |ifference betwee|
000012f0  6e 20 6c 26 72 20 61 6e  64 20 74 26 62 2e 20 54  |n l&r and t&b. T|
00001300  6f 70 2d 6c 65 66 74 20  6f 66 20 56 57 41 20 69  |op-left of VWA i|
00001310  73 20 70 6f 73 69 74 69  6f 6e 65 64 20 74 6f 20  |s positioned to |
00001320  74 6c 2e 0a 49 66 20 72  62 20 3d 20 2d 31 20 74  |tl..If rb = -1 t|
00001330  68 65 6e 20 6e 6f 20 61  63 74 75 61 6c 20 73 69  |hen no actual si|
00001340  7a 65 20 63 68 61 6e 67  65 2c 20 6a 75 73 74 20  |ze change, just |
00001350  70 6f 73 69 74 69 6f 6e  2e 0a 00 00 44 41 54 41  |position....DATA|
00001360  7c 00 00 00 50 52 4f 43  72 65 6c 65 61 73 65 66  ||...PROCreleasef|
00001370  6f 6e 74 6d 65 6e 75 0a  23 50 61 72 65 6e 74 20  |ontmenu.#Parent |
00001380  21 52 6f 6f 74 0a 52 65  6c 65 61 73 65 20 6d 65  |!Root.Release me|
00001390  6d 6f 72 79 20 75 73 65  64 20 62 79 20 3c 46 4e  |mory used by <FN|
000013a0  67 65 74 66 6f 6e 74 6d  65 6e 75 3e 2e 0a 0a 54  |getfontmenu>...T|
000013b0  68 69 73 20 6d 75 73 74  20 62 65 20 64 6f 6e 65  |his must be done|
000013c0  20 62 65 66 6f 72 65 20  61 20 70 72 6f 67 72 61  | before a progra|
000013d0  6d 20 65 78 69 74 73 2e  44 41 54 41 cc 00 00 00  |m exits.DATA....|
000013e0  50 52 4f 43 6d 65 6e 75  74 69 63 6b 28 6d 65 6e  |PROCmenutick(men|
000013f0  75 2c 6e 75 6d 62 65 72  2c 74 6f 67 67 6c 65 29  |u,number,toggle)|
00001400  0a 23 50 61 72 65 6e 74  20 21 52 6f 6f 74 0a 3d  |.#Parent !Root.=|
00001410  3e 09 7b 2f 7d 6d 65 6e  75 7b 2f 7d 09 70 6f 69  |>.{/}menu{/}.poi|
00001420  6e 74 65 72 20 74 6f 20  6d 65 6e 75 20 62 6c 6f  |nter to menu blo|
00001430  63 6b 0a 09 7b 2f 7d 6e  75 6d 62 65 72 7b 2f 7d  |ck..{/}number{/}|
00001440  09 6f 70 74 69 6f 6e 20  74 6f 20 63 68 61 6e 67  |.option to chang|
00001450  65 0a 09 7b 2f 7d 74 6f  67 67 6c 65 7b 2f 7d 09  |e..{/}toggle{/}.|
00001460  3c 66 6c 61 67 3d 3e 74  6f 67 67 6c 65 66 6c 61  |<flag=>togglefla|
00001470  67 3e 20 66 6f 72 20 77  68 65 74 68 65 72 20 74  |g> for whether t|
00001480  6f 20 74 69 63 6b 0a 0a  54 69 63 6b 2f 75 6e 74  |o tick..Tick/unt|
00001490  69 63 6b 20 6f 70 74 69  6f 6e 20 6f 6e 20 6d 65  |ick option on me|
000014a0  6e 75 2e 0a 44 41 54 41  cf 00 00 00 50 52 4f 43  |nu..DATA....PROC|
000014b0  6d 65 6e 75 73 68 61 64  65 28 6d 65 6e 75 2c 6e  |menushade(menu,n|
000014c0  75 6d 62 65 72 2c 74 6f  67 67 6c 65 29 0a 23 50  |umber,toggle).#P|
000014d0  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000014e0  2f 7d 6d 65 6e 75 7b 2f  7d 09 70 6f 69 6e 74 65  |/}menu{/}.pointe|
000014f0  72 20 74 6f 20 6d 65 6e  75 20 62 6c 6f 63 6b 0a  |r to menu block.|
00001500  09 7b 2f 7d 6e 75 6d 62  65 72 7b 2f 7d 09 6f 70  |.{/}number{/}.op|
00001510  74 69 6f 6e 20 74 6f 20  61 6c 74 65 72 0a 09 7b  |tion to alter..{|
00001520  2f 7d 74 6f 67 67 6c 65  7b 2f 7d 09 3c 66 6c 61  |/}toggle{/}.<fla|
00001530  67 3d 3e 74 6f 67 67 6c  65 66 6c 61 67 3e 20 66  |g=>toggleflag> f|
00001540  6f 72 20 77 68 65 74 68  65 72 20 74 6f 20 73 68  |or whether to sh|
00001550  61 64 65 0a 0a 53 68 61  64 65 2f 75 6e 73 68 61  |ade..Shade/unsha|
00001560  64 65 20 6f 70 74 69 6f  6e 20 6f 6e 20 6d 65 6e  |de option on men|
00001570  75 2e 0a 00 44 41 54 41  ef 00 00 00 50 52 4f 43  |u...DATA....PROC|
00001580  73 65 74 6d 65 6e 75 74  65 78 74 28 6d 65 6e 75  |setmenutext(menu|
00001590  2c 6e 75 6d 62 65 72 2c  74 65 78 74 24 29 0a 23  |,number,text$).#|
000015a0  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
000015b0  7b 2f 7d 6d 65 6e 75 7b  2f 7d 09 70 6f 69 6e 74  |{/}menu{/}.point|
000015c0  65 72 20 74 6f 20 6d 65  6e 75 20 62 6c 6f 63 6b  |er to menu block|
000015d0  0a 09 7b 2f 7d 6e 75 6d  62 65 72 7b 2f 7d 09 6f  |..{/}number{/}.o|
000015e0  70 74 69 6f 6e 20 6e 75  6d 62 65 72 0a 09 7b 2f  |ption number..{/|
000015f0  7d 74 65 78 74 24 7b 2f  7d 09 6e 65 77 20 74 65  |}text${/}.new te|
00001600  78 74 0a 0a 53 65 74 20  74 68 65 20 74 65 78 74  |xt..Set the text|
00001610  20 66 6f 72 20 6f 70 74  69 6f 6e 20 6f 6e 20 6d  | for option on m|
00001620  65 6e 75 2e 20 54 65 78  74 20 6d 75 73 74 20 66  |enu. Text must f|
00001630  69 74 20 69 6e 74 6f 20  73 70 61 63 65 20 61 6c  |it into space al|
00001640  6c 6f 63 61 74 65 64 20  2d 20 6e 6f 20 63 68 65  |located - no che|
00001650  63 6b 73 20 61 72 65 20  70 65 72 66 6f 72 6d 65  |cks are performe|
00001660  64 2e 0a 00 44 41 54 41  46 01 00 00 50 52 4f 43  |d...DATAF...PROC|
00001670  64 65 6c 65 74 65 69 63  6f 6e 28 77 69 6e 2c 69  |deleteicon(win,i|
00001680  63 6f 6e 29 0a 23 50 61  72 65 6e 74 20 21 52 6f  |con).#Parent !Ro|
00001690  6f 74 0a 3d 3e 09 7b 2f  7d 77 69 6e 7b 2f 7d 09  |ot.=>.{/}win{/}.|
000016a0  77 69 6e 64 6f 77 20 68  61 6e 64 6c 65 0a 09 7b  |window handle..{|
000016b0  2f 7d 69 63 6f 6e 7b 2f  7d 09 69 63 6f 6e 20 68  |/}icon{/}.icon h|
000016c0  61 6e 64 6c 65 0a 0a 44  65 6c 65 74 65 20 69 63  |andle..Delete ic|
000016d0  6f 6e 20 66 72 6f 6d 20  77 69 6e 64 6f 77 2e 0a  |on from window..|
000016e0  0a 4e 6f 74 65 3a 20 54  68 65 20 69 63 6f 6e 20  |.Note: The icon |
000016f0  69 73 20 64 65 6c 65 74  65 64 2c 20 62 75 74 20  |is deleted, but |
00001700  73 70 61 63 65 20 69 73  20 73 74 69 6c 6c 20 61  |space is still a|
00001710  6c 6c 6f 63 61 74 65 64  20 74 6f 20 69 74 20 69  |llocated to it i|
00001720  6e 20 74 68 65 20 77 69  6e 64 6f 77 20 62 6c 6f  |n the window blo|
00001730  63 6b 2c 20 68 65 6e 63  65 20 69 66 20 61 20 6e  |ck, hence if a n|
00001740  65 77 20 69 63 6f 6e 20  69 73 20 63 72 65 61 74  |ew icon is creat|
00001750  65 64 20 74 68 65 20 6e  65 77 20 69 63 6f 6e 20  |ed the new icon |
00001760  77 69 6c 6c 20 74 61 6b  65 20 74 68 65 20 73 70  |will take the sp|
00001770  61 63 65 20 61 6c 6c 6f  63 61 74 65 64 20 74 6f  |ace allocated to|
00001780  20 74 68 65 20 70 72 65  76 69 6f 75 73 20 69 63  | the previous ic|
00001790  6f 6e 20 61 6e 64 20 68  65 6e 63 65 20 69 74 27  |on and hence it'|
000017a0  73 20 68 61 6e 64 6c 65  2e 0a 00 00 44 41 54 41  |s handle....DATA|
000017b0  cb 01 00 00 50 52 4f 43  72 65 61 64 68 65 6c 70  |....PROCreadhelp|
000017c0  28 77 69 6e 2c 69 63 6f  6e 2c 74 6f 29 0a 23 50  |(win,icon,to).#P|
000017d0  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000017e0  2f 7d 77 69 6e 7b 2f 7d  09 77 69 6e 64 6f 77 20  |/}win{/}.window |
000017f0  68 61 6e 64 6c 65 0a 09  7b 2f 7d 69 63 6f 6e 7b  |handle..{/}icon{|
00001800  2f 7d 09 69 63 6f 6e 20  68 61 6e 64 6c 65 0a 09  |/}.icon handle..|
00001810  7b 2f 7d 74 6f 7b 2f 7d  09 74 61 73 6b 20 68 61  |{/}to{/}.task ha|
00001820  6e 64 6c 65 20 74 6f 20  73 65 6e 64 20 6d 65 73  |ndle to send mes|
00001830  73 61 67 65 20 74 6f 0a  0a 52 65 61 64 20 68 65  |sage to..Read he|
00001840  6c 70 20 66 72 6f 6d 20  61 70 70 6c 69 63 61 74  |lp from applicat|
00001850  69 6f 6e 20 61 6e 64 20  73 65 6e 64 20 69 74 20  |ion and send it |
00001860  62 61 63 6b 2e 0a 0a 55  73 75 61 6c 6c 79 20 63  |back...Usually c|
00001870  61 6c 6c 65 64 20 77 69  74 68 20 0a 7b 66 43 6f  |alled with .{fCo|
00001880  64 65 7d 52 45 53 54 4f  52 45 20 64 61 74 61 73  |de}RESTORE datas|
00001890  74 61 74 65 6d 65 6e 74  73 3a 20 50 52 4f 43 72  |tatements: PROCr|
000018a0  65 61 64 68 65 6c 70 28  62 25 21 33 32 2c 62 25  |eadhelp(b%!32,b%|
000018b0  21 33 36 2c 62 25 21 34  29 7b 66 7d 2e 0a 4d 65  |!36,b%!4){f}..Me|
000018c0  6e 75 73 20 61 72 65 20  72 65 73 70 6f 6e 64 65  |nus are responde|
000018d0  64 20 74 6f 20 63 6f 72  72 65 63 74 6c 79 20 61  |d to correctly a|
000018e0  6e 64 20 67 69 76 65 20  6d 65 73 73 61 67 65 73  |nd give messages|
000018f0  20 75 6e 64 65 72 20 52  4f 33 2e 20 53 65 65 20  | under RO3. See |
00001900  3c 50 52 4f 43 73 65 6e  64 68 65 6c 70 3e 20 66  |<PROCsendhelp> f|
00001910  6f 72 20 6d 6f 72 65 20  69 6e 66 6f 72 6d 61 74  |or more informat|
00001920  69 6f 6e 2e 0a 57 69 6d  70 4c 69 62 32 20 68 61  |ion..WimpLib2 ha|
00001930  73 20 6e 6f 20 73 75 70  70 6f 72 74 20 66 6f 72  |s no support for|
00001940  20 6d 65 6e 75 20 68 65  6c 70 2e 0a 0a 43 6c 69  | menu help...Cli|
00001950  63 6b 20 3c 68 65 72 65  3d 3e 68 65 6c 70 66 6f  |ck <here=>helpfo|
00001960  72 6d 61 74 3e 20 66 6f  72 20 44 41 54 41 20 66  |rmat> for DATA f|
00001970  6f 72 6d 61 74 2e 0a 00  44 41 54 41 c7 01 00 00  |ormat...DATA....|
00001980  50 52 4f 43 73 65 6e 64  68 65 6c 70 28 68 65 6c  |PROCsendhelp(hel|
00001990  70 24 2c 74 6f 29 0a 23  50 61 72 65 6e 74 20 21  |p$,to).#Parent !|
000019a0  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 68 65 6c 70 24  |Root.=>.{/}help$|
000019b0  7b 2f 7d 09 4d 65 73 73  61 67 65 20 74 6f 20 73  |{/}.Message to s|
000019c0  65 6e 64 0a 09 7b 2f 7d  74 6f 7b 2f 7d 09 74 61  |end..{/}to{/}.ta|
000019d0  73 6b 20 74 6f 20 73 65  6e 64 20 74 6f 0a 0a 53  |sk to send to..S|
000019e0  65 6e 64 20 68 65 6c 70  20 74 6f 20 61 70 70 6c  |end help to appl|
000019f0  69 63 61 74 69 6f 6e 2e  0a 0a 3c 53 70 65 63 69  |ication...<Speci|
00001a00  61 6c 20 63 6f 64 65 73  3d 3e 53 57 49 3a 57 69  |al codes=>SWI:Wi|
00001a10  6d 70 5f 55 4d 35 30 33  43 6f 64 65 73 3e 20 6d  |mp_UM503Codes> m|
00001a20  61 79 20 62 65 20 75 73  65 64 20 75 6e 64 65 72  |ay be used under|
00001a30  20 52 4f 33 20 21 48 65  6c 70 20 6f 72 20 21 51  | RO3 !Help or !Q|
00001a40  75 69 63 6b 48 6c 70 2e  20 49 6e 20 61 64 64 69  |uickHlp. In addi|
00001a50  74 69 6f 6e 20 74 6f 20  74 68 65 20 21 48 65 6c  |tion to the !Hel|
00001a60  70 20 63 6f 64 65 73 20  3a 0a a4 53 74 72 69 6e  |p codes :..Strin|
00001a70  67 24 a4 20 77 69 6c 6c  20 69 6e 63 6c 75 64 65  |g$. will include|
00001a80  20 73 74 72 69 6e 67 20  7b 2f 7d 73 74 72 69 6e  | string {/}strin|
00001a90  67 24 7b 2f 7d 0a 3e 74  6f 6b 65 6e 5b 3a 73 75  |g${/}.>token[:su|
00001aa0  62 73 74 31 5b 3a 73 75  62 73 74 32 5b 3a 73 75  |bst1[:subst2[:su|
00001ab0  62 73 74 33 5d 5d 5d 20  77 69 6c 6c 20 6c 6f 6f  |bst3]]] will loo|
00001ac0  6b 2d 75 70 20 74 68 65  20 74 6f 6b 65 6e 20 69  |k-up the token i|
00001ad0  6e 20 74 68 65 20 4d 65  73 73 61 67 65 54 72 61  |n the MessageTra|
00001ae0  6e 73 20 66 69 6c 65 2e  0a 0a 49 66 20 74 68 65  |ns file...If the|
00001af0  20 69 73 20 6e 6f 20 66  75 6c 6c 20 73 74 6f 70  | is no full stop|
00001b00  20 61 74 20 74 68 65 20  65 6e 64 20 6f 66 20 74  | at the end of t|
00001b10  68 65 20 6c 69 6e 65 20  28 6f 72 20 62 65 66 6f  |he line (or befo|
00001b20  72 65 20 7c 4d 29 20 74  68 65 6e 20 6f 6e 65 20  |re |M) then one |
00001b30  77 69 6c 6c 20 62 65 20  61 64 64 65 64 2e 0a 00  |will be added...|
00001b40  44 41 54 41 61 00 00 00  50 52 4f 43 6f 70 65 6e  |DATAa...PROCopen|
00001b50  6d 65 73 73 61 67 65 73  0a 23 50 61 72 65 6e 74  |messages.#Parent|
00001b60  20 21 52 6f 6f 74 0a 4f  70 65 6e 20 61 20 4d 65  | !Root.Open a Me|
00001b70  73 73 61 67 65 54 72 61  6e 73 20 66 69 6c 65 20  |ssageTrans file |
00001b80  28 41 70 70 64 69 72 24  2b 22 2e 4d 65 73 73 61  |(Appdir$+".Messa|
00001b90  67 65 73 22 29 20 66 6f  72 20 69 6e 70 75 74 2e  |ges") for input.|
00001ba0  0a 00 00 00 44 41 54 41  6f 00 00 00 50 52 4f 43  |....DATAo...PROC|
00001bb0  63 6c 6f 73 65 6d 65 73  73 61 67 65 73 0a 23 50  |closemessages.#P|
00001bc0  61 72 65 6e 74 20 21 52  6f 6f 74 0a 43 6c 6f 73  |arent !Root.Clos|
00001bd0  65 20 74 68 65 20 4d 65  73 73 61 67 65 54 72 61  |e the MessageTra|
00001be0  6e 73 20 66 69 6c 65 20  70 72 65 76 69 6f 75 73  |ns file previous|
00001bf0  6c 79 20 6f 70 65 6e 65  64 20 77 69 74 68 20 3c  |ly opened with <|
00001c00  50 52 4f 43 6f 70 65 6e  6d 65 73 73 61 67 65 73  |PROCopenmessages|
00001c10  3e 2e 0a 00 44 41 54 41  a0 00 00 00 50 52 4f 43  |>...DATA....PROC|
00001c20  72 65 6c 65 61 73 65 66  74 6d 65 6e 75 0a 23 50  |releaseftmenu.#P|
00001c30  61 72 65 6e 74 20 21 52  6f 6f 74 0a 52 65 6c 65  |arent !Root.Rele|
00001c40  61 73 65 73 20 74 68 65  20 73 70 61 63 65 20 75  |ases the space u|
00001c50  73 65 64 20 62 79 20 74  68 65 20 66 69 6c 65 74  |sed by the filet|
00001c60  79 70 65 20 6d 65 6e 75  20 61 73 20 63 72 65 61  |ype menu as crea|
00001c70  74 65 64 20 62 79 20 3c  46 4e 63 72 65 61 74 65  |ted by <FNcreate|
00001c80  66 74 6d 65 6e 75 3e 2e  0a 0a 54 68 69 73 20 6d  |ftmenu>...This m|
00001c90  75 73 74 20 62 65 20 64  6f 6e 65 20 62 65 66 6f  |ust be done befo|
00001ca0  72 65 20 61 20 70 72 6f  67 72 61 6d 20 65 78 69  |re a program exi|
00001cb0  74 73 2e 0a 44 41 54 41  c4 00 00 00 50 52 4f 43  |ts..DATA....PROC|
00001cc0  69 63 6f 6e 73 68 61 64  65 28 77 69 6e 2c 69 63  |iconshade(win,ic|
00001cd0  6f 6e 2c 74 6f 67 67 6c  65 29 0a 23 50 61 72 65  |on,toggle).#Pare|
00001ce0  6e 74 20 21 52 6f 6f 74  0a 3d 3e 09 7b 2f 7d 77  |nt !Root.=>.{/}w|
00001cf0  69 6e 64 6f 77 7b 2f 7d  09 77 69 6e 64 6f 77 20  |indow{/}.window |
00001d00  68 61 6e 64 6c 65 0a 09  7b 2f 7d 69 63 6f 6e 7b  |handle..{/}icon{|
00001d10  2f 7d 09 69 63 6f 6e 20  68 61 6e 64 6c 65 0a 09  |/}.icon handle..|
00001d20  7b 2f 7d 74 6f 67 67 6c  65 7b 2f 7d 09 3c 66 6c  |{/}toggle{/}.<fl|
00001d30  61 67 3d 3e 74 6f 67 67  6c 65 66 6c 61 67 3e 20  |ag=>toggleflag> |
00001d40  66 6f 72 20 77 68 65 74  68 65 72 20 74 6f 20 73  |for whether to s|
00001d50  68 61 64 65 0a 0a 53 68  61 64 65 2c 20 75 6e 73  |hade..Shade, uns|
00001d60  68 61 64 65 20 6f 72 20  74 6f 67 67 6c 65 20 61  |hade or toggle a|
00001d70  6e 20 69 63 6f 6e 2e 0a  44 41 54 41 c7 00 00 00  |n icon..DATA....|
00001d80  50 52 4f 43 69 63 6f 6e  73 74 61 74 65 28 77 69  |PROCiconstate(wi|
00001d90  6e 2c 69 63 6f 6e 2c 74  6f 67 67 6c 65 29 0a 23  |n,icon,toggle).#|
00001da0  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
00001db0  7b 2f 7d 77 69 6e 64 6f  77 7b 2f 7d 09 77 69 6e  |{/}window{/}.win|
00001dc0  64 6f 77 20 68 61 6e 64  6c 65 0a 09 7b 2f 7d 69  |dow handle..{/}i|
00001dd0  63 6f 6e 7b 2f 7d 09 69  63 6f 6e 20 68 61 6e 64  |con{/}.icon hand|
00001de0  6c 65 0a 09 7b 2f 7d 74  6f 67 67 6c 65 7b 2f 7d  |le..{/}toggle{/}|
00001df0  09 3c 66 6c 61 67 3d 3e  74 6f 67 67 6c 65 66 6c  |.<flag=>togglefl|
00001e00  61 67 3e 20 66 6f 72 20  77 68 65 74 68 65 72 20  |ag> for whether |
00001e10  74 6f 20 73 65 6c 65 63  74 0a 0a 53 65 6c 65 63  |to select..Selec|
00001e20  74 2c 20 75 6e 73 65 6c  65 63 74 20 6f 72 20 74  |t, unselect or t|
00001e30  6f 67 67 6c 65 20 61 6e  20 69 63 6f 6e 2e 0a 00  |oggle an icon...|
00001e40  44 41 54 41 0b 01 00 00  50 52 4f 43 73 65 74 69  |DATA....PROCseti|
00001e50  63 6f 6e 62 69 74 28 77  69 6e 2c 69 63 6f 6e 2c  |conbit(win,icon,|
00001e60  62 69 74 2c 74 6f 67 67  6c 65 29 0a 23 50 61 72  |bit,toggle).#Par|
00001e70  65 6e 74 20 21 52 6f 6f  74 0a 3d 3e 09 7b 2f 7d  |ent !Root.=>.{/}|
00001e80  77 69 6e 64 6f 77 7b 2f  7d 09 77 69 6e 64 6f 77  |window{/}.window|
00001e90  20 68 61 6e 64 6c 65 0a  09 7b 2f 7d 69 63 6f 6e  | handle..{/}icon|
00001ea0  7b 2f 7d 09 69 63 6f 6e  20 68 61 6e 64 6c 65 0a  |{/}.icon handle.|
00001eb0  09 7b 2f 7d 62 69 74 7b  2f 7d 09 3c 62 69 74 3d  |.{/}bit{/}.<bit=|
00001ec0  3e 53 57 49 3a 77 69 6d  70 5f 69 63 6f 6e 66 6c  |>SWI:wimp_iconfl|
00001ed0  61 67 73 3e 20 74 6f 20  63 68 61 6e 67 65 0a 09  |ags> to change..|
00001ee0  7b 2f 7d 74 6f 67 67 6c  65 7b 2f 7d 09 3c 66 6c  |{/}toggle{/}.<fl|
00001ef0  61 67 3d 3e 74 6f 67 67  6c 65 66 6c 61 67 3e 20  |ag=>toggleflag> |
00001f00  66 6f 72 20 77 68 65 74  68 65 72 20 74 6f 20 73  |for whether to s|
00001f10  68 61 64 65 0a 0a 53 65  74 2f 75 6e 73 65 74 2f  |hade..Set/unset/|
00001f20  74 6f 67 67 6c 65 20 61  20 70 61 72 74 69 63 75  |toggle a particu|
00001f30  6c 61 72 20 62 69 74 20  69 6e 20 61 6e 20 69 63  |lar bit in an ic|
00001f40  6f 6e 27 73 20 66 6c 61  67 73 0a 00 44 41 54 41  |on's flags..DATA|
00001f50  7d 00 00 00 50 52 4f 43  72 65 64 72 61 77 69 63  |}...PROCredrawic|
00001f60  6f 6e 28 77 69 6e 2c 69  63 6f 6e 29 0a 23 50 61  |on(win,icon).#Pa|
00001f70  72 65 6e 74 20 21 52 6f  6f 74 0a 3d 3e 09 7b 2f  |rent !Root.=>.{/|
00001f80  7d 77 69 6e 7b 2f 7d 09  77 69 6e 64 6f 77 20 68  |}win{/}.window h|
00001f90  61 6e 64 6c 65 0a 09 7b  2f 7d 69 63 6f 6e 7b 2f  |andle..{/}icon{/|
00001fa0  7d 09 69 63 6f 6e 20 68  61 6e 64 6c 65 0a 0a 52  |}.icon handle..R|
00001fb0  65 64 72 61 77 20 74 68  65 20 73 70 65 63 69 66  |edraw the specif|
00001fc0  69 65 64 20 69 63 6f 6e  2e 00 00 00 44 41 54 41  |ied icon....DATA|
00001fd0  f2 00 00 00 50 52 4f 43  73 65 74 69 63 6f 6e 74  |....PROCseticont|
00001fe0  65 78 74 28 77 69 6e 2c  69 63 6f 6e 2c 74 65 78  |ext(win,icon,tex|
00001ff0  74 24 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |t$).#Parent !Roo|
00002000  74 0a 3d 3e 09 7b 2f 7d  77 69 6e 7b 2f 7d 09 77  |t.=>.{/}win{/}.w|
00002010  69 6e 64 6f 77 20 68 61  6e 64 6c 65 0a 09 7b 2f  |indow handle..{/|
00002020  7d 69 63 6f 6e 7b 2f 7d  09 69 63 6f 6e 20 68 61  |}icon{/}.icon ha|
00002030  6e 64 6c 65 0a 09 7b 2f  7d 74 65 78 74 24 7b 2f  |ndle..{/}text${/|
00002040  7d 09 6e 65 77 20 74 65  78 74 0a 0a 53 65 74 20  |}.new text..Set |
00002050  69 63 6f 6e 27 73 20 74  65 78 74 20 73 74 72 69  |icon's text stri|
00002060  6e 67 20 28 6f 6e 6c 79  20 66 6f 72 20 69 6e 64  |ng (only for ind|
00002070  69 72 65 63 74 65 64 20  73 70 72 69 74 65 73 29  |irected sprites)|
00002080  2e 0a 0a 4e 6f 74 65 3a  20 44 6f 20 6e 6f 74 20  |...Note: Do not |
00002090  6f 76 65 72 72 75 6e 20  6d 61 78 69 6d 75 6d 20  |overrun maximum |
000020a0  6c 65 6e 67 74 68 20 6f  66 20 69 6e 64 69 72 65  |length of indire|
000020b0  63 74 69 6f 6e 20 62 75  66 66 65 72 2e 0a 00 00  |ction buffer....|
000020c0  44 41 54 41 ad 00 00 00  50 52 4f 43 64 72 61 67  |DATA....PROCdrag|
000020d0  69 63 6f 6e 28 77 69 6e  64 6f 77 2c 69 63 6f 6e  |icon(window,icon|
000020e0  2c 66 6c 61 67 29 0a 23  50 61 72 65 6e 74 20 21  |,flag).#Parent !|
000020f0  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 77 69 6e 7b 2f  |Root.=>.{/}win{/|
00002100  7d 09 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |}.window handle.|
00002110  09 7b 2f 7d 69 63 6f 6e  7b 2f 7d 09 69 63 6f 6e  |.{/}icon{/}.icon|
00002120  20 68 61 6e 64 6c 65 0a  09 7b 2f 7d 66 6c 61 67  | handle..{/}flag|
00002130  7b 2f 7d 09 54 52 55 45  20 74 6f 20 72 65 73 74  |{/}.TRUE to rest|
00002140  72 69 63 74 20 74 6f 20  74 68 65 20 77 69 6e 64  |rict to the wind|
00002150  6f 77 0a 0a 53 74 61 72  74 20 61 20 64 72 61 67  |ow..Start a drag|
00002160  20 6f 66 20 61 6e 20 69  63 6f 6e 2e 0a 00 00 00  | of an icon.....|
00002170  44 41 54 41 7d 01 00 00  50 52 4f 43 77 69 6e 64  |DATA}...PROCwind|
00002180  6f 77 74 69 74 6c 65 28  77 69 6e 2c 74 69 74 6c  |owtitle(win,titl|
00002190  65 24 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |e$).#Parent !Roo|
000021a0  74 0a 3d 3e 09 7b 2f 7d  77 69 6e 7b 2f 7d 09 77  |t.=>.{/}win{/}.w|
000021b0  69 6e 64 6f 77 20 68 61  6e 64 6c 65 0a 09 7b 2f  |indow handle..{/|
000021c0  7d 74 69 74 6c 65 24 7b  2f 7d 09 6e 65 77 20 74  |}title${/}.new t|
000021d0  69 74 6c 65 20 6f 66 20  77 69 6e 64 6f 77 0a 0a  |itle of window..|
000021e0  53 65 74 20 74 69 74 6c  65 20 6f 66 20 77 69 6e  |Set title of win|
000021f0  64 6f 77 2e 20 49 6e 64  69 72 65 63 74 69 6f 6e  |dow. Indirection|
00002200  20 6d 75 73 74 20 62 65  20 75 73 65 64 20 66 6f  | must be used fo|
00002210  72 20 74 69 74 6c 65 20  62 61 72 2e 0a 0a 49 6e  |r title bar...In|
00002220  20 57 69 6d 70 4c 69 62  32 20 74 68 69 73 20 75  | WimpLib2 this u|
00002230  73 65 73 20 3c 57 69 6d  70 5f 47 65 74 57 69 6e  |ses <Wimp_GetWin|
00002240  64 6f 77 49 6e 66 6f 3d  3e 53 57 49 3a 57 69 6d  |dowInfo=>SWI:Wim|
00002250  70 5f 47 65 74 57 69 6e  64 6f 77 49 6e 66 6f 3e  |p_GetWindowInfo>|
00002260  20 77 68 69 63 68 20 72  65 74 75 72 6e 73 20 74  | which returns t|
00002270  68 65 20 65 6e 74 69 72  65 20 77 69 6e 64 6f 77  |he entire window|
00002280  20 62 6c 6f 63 6b 20 69  6e 63 6c 75 64 69 6e 67  | block including|
00002290  20 69 63 6f 6e 73 20 74  6f 20 7b 2f 7d 62 25 7b  | icons to {/}b%{|
000022a0  2f 7d 2c 20 74 68 65 72  65 66 6f 72 65 20 69 74  |/}, therefore it|
000022b0  20 69 73 20 76 69 74 61  6c 20 74 68 61 74 20 74  | is vital that t|
000022c0  68 65 20 62 6c 6f 63 6b  20 68 61 73 20 73 75 66  |he block has suf|
000022d0  66 69 63 69 65 6e 74 20  73 70 61 63 65 20 74 6f  |ficient space to|
000022e0  20 73 74 6f 72 65 20 74  68 65 6d 2e 0a 00 00 00  | store them.....|
000022f0  44 41 54 41 f4 00 00 00  50 52 4f 43 72 65 61 64  |DATA....PROCread|
00002300  74 61 73 6b 61 72 65 61  28 74 61 73 6b 2c 6c 6f  |taskarea(task,lo|
00002310  63 2c 74 6f 2c 6c 65 6e  29 0a 23 50 61 72 65 6e  |c,to,len).#Paren|
00002320  74 20 21 52 6f 6f 74 0a  3d 3e 09 7b 2f 7d 74 61  |t !Root.=>.{/}ta|
00002330  73 6b 7b 2f 7d 09 73 6f  75 72 63 65 20 61 70 70  |sk{/}.source app|
00002340  6c 69 63 61 74 69 6f 6e  27 73 20 68 61 6e 64 6c  |lication's handl|
00002350  65 0a 09 7b 2f 7d 6c 6f  63 7b 2f 7d 09 61 64 64  |e..{/}loc{/}.add|
00002360  72 65 73 73 20 69 6e 20  73 6f 75 72 63 65 0a 09  |ress in source..|
00002370  7b 2f 7d 74 6f 7b 2f 7d  09 61 64 64 72 65 73 73  |{/}to{/}.address|
00002380  20 69 6e 20 6f 75 72 20  61 70 70 6c 69 63 61 74  | in our applicat|
00002390  69 6f 6e 0a 09 7b 2f 7d  6c 65 6e 7b 2f 7d 09 6c  |ion..{/}len{/}.l|
000023a0  65 6e 67 74 68 20 74 6f  20 72 65 61 64 0a 0a 52  |ength to read..R|
000023b0  65 61 64 20 61 20 62 6c  6f 63 6b 20 66 72 6f 6d  |ead a block from|
000023c0  20 67 69 76 65 6e 20 74  61 73 6b 20 69 6e 74 6f  | given task into|
000023d0  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 73 70 61  | application spa|
000023e0  63 65 2e 0a 44 41 54 41  aa 00 00 00 50 52 4f 43  |ce..DATA....PROC|
000023f0  73 65 74 63 61 72 65 74  65 6e 64 28 77 69 6e 2c  |setcaretend(win,|
00002400  69 63 6f 6e 29 0a 23 50  61 72 65 6e 74 20 21 52  |icon).#Parent !R|
00002410  6f 6f 74 0a 3d 3e 09 7b  2f 7d 77 69 6e 7b 2f 7d  |oot.=>.{/}win{/}|
00002420  09 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 09  |.window handle..|
00002430  7b 2f 7d 69 63 6f 6e 7b  2f 7d 09 69 63 6f 6e 20  |{/}icon{/}.icon |
00002440  68 61 6e 64 6c 65 0a 0a  53 65 74 20 74 68 65 20  |handle..Set the |
00002450  63 61 72 65 74 73 20 6c  6f 63 61 74 69 6f 6e 20  |carets location |
00002460  61 73 20 74 68 65 20 65  6e 64 20 6f 66 20 74 68  |as the end of th|
00002470  65 20 74 65 78 74 20 69  6e 20 74 68 65 20 73 70  |e text in the sp|
00002480  65 63 69 66 69 65 64 20  69 63 6f 6e 2e 0a 00 00  |ecified icon....|
00002490  44 41 54 41 e8 00 00 00  50 52 4f 43 73 65 74 63  |DATA....PROCsetc|
000024a0  61 72 65 74 70 6f 73 28  77 69 6e 2c 69 63 6f 6e  |aretpos(win,icon|
000024b0  2c 63 68 61 72 73 29 0a  23 50 61 72 65 6e 74 20  |,chars).#Parent |
000024c0  21 52 6f 6f 74 0a 3d 3e  09 7b 2f 7d 77 69 6e 7b  |!Root.=>.{/}win{|
000024d0  2f 7d 09 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |/}.window handle|
000024e0  2c 20 6f 72 20 2d 31 20  74 6f 20 6c 6f 73 65 0a  |, or -1 to lose.|
000024f0  09 7b 2f 7d 69 63 6f 6e  7b 2f 7d 09 69 63 6f 6e  |.{/}icon{/}.icon|
00002500  20 68 61 6e 64 6c 65 0a  09 7b 2f 7d 63 68 61 72  | handle..{/}char|
00002510  73 7b 2f 7d 09 6e 75 6d  62 65 72 20 6f 66 20 63  |s{/}.number of c|
00002520  68 61 72 61 63 74 65 72  73 0a 0a 53 65 74 20 74  |haracters..Set t|
00002530  68 65 20 63 61 72 65 74  73 20 6c 6f 63 61 74 69  |he carets locati|
00002540  6f 6e 20 61 73 20 74 68  65 20 73 70 65 63 69 66  |on as the specif|
00002550  69 65 64 20 6e 75 6d 62  65 72 20 6f 66 20 63 68  |ied number of ch|
00002560  61 72 61 63 74 65 72 73  20 69 6e 74 6f 20 74 68  |aracters into th|
00002570  65 20 69 63 6f 6e 2e 0a  44 41 54 41 b6 00 00 00  |e icon..DATA....|
00002580  50 52 4f 43 67 65 74 63  61 72 65 74 70 6f 73 28  |PROCgetcaretpos(|
00002590  77 69 6e 2c 69 63 6f 6e  2c 63 68 61 72 73 29 0a  |win,icon,chars).|
000025a0  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3c 3d  |#Parent !Root.<=|
000025b0  09 7b 2f 7d 77 69 6e 7b  2f 7d 09 77 69 6e 64 6f  |.{/}win{/}.windo|
000025c0  77 20 68 61 6e 64 6c 65  0a 09 7b 2f 7d 69 63 6f  |w handle..{/}ico|
000025d0  6e 7b 2f 7d 09 69 63 6f  6e 20 68 61 6e 64 6c 65  |n{/}.icon handle|
000025e0  0a 09 7b 2f 7d 63 68 61  72 73 7b 2f 7d 09 63 68  |..{/}chars{/}.ch|
000025f0  61 72 61 63 74 65 72 20  6f 66 66 73 65 74 20 69  |aracter offset i|
00002600  6e 74 6f 20 73 74 72 69  6e 67 0a 0a 52 65 74 75  |nto string..Retu|
00002610  72 6e 20 74 68 65 20 6c  6f 63 61 74 69 6f 6e 20  |rn the location |
00002620  6f 66 20 74 68 65 20 63  61 72 65 74 2e 0a 00 00  |of the caret....|
00002630  44 41 54 41 ae 00 00 00  50 52 4f 43 67 65 74 70  |DATA....PROCgetp|
00002640  74 72 70 6f 73 28 78 2c  79 2c 77 69 6e 2c 69 63  |trpos(x,y,win,ic|
00002650  6f 6e 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |on).#Parent !Roo|
00002660  74 0a 3c 3d 09 7b 2f 7d  78 7b 2f 7d 09 09 6d 6f  |t.<=.{/}x{/}..mo|
00002670  75 73 65 20 78 0a 09 7b  2f 7d 79 7b 2f 7d 09 09  |use x..{/}y{/}..|
00002680  6d 6f 75 73 65 20 79 0a  09 7b 2f 7d 77 69 6e 7b  |mouse y..{/}win{|
00002690  2f 7d 09 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |/}.window handle|
000026a0  0a 09 7b 2f 7d 69 63 6f  6e 7b 2f 7d 09 69 63 6f  |..{/}icon{/}.ico|
000026b0  6e 20 68 61 6e 64 6c 65  0a 0a 52 65 74 75 72 6e  |n handle..Return|
000026c0  20 74 68 65 20 6c 6f 63  61 74 69 6f 6e 20 6f 66  | the location of|
000026d0  20 74 68 65 20 70 6f 69  6e 74 65 72 2e 0a 00 00  | the pointer....|
000026e0  44 41 54 41 c7 00 00 00  50 52 4f 43 77 72 69 74  |DATA....PROCwrit|
000026f0  65 63 6d 6f 73 28 62 79  74 65 2c 76 61 6c 75 65  |ecmos(byte,value|
00002700  29 0a 23 50 61 72 65 6e  74 20 21 52 6f 6f 74 0a  |).#Parent !Root.|
00002710  23 57 72 61 70 20 6f 66  66 0a 3d 3e 09 7b 2f 7d  |#Wrap off.=>.{/}|
00002720  62 79 74 65 7b 2f 7d 09  3c 43 4d 4f 53 20 62 79  |byte{/}.<CMOS by|
00002730  74 65 20 74 6f 20 63 68  61 6e 67 65 3d 3e 53 57  |te to change=>SW|
00002740  49 3a 6f 73 5f 62 79 74  65 63 6d 6f 73 3e 0a 09  |I:os_bytecmos>..|
00002750  7b 2f 7d 76 61 6c 75 65  7b 2f 7d 09 6e 65 77 20  |{/}value{/}.new |
00002760  76 61 6c 75 65 20 6f 66  20 62 79 74 65 0a 23 57  |value of byte.#W|
00002770  72 61 70 0a 0a 57 72 69  74 65 20 61 20 62 79 74  |rap..Write a byt|
00002780  65 20 6f 66 20 63 6f 6e  66 69 67 75 72 61 74 69  |e of configurati|
00002790  6f 6e 20 69 6e 66 6f 20  69 6e 74 6f 20 43 4d 4f  |on info into CMO|
000027a0  53 20 52 41 4d 2e 0a 00  44 41 54 41 ea 00 00 00  |S RAM...DATA....|
000027b0  50 52 4f 43 6d 65 6e 75  75 6e 74 69 63 6b 28 6d  |PROCmenuuntick(m|
000027c0  65 6e 75 2c 73 74 61 72  74 2c 65 6e 64 29 0a 23  |enu,start,end).#|
000027d0  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
000027e0  7b 2f 7d 6d 65 6e 75 7b  2f 7d 09 70 6f 69 6e 74  |{/}menu{/}.point|
000027f0  65 72 20 74 6f 20 6d 65  6e 75 20 62 6c 6f 63 6b  |er to menu block|
00002800  0a 09 7b 2f 7d 73 74 61  72 74 7b 2f 7d 09 6f 70  |..{/}start{/}.op|
00002810  74 69 6f 6e 20 74 6f 20  73 74 61 72 74 20 61 74  |tion to start at|
00002820  0a 09 7b 2f 7d 65 6e 64  7b 2f 7d 09 6f 70 74 69  |..{/}end{/}.opti|
00002830  6f 6e 20 74 6f 20 65 6e  64 20 61 74 2c 20 6f 72  |on to end at, or|
00002840  20 2d 31 20 66 6f 72 20  65 6e 64 20 6f 66 20 6d  | -1 for end of m|
00002850  65 6e 75 0a 0a 55 6e 74  69 63 6b 73 20 61 6c 6c  |enu..Unticks all|
00002860  20 74 68 65 20 6f 70 74  69 6f 6e 73 20 62 65 74  | the options bet|
00002870  77 65 65 6e 20 74 68 6f  73 65 20 73 70 65 63 69  |ween those speci|
00002880  66 69 65 64 20 28 69 6e  63 6c 75 73 69 76 65 29  |fied (inclusive)|
00002890  2e 0a 00 00 44 41 54 41  d8 00 00 00 50 52 4f 43  |....DATA....PROC|
000028a0  73 65 74 69 63 6f 6e 76  61 6c 69 64 28 77 69 6e  |seticonvalid(win|
000028b0  2c 69 63 6f 6e 2c 76 61  6c 69 64 24 29 0a 23 50  |,icon,valid$).#P|
000028c0  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000028d0  2f 7d 77 69 6e 7b 2f 7d  09 77 69 6e 64 6f 77 20  |/}win{/}.window |
000028e0  68 61 6e 64 6c 65 0a 09  7b 2f 7d 69 63 6f 6e 7b  |handle..{/}icon{|
000028f0  2f 7d 09 69 63 6f 6e 20  68 61 6e 64 6c 65 0a 09  |/}.icon handle..|
00002900  7b 2f 7d 76 61 6c 69 64  24 7b 2f 7d 09 6e 65 77  |{/}valid${/}.new|
00002910  20 76 61 6c 69 64 61 74  69 6f 6e 20 73 74 72 69  | validation stri|
00002920  6e 67 0a 0a 53 65 74 20  69 63 6f 6e 27 73 20 76  |ng..Set icon's v|
00002930  61 6c 69 64 61 74 69 6f  6e 20 73 74 72 69 6e 67  |alidation string|
00002940  2e 20 44 6f 20 6e 6f 74  20 6f 76 65 72 72 75 6e  |. Do not overrun|
00002950  20 76 61 6c 69 64 61 74  69 6f 6e 20 73 74 72 69  | validation stri|
00002960  6e 67 73 20 62 75 66 66  65 72 2e 0a 44 41 54 41  |ngs buffer..DATA|
00002970  e6 01 00 00 50 52 4f 43  6d 61 6b 65 73 74 61 74  |....PROCmakestat|
00002980  75 73 66 69 6c 65 28 66  69 6c 65 24 29 0a 23 50  |usfile(file$).#P|
00002990  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000029a0  2f 7d 66 69 6c 65 24 7b  2f 7d 09 66 69 6c 65 20  |/}file${/}.file |
000029b0  74 6f 20 63 72 65 61 74  65 0a 0a 42 65 67 69 6e  |to create..Begin|
000029c0  20 6d 61 6b 69 6e 67 20  61 20 73 74 61 74 75 73  | making a status|
000029d0  20 66 69 6c 65 20 66 6f  72 20 75 73 65 20 62 79  | file for use by|
000029e0  20 74 68 69 73 20 70 72  6f 67 72 61 6d 20 61 6c  | this program al|
000029f0  6f 6e 65 20 28 6f 72 20  3c 21 43 6f 6e 66 69 67  |one (or <!Config|
00002a00  2b 3d 3e 43 6f 6e 66 69  67 50 6c 75 73 3a 69 6e  |+=>ConfigPlus:in|
00002a10  66 6f 3e 20 69 66 20 73  75 70 70 6f 72 74 65 64  |fo> if supported|
00002a20  29 2e 0a 0a 54 68 65 20  66 69 6c 65 20 69 73 20  |)...The file is |
00002a30  63 72 65 61 74 65 64 20  77 69 74 68 20 74 79 70  |created with typ|
00002a40  65 20 74 65 78 74 20 61  6e 64 20 68 65 61 64 65  |e text and heade|
00002a50  64 20 77 69 74 68 20 7b  2f 7d 41 70 70 6e 61 6d  |d with {/}Appnam|
00002a60  65 24 7b 2f 7d 20 74 6f  20 6d 61 72 6b 20 69 74  |e${/} to mark it|
00002a70  20 61 73 20 62 65 6c 6f  6e 67 69 6e 67 20 74 6f  | as belonging to|
00002a80  20 74 68 69 73 20 61 70  70 6c 69 63 61 74 69 6f  | this applicatio|
00002a90  6e 2e 0a 0a 52 65 6c 61  74 65 64 20 63 6f 6d 6d  |n...Related comm|
00002aa0  61 6e 64 73 20 3a 0a 23  54 61 62 3b 49 6e 64 65  |ands :.#Tab;Inde|
00002ab0  6e 74 20 32 0a 3c 50 52  4f 43 73 74 61 74 75 73  |nt 2.<PROCstatus|
00002ac0  70 75 74 3e 09 09 73 74  6f 72 65 73 20 61 20 73  |put>..stores a s|
00002ad0  74 72 69 6e 67 0a 3c 50  52 4f 43 73 74 61 74 75  |tring.<PROCstatu|
00002ae0  73 6f 70 74 69 6f 6e 3e  09 73 74 6f 72 65 73 20  |soption>.stores |
00002af0  61 20 76 61 72 69 61 62  6c 65 0a 3c 50 52 4f 43  |a variable.<PROC|
00002b00  73 74 61 74 75 73 66 6c  61 67 3e 09 73 74 6f 72  |statusflag>.stor|
00002b10  65 73 20 61 20 66 6c 61  67 0a 3c 50 52 4f 43 63  |es a flag.<PROCc|
00002b20  6c 6f 73 65 73 74 61 74  75 73 66 69 6c 65 3e 09  |losestatusfile>.|
00002b30  66 69 6e 69 73 68 65 73  20 6d 61 6b 69 6e 67 20  |finishes making |
00002b40  74 68 65 20 66 69 6c 65  2e 0a 23 49 6e 64 65 6e  |the file..#Inden|
00002b50  74 0a 00 00 44 41 54 41  7e 00 00 00 50 52 4f 43  |t...DATA~...PROC|
00002b60  63 6c 6f 73 65 73 74 61  74 75 73 66 69 6c 65 0a  |closestatusfile.|
00002b70  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 43 6c  |#Parent !Root.Cl|
00002b80  6f 73 65 20 61 20 73 74  61 74 75 73 20 66 69 6c  |ose a status fil|
00002b90  65 20 70 72 65 76 69 6f  75 73 6c 79 20 6f 70 65  |e previously ope|
00002ba0  6e 65 64 20 62 79 20 3c  50 52 4f 43 6d 61 6b 65  |ned by <PROCmake|
00002bb0  73 74 61 74 75 73 66 69  6c 65 3e 20 6f 72 20 3c  |statusfile> or <|
00002bc0  46 4e 72 65 61 64 73 74  61 74 75 73 66 69 6c 65  |FNreadstatusfile|
00002bd0  3e 0a 00 00 44 41 54 41  e0 00 00 00 50 52 4f 43  |>...DATA....PROC|
00002be0  73 74 61 74 75 73 70 75  74 28 74 61 67 24 2c 76  |statusput(tag$,v|
00002bf0  61 6c 75 65 24 29 0a 23  50 61 72 65 6e 74 20 21  |alue$).#Parent !|
00002c00  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 74 61 67 24 7b  |Root.=>.{/}tag${|
00002c10  2f 7d 09 74 61 67 20 63  6f 64 65 0a 09 7b 2f 7d  |/}.tag code..{/}|
00002c20  76 61 6c 75 65 24 7b 2f  7d 09 76 61 6c 75 65 20  |value${/}.value |
00002c30  74 6f 20 73 74 6f 72 65  0a 0a 53 74 6f 72 65 20  |to store..Store |
00002c40  61 20 73 74 72 69 6e 67  20 69 6e 20 74 68 65 20  |a string in the |
00002c50  73 74 61 74 75 73 20 66  69 6c 65 20 77 69 74 68  |status file with|
00002c60  20 72 65 66 65 72 65 6e  63 65 20 74 61 67 2e 0a  | reference tag..|
00002c70  0a 54 68 69 73 20 77 69  6c 6c 20 62 65 20 73 74  |.This will be st|
00002c80  6f 72 65 64 20 69 6e 20  74 68 65 20 66 69 6c 65  |ored in the file|
00002c90  20 61 73 20 3a 0a 20 20  7b 66 43 6f 64 65 7d 5c  | as :.  {fCode}\|
00002ca0  3c 74 61 67 24 3e 3a 5c  3c 76 61 6c 75 65 24 3e  |<tag$>:\<value$>|
00002cb0  7b 66 7d 0a 44 41 54 41  e3 00 00 00 50 52 4f 43  |{f}.DATA....PROC|
00002cc0  73 74 61 74 75 73 6f 70  74 69 6f 6e 28 74 61 67  |statusoption(tag|
00002cd0  24 2c 76 61 6c 75 65 29  0a 23 50 61 72 65 6e 74  |$,value).#Parent|
00002ce0  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 74 61 67  | !Root.=>.{/}tag|
00002cf0  24 7b 2f 7d 09 74 61 67  20 63 6f 64 65 0a 09 7b  |${/}.tag code..{|
00002d00  2f 7d 76 61 6c 75 65 7b  2f 7d 09 76 61 6c 75 65  |/}value{/}.value|
00002d10  20 74 6f 20 73 74 6f 72  65 0a 0a 53 74 6f 72 65  | to store..Store|
00002d20  20 61 20 76 61 72 69 61  62 6c 65 20 69 6e 20 74  | a variable in t|
00002d30  68 65 20 73 74 61 74 75  73 20 66 69 6c 65 20 77  |he status file w|
00002d40  69 74 68 20 72 65 66 65  72 65 6e 63 65 20 74 61  |ith reference ta|
00002d50  67 2e 0a 0a 54 68 69 73  20 77 69 6c 6c 20 62 65  |g...This will be|
00002d60  20 73 74 6f 72 65 64 20  69 6e 20 74 68 65 20 66  | stored in the f|
00002d70  69 6c 65 20 61 73 20 3a  0a 20 20 7b 66 43 6f 64  |ile as :.  {fCod|
00002d80  65 7d 5c 3c 74 61 67 24  3e 3a 25 5c 3c 76 61 6c  |e}\<tag$>:%\<val|
00002d90  75 65 3e 7b 66 7d 0a 00  44 41 54 41 e0 00 00 00  |ue>{f}..DATA....|
00002da0  50 52 4f 43 73 74 61 74  75 73 6e 65 78 74 28 74  |PROCstatusnext(t|
00002db0  61 67 24 2c 76 61 6c 75  65 24 29 0a 23 50 61 72  |ag$,value$).#Par|
00002dc0  65 6e 74 20 21 52 6f 6f  74 0a 23 57 72 61 70 20  |ent !Root.#Wrap |
00002dd0  6f 66 66 0a 3c 3d 09 7b  2f 7d 74 61 67 24 7b 2f  |off.<=.{/}tag${/|
00002de0  7d 09 74 61 67 20 63 6f  64 65 2c 20 6f 72 20 2a  |}.tag code, or *|
00002df0  45 2a 4e 2a 44 2a 20 69  66 20 45 4f 46 0a 09 7b  |E*N*D* if EOF..{|
00002e00  2f 7d 76 61 6c 75 65 24  7b 2f 7d 09 76 61 6c 75  |/}value${/}.valu|
00002e10  65 0a 23 57 72 61 70 0a  0a 54 68 69 73 20 72 65  |e.#Wrap..This re|
00002e20  74 75 72 6e 73 20 74 68  65 20 6e 65 78 74 20 74  |turns the next t|
00002e30  61 67 20 61 6e 64 20 76  61 6c 75 65 20 69 6e 20  |ag and value in |
00002e40  74 68 65 20 66 69 6c 65  2e 20 43 6f 6d 6d 65 6e  |the file. Commen|
00002e50  74 20 6c 69 6e 65 73 20  70 72 65 63 65 65 64 65  |t lines preceede|
00002e60  64 20 62 79 20 23 20 77  69 6c 6c 20 62 65 20 69  |d by # will be i|
00002e70  67 6e 6f 72 65 64 2e 0a  44 41 54 41 fd 00 00 00  |gnored..DATA....|
00002e80  50 52 4f 43 72 65 6c 65  61 73 65 28 70 6f 69 6e  |PROCrelease(poin|
00002e90  74 65 72 29 20 2d 20 57  69 6d 70 4c 69 62 20 76  |ter) - WimpLib v|
00002ea0  65 72 73 69 6f 6e 0a 23  50 61 72 65 6e 74 20 21  |ersion.#Parent !|
00002eb0  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 70 6f 69 6e 74  |Root.=>.{/}point|
00002ec0  65 72 7b 2f 7d 09 70 6f  69 6e 74 65 72 20 74 6f  |er{/}.pointer to|
00002ed0  20 62 6c 6f 63 6b 0a 3c  3d 09 2d 31 20 74 6f 20  | block.<=.-1 to |
00002ee0  69 6e 64 69 63 61 74 65  20 74 6f 20 62 6c 6f 63  |indicate to bloc|
00002ef0  6b 2e 0a 0a 52 65 6c 65  61 73 65 20 61 20 63 6c  |k...Release a cl|
00002f00  61 69 6d 65 64 20 62 6c  6f 63 6b 20 6f 66 20 52  |aimed block of R|
00002f10  4d 41 2e 20 0a 0a 4e 6f  74 65 3a 20 54 68 69 73  |MA. ..Note: This|
00002f20  20 63 61 6c 6c 20 69 73  20 72 65 70 6c 61 63 65  | call is replace|
00002f30  64 20 69 6e 20 48 65 61  70 4c 69 62 20 62 79 20  |d in HeapLib by |
00002f40  61 20 48 65 61 70 20 63  6c 61 69 6d 20 3c 50 52  |a Heap claim <PR|
00002f50  4f 43 72 65 6c 65 61 73  65 3d 3e 48 65 61 70 4c  |OCrelease=>HeapL|
00002f60  69 62 3a 50 52 4f 43 72  65 6c 65 61 73 65 3e 20  |ib:PROCrelease> |
00002f70  63 61 6c 6c 2e 00 00 00  44 41 54 41 8f 00 00 00  |call....DATA....|
00002f80  50 52 4f 43 70 72 65 73  73 69 63 6f 6e 28 77 69  |PROCpressicon(wi|
00002f90  6e 2c 69 63 6f 6e 29 0a  23 50 61 72 65 6e 74 20  |n,icon).#Parent |
00002fa0  21 52 6f 6f 74 0a 3d 3e  09 7b 2f 7d 77 69 6e 7b  |!Root.=>.{/}win{|
00002fb0  2f 7d 09 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |/}.window handle|
00002fc0  0a 09 7b 2f 7d 69 63 6f  6e 7b 2f 7d 09 69 63 6f  |..{/}icon{/}.ico|
00002fd0  6e 20 68 61 6e 64 6c 65  0a 0a 50 72 65 73 73 20  |n handle..Press |
00002fe0  61 6e 20 69 63 6f 6e 20  66 6f 72 20 61 62 6f 75  |an icon for abou|
00002ff0  74 20 bc 20 73 65 63 6f  6e 64 20 61 6e 64 20 72  |t . second and r|
00003000  65 6c 65 61 73 65 2e 00  44 41 54 41 04 01 00 00  |elease..DATA....|
00003010  50 52 4f 43 73 74 61 74  75 73 66 6c 61 67 28 74  |PROCstatusflag(t|
00003020  61 67 24 2c 66 6c 61 67  29 0a 23 50 61 72 65 6e  |ag$,flag).#Paren|
00003030  74 20 21 52 6f 6f 74 0a  3d 3e 09 7b 2f 7d 74 61  |t !Root.=>.{/}ta|
00003040  67 24 7b 2f 7d 09 74 61  67 20 63 6f 64 65 0a 09  |g${/}.tag code..|
00003050  7b 2f 7d 66 6c 61 67 7b  2f 7d 09 66 6c 61 67 20  |{/}flag{/}.flag |
00003060  74 6f 20 73 74 6f 72 65  0a 0a 53 74 6f 72 65 20  |to store..Store |
00003070  61 20 66 6c 61 67 20 69  6e 20 74 68 65 20 73 74  |a flag in the st|
00003080  61 74 75 73 20 66 69 6c  65 20 77 69 74 68 20 72  |atus file with r|
00003090  65 66 65 72 65 6e 63 65  20 74 61 67 2e 0a 0a 54  |eference tag...T|
000030a0  68 69 73 20 77 69 6c 6c  20 62 65 20 73 74 6f 72  |his will be stor|
000030b0  65 64 20 69 6e 20 74 68  65 20 66 69 6c 65 20 61  |ed in the file a|
000030c0  73 20 3a 0a 23 54 61 62  0a 20 20 7b 66 43 6f 64  |s :.#Tab.  {fCod|
000030d0  65 7d 5c 3c 74 61 67 24  3e 3a 25 4f 6e 7b 66 7d  |e}\<tag$>:%On{f}|
000030e0  09 09 69 66 20 54 52 55  45 0a 20 20 7b 66 43 6f  |..if TRUE.  {fCo|
000030f0  64 65 7d 5c 3c 74 61 67  24 3e 3a 25 4f 66 66 7b  |de}\<tag$>:%Off{|
00003100  66 7d 09 69 66 20 46 41  4c 53 45 0a 44 41 54 41  |f}.if FALSE.DATA|
00003110  43 02 00 00 50 52 4f 43  73 68 6f 77 66 72 65 65  |C...PROCshowfree|
00003120  0a 23 50 61 72 65 6e 74  20 21 52 6f 6f 74 0a 54  |.#Parent !Root.T|
00003130  68 69 73 20 63 61 6c 6c  20 64 69 73 70 6c 61 79  |his call display|
00003140  73 20 6f 6e 20 74 68 65  20 77 69 6e 64 6f 77 20  |s on the window |
00003150  7b 2f 7d 69 6e 66 6f 62  6f 78 25 7b 2f 7d 20 74  |{/}infobox%{/} t|
00003160  68 65 20 61 6d 6f 75 6e  74 20 6f 66 20 73 70 61  |he amount of spa|
00003170  63 65 20 74 61 6b 65 6e  20 75 70 20 62 79 20 74  |ce taken up by t|
00003180  68 65 20 70 72 6f 67 72  61 6d 2c 20 76 61 72 69  |he program, vari|
00003190  61 62 6c 65 73 20 61 6e  64 20 66 72 65 65 20 73  |ables and free s|
000031a0  70 61 63 65 2e 20 49 66  20 74 68 65 20 3c 48 65  |pace. If the <He|
000031b0  61 70 20 4c 69 62 72 61  72 79 3d 3e 48 65 61 70  |ap Library=>Heap|
000031c0  4c 69 62 3a 21 52 6f 6f  74 3e 20 69 73 20 69 6e  |Lib:!Root> is in|
000031d0  73 74 61 6c 6c 65 64 2c  20 74 68 65 6e 20 69 6e  |stalled, then in|
000031e0  66 6f 72 6d 61 74 69 6f  6e 20 6f 6e 20 74 68 65  |formation on the|
000031f0  20 68 65 61 70 20 77 69  6c 6c 20 61 6c 73 6f 20  | heap will also |
00003200  62 65 20 64 69 73 70 6c  61 79 65 64 2e 20 4e 6f  |be displayed. No|
00003210  74 65 20 74 68 61 74 20  61 6e 79 20 6c 69 62 72  |te that any libr|
00003220  61 72 69 65 73 20 69 6e  73 74 61 6c 6c 65 64 20  |aries installed |
00003230  77 69 6c 6c 20 62 65 20  69 6e 63 6c 75 64 65 64  |will be included|
00003240  20 69 6e 20 74 68 65 20  76 61 72 69 61 62 6c 65  | in the variable|
00003250  20 75 73 61 67 65 20 65  6e 74 72 79 2e 0a 0a 54  | usage entry...T|
00003260  68 69 73 20 69 73 20 62  65 73 74 20 75 73 65 64  |his is best used|
00003270  20 64 75 72 69 6e 67 20  74 65 73 74 69 6e 67 20  | during testing |
00003280  69 66 20 74 68 65 20 75  73 65 72 20 63 6c 69 63  |if the user clic|
00003290  6b 73 20 6f 6e 20 74 68  65 20 7b 2f 7d 69 6e 66  |ks on the {/}inf|
000032a0  6f 62 6f 78 25 7b 2f 7d  20 77 69 6e 64 6f 77 0a  |obox%{/} window.|
000032b0  0a 4e 6f 74 65 3a 20 54  68 65 20 77 69 6e 64 6f  |.Note: The windo|
000032c0  77 20 73 68 6f 75 6c 64  20 72 65 61 6c 6c 79 20  |w should really |
000032d0  62 65 20 6f 6e 65 20 66  72 6f 6d 20 74 68 65 20  |be one from the |
000032e0  53 6b 65 6c 65 74 6f 6e  20 61 70 70 6c 69 63 61  |Skeleton applica|
000032f0  74 69 6f 6e 20 61 73 20  74 68 69 73 20 68 61 73  |tion as this has|
00003300  20 74 68 65 20 63 6f 72  72 65 63 74 20 6e 75 6d  | the correct num|
00003310  62 65 72 20 6f 66 20 69  63 6f 6e 73 20 69 6e 20  |ber of icons in |
00003320  74 68 65 20 63 6f 72 72  65 63 74 20 70 6c 61 63  |the correct plac|
00003330  65 73 20 77 69 74 68 20  74 68 65 20 63 6f 72 72  |es with the corr|
00003340  65 63 74 20 76 61 6c 69  64 61 74 69 6f 6e 2e 00  |ect validation..|
00003350  44 41 54 41 eb 01 00 00  50 52 4f 43 65 65 72 72  |DATA....PROCeerr|
00003360  6f 72 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |or.#Parent !Root|
00003370  0a 54 68 69 73 20 69 73  20 74 68 65 20 73 69 6e  |.This is the sin|
00003380  67 6c 65 20 74 61 73 6b  69 6e 67 20 76 65 72 73  |gle tasking vers|
00003390  69 6f 6e 20 6f 66 20 50  52 4f 43 65 72 72 6f 72  |ion of PROCerror|
000033a0  20 66 6f 72 20 72 75 6e  6e 69 6e 67 20 28 73 74  | for running (st|
000033b0  72 61 6e 67 65 6c 79 29  20 69 6e 20 74 68 65 20  |rangely) in the |
000033c0  64 65 73 6b 74 6f 70 20  65 6e 76 69 72 6f 6e 6d  |desktop environm|
000033d0  65 6e 74 2e 20 4d 6f 73  74 6c 79 20 69 74 20 69  |ent. Mostly it i|
000033e0  73 20 75 73 65 64 20 66  6f 72 20 64 65 62 75 67  |s used for debug|
000033f0  67 69 6e 67 20 70 75 72  70 6f 73 65 73 2e 0a 0a  |ging purposes...|
00003400  55 73 75 61 6c 6c 79 20  74 68 65 72 65 20 61 72  |Usually there ar|
00003410  65 20 6e 75 6d 65 72 6f  75 73 20 76 61 72 69 61  |e numerous varia|
00003420  62 6c 65 73 20 79 6f 75  20 6e 65 65 64 20 74 6f  |bles you need to|
00003430  20 69 6e 69 74 69 61 6c  69 73 65 20 62 65 66 6f  | initialise befo|
00003440  72 65 20 74 68 65 20 57  69 6d 70 20 69 73 20 73  |re the Wimp is s|
00003450  65 74 20 75 70 20 66 6f  72 20 75 73 65 20 61 6e  |et up for use an|
00003460  64 20 74 68 65 72 65 66  6f 72 65 20 61 20 64 69  |d therefore a di|
00003470  66 66 65 72 65 6e 74 20  65 72 72 6f 72 20 68 61  |fferent error ha|
00003480  6e 64 6c 65 72 20 69 73  20 72 65 71 75 69 72 65  |ndler is require|
00003490  64 2e 20 55 73 61 67 65  20 69 73 20 75 73 75 61  |d. Usage is usua|
000034a0  6c 6c 79 20 3a 0a 0a 7b  66 43 6f 64 65 7d 4f 4e  |lly :..{fCode}ON|
000034b0  20 45 52 52 4f 52 20 50  52 4f 43 65 65 72 72 6f  | ERROR PROCeerro|
000034c0  72 3a 45 4e 44 7b 66 7d  0a 0a 54 68 65 20 45 72  |r:END{f}..The Er|
000034d0  72 6f 72 24 20 61 6e 64  20 45 72 72 6f 72 24 54  |ror$ and Error$T|
000034e0  61 73 6b 20 76 61 72 69  61 62 6c 65 73 20 61 72  |ask variables ar|
000034f0  65 20 73 65 74 20 75 70  20 63 6f 72 72 65 63 74  |e set up correct|
00003500  6c 79 20 61 6e 64 20 74  68 65 20 65 72 72 6f 72  |ly and the error|
00003510  20 69 73 20 64 69 73 70  6c 61 79 65 64 20 69 6e  | is displayed in|
00003520  20 61 20 73 74 61 6e 64  61 72 64 20 57 69 6d 70  | a standard Wimp|
00003530  20 65 72 72 6f 72 20 62  6f 78 2e 00 44 41 54 41  | error box..DATA|
00003540  d4 01 00 00 50 52 4f 43  64 72 61 67 73 61 76 65  |....PROCdragsave|
00003550  28 77 69 6e 64 6f 77 2c  69 63 6f 6e 2c 74 79 70  |(window,icon,typ|
00003560  65 2c 73 69 7a 65 29 0a  23 50 61 72 65 6e 74 20  |e,size).#Parent |
00003570  21 52 6f 6f 74 0a 3d 3e  09 7b 2f 7d 77 69 6e 7b  |!Root.=>.{/}win{|
00003580  2f 7d 09 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |/}.window handle|
00003590  20 6f 66 20 73 61 76 65  20 62 6f 78 20 77 65 20  | of save box we |
000035a0  63 61 6d 65 20 66 72 6f  6d 0a 09 7b 2f 7d 69 63  |came from..{/}ic|
000035b0  6f 6e 7b 2f 7d 09 69 63  6f 6e 20 68 61 6e 64 6c  |on{/}.icon handl|
000035c0  65 20 6f 66 20 66 69 6c  65 6e 61 6d 65 20 69 63  |e of filename ic|
000035d0  6f 6e 20 28 75 73 75 61  6c 6c 79 20 32 29 0a 09  |on (usually 2)..|
000035e0  7b 2f 7d 74 79 70 65 7b  2f 7d 09 3c 66 69 6c 65  |{/}type{/}.<file|
000035f0  74 79 70 65 3d 3e 46 69  6c 65 74 79 70 65 73 3a  |type=>Filetypes:|
00003600  21 52 6f 6f 74 3e 0a 09  7b 2f 7d 73 69 7a 65 7b  |!Root>..{/}size{|
00003610  2f 7d 09 65 73 74 69 6d  61 74 65 64 20 73 69 7a  |/}.estimated siz|
00003620  65 20 6f 66 20 74 68 65  20 66 69 6c 65 20 28 6f  |e of the file (o|
00003630  72 20 2d 31 20 69 66 20  75 6e 6b 6e 6f 77 6e 29  |r -1 if unknown)|
00003640  0a 0a 49 6e 69 74 69 61  74 65 73 20 74 68 65 20  |..Initiates the |
00003650  44 61 74 61 53 61 76 65  20 70 72 6f 74 6f 63 6f  |DataSave protoco|
00003660  6c 20 61 66 74 65 72 20  61 20 64 72 61 67 20 68  |l after a drag h|
00003670  61 73 20 62 65 65 6e 20  63 6f 6d 70 6c 65 74 65  |as been complete|
00003680  64 2e 20 59 6f 75 20 73  68 6f 75 6c 64 20 6c 69  |d. You should li|
00003690  73 74 65 6e 20 66 6f 72  20 61 20 3c 44 61 74 61  |sten for a <Data|
000036a0  53 61 76 65 41 63 6b 3d  3e 53 57 49 3a 57 69 6d  |SaveAck=>SWI:Wim|
000036b0  70 5f 55 4d 32 3e 20 6d  65 73 73 61 67 65 20 66  |p_UM2> message f|
000036c0  6f 72 20 73 75 63 63 65  73 73 2c 20 6f 72 20 61  |or success, or a|
000036d0  20 61 63 6b 6e 6f 77 6c  65 64 67 65 64 20 28 72  | acknowledged (r|
000036e0  65 61 73 6f 6e 20 31 39  29 20 3c 44 61 74 61 53  |eason 19) <DataS|
000036f0  61 76 65 3d 3e 53 57 49  3a 57 69 6d 70 5f 55 4d  |ave=>SWI:Wimp_UM|
00003700  31 3e 20 66 6f 72 20 66  61 69 6c 75 72 65 2e 0a  |1> for failure..|
00003710  44 41 54 41 56 01 00 00  50 52 4f 43 72 65 73 69  |DATAV...PROCresi|
00003720  7a 65 77 69 6e 74 6f 28  77 69 6e 2c 6c 2c 74 2c  |zewinto(win,l,t,|
00003730  72 2c 62 29 0a 23 50 61  72 65 6e 74 20 21 52 6f  |r,b).#Parent !Ro|
00003740  6f 74 0a 3d 3e 09 7b 2f  7d 77 69 6e 7b 2f 7d 09  |ot.=>.{/}win{/}.|
00003750  77 69 6e 64 6f 77 20 68  61 6e 64 6c 65 0a 09 7b  |window handle..{|
00003760  2f 7d 6c 7b 2f 7d 09 09  6c 65 66 74 20 6f 66 20  |/}l{/}..left of |
00003770  54 57 41 0a 09 7b 2f 7d  74 7b 2f 7d 09 09 74 6f  |TWA..{/}t{/}..to|
00003780  70 20 6f 66 20 54 57 41  0a 09 7b 2f 7d 72 7b 2f  |p of TWA..{/}r{/|
00003790  7d 09 09 72 69 67 68 74  20 6f 66 20 54 57 41 0a  |}..right of TWA.|
000037a0  09 7b 2f 7d 62 7b 2f 7d  09 09 62 6f 74 74 6f 6d  |.{/}b{/}..bottom|
000037b0  20 6f 66 20 54 57 41 0a  0a 52 65 73 69 7a 65 73  | of TWA..Resizes|
000037c0  20 77 69 6e 64 6f 77 20  6f 6e 20 73 63 72 65 65  | window on scree|
000037d0  6e 20 74 6f 20 74 68 65  20 73 69 7a 65 20 67 69  |n to the size gi|
000037e0  76 65 6e 2e 0a 0a 57 69  6e 64 6f 77 20 77 69 6c  |ven...Window wil|
000037f0  6c 20 6e 6f 74 20 63 68  61 6e 67 65 20 69 6e 20  |l not change in |
00003800  73 69 7a 65 2c 20 75 6e  6c 65 73 73 20 69 74 20  |size, unless it |
00003810  69 73 20 63 75 72 72 65  6e 74 6c 79 20 61 74 20  |is currently at |
00003820  66 75 6c 6c 20 73 69 7a  65 20 69 6e 20 77 68 69  |full size in whi|
00003830  63 68 20 63 61 73 65 20  69 74 20 77 69 6c 6c 20  |ch case it will |
00003840  63 68 61 6e 67 65 20 74  6f 20 74 68 65 20 6e 65  |change to the ne|
00003850  77 20 73 69 7a 65 20 6f  66 20 74 68 65 20 77 69  |w size of the wi|
00003860  6e 64 6f 77 2e 0a 00 00  44 49 52 24 b8 06 00 00  |ndow....DIR$....|
00003870  b8 06 00 00 20 3f 00 00  47 ff ff ff 96 96 49 02  |.... ?..G.....I.|
00003880  02 02 00 00 13 00 00 00  00 00 00 00 64 65 63 6f  |............deco|
00003890  64 65 6d 65 6e 75 00 00  24 41 00 00 46 ff ff ff  |demenu..$A..F...|
000038a0  06 b2 f6 4d 09 01 00 00  13 00 00 00 00 00 00 00  |...M............|
000038b0  67 65 74 66 6f 6e 74 6d  65 6e 75 00 30 42 00 00  |getfontmenu.0B..|
000038c0  46 ff ff ff 54 a5 f6 4d  a8 00 00 00 13 00 00 00  |F...T..M........|
000038d0  00 00 00 00 6d 65 6e 75  74 69 63 6b 65 64 00 00  |....menuticked..|
000038e0  d8 42 00 00 46 ff ff ff  ed a6 f6 4d a8 00 00 00  |.B..F......M....|
000038f0  13 00 00 00 00 00 00 00  6d 65 6e 75 73 68 61 64  |........menushad|
00003900  65 64 00 00 80 43 00 00  46 ff ff ff bf ab f6 4d  |ed...C..F......M|
00003910  aa 00 00 00 13 00 00 00  00 00 00 00 67 65 74 6d  |............getm|
00003920  65 6e 75 74 65 78 74 00  2c 44 00 00 46 ff ff ff  |enutext.,D..F...|
00003930  40 34 9a 4e 73 02 00 00  13 00 00 00 00 00 00 00  |@4.Ns...........|
00003940  63 72 65 61 74 65 69 63  6f 6e 00 00 a0 46 00 00  |createicon...F..|
00003950  47 ff ff ff 30 9a 34 25  3f 03 00 00 13 00 00 00  |G...0.4%?.......|
00003960  00 00 00 00 43 72 65 61  74 65 49 63 6f 6e 42 61  |....CreateIconBa|
00003970  72 49 63 6f 6e 00 00 00  e0 49 00 00 46 ff ff ff  |rIcon....I..F...|
00003980  56 8d f6 4d b8 00 00 00  13 00 00 00 00 00 00 00  |V..M............|
00003990  69 6e 64 69 72 65 63 74  00 00 00 00 98 4a 00 00  |indirect.....J..|
000039a0  46 ff ff ff 45 76 f6 4d  0a 01 00 00 13 00 00 00  |F...Ev.M........|
000039b0  00 00 00 00 6c 6f 61 64  74 65 6d 70 6c 61 74 65  |....loadtemplate|
000039c0  00 00 00 00 a4 4b 00 00  46 ff ff ff 4b 7b f6 4d  |.....K..F...K{.M|
000039d0  84 00 00 00 13 00 00 00  00 00 00 00 6c 6f 61 64  |............load|
000039e0  73 70 72 69 74 65 73 00  28 4c 00 00 47 ff ff ff  |sprites.(L..G...|
000039f0  ed 91 73 06 3f 01 00 00  13 00 00 00 00 00 00 00  |..s.?...........|
00003a00  6d 73 67 74 6f 6b 65 6e  00 00 00 00 68 4d 00 00  |msgtoken....hM..|
00003a10  46 ff ff ff 50 ba f6 4d  06 01 00 00 13 00 00 00  |F...P..M........|
00003a20  00 00 00 00 63 72 65 61  74 65 66 74 6d 65 6e 75  |....createftmenu|
00003a30  00 00 00 00 70 4e 00 00  46 ff ff ff 69 0b f9 4d  |....pN..F...i..M|
00003a40  a9 01 00 00 13 00 00 00  00 00 00 00 6d 73 67 74  |............msgt|
00003a50  65 78 74 00 1c 50 00 00  46 ff ff ff c9 51 19 55  |ext..P..F....Q.U|
00003a60  d5 00 00 00 13 00 00 00  00 00 00 00 63 72 65 61  |............crea|
00003a70  74 65 6d 65 6e 75 00 00  f4 50 00 00 46 ff ff ff  |temenu...P..F...|
00003a80  79 81 f6 4d b4 00 00 00  13 00 00 00 00 00 00 00  |y..M............|
00003a90  73 79 73 74 65 6d 76 61  72 00 00 00 a8 51 00 00  |systemvar....Q..|
00003aa0  46 ff ff ff bb 29 ed a9  ac 00 00 00 13 00 00 00  |F....)..........|
00003ab0  00 00 00 00 73 74 72 69  6e 67 30 00 54 52 00 00  |....string0.TR..|
00003ac0  46 ff ff ff b3 bf f8 4d  93 00 00 00 13 00 00 00  |F......M........|
00003ad0  00 00 00 00 67 65 74 69  63 6f 6e 73 74 61 74 65  |....geticonstate|
00003ae0  00 00 00 00 e8 52 00 00  46 ff ff ff 13 d0 f8 4d  |.....R..F......M|
00003af0  ad 00 00 00 13 00 00 00  00 00 00 00 67 65 74 69  |............geti|
00003b00  63 6f 6e 74 65 78 74 00  98 53 00 00 46 ff ff ff  |context..S..F...|
00003b10  c0 d4 f8 4d c0 00 00 00  13 00 00 00 00 00 00 00  |...M............|
00003b20  67 65 74 69 63 6f 6e 76  61 6c 69 64 00 00 00 00  |geticonvalid....|
00003b30  58 54 00 00 46 ff ff ff  55 48 f9 4d 71 00 00 00  |XT..F...UH.Mq...|
00003b40  13 00 00 00 00 00 00 00  6c 6f 77 65 72 00 00 00  |........lower...|
00003b50  cc 54 00 00 46 ff ff ff  bc 4a f9 4d 6e 00 00 00  |.T..F....J.Mn...|
00003b60  13 00 00 00 00 00 00 00  75 70 70 65 72 00 00 00  |........upper...|
00003b70  3c 55 00 00 46 ff ff ff  6d 4c f9 4d 4e 01 00 00  |<U..F...mL.MN...|
00003b80  13 00 00 00 00 00 00 00  74 69 64 79 00 00 00 00  |........tidy....|
00003b90  8c 56 00 00 46 ff ff ff  14 7e f6 4d e6 00 00 00  |.V..F....~.M....|
00003ba0  13 00 00 00 00 00 00 00  47 65 74 45 6e 76 00 00  |........GetEnv..|
00003bb0  74 57 00 00 46 ff ff ff  1d ba 7b 4f b2 00 00 00  |tW..F.....{O....|
00003bc0  13 00 00 00 00 00 00 00  66 69 6c 65 74 79 70 65  |........filetype|
00003bd0  00 00 00 00 28 58 00 00  46 ff ff ff 87 72 f4 4d  |....(X..F....r.M|
00003be0  8b 00 00 00 13 00 00 00  00 00 00 00 66 69 6c 65  |............file|
00003bf0  6c 65 6e 67 74 68 00 00  b4 58 00 00 46 ff ff ff  |length...X..F...|
00003c00  cc 7f d5 a5 00 01 00 00  13 00 00 00 00 00 00 00  |................|
00003c10  65 72 72 6f 72 62 6f 78  00 00 00 00 b4 59 00 00  |errorbox.....Y..|
00003c20  46 ff ff ff 7d 83 5f 4e  e8 00 00 00 13 00 00 00  |F...}._N........|
00003c30  00 00 00 00 63 6c 61 69  6d 00 00 00 9c 5a 00 00  |....claim....Z..|
00003c40  46 ff ff ff 52 1b 7c 4f  fe 00 00 00 13 00 00 00  |F...R.|O........|
00003c50  00 00 00 00 74 61 73 6b  6e 61 6d 65 00 00 00 00  |....taskname....|
00003c60  9c 5b 00 00 46 ff ff ff  c3 f4 f4 4d 80 00 00 00  |.[..F......M....|
00003c70  13 00 00 00 00 00 00 00  77 69 6e 64 6f 77 74 61  |........windowta|
00003c80  73 6b 00 00 1c 5c 00 00  46 ff ff ff 0e 26 ed a9  |sk...\..F....&..|
00003c90  b3 00 00 00 13 00 00 00  00 00 00 00 72 65 61 64  |............read|
00003ca0  74 61 73 6b 73 74 72 69  6e 67 00 00 d0 5c 00 00  |taskstring...\..|
00003cb0  46 ff ff ff 62 43 f5 4d  d2 00 00 00 13 00 00 00  |F...bC.M........|
00003cc0  00 00 00 00 62 61 63 6b  6f 66 77 69 6e 73 74 61  |....backofwinsta|
00003cd0  63 6b 00 00 a4 5d 00 00  46 ff ff ff f2 5a f5 4d  |ck...]..F....Z.M|
00003ce0  a5 00 00 00 13 00 00 00  00 00 00 00 77 69 6e 73  |............wins|
00003cf0  74 61 63 6b 6e 65 78 74  00 00 00 00 4c 5e 00 00  |tacknext....L^..|
00003d00  46 ff ff ff 04 6d f4 4d  81 00 00 00 13 00 00 00  |F....m.M........|
00003d10  00 00 00 00 6c 65 61 66  6e 61 6d 65 00 00 00 00  |....leafname....|
00003d20  d0 5e 00 00 46 ff ff ff  fb 61 f4 4d 97 00 00 00  |.^..F....a.M....|
00003d30  13 00 00 00 00 00 00 00  70 61 74 68 6e 61 6d 65  |........pathname|
00003d40  00 00 00 00 68 5f 00 00  46 ff ff ff db ab 7b 4f  |....h_..F.....{O|
00003d50  10 01 00 00 13 00 00 00  00 00 00 00 6c 6f 6e 67  |............long|
00003d60  66 69 6c 65 6e 61 6d 65  00 00 00 00 78 60 00 00  |filename....x`..|
00003d70  46 ff ff ff 55 91 f5 4d  ad 00 00 00 13 00 00 00  |F...U..M........|
00003d80  00 00 00 00 72 65 61 64  63 6d 6f 73 00 00 00 00  |....readcmos....|
00003d90  28 61 00 00 46 ff ff ff  a6 6a f9 4d 82 00 00 00  |(a..F....j.M....|
00003da0  13 00 00 00 00 00 00 00  73 77 69 6e 75 6d 62 65  |........swinumbe|
00003db0  72 00 00 00 ac 61 00 00  46 ff ff ff bb 4e f9 4d  |r....a..F....N.M|
00003dc0  b4 00 00 00 13 00 00 00  00 00 00 00 73 74 72 69  |............stri|
00003dd0  70 73 70 61 63 65 73 00  60 62 00 00 46 ff ff ff  |pspaces.`b..F...|
00003de0  7d 51 f9 4d 0b 02 00 00  13 00 00 00 00 00 00 00  |}Q.M............|
00003df0  73 75 62 73 74 76 61 72  73 00 00 00 6c 64 00 00  |substvars...ld..|
00003e00  46 ff ff ff 26 5a f9 4d  93 01 00 00 13 00 00 00  |F...&Z.M........|
00003e10  00 00 00 00 73 75 62 73  74 76 61 72 73 70 00 00  |....substvarsp..|
00003e20  00 66 00 00 46 ff ff ff  0c 00 ed a9 c0 00 00 00  |.f..F...........|
00003e30  13 00 00 00 00 00 00 00  67 73 74 72 61 6e 73 00  |........gstrans.|
00003e40  c0 66 00 00 46 ff ff ff  19 e9 8b 4f 1f 02 00 00  |.f..F......O....|
00003e50  13 00 00 00 00 00 00 00  72 65 61 64 73 74 61 74  |........readstat|
00003e60  75 73 66 69 6c 65 00 00  e0 68 00 00 46 ff ff ff  |usfile...h..F...|
00003e70  f9 d0 8b 4f b7 00 00 00  13 00 00 00 00 00 00 00  |...O............|
00003e80  73 74 61 74 75 73 67 65  74 00 00 00 98 69 00 00  |statusget....i..|
00003e90  46 ff ff ff 24 e1 8b 4f  9d 00 00 00 13 00 00 00  |F...$..O........|
00003ea0  00 00 00 00 73 74 61 74  75 73 67 65 74 76 00 00  |....statusgetv..|
00003eb0  38 6a 00 00 46 ff ff ff  6a ca 7b 4f 0b 01 00 00  |8j..F...j.{O....|
00003ec0  13 00 00 00 00 00 00 00  62 61 73 65 74 79 70 65  |........basetype|
00003ed0  00 00 00 00 44 6b 00 00  46 ff ff ff e7 df 7b 4f  |....Dk..F.....{O|
00003ee0  25 01 00 00 13 00 00 00  00 00 00 00 66 69 6e 64  |%...........find|
00003ef0  74 61 73 6b 00 00 00 00  6c 6c 00 00 46 ff ff ff  |task....ll..F...|
00003f00  ea d6 8b 4f 8c 00 00 00  13 00 00 00 00 00 00 00  |...O............|
00003f10  73 74 61 74 75 73 67 65  74 66 6c 61 67 00 00 00  |statusgetflag...|
00003f20  44 41 54 41 02 02 00 00  46 4e 64 65 63 6f 64 65  |DATA....FNdecode|
00003f30  6d 65 6e 75 28 6d 65 6e  75 29 0a 23 50 61 72 65  |menu(menu).#Pare|
00003f40  6e 74 20 21 52 6f 6f 74  0a 3d 3e 09 7b 2f 7d 6d  |nt !Root.=>.{/}m|
00003f50  65 6e 75 7b 2f 7d 09 70  6f 69 6e 74 65 72 20 74  |enu{/}.pointer t|
00003f60  6f 20 6d 65 6e 75 20 62  6c 6f 63 6b 0a 3c 3d 09  |o menu block.<=.|
00003f70  73 74 72 69 6e 67 20 63  72 65 61 74 65 64 20 66  |string created f|
00003f80  72 6f 6d 20 6d 65 6e 75  20 65 6e 74 72 69 65 73  |rom menu entries|
00003f90  0a 0a 52 65 74 75 72 6e  20 6d 65 6e 75 20 73 74  |..Return menu st|
00003fa0  72 69 6e 67 20 66 72 6f  6d 20 64 61 74 61 20 73  |ring from data s|
00003fb0  74 6f 72 65 64 20 61 74  20 62 25 2c 20 75 73 69  |tored at b%, usi|
00003fc0  6e 67 20 6d 65 6e 75 20  61 73 20 74 65 6d 70 6c  |ng menu as templ|
00003fd0  61 74 65 2e 20 46 6f 6e  74 20 6d 65 6e 75 73 20  |ate. Font menus |
00003fe0  61 72 65 20 68 61 6e 64  6c 65 64 20 63 6f 72 72  |are handled corr|
00003ff0  65 63 74 6c 79 20 61 6e  64 20 77 69 6c 6c 20 72  |ectly and will r|
00004000  65 74 75 72 6e 20 73 74  72 69 6e 67 73 20 66 6f  |eturn strings fo|
00004010  72 20 75 73 65 20 69 6e  20 3c 46 6f 6e 74 5f 46  |r use in <Font_F|
00004020  69 6e 64 46 6f 6e 74 3d  3e 53 57 49 3a 46 6f 6e  |indFont=>SWI:Fon|
00004030  74 5f 46 69 6e 64 46 6f  6e 74 3e 2e 20 4b 65 79  |t_FindFont>. Key|
00004040  62 6f 61 72 64 20 73 68  6f 72 74 63 75 74 73 20  |board shortcuts |
00004050  77 69 6c 6c 20 62 65 20  72 65 6d 6f 76 65 64 20  |will be removed |
00004060  69 66 20 74 68 65 79 20  61 72 65 20 72 65 63 6f  |if they are reco|
00004070  67 6e 69 73 65 64 2e 20  54 68 69 73 20 69 6e 63  |gnised. This inc|
00004080  6c 75 64 65 73 20 61 6c  6c 20 74 68 65 20 6b 65  |ludes all the ke|
00004090  79 73 20 70 72 65 66 69  78 65 64 20 62 79 20 5e  |ys prefixed by ^|
000040a0  20 6f 72 20 74 68 65 20  75 70 20 61 72 72 6f 77  | or the up arrow|
000040b0  2c 20 70 6c 75 73 20 74  68 6f 73 65 20 64 65 73  |, plus those des|
000040c0  63 72 69 62 65 64 20 69  6e 20 3c 46 4e 63 72 65  |cribed in <FNcre|
000040d0  61 74 65 6d 65 6e 75 3d  3e 6d 65 6e 75 63 6f 6e  |atemenu=>menucon|
000040e0  74 72 6f 6c 3e 2e 0a 0a  55 73 65 20 63 75 72 6d  |trol>...Use curm|
000040f0  65 6e 75 25 20 69 66 20  63 72 65 61 74 65 64 20  |enu% if created |
00004100  75 73 69 6e 67 20 3c 50  52 4f 43 69 62 6d 65 6e  |using <PROCibmen|
00004110  75 3e 20 6f 72 20 3c 50  52 4f 43 6d 65 6e 75 3e  |u> or <PROCmenu>|
00004120  2e 0a 00 00 44 41 54 41  09 01 00 00 46 4e 67 65  |....DATA....FNge|
00004130  74 66 6f 6e 74 6d 65 6e  75 0a 23 50 61 72 65 6e  |tfontmenu.#Paren|
00004140  74 20 21 52 6f 6f 74 0a  23 57 72 61 70 20 6f 66  |t !Root.#Wrap of|
00004150  66 0a 5c 3c 3d 09 70 6f  69 6e 74 65 72 20 74 6f  |f.\<=.pointer to|
00004160  20 6d 65 6e 75 20 62 6c  6f 63 6b 20 6f 66 20 66  | menu block of f|
00004170  6f 6e 74 20 6d 65 6e 75  0a 09 6f 72 20 2d 31 20  |ont menu..or -1 |
00004180  69 66 20 6e 6f 74 20 65  6e 6f 75 67 68 20 73 70  |if not enough sp|
00004190  61 63 65 0a 23 57 72 61  70 0a 0a 52 65 74 75 72  |ace.#Wrap..Retur|
000041a0  6e 20 6c 6f 63 61 74 69  6f 6e 20 6f 66 20 66 6f  |n location of fo|
000041b0  6e 74 20 6d 65 6e 75 2e  20 42 6c 6f 63 6b 20 69  |nt menu. Block i|
000041c0  73 20 73 74 6f 72 65 64  20 69 6e 20 52 4d 41 20  |s stored in RMA |
000041d0  28 75 6e 6c 65 73 73 20  3c 48 65 61 70 4c 69 62  |(unless <HeapLib|
000041e0  3d 3e 48 65 61 70 4c 69  62 3a 21 52 6f 6f 74 3e  |=>HeapLib:!Root>|
000041f0  20 69 6e 73 74 61 6c 6c  65 64 29 20 61 6e 64 20  | installed) and |
00004200  6d 75 73 74 20 62 65 20  72 65 6c 65 61 73 65 64  |must be released|
00004210  20 77 69 74 68 20 3c 50  52 4f 43 72 65 6c 65 61  | with <PROCrelea|
00004220  73 65 66 6f 6e 74 6d 65  6e 75 3e 2e 0a 00 00 00  |sefontmenu>.....|
00004230  44 41 54 41 a8 00 00 00  46 4e 6d 65 6e 75 74 69  |DATA....FNmenuti|
00004240  63 6b 65 64 28 6d 65 6e  75 2c 69 74 65 6d 29 0a  |cked(menu,item).|
00004250  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3d 3e  |#Parent !Root.=>|
00004260  09 7b 2f 7d 6d 65 6e 75  7b 2f 7d 09 70 6f 69 6e  |.{/}menu{/}.poin|
00004270  74 65 72 20 74 6f 20 6d  65 6e 75 20 62 6c 6f 63  |ter to menu bloc|
00004280  6b 0a 09 7b 2f 7d 69 74  65 6d 7b 2f 7d 09 6f 70  |k..{/}item{/}.op|
00004290  74 69 6f 6e 20 74 6f 20  63 68 65 63 6b 0a 5c 3c  |tion to check.\<|
000042a0  3d 09 54 52 55 45 20 69  66 20 69 74 65 6d 20 69  |=.TRUE if item i|
000042b0  73 20 74 69 63 6b 65 64  0a 0a 43 68 65 63 6b 20  |s ticked..Check |
000042c0  69 66 20 6d 65 6e 75 20  69 74 65 6d 20 69 73 20  |if menu item is |
000042d0  74 69 63 6b 65 64 2e 0a  44 41 54 41 a8 00 00 00  |ticked..DATA....|
000042e0  46 4e 6d 65 6e 75 73 68  61 64 65 64 28 6d 65 6e  |FNmenushaded(men|
000042f0  75 2c 69 74 65 6d 29 0a  23 50 61 72 65 6e 74 20  |u,item).#Parent |
00004300  21 52 6f 6f 74 0a 3d 3e  09 7b 2f 7d 6d 65 6e 75  |!Root.=>.{/}menu|
00004310  7b 2f 7d 09 70 6f 69 6e  74 65 72 20 74 6f 20 6d  |{/}.pointer to m|
00004320  65 6e 75 20 62 6c 6f 63  6b 0a 09 7b 2f 7d 69 74  |enu block..{/}it|
00004330  65 6d 7b 2f 7d 09 6f 70  74 69 6f 6e 20 74 6f 20  |em{/}.option to |
00004340  63 68 65 63 6b 0a 5c 3c  3d 09 54 52 55 45 20 69  |check.\<=.TRUE i|
00004350  66 20 69 74 65 6d 20 69  73 20 73 68 61 64 65 64  |f item is shaded|
00004360  0a 0a 43 68 65 63 6b 20  69 66 20 6d 65 6e 75 20  |..Check if menu |
00004370  69 74 65 6d 20 69 73 20  73 68 61 64 65 64 2e 0a  |item is shaded..|
00004380  44 41 54 41 aa 00 00 00  46 4e 67 65 74 6d 65 6e  |DATA....FNgetmen|
00004390  75 74 65 78 74 28 6d 65  6e 75 2c 6e 75 6d 62 65  |utext(menu,numbe|
000043a0  72 29 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |r).#Parent !Root|
000043b0  0a 3d 3e 09 7b 2f 7d 6d  65 6e 75 7b 2f 7d 09 70  |.=>.{/}menu{/}.p|
000043c0  6f 69 6e 74 65 72 20 74  6f 20 6d 65 6e 75 0a 09  |ointer to menu..|
000043d0  7b 2f 7d 6e 75 6d 62 65  72 7b 2f 7d 09 6f 70 74  |{/}number{/}.opt|
000043e0  69 6f 6e 20 6e 75 6d 62  65 72 20 74 6f 20 72 65  |ion number to re|
000043f0  61 64 0a 5c 3c 3d 09 74  65 78 74 20 6f 66 20 6f  |ad.\<=.text of o|
00004400  70 74 69 6f 6e 0a 0a 52  65 61 64 20 74 68 65 20  |ption..Read the |
00004410  74 65 78 74 20 66 72 6f  6d 20 6f 70 74 69 6f 6e  |text from option|
00004420  20 6f 6e 20 6d 65 6e 75  2e 0a 00 00 44 41 54 41  | on menu....DATA|
00004430  73 02 00 00 46 4e 63 72  65 61 74 65 69 63 6f 6e  |s...FNcreateicon|
00004440  28 77 69 6e 2c 78 2c 79  2c 77 69 64 74 68 2c 68  |(win,x,y,width,h|
00004450  65 69 67 68 74 2c 74 69  74 6c 65 24 2c 76 61 6c  |eight,title$,val|
00004460  69 64 24 2c 63 6f 6c 2c  65 73 67 2c 62 75 74 2c  |id$,col,esg,but,|
00004470  66 6c 61 67 73 29 0a 23  50 61 72 65 6e 74 20 21  |flags).#Parent !|
00004480  52 6f 6f 74 0a 3d 3e 09  7b 2f 7d 77 69 6e 7b 2f  |Root.=>.{/}win{/|
00004490  7d 09 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 0a  |}.window handle.|
000044a0  09 7b 2f 7d 78 7b 2f 7d  09 09 6c 65 66 74 20 6f  |.{/}x{/}..left o|
000044b0  66 20 69 63 6f 6e 0a 09  7b 2f 7d 79 7b 2f 7d 09  |f icon..{/}y{/}.|
000044c0  09 74 6f 70 20 6f 66 20  69 63 6f 6e 0a 09 7b 2f  |.top of icon..{/|
000044d0  7d 77 69 64 74 68 7b 2f  7d 09 77 69 64 74 68 20  |}width{/}.width |
000044e0  6f 66 20 69 63 6f 6e 20  61 63 72 6f 73 73 0a 09  |of icon across..|
000044f0  7b 2f 7d 68 65 69 67 68  74 7b 2f 7d 09 68 65 69  |{/}height{/}.hei|
00004500  67 68 74 20 6f 66 20 69  63 6f 6e 20 64 6f 77 6e  |ght of icon down|
00004510  0a 09 7b 2f 7d 74 69 74  6c 65 24 7b 2f 7d 09 74  |..{/}title${/}.t|
00004520  65 78 74 20 73 74 72 69  6e 67 2c 20 6f 72 20 43  |ext string, or C|
00004530  48 52 24 28 30 29 20 66  6f 72 20 61 20 66 75 6c  |HR$(0) for a ful|
00004540  6c 20 70 61 74 68 20 6e  61 6d 65 0a 09 7b 2f 7d  |l path name..{/}|
00004550  76 61 6c 69 64 24 7b 2f  7d 09 76 61 6c 69 64 61  |valid${/}.valida|
00004560  74 69 6f 6e 20 73 74 72  69 6e 67 20 6f 72 20 6e  |tion string or n|
00004570  75 6c 6c 20 66 6f 72 20  6e 6f 6e 65 0a 09 7b 2f  |ull for none..{/|
00004580  7d 63 6f 6c 7b 2f 7d 09  63 6f 6c 6f 75 72 20 6f  |}col{/}.colour o|
00004590  66 20 69 63 6f 6e 20 26  42 46 20 28 42 3d 62 61  |f icon &BF (B=ba|
000045a0  63 6b 67 72 6f 75 6e 64  2c 20 46 3d 66 6f 72 65  |ckground, F=fore|
000045b0  67 72 6f 75 6e 64 29 20  6f 72 20 66 6f 6e 74 20  |ground) or font |
000045c0  68 61 6e 64 6c 65 0a 09  7b 2f 7d 45 53 47 7b 2f  |handle..{/}ESG{/|
000045d0  7d 09 45 78 63 75 6c 73  69 76 65 20 53 65 6c 65  |}.Exculsive Sele|
000045e0  63 74 69 6f 6e 20 47 72  6f 75 70 20 6f 72 20 30  |ction Group or 0|
000045f0  20 66 6f 72 20 6e 6f 6e  65 0a 09 7b 2f 7d 62 75  | for none..{/}bu|
00004600  74 7b 2f 7d 09 3c 62 75  74 74 6f 6e 20 74 79 70  |t{/}.<button typ|
00004610  65 3d 3e 53 57 49 3a 57  69 6d 70 5f 69 63 6f 6e  |e=>SWI:Wimp_icon|
00004620  62 75 74 74 6f 6e 3e 20  28 30 2d 31 35 29 0a 09  |button> (0-15)..|
00004630  7b 2f 7d 66 6c 61 67 73  7b 2f 7d 09 6f 74 68 65  |{/}flags{/}.othe|
00004640  72 20 3c 66 6c 61 67 73  3d 3e 53 57 49 3a 57 69  |r <flags=>SWI:Wi|
00004650  6d 70 5f 69 63 6f 6e 66  6c 61 67 73 3e 20 7b 66  |mp_iconflags> {f|
00004660  43 6f 64 65 7d 25 41 46  56 48 42 30 30 7b 66 7d  |Code}%AFVHB00{f}|
00004670  20 28 41 3d 46 6f 6e 74  2c 20 46 3d 46 69 6c 6c  | (A=Font, F=Fill|
00004680  65 64 2c 20 42 3d 42 6f  72 64 65 72 29 0a 0a 43  |ed, B=Border)..C|
00004690  72 65 61 74 65 20 61 6e  20 69 63 6f 6e 2e 0a 00  |reate an icon...|
000046a0  44 41 54 41 3f 03 00 00  46 4e 43 72 65 61 74 65  |DATA?...FNCreate|
000046b0  49 63 6f 6e 42 61 72 49  63 6f 6e 28 73 70 72 69  |IconBarIcon(spri|
000046c0  74 65 24 2c 6e 61 6d 65  24 2c 70 6f 73 69 74 69  |te$,name$,positi|
000046d0  6f 6e 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |on).#Parent !Roo|
000046e0  74 0a 3d 3e 09 7b 2f 7d  73 70 72 69 74 65 24 7b  |t.=>.{/}sprite${|
000046f0  2f 7d 09 73 70 72 69 74  65 20 74 6f 20 75 73 65  |/}.sprite to use|
00004700  20 28 66 72 6f 6d 20 77  69 6d 70 20 70 6f 6f 6c  | (from wimp pool|
00004710  29 0a 09 7b 2f 7d 6e 61  6d 65 24 7b 2f 7d 09 74  |)..{/}name${/}.t|
00004720  65 78 74 20 74 6f 20 61  70 70 65 61 72 20 75 6e  |ext to appear un|
00004730  64 65 72 20 69 63 6f 6e  20 28 6f 72 20 6e 75 6c  |der icon (or nul|
00004740  6c 29 0a 09 7b 2f 7d 70  6f 73 69 74 69 6f 6e 7b  |l)..{/}position{|
00004750  2f 7d 09 3c 69 63 6f 6e  62 61 72 20 70 6f 73 69  |/}.<iconbar posi|
00004760  74 69 6f 6e 3d 3e 2e 70  6f 73 69 74 69 6f 6e 3e  |tion=>.position>|
00004770  0a 0a 43 72 65 61 74 65  20 61 6e 20 69 63 6f 6e  |..Create an icon|
00004780  20 66 6f 72 20 74 68 65  20 69 63 6f 6e 20 62 61  | for the icon ba|
00004790  72 2e 0a 23 53 75 62 70  61 67 65 20 70 6f 73 69  |r..#Subpage posi|
000047a0  74 69 6f 6e 0a 46 4e 43  72 65 61 74 65 49 63 6f  |tion.FNCreateIco|
000047b0  6e 42 61 72 49 63 6f 6e  20 70 6f 73 74 69 6f 6e  |nBarIcon postion|
000047c0  0a 54 68 69 73 20 69 73  20 61 20 6d 61 73 6b 65  |.This is a maske|
000047d0  64 20 62 79 74 65 20 74  6f 20 69 6e 64 69 63 61  |d byte to indica|
000047e0  74 65 20 74 68 65 20 70  6f 73 69 74 69 6f 6e 20  |te the position |
000047f0  79 6f 75 20 77 69 73 68  20 74 68 65 20 69 63 6f  |you wish the ico|
00004800  6e 20 74 6f 20 74 61 6b  65 20 6f 6e 20 74 68 65  |n to take on the|
00004810  20 69 63 6f 6e 62 61 72  2e 20 54 68 65 20 6c 6f  | iconbar. The lo|
00004820  77 20 62 79 74 65 20 69  73 20 74 68 65 20 61 62  |w byte is the ab|
00004830  73 6f 6c 75 74 65 20 3c  70 6f 73 69 74 69 6f 6e  |solute <position|
00004840  20 61 73 20 67 69 76 65  6e 20 74 6f 20 57 69 6d  | as given to Wim|
00004850  70 5f 43 72 65 61 74 65  49 63 6f 6e 3d 3e 53 57  |p_CreateIcon=>SW|
00004860  49 3a 57 69 6d 70 5f 43  72 65 61 74 65 49 63 6f  |I:Wimp_CreateIco|
00004870  6e 2e 70 6f 73 69 74 69  6f 6e 3e 2c 20 61 6e 64  |n.position>, and|
00004880  20 74 68 65 20 6e 65 78  74 20 62 79 74 65 28 73  | the next byte(s|
00004890  29 20 75 70 20 74 68 65  20 70 61 72 61 6d 65 74  |) up the paramet|
000048a0  65 72 2e 20 46 6f 72 20  3c 70 72 69 6f 72 69 74  |er. For <priorit|
000048b0  69 65 73 3d 3e 53 57 49  3a 57 69 6d 70 5f 43 72  |ies=>SWI:Wimp_Cr|
000048c0  65 61 74 65 49 63 6f 6e  2e 70 72 69 6f 72 69 74  |eateIcon.priorit|
000048d0  69 65 73 3e 2c 20 74 68  69 73 20 77 69 6c 6c 20  |ies>, this will |
000048e0  62 65 20 73 68 69 66 74  65 64 20 75 70 20 62 79  |be shifted up by|
000048f0  20 31 36 20 62 69 74 73  3b 20 66 6f 72 20 69 63  | 16 bits; for ic|
00004900  6f 6e 73 2c 20 74 68 69  73 20 69 73 20 74 68 65  |ons, this is the|
00004910  20 69 63 6f 6e 20 6e 75  6d 62 65 72 2e 0a 0a 54  | icon number...T|
00004920  68 65 72 65 66 6f 72 65  20 74 6f 20 63 72 65 61  |herefore to crea|
00004930  74 65 20 61 6e 20 69 63  6f 6e 20 74 6f 20 74 68  |te an icon to th|
00004940  65 20 72 69 67 68 74 20  6f 66 20 69 63 6f 6e 20  |e right of icon |
00004950  37 20 6f 6e 20 74 68 65  20 69 63 6f 6e 62 61 72  |7 on the iconbar|
00004960  20 79 6f 75 20 77 6f 75  6c 64 20 75 73 65 20 61  | you would use a|
00004970  20 76 61 6c 75 65 20 6f  66 20 26 30 37 30 34 2c  | value of &0704,|
00004980  20 61 6e 64 20 74 6f 20  63 72 65 61 74 65 20 61  | and to create a|
00004990  6e 20 69 63 6f 6e 20 6f  6e 20 74 68 65 20 6c 65  |n icon on the le|
000049a0  66 74 20 6f 66 20 74 68  65 20 69 63 6f 6e 20 62  |ft of the icon b|
000049b0  61 72 20 77 69 74 68 20  70 72 69 6f 72 69 74 79  |ar with priority|
000049c0  20 26 37 38 30 30 30 30  30 30 20 79 6f 75 20 77  | &78000000 you w|
000049d0  6f 75 6c 64 20 75 73 65  20 26 37 38 30 37 2e 00  |ould use &7807..|
000049e0  44 41 54 41 b8 00 00 00  46 4e 69 6e 64 69 72 65  |DATA....FNindire|
000049f0  63 74 28 74 65 78 74 24  29 0a 23 50 61 72 65 6e  |ct(text$).#Paren|
00004a00  74 20 21 52 6f 6f 74 0a  3d 3e 09 7b 2f 7d 74 65  |t !Root.=>.{/}te|
00004a10  78 74 24 7b 2f 7d 09 73  74 72 69 6e 67 20 74 6f  |xt${/}.string to|
00004a20  20 69 6e 64 69 72 65 63  74 0a 5c 3c 3d 09 70 6f  | indirect.\<=.po|
00004a30  69 6e 74 65 72 20 74 6f  20 73 74 72 69 6e 67 2c  |inter to string,|
00004a40  20 30 20 69 66 20 6e 75  6c 6c 20 73 74 72 69 6e  | 0 if null strin|
00004a50  67 0a 0a 50 6c 61 63 65  20 73 74 72 69 6e 67 20  |g..Place string |
00004a60  69 6e 20 69 6e 64 69 72  65 63 74 69 6f 6e 20 62  |in indirection b|
00004a70  75 66 66 65 72 2e 20 47  65 6e 65 72 61 74 65 20  |uffer. Generate |
00004a80  65 72 72 6f 72 73 20 69  66 20 6e 6f 20 6d 6f 72  |errors if no mor|
00004a90  65 20 72 6f 6f 6d 2e 0a  44 41 54 41 0a 01 00 00  |e room..DATA....|
00004aa0  46 4e 6c 6f 61 64 74 65  6d 70 6c 61 74 65 28 6e  |FNloadtemplate(n|
00004ab0  61 6d 65 24 2c 73 70 72  69 74 65 62 6c 6f 63 6b  |ame$,spriteblock|
00004ac0  29 0a 23 50 61 72 65 6e  74 20 21 52 6f 6f 74 0a  |).#Parent !Root.|
00004ad0  3d 3e 09 7b 2f 7d 6e 61  6d 65 24 7b 2f 7d 09 09  |=>.{/}name${/}..|
00004ae0  6e 61 6d 65 20 6f 66 20  74 65 6d 70 6c 61 74 65  |name of template|
00004af0  20 74 6f 20 6c 6f 61 64  0a 09 7b 2f 7d 73 70 72  | to load..{/}spr|
00004b00  69 74 65 62 6c 6f 63 6b  7b 2f 7d 09 70 6f 69 6e  |iteblock{/}.poin|
00004b10  74 65 72 20 74 6f 20 62  6c 6f 63 6b 2c 20 6f 72  |ter to block, or|
00004b20  20 31 20 66 6f 72 20 77  69 6d 70 20 70 6f 6f 6c  | 1 for wimp pool|
00004b30  0a 3c 3d 09 70 6f 69 6e  74 65 72 20 74 6f 20 77  |.<=.pointer to w|
00004b40  69 6e 64 6f 77 20 62 6c  6f 63 6b 0a 0a 4c 6f 61  |indow block..Loa|
00004b50  64 20 6e 61 6d 65 64 20  74 65 6d 70 6c 61 74 65  |d named template|
00004b60  20 61 6e 64 20 63 72 65  61 74 65 20 77 69 6e 64  | and create wind|
00004b70  6f 77 2e 20 28 46 69 6c  65 20 74 6f 20 62 65 20  |ow. (File to be |
00004b80  61 63 63 65 73 73 65 64  20 69 73 20 41 70 70 64  |accessed is Appd|
00004b90  69 72 24 2b 22 2e 54 65  6d 70 6c 61 74 65 73 22  |ir$+".Templates"|
00004ba0  29 0a 00 00 44 41 54 41  84 00 00 00 46 4e 6c 6f  |)...DATA....FNlo|
00004bb0  61 64 73 70 72 69 74 65  73 28 66 69 6c 65 24 29  |adsprites(file$)|
00004bc0  0a 23 50 61 72 65 6e 74  20 21 52 6f 6f 74 0a 3d  |.#Parent !Root.=|
00004bd0  3e 09 7b 2f 7d 66 69 6c  65 24 7b 2f 7d 09 6e 61  |>.{/}file${/}.na|
00004be0  6d 65 20 6f 66 20 66 69  6c 65 0a 3c 3d 09 70 6f  |me of file.<=.po|
00004bf0  69 6e 74 65 72 20 74 6f  20 73 70 72 69 74 65 20  |inter to sprite |
00004c00  61 72 65 61 0a 0a 4c 6f  61 64 20 73 70 72 69 74  |area..Load sprit|
00004c10  65 20 66 69 6c 65 20 69  6e 74 6f 20 61 20 6e 65  |e file into a ne|
00004c20  77 20 61 72 65 61 2e 0a  44 41 54 41 3f 01 00 00  |w area..DATA?...|
00004c30  46 4e 6d 73 67 74 6f 6b  65 6e 28 74 6f 6b 65 6e  |FNmsgtoken(token|
00004c40  24 29 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |$).#Parent !Root|
00004c50  0a 3d 3e 09 7b 2f 7d 74  6f 6b 65 6e 24 7b 2f 7d  |.=>.{/}token${/}|
00004c60  09 74 6f 6b 65 6e 20 74  6f 20 6c 6f 6f 6b 20 75  |.token to look u|
00004c70  70 0a 0a 54 72 61 6e 73  6c 61 74 65 20 61 20 74  |p..Translate a t|
00004c80  6f 6b 65 6e 20 74 6f 20  61 20 6d 65 73 73 61 67  |oken to a messag|
00004c90  65 2e 20 50 61 72 61 6d  65 74 65 72 73 20 66 6f  |e. Parameters fo|
00004ca0  72 20 73 75 62 73 74 69  74 75 74 69 6f 6e 20 61  |r substitution a|
00004cb0  72 65 20 70 61 73 73 65  64 20 75 73 69 6e 67 20  |re passed using |
00004cc0  3a 27 73 20 62 65 74 77  65 65 6e 20 74 68 65 6d  |:'s between them|
00004cd0  2e 20 49 66 20 79 6f 75  20 77 69 73 68 20 74 6f  |. If you wish to|
00004ce0  20 73 75 70 70 6c 79 20  61 20 70 61 72 61 6d 65  | supply a parame|
00004cf0  74 65 72 20 77 69 74 68  20 3a 27 73 20 69 6e 2c  |ter with :'s in,|
00004d00  20 74 68 65 6e 20 79 6f  75 20 73 68 6f 75 6c 64  | then you should|
00004d10  20 70 72 65 66 69 78 20  69 74 20 77 69 74 68 20  | prefix it with |
00004d20  61 20 7c 20 63 68 61 72  61 63 74 65 72 2e 20 54  |a | character. T|
00004d30  68 69 73 20 77 69 6c 6c  20 63 61 75 73 65 20 74  |his will cause t|
00004d40  68 65 20 72 65 73 74 20  6f 66 20 74 68 65 20 6c  |he rest of the l|
00004d50  69 6e 65 20 74 6f 20 62  65 20 73 75 62 73 74 69  |ine to be substi|
00004d60  74 75 74 65 64 2e 0a 00  44 41 54 41 06 01 00 00  |tuted...DATA....|
00004d70  46 4e 63 72 65 61 74 65  66 74 6d 65 6e 75 0a 23  |FNcreateftmenu.#|
00004d80  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 5c 3c 3d  |Parent !Root.\<=|
00004d90  09 70 6f 69 6e 74 65 72  20 74 6f 20 6d 65 6e 75  |.pointer to menu|
00004da0  20 62 6c 6f 63 6b 20 6f  66 20 66 69 6c 65 74 79  | block of filety|
00004db0  70 65 20 6d 65 6e 75 0a  0a 43 72 65 61 74 65 73  |pe menu..Creates|
00004dc0  20 61 20 66 69 6c 65 74  79 70 65 20 6d 65 6e 75  | a filetype menu|
00004dd0  20 61 6e 64 20 72 65 74  75 72 6e 73 20 61 20 70  | and returns a p|
00004de0  6f 69 6e 74 65 72 20 74  6f 20 69 74 73 20 73 74  |ointer to its st|
00004df0  72 75 63 74 75 72 65 2e  20 42 6c 6f 63 6b 20 69  |ructure. Block i|
00004e00  73 20 73 74 6f 72 65 64  20 69 6e 20 52 4d 41 20  |s stored in RMA |
00004e10  28 75 6e 6c 65 73 73 20  3c 48 65 61 70 4c 69 62  |(unless <HeapLib|
00004e20  3d 3e 48 65 61 70 4c 69  62 3a 21 52 6f 6f 74 3e  |=>HeapLib:!Root>|
00004e30  20 69 73 20 69 6e 73 74  61 6c 6c 65 64 29 20 61  | is installed) a|
00004e40  6e 64 20 6d 75 73 74 20  62 65 20 72 65 6c 65 61  |nd must be relea|
00004e50  73 65 64 20 77 69 74 68  20 3c 50 52 4f 43 72 65  |sed with <PROCre|
00004e60  6c 65 61 73 65 66 74 6d  65 6e 75 3e 2e 0a 00 00  |leaseftmenu>....|
00004e70  44 41 54 41 a9 01 00 00  46 4e 6d 73 67 74 65 78  |DATA....FNmsgtex|
00004e80  74 28 74 65 78 74 24 29  0a 23 50 61 72 65 6e 74  |t(text$).#Parent|
00004e90  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 74 65 78  | !Root.=>.{/}tex|
00004ea0  74 24 7b 2f 7d 09 74 65  78 74 20 74 6f 20 70 72  |t${/}.text to pr|
00004eb0  6f 63 65 73 73 0a 5c 3c  3d 09 74 65 78 74 20 73  |ocess.\<=.text s|
00004ec0  74 72 69 6e 67 0a 0a 50  72 6f 63 65 73 73 20 74  |tring..Process t|
00004ed0  65 78 74 20 61 6e 64 20  72 65 74 75 72 6e 20 73  |ext and return s|
00004ee0  74 72 69 6e 67 20 66 72  6f 6d 20 4d 65 73 73 61  |tring from Messa|
00004ef0  67 65 73 20 66 69 6c 65  20 69 66 20 61 70 70 72  |ges file if appr|
00004f00  6f 70 72 69 61 74 65 2e  0a 0a 49 66 20 70 72 65  |opriate...If pre|
00004f10  66 69 78 65 64 20 62 79  20 61 20 3e 20 73 79 6d  |fixed by a > sym|
00004f20  62 6f 6c 20 74 68 65 20  72 65 73 74 20 6f 66 20  |bol the rest of |
00004f30  74 68 65 20 6c 69 6e 65  20 77 69 6c 6c 20 62 65  |the line will be|
00004f40  20 70 61 73 73 65 64 20  6f 6e 20 74 6f 20 3c 46  | passed on to <F|
00004f50  4e 6d 73 67 74 6f 6b 65  6e 3e 20 61 6e 64 20 70  |Nmsgtoken> and p|
00004f60  72 6f 63 65 73 73 65 64  20 62 79 20 74 68 65 20  |rocessed by the |
00004f70  4d 65 73 73 61 67 65 54  72 61 6e 73 20 6d 6f 64  |MessageTrans mod|
00004f80  75 6c 65 2e 20 54 68 69  73 20 69 73 20 75 73 75  |ule. This is usu|
00004f90  61 6c 6c 79 20 75 73 65  64 20 77 68 65 72 65 20  |ally used where |
00004fa0  69 74 20 69 73 20 70 6f  73 73 69 62 6c 65 20 66  |it is possible f|
00004fb0  6f 72 20 61 20 74 65 78  74 20 65 6e 74 72 79 20  |or a text entry |
00004fc0  74 6f 20 62 65 20 6c 69  74 65 72 61 6c 20 6f 72  |to be literal or|
00004fd0  20 74 61 6b 65 6e 20 66  72 6f 6d 20 61 20 6d 65  | taken from a me|
00004fe0  73 73 61 67 65 73 20 66  69 6c 65 2e 20 54 68 65  |ssages file. The|
00004ff0  20 3c 46 4e 65 72 72 6f  72 62 6f 78 3e 20 72 6f  | <FNerrorbox> ro|
00005000  75 74 69 6e 65 20 69 73  20 61 20 67 6f 6f 64 20  |utine is a good |
00005010  65 78 61 6d 70 6c 65 2e  0a 00 00 00 44 41 54 41  |example.....DATA|
00005020  d5 00 00 00 46 4e 63 72  65 61 74 65 6d 65 6e 75  |....FNcreatemenu|
00005030  28 6d 65 6e 75 24 29 0a  23 50 61 72 65 6e 74 20  |(menu$).#Parent |
00005040  21 52 6f 6f 74 0a 23 57  72 61 70 20 4f 66 66 0a  |!Root.#Wrap Off.|
00005050  3d 3e 09 7b 2f 7d 6d 65  6e 75 24 7b 2f 7d 09 3c  |=>.{/}menu${/}.<|
00005060  63 6f 6e 74 72 6f 6c 20  73 74 72 69 6e 67 3d 3e  |control string=>|
00005070  6d 65 6e 75 63 6f 6e 74  72 6f 6c 3e 0a 5c 3c 3d  |menucontrol>.\<=|
00005080  09 70 6f 69 6e 74 65 72  20 74 6f 20 6d 65 6e 75  |.pointer to menu|
00005090  20 62 6c 6f 63 6b 0a 09  7b 2f 7d 6f 70 74 69 6f  | block..{/}optio|
000050a0  6e 73 25 7b 2f 7d 09 6e  75 6d 62 65 72 20 6f 66  |ns%{/}.number of|
000050b0  20 6f 70 74 69 6f 6e 73  20 6f 6e 20 6d 65 6e 75  | options on menu|
000050c0  0a 23 57 72 61 70 20 4f  6e 0a 0a 43 72 65 61 74  |.#Wrap On..Creat|
000050d0  65 20 61 20 6d 65 6e 75  20 67 69 76 65 6e 20 61  |e a menu given a|
000050e0  20 63 6f 6e 74 72 6f 6c  20 73 74 72 69 6e 67 2e  | control string.|
000050f0  0a 00 00 00 44 41 54 41  b4 00 00 00 46 4e 73 79  |....DATA....FNsy|
00005100  73 74 65 6d 76 61 72 28  76 61 72 69 61 62 6c 65  |stemvar(variable|
00005110  24 29 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |$).#Parent !Root|
00005120  0a 23 57 72 61 70 20 4f  66 66 0a 3d 3e 09 7b 2f  |.#Wrap Off.=>.{/|
00005130  7d 76 61 72 69 61 62 6c  65 24 7b 2f 7d 09 73 79  |}variable${/}.sy|
00005140  73 74 65 6d 20 76 61 72  69 61 62 6c 65 20 6e 61  |stem variable na|
00005150  6d 65 0a 3c 3d 09 76 61  6c 75 65 20 6f 72 20 6e  |me.<=.value or n|
00005160  75 6c 6c 20 69 66 20 6e  6f 6e 2d 65 78 69 73 74  |ull if non-exist|
00005170  61 6e 74 2e 0a 0a 52 65  74 75 72 6e 20 74 68 65  |ant...Return the|
00005180  20 76 61 6c 75 65 20 6f  66 20 61 20 73 79 73 74  | value of a syst|
00005190  65 6d 20 76 61 72 69 61  62 6c 65 20 61 73 20 61  |em variable as a|
000051a0  20 73 74 72 69 6e 67 2e  44 41 54 41 ac 00 00 00  | string.DATA....|
000051b0  46 4e 73 74 72 69 6e 67  30 28 6c 6f 63 61 74 69  |FNstring0(locati|
000051c0  6f 6e 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |on).#Parent !Roo|
000051d0  74 0a 3d 3e 09 7b 2f 7d  6c 6f 63 61 74 69 6f 6e  |t.=>.{/}location|
000051e0  7b 2f 7d 09 70 6f 69 6e  74 65 72 20 74 6f 20 73  |{/}.pointer to s|
000051f0  74 72 69 6e 67 20 74 6f  20 72 65 74 75 72 6e 0a  |tring to return.|
00005200  3c 3d 09 73 74 72 69 6e  67 20 61 74 20 6c 6f 63  |<=.string at loc|
00005210  61 74 69 6f 6e 0a 0a 52  65 74 75 72 6e 20 30 2d  |ation..Return 0-|
00005220  74 65 72 6d 69 6e 61 74  65 64 20 28 6f 72 20 63  |terminated (or c|
00005230  74 72 6c 2d 74 65 72 6d  69 6e 61 74 65 64 29 20  |trl-terminated) |
00005240  73 74 72 69 6e 67 20 61  74 20 6c 6f 63 61 74 69  |string at locati|
00005250  6f 6e 2e 0a 44 41 54 41  93 00 00 00 46 4e 67 65  |on..DATA....FNge|
00005260  74 69 63 6f 6e 73 74 61  74 65 28 77 69 6e 2c 69  |ticonstate(win,i|
00005270  63 6f 6e 29 0a 23 50 61  72 65 6e 74 20 21 52 6f  |con).#Parent !Ro|
00005280  6f 74 0a 3d 3e 09 7b 2f  7d 77 69 6e 7b 2f 7d 09  |ot.=>.{/}win{/}.|
00005290  77 69 6e 64 6f 77 20 68  61 6e 64 6c 65 0a 09 7b  |window handle..{|
000052a0  2f 7d 69 63 6f 6e 7b 2f  7d 09 69 63 6f 6e 20 68  |/}icon{/}.icon h|
000052b0  61 6e 64 6c 65 0a 5c 3c  3d 09 54 52 55 45 20 69  |andle.\<=.TRUE i|
000052c0  66 20 69 63 6f 6e 20 73  65 6c 65 63 74 65 64 0a  |f icon selected.|
000052d0  0a 49 73 20 74 68 65 20  69 63 6f 6e 20 73 65 6c  |.Is the icon sel|
000052e0  65 63 74 65 64 20 3f 00  44 41 54 41 ad 00 00 00  |ected ?.DATA....|
000052f0  46 4e 67 65 74 69 63 6f  6e 74 65 78 74 28 77 69  |FNgeticontext(wi|
00005300  6e 2c 69 63 6f 6e 29 0a  23 50 61 72 65 6e 74 20  |n,icon).#Parent |
00005310  21 52 6f 6f 74 0a 3d 3e  09 7b 2f 7d 77 69 6e 7b  |!Root.=>.{/}win{|
00005320  2f 7d 09 77 69 6e 64 6f  77 20 68 61 6e 64 6c 65  |/}.window handle|
00005330  0a 09 7b 2f 7d 69 63 6f  6e 7b 2f 7d 09 69 63 6f  |..{/}icon{/}.ico|
00005340  6e 20 68 61 6e 64 6c 65  0a 5c 3c 3d 09 74 65 78  |n handle.\<=.tex|
00005350  74 20 73 74 72 69 6e 67  20 66 6f 72 20 69 63 6f  |t string for ico|
00005360  6e 20 28 6f 72 20 73 70  72 69 74 65 20 69 66 20  |n (or sprite if |
00005370  6f 6e 6c 79 20 73 70 72  69 74 65 29 0a 0a 52 65  |only sprite)..Re|
00005380  74 75 72 6e 20 74 65 78  74 20 66 72 6f 6d 20 69  |turn text from i|
00005390  63 6f 6e 2e 0a 00 00 00  44 41 54 41 c0 00 00 00  |con.....DATA....|
000053a0  46 4e 67 65 74 69 63 6f  6e 76 61 6c 69 64 28 77  |FNgeticonvalid(w|
000053b0  69 6e 2c 69 63 6f 6e 29  0a 23 50 61 72 65 6e 74  |in,icon).#Parent|
000053c0  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 77 69 6e  | !Root.=>.{/}win|
000053d0  7b 2f 7d 09 77 69 6e 64  6f 77 20 68 61 6e 64 6c  |{/}.window handl|
000053e0  65 0a 09 7b 2f 7d 69 63  6f 6e 7b 2f 7d 09 69 63  |e..{/}icon{/}.ic|
000053f0  6f 6e 20 68 61 6e 64 6c  65 0a 5c 3c 3d 09 76 61  |on handle.\<=.va|
00005400  6c 69 64 61 74 69 6f 6e  20 73 74 72 69 6e 67 0a  |lidation string.|
00005410  0a 52 65 74 75 72 6e 20  69 63 6f 6e 27 73 20 76  |.Return icon's v|
00005420  61 6c 69 64 61 74 69 6f  6e 20 73 74 72 69 6e 67  |alidation string|
00005430  2e 20 41 6e 20 65 72 72  6f 72 20 77 69 6c 6c 20  |. An error will |
00005440  6f 63 63 75 72 20 69 66  20 64 69 72 65 63 74 20  |occur if direct |
00005450  73 74 72 69 6e 67 2e 0a  44 41 54 41 71 00 00 00  |string..DATAq...|
00005460  46 4e 6c 6f 77 65 72 28  61 24 29 0a 23 50 61 72  |FNlower(a$).#Par|
00005470  65 6e 74 20 21 52 6f 6f  74 0a 3d 3e 09 7b 2f 7d  |ent !Root.=>.{/}|
00005480  61 24 7b 2f 7d 09 73 74  72 69 6e 67 0a 3c 3d 09  |a${/}.string.<=.|
00005490  73 74 72 69 6e 67 20 69  6e 20 6c 6f 77 65 72 20  |string in lower |
000054a0  63 61 73 65 0a 0a 52 65  74 75 72 6e 20 67 69 76  |case..Return giv|
000054b0  65 6e 20 73 74 72 69 6e  67 20 69 6e 20 6c 6f 77  |en string in low|
000054c0  65 72 20 63 61 73 65 2e  0a 00 00 00 44 41 54 41  |er case.....DATA|
000054d0  6e 00 00 00 46 4e 75 70  70 65 72 28 61 24 29 0a  |n...FNupper(a$).|
000054e0  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3d 3e  |#Parent !Root.=>|
000054f0  09 7b 2f 7d 61 24 7b 2f  7d 09 73 74 72 69 6e 67  |.{/}a${/}.string|
00005500  0a 3c 3d 09 75 70 70 65  72 20 63 61 73 65 20 73  |.<=.upper case s|
00005510  74 72 69 6e 67 0a 0a 52  65 74 75 72 6e 20 67 69  |tring..Return gi|
00005520  76 65 6e 20 73 74 72 69  6e 67 20 69 6e 20 75 70  |ven string in up|
00005530  70 65 72 20 63 61 73 65  2e 0a 00 00 44 41 54 41  |per case....DATA|
00005540  4e 01 00 00 46 4e 74 69  64 79 28 61 24 29 0a 23  |N...FNtidy(a$).#|
00005550  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
00005560  7b 2f 7d 61 24 7b 2f 7d  09 73 74 72 69 6e 67 0a  |{/}a${/}.string.|
00005570  3c 3d 09 74 69 64 69 65  64 20 73 74 72 69 6e 67  |<=.tidied string|
00005580  0a 0a 52 65 74 75 72 6e  20 67 69 76 65 6e 20 73  |..Return given s|
00005590  74 72 69 6e 67 20 69 6e  20 74 69 64 79 20 66 6f  |tring in tidy fo|
000055a0  72 6d 61 74 2e 20 41 6c  6c 20 63 68 61 72 61 63  |rmat. All charac|
000055b0  74 65 72 73 20 61 72 65  20 6c 6f 77 65 72 20 63  |ters are lower c|
000055c0  61 73 65 2c 20 65 78 63  65 70 74 20 74 68 65 20  |ase, except the |
000055d0  66 69 72 73 74 20 61 6e  64 20 74 68 6f 73 65 20  |first and those |
000055e0  73 75 63 63 65 65 64 69  6e 67 20 6e 6f 6e 2d 61  |succeeding non-a|
000055f0  6c 70 68 61 62 65 74 69  63 20 63 68 61 72 61 63  |lphabetic charac|
00005600  74 65 72 73 2c 20 77 68  69 63 68 20 61 72 65 20  |ters, which are |
00005610  75 70 70 65 72 20 63 61  73 65 2e 20 41 70 6f 73  |upper case. Apos|
00005620  74 72 6f 70 68 65 73 20  61 72 65 20 63 6f 6e 73  |trophes are cons|
00005630  69 64 65 72 65 64 20 74  6f 20 62 65 20 61 6c 70  |idered to be alp|
00005640  68 61 62 65 74 69 63 20  63 68 61 72 61 63 74 65  |habetic characte|
00005650  72 73 20 61 6e 64 20 74  68 65 72 65 66 6f 72 65  |rs and therefore|
00005660  20 22 54 48 45 52 45 27  53 22 20 77 69 6c 6c 20  | "THERE'S" will |
00005670  62 65 20 72 65 74 75 72  6e 65 64 20 61 73 20 22  |be returned as "|
00005680  54 68 65 72 65 27 73 22  2e 0a 00 00 44 41 54 41  |There's"....DATA|
00005690  e6 00 00 00 46 4e 47 65  74 45 6e 76 0a 23 50 61  |....FNGetEnv.#Pa|
000056a0  72 65 6e 74 20 21 52 6f  6f 74 0a 3c 3d 09 65 6e  |rent !Root.<=.en|
000056b0  76 69 72 6f 6e 6d 65 6e  74 20 73 74 72 69 6e 67  |vironment string|
000056c0  20 73 74 72 69 70 70 65  64 20 6f 66 20 6c 6f 61  | stripped of loa|
000056d0  64 65 72 0a 0a 54 68 69  73 20 69 73 20 74 68 65  |der..This is the|
000056e0  20 73 74 72 69 6e 67 20  77 68 69 63 68 20 69 73  | string which is|
000056f0  20 75 73 65 64 20 74 6f  20 6c 6f 61 64 20 74 68  | used to load th|
00005700  65 20 61 70 70 6c 69 63  61 74 69 6f 6e 2e 20 49  |e application. I|
00005710  74 20 6d 61 79 20 63 6f  6e 74 61 69 6e 20 61 6e  |t may contain an|
00005720  79 20 73 74 72 69 6e 67  20 77 68 69 63 68 20 69  |y string which i|
00005730  73 20 62 65 20 61 63 74  65 64 20 75 70 6f 6e 20  |s be acted upon |
00005740  6f 6e 20 73 74 61 72 74  75 70 2c 20 65 67 2e 20  |on startup, eg. |
00005750  61 20 66 69 6c 65 20 74  6f 20 6c 6f 61 64 20 6f  |a file to load o|
00005760  72 20 6f 70 74 69 6f 6e  73 20 74 6f 20 73 65 74  |r options to set|
00005770  2e 0a 00 00 44 41 54 41  b2 00 00 00 46 4e 66 69  |....DATA....FNfi|
00005780  6c 65 74 79 70 65 28 66  69 6c 65 24 29 0a 23 50  |letype(file$).#P|
00005790  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000057a0  2f 7d 66 69 6c 65 24 7b  2f 7d 09 66 69 6c 65 6e  |/}file${/}.filen|
000057b0  61 6d 65 0a 3c 3d 09 2d  32 20 69 66 20 6e 6f 74  |ame.<=.-2 if not|
000057c0  20 66 6f 75 6e 64 0a 09  2d 31 20 69 66 20 75 6e  | found..-1 if un|
000057d0  74 79 70 65 64 0a 09 30  2d 26 46 46 46 20 69 66  |typed..0-&FFF if|
000057e0  20 74 79 70 65 64 0a 09  26 31 30 30 30 20 69 66  | typed..&1000 if|
000057f0  20 64 69 72 65 63 74 6f  72 79 20 6f 72 20 69 6d  | directory or im|
00005800  61 67 65 0a 09 0a 52 65  74 75 72 6e 20 74 68 65  |age...Return the|
00005810  20 66 69 6c 65 20 74 79  70 65 20 6f 66 20 61 20  | file type of a |
00005820  66 69 6c 65 2e 0a 00 00  44 41 54 41 8b 00 00 00  |file....DATA....|
00005830  46 4e 66 69 6c 65 6c 65  6e 67 74 68 28 66 69 6c  |FNfilelength(fil|
00005840  65 24 29 0a 23 50 61 72  65 6e 74 20 21 52 6f 6f  |e$).#Parent !Roo|
00005850  74 0a 3d 3e 09 7b 2f 7d  66 69 6c 65 24 7b 2f 7d  |t.=>.{/}file${/}|
00005860  09 66 69 6c 65 20 74 6f  20 63 68 65 63 6b 0a 3c  |.file to check.<|
00005870  3d 09 6c 65 6e 67 74 68  20 6f 66 20 66 69 6c 65  |=.length of file|
00005880  2c 20 6f 72 20 2d 31 20  69 66 20 6e 6f 74 20 66  |, or -1 if not f|
00005890  6f 75 6e 64 0a 0a 52 65  74 75 72 6e 20 74 68 65  |ound..Return the|
000058a0  20 6c 65 6e 67 74 68 20  6f 66 20 61 20 66 69 6c  | length of a fil|
000058b0  65 2e 0a 00 44 41 54 41  00 01 00 00 46 4e 65 72  |e...DATA....FNer|
000058c0  72 6f 72 62 6f 78 28 74  69 74 6c 65 24 2c 6d 65  |rorbox(title$,me|
000058d0  73 73 61 67 65 24 2c 66  6c 61 67 73 29 0a 23 50  |ssage$,flags).#P|
000058e0  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
000058f0  2f 7d 74 69 74 6c 65 24  7b 2f 7d 09 74 69 74 6c  |/}title${/}.titl|
00005900  65 20 6f 66 20 77 69 6e  64 6f 77 0a 09 7b 2f 7d  |e of window..{/}|
00005910  6d 65 73 73 61 67 65 24  7b 2f 7d 09 6d 65 73 73  |message${/}.mess|
00005920  61 67 65 20 77 69 74 68  69 6e 20 77 69 6e 64 6f  |age within windo|
00005930  77 0a 09 7b 2f 7d 66 6c  61 67 73 7b 2f 7d 09 57  |w..{/}flags{/}.W|
00005940  69 6d 70 5f 52 65 70 6f  72 74 45 72 72 6f 72 20  |imp_ReportError |
00005950  3c 66 6c 61 67 73 3d 3e  53 57 49 3a 57 69 6d 70  |<flags=>SWI:Wimp|
00005960  5f 52 65 70 6f 72 74 45  72 72 6f 72 30 3e 0a 3c  |_ReportError0>.<|
00005970  3d 09 31 20 66 6f 72 20  4f 4b 0a 09 32 20 66 6f  |=.1 for OK..2 fo|
00005980  72 20 43 61 6e 63 65 6c  0a 0a 43 72 65 61 74 65  |r Cancel..Create|
00005990  20 61 6e 20 65 72 72 6f  72 20 62 6f 78 20 77 69  | an error box wi|
000059a0  74 68 20 75 70 20 74 6f  20 32 20 62 75 74 74 6f  |th up to 2 butto|
000059b0  6e 73 2e 0a 44 41 54 41  e8 00 00 00 46 4e 63 6c  |ns..DATA....FNcl|
000059c0  61 69 6d 28 73 69 7a 65  29 20 2d 20 57 69 6d 70  |aim(size) - Wimp|
000059d0  4c 69 62 20 76 65 72 73  69 6f 6e 0a 23 50 61 72  |Lib version.#Par|
000059e0  65 6e 74 20 21 52 6f 6f  74 0a 3d 3e 09 7b 2f 7d  |ent !Root.=>.{/}|
000059f0  73 69 7a 65 7b 2f 7d 09  73 69 7a 65 20 6f 66 20  |size{/}.size of |
00005a00  62 6c 6f 63 6b 0a 3c 3d  09 70 6f 69 6e 74 65 72  |block.<=.pointer|
00005a10  20 74 6f 20 62 6c 6f 63  6b 2c 20 6f 72 20 2d 31  | to block, or -1|
00005a20  20 69 66 20 6e 6f 20 72  6f 6f 6d 0a 0a 43 6c 61  | if no room..Cla|
00005a30  69 6d 20 61 20 62 6c 6f  63 6b 20 6f 66 20 52 4d  |im a block of RM|
00005a40  41 2e 0a 0a 4e 6f 74 65  3a 20 54 68 69 73 20 63  |A...Note: This c|
00005a50  61 6c 6c 20 69 73 20 72  65 70 6c 61 63 65 64 20  |all is replaced |
00005a60  69 6e 20 48 65 61 70 4c  69 62 20 62 79 20 61 20  |in HeapLib by a |
00005a70  48 65 61 70 20 63 6c 61  69 6d 20 3c 46 4e 63 6c  |Heap claim <FNcl|
00005a80  61 69 6d 3d 3e 48 65 61  70 4c 69 62 3a 46 4e 63  |aim=>HeapLib:FNc|
00005a90  6c 61 69 6d 3e 20 63 61  6c 6c 2e 0a 44 41 54 41  |laim> call..DATA|
00005aa0  fe 00 00 00 46 4e 74 61  73 6b 6e 61 6d 65 28 74  |....FNtaskname(t|
00005ab0  61 73 6b 29 0a 23 50 61  72 65 6e 74 20 21 52 6f  |ask).#Parent !Ro|
00005ac0  6f 74 0a 3d 3e 09 7b 2f  7d 74 61 73 6b 7b 2f 7d  |ot.=>.{/}task{/}|
00005ad0  09 74 61 73 6b 20 68 61  6e 64 6c 65 0a 3c 3d 09  |.task handle.<=.|
00005ae0  74 61 73 6b 73 20 6e 61  6d 65 2c 20 6f 72 20 22  |tasks name, or "|
00005af0  4e 6f 6e 65 22 20 69 66  20 69 6e 76 61 6c 69 64  |None" if invalid|
00005b00  0a 0a 52 65 74 75 72 6e  20 61 20 67 69 76 65 6e  |..Return a given|
00005b10  20 74 61 73 6b 73 20 6e  61 6d 65 2e 0a 0a 57 69  | tasks name...Wi|
00005b20  6d 70 4c 69 62 32 20 61  6c 77 61 79 73 20 72 65  |mpLib2 always re|
00005b30  74 75 72 6e 73 20 22 55  6e 6b 6e 6f 77 6e 22 2c  |turns "Unknown",|
00005b40  20 61 73 20 3c 54 61 73  6b 4d 61 6e 61 67 65 72  | as <TaskManager|
00005b50  5f 54 61 73 6b 4e 61 6d  65 46 72 6f 6d 48 61 6e  |_TaskNameFromHan|
00005b60  64 6c 65 3d 3e 53 57 49  3a 54 61 73 6b 4d 61 6e  |dle=>SWI:TaskMan|
00005b70  61 67 65 72 5f 54 61 73  6b 4e 61 6d 65 46 72 6f  |ager_TaskNameFro|
00005b80  6d 48 61 6e 64 6c 65 3e  20 69 73 20 6e 6f 74 20  |mHandle> is not |
00005b90  73 75 70 70 6f 72 74 65  64 2e 00 00 44 41 54 41  |supported...DATA|
00005ba0  80 00 00 00 46 4e 77 69  6e 64 6f 77 74 61 73 6b  |....FNwindowtask|
00005bb0  28 77 69 6e 29 0a 23 50  61 72 65 6e 74 20 21 52  |(win).#Parent !R|
00005bc0  6f 6f 74 0a 3d 3e 09 7b  2f 7d 77 69 6e 7b 2f 7d  |oot.=>.{/}win{/}|
00005bd0  09 77 69 6e 64 6f 77 20  68 61 6e 64 6c 65 0a 3c  |.window handle.<|
00005be0  3d 09 74 61 73 6b 20 68  61 6e 64 6c 65 20 6f 66  |=.task handle of|
00005bf0  20 6f 77 6e 65 72 0a 0a  52 65 74 75 72 6e 20 74  | owner..Return t|
00005c00  61 73 6b 20 68 61 6e 64  6c 65 20 77 68 6f 20 6f  |ask handle who o|
00005c10  77 6e 73 20 77 69 6e 64  6f 77 2e 0a 44 41 54 41  |wns window..DATA|
00005c20  b3 00 00 00 46 4e 72 65  61 64 74 61 73 6b 73 74  |....FNreadtaskst|
00005c30  72 69 6e 67 28 74 61 73  6b 2c 6c 6f 63 29 0a 23  |ring(task,loc).#|
00005c40  50 61 72 65 6e 74 20 21  52 6f 6f 74 0a 3d 3e 09  |Parent !Root.=>.|
00005c50  7b 2f 7d 74 61 73 6b 7b  2f 7d 09 74 61 73 6b 20  |{/}task{/}.task |
00005c60  68 61 6e 64 6c 65 20 74  6f 20 72 65 61 64 0a 09  |handle to read..|
00005c70  7b 2f 7d 6c 6f 63 7b 2f  7d 09 6c 6f 63 61 74 69  |{/}loc{/}.locati|
00005c80  6f 6e 20 6f 66 20 73 74  72 69 6e 67 20 69 6e 20  |on of string in |
00005c90  74 61 73 6b 0a 0a 52 65  61 64 20 61 20 63 74 72  |task..Read a ctr|
00005ca0  6c 2d 74 65 72 6d 69 6e  61 74 65 64 20 73 74 72  |l-terminated str|
00005cb0  69 6e 67 20 66 72 6f 6d  20 74 61 73 6b 20 61 74  |ing from task at|
00005cc0  20 6c 6f 63 61 74 69 6f  6e 20 6c 6f 63 2e 0a 00  | location loc...|
00005cd0  44 41 54 41 d2 00 00 00  46 4e 62 61 63 6b 6f 66  |DATA....FNbackof|
00005ce0  77 69 6e 73 74 61 63 6b  0a 23 50 61 72 65 6e 74  |winstack.#Parent|
00005cf0  20 21 52 6f 6f 74 0a 3c  3d 09 68 61 6e 64 6c 65  | !Root.<=.handle|
00005d00  20 6f 66 20 62 61 63 6b  20 61 74 20 62 61 63 6b  | of back at back|
00005d10  20 6f 66 20 73 74 61 63  6b 0a 0a 52 65 74 75 72  | of stack..Retur|
00005d20  6e 20 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 20  |n window handle |
00005d30  6f 66 20 62 61 63 6b 20  6f 66 20 77 69 6e 64 6f  |of back of windo|
00005d40  77 20 73 74 61 63 6b 2e  0a 0a 4e 6f 74 65 3a 20  |w stack...Note: |
00005d50  69 6e 66 6f 62 6f 78 25  20 6d 75 73 74 20 62 65  |infobox% must be|
00005d60  20 61 20 76 61 6c 69 64  20 77 69 6e 64 6f 77 20  | a valid window |
00005d70  66 6f 72 20 74 68 69 73  20 74 6f 20 77 6f 72 6b  |for this to work|
00005d80  2c 20 28 70 72 65 66 65  72 61 62 6c 65 20 61 20  |, (preferable a |
00005d90  73 75 62 2d 6d 65 6e 75  20 77 69 6e 64 6f 77 29  |sub-menu window)|
00005da0  2e 0a 00 00 44 41 54 41  a5 00 00 00 46 4e 77 69  |....DATA....FNwi|
00005db0  6e 73 74 61 63 6b 6e 65  78 74 28 77 69 6e 29 0a  |nstacknext(win).|
00005dc0  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3d 3e  |#Parent !Root.=>|
00005dd0  09 7b 2f 7d 77 69 6e 7b  2f 7d 09 77 69 6e 64 6f  |.{/}win{/}.windo|
00005de0  77 20 68 61 6e 64 6c 65  0a 3c 3d 09 77 69 6e 64  |w handle.<=.wind|
00005df0  6f 77 20 68 61 6e 64 6c  65 2c 20 6f 72 20 2d 31  |ow handle, or -1|
00005e00  20 69 66 20 61 74 20 66  72 6f 6e 74 0a 0a 52 65  | if at front..Re|
00005e10  74 75 72 6e 20 77 69 6e  64 6f 77 20 68 61 6e 64  |turn window hand|
00005e20  6c 65 20 6f 66 20 6e 65  78 74 20 77 69 6e 64 6f  |le of next windo|
00005e30  77 20 69 6e 20 66 72 6f  6e 74 20 6f 66 20 73 70  |w in front of sp|
00005e40  65 63 69 66 69 65 64 2e  0a 00 00 00 44 41 54 41  |ecified.....DATA|
00005e50  81 00 00 00 46 4e 6c 65  61 66 6e 61 6d 65 28 66  |....FNleafname(f|
00005e60  69 6c 65 24 29 0a 23 50  61 72 65 6e 74 20 21 52  |ile$).#Parent !R|
00005e70  6f 6f 74 0a 3d 3e 09 7b  2f 7d 66 69 6c 65 24 7b  |oot.=>.{/}file${|
00005e80  2f 7d 09 66 69 6c 65 0a  3c 3d 09 6c 65 61 66 20  |/}.file.<=.leaf |
00005e90  6f 66 20 66 69 6c 65 6e  61 6d 65 0a 0a 52 65 74  |of filename..Ret|
00005ea0  75 72 6e 20 74 68 65 20  6c 65 61 66 6e 61 6d 65  |urn the leafname|
00005eb0  20 6f 66 20 74 68 65 20  73 70 65 63 69 66 69 65  | of the specifie|
00005ec0  64 20 66 69 6c 65 20 70  61 74 68 2e 0a 00 00 00  |d file path.....|
00005ed0  44 41 54 41 97 00 00 00  46 4e 70 61 74 68 6e 61  |DATA....FNpathna|
00005ee0  6d 65 28 66 69 6c 65 24  29 0a 23 50 61 72 65 6e  |me(file$).#Paren|
00005ef0  74 20 21 52 6f 6f 74 0a  3d 3e 09 7b 2f 7d 66 69  |t !Root.=>.{/}fi|
00005f00  6c 65 24 7b 2f 7d 09 66  69 6c 65 6e 61 6d 65 0a  |le${/}.filename.|
00005f10  3c 3d 09 70 61 74 68 6e  61 6d 65 20 6f 66 20 66  |<=.pathname of f|
00005f20  69 6c 65 6e 61 6d 65 2c  20 6f 72 20 40 20 69 66  |ilename, or @ if|
00005f30  20 6e 6f 6e 65 0a 0a 52  65 74 75 72 6e 20 74 68  | none..Return th|
00005f40  65 20 70 61 74 68 6e 61  6d 65 20 6f 66 20 74 68  |e pathname of th|
00005f50  65 20 73 70 65 63 69 66  69 65 64 20 66 69 6c 65  |e specified file|
00005f60  20 70 61 74 68 2e 0a 00  44 41 54 41 10 01 00 00  | path...DATA....|
00005f70  46 4e 6c 6f 6e 67 66 69  6c 65 6e 61 6d 65 28 66  |FNlongfilename(f|
00005f80  69 6c 65 24 29 0a 23 50  61 72 65 6e 74 20 21 52  |ile$).#Parent !R|
00005f90  6f 6f 74 0a 3d 3e 09 7b  2f 7d 66 69 6c 65 24 7b  |oot.=>.{/}file${|
00005fa0  2f 7d 09 66 69 6c 65 20  74 6f 20 63 68 61 6e 67  |/}.file to chang|
00005fb0  65 0a 3c 3d 09 66 75 6c  6c 20 66 69 6c 65 6e 61  |e.<=.full filena|
00005fc0  6d 65 0a 0a 52 65 74 75  72 6e 20 74 68 65 20 66  |me..Return the f|
00005fd0  75 6c 6c 20 70 61 74 68  6e 61 6d 65 20 6f 66 20  |ull pathname of |
00005fe0  74 68 65 20 66 69 6c 65  2e 20 54 68 69 73 20 70  |the file. This p|
00005ff0  65 72 66 6f 72 6d 73 20  63 61 6e 6f 6e 69 63 61  |erforms canonica|
00006000  6c 69 73 61 74 69 6f 6e  20 6f 66 20 74 68 65 20  |lisation of the |
00006010  66 69 6c 65 6e 61 6d 65  2e 0a 0a 57 69 6d 70 4c  |filename...WimpL|
00006020  69 62 32 20 72 65 74 75  72 6e 73 20 7b 2f 7d 66  |ib2 returns {/}f|
00006030  69 6c 65 24 7b 2f 7d 2c  20 62 65 63 61 75 73 65  |ile${/}, because|
00006040  20 3c 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 2c 33  | <OS_FSControl,3|
00006050  37 3d 3e 53 57 49 3a 6f  73 5f 66 73 63 6f 6e 74  |7=>SWI:os_fscont|
00006060  72 6f 6c 33 37 3e 20 69  73 20 6e 6f 74 20 73 75  |rol37> is not su|
00006070  70 70 6f 72 74 65 64 2e  44 41 54 41 ad 00 00 00  |pported.DATA....|
00006080  46 4e 72 65 61 64 63 6d  6f 73 28 62 79 74 65 29  |FNreadcmos(byte)|
00006090  0a 23 50 61 72 65 6e 74  20 21 52 6f 6f 74 0a 23  |.#Parent !Root.#|
000060a0  57 72 61 70 20 6f 66 66  0a 3d 3e 09 7b 2f 7d 62  |Wrap off.=>.{/}b|
000060b0  79 74 65 7b 2f 7d 09 3c  43 4d 4f 53 20 62 79 74  |yte{/}.<CMOS byt|
000060c0  65 20 74 6f 20 72 65 61  64 3d 3e 53 57 49 3a 6f  |e to read=>SWI:o|
000060d0  73 5f 62 79 74 65 63 6d  6f 73 3e 0a 3c 3d 09 76  |s_bytecmos>.<=.v|
000060e0  61 6c 75 65 20 6f 66 20  62 79 74 65 0a 23 57 72  |alue of byte.#Wr|
000060f0  61 70 0a 0a 52 65 61 64  20 61 20 62 79 74 65 20  |ap..Read a byte |
00006100  6f 66 20 63 6f 6e 66 69  67 75 72 61 74 69 6f 6e  |of configuration|
00006110  20 69 6e 66 6f 20 66 72  6f 6d 20 43 4d 4f 53 20  | info from CMOS |
00006120  52 41 4d 2e 0a 00 00 00  44 41 54 41 82 00 00 00  |RAM.....DATA....|
00006130  46 4e 73 77 69 6e 75 6d  62 65 72 28 73 77 69 24  |FNswinumber(swi$|
00006140  29 0a 23 50 61 72 65 6e  74 20 21 52 6f 6f 74 0a  |).#Parent !Root.|
00006150  3d 3e 09 7b 2f 7d 73 77  69 24 7b 2f 7d 09 53 57  |=>.{/}swi${/}.SW|
00006160  49 20 6e 61 6d 65 0a 3c  3d 09 53 57 49 20 6e 75  |I name.<=.SWI nu|
00006170  6d 62 65 72 0a 0a 52 65  74 75 72 6e 20 53 57 49  |mber..Return SWI|
00006180  20 6e 75 6d 62 65 72 20  63 6f 64 65 20 6f 66 20  | number code of |
00006190  74 68 65 20 73 70 65 63  69 66 69 65 64 20 53 57  |the specified SW|
000061a0  49 20 73 74 72 69 6e 67  2e 0a 00 00 44 41 54 41  |I string....DATA|
000061b0  b4 00 00 00 46 4e 73 74  72 69 70 73 70 61 63 65  |....FNstripspace|
000061c0  73 28 74 65 78 74 24 29  0a 23 50 61 72 65 6e 74  |s(text$).#Parent|
000061d0  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 74 65 78  | !Root.=>.{/}tex|
000061e0  74 24 7b 2f 7d 09 73 74  72 69 6e 67 20 74 6f 20  |t${/}.string to |
000061f0  73 74 72 69 70 0a 3c 3d  09 73 74 72 69 6e 67 20  |strip.<=.string |
00006200  77 69 74 68 6f 75 74 20  61 6e 79 20 70 61 64 64  |without any padd|
00006210  69 6e 67 20 73 70 61 63  65 73 0a 0a 52 65 74 75  |ing spaces..Retu|
00006220  72 6e 73 20 73 74 72 69  6e 67 20 77 69 74 68 6f  |rns string witho|
00006230  75 74 20 61 6e 79 20 73  70 61 63 65 73 20 6f 6e  |ut any spaces on|
00006240  20 65 69 74 68 65 72 20  74 68 65 20 6c 65 66 74  | either the left|
00006250  20 6f 72 20 72 69 67 68  74 20 73 69 64 65 73 2e  | or right sides.|
00006260  44 41 54 41 0b 02 00 00  46 4e 73 75 62 73 74 76  |DATA....FNsubstv|
00006270  61 72 73 28 74 65 78 74  24 29 0a 23 50 61 72 65  |ars(text$).#Pare|
00006280  6e 74 20 21 52 6f 6f 74  0a 3d 3e 09 7b 2f 7d 74  |nt !Root.=>.{/}t|
00006290  65 78 74 24 7b 2f 7d 09  73 74 72 69 6e 67 20 74  |ext${/}.string t|
000062a0  6f 20 70 72 6f 63 65 73  73 0a 3c 3d 09 73 75 62  |o process.<=.sub|
000062b0  73 74 69 74 75 74 65 64  20 74 65 78 74 0a 0a 50  |stituted text..P|
000062c0  65 72 66 6f 72 6d 73 20  76 61 72 69 61 62 6c 65  |erforms variable|
000062d0  20 73 75 62 73 74 69 74  75 74 69 6f 6e 20 6f 6e  | substitution on|
000062e0  20 61 20 73 74 72 69 6e  67 2e 20 56 61 72 69 61  | a string. Varia|
000062f0  62 6c 65 20 6e 61 6d 65  73 20 61 72 65 20 64 65  |ble names are de|
00006300  6c 69 6d 69 74 65 64 20  62 79 20 a4 20 73 79 6d  |limited by . sym|
00006310  62 6f 6c 73 20 61 6e 64  20 6d 61 79 20 62 65 20  |bols and may be |
00006320  65 69 74 68 65 72 20 73  74 72 69 6e 67 73 20 6f  |either strings o|
00006330  72 20 76 61 6c 75 65 73  2e 0a 0a 46 6f 72 20 65  |r values...For e|
00006340  78 61 6d 70 6c 65 20 3a  0a 0a 7b 66 43 6f 64 65  |xample :..{fCode|
00006350  7d 46 4e 73 75 62 73 74  76 61 72 73 28 22 a4 63  |}FNsubstvars(".c|
00006360  69 74 79 24 a4 20 69 73  20 74 68 65 20 63 61 70  |ity$. is the cap|
00006370  69 74 61 6c 20 6f 66 20  46 72 61 6e 63 65 22 29  |ital of France")|
00006380  7b 66 7d 20 3d 3e 20 7b  66 43 6f 64 65 7d 22 50  |{f} => {fCode}"P|
00006390  61 72 69 73 20 69 73 20  74 68 65 20 63 61 70 69  |aris is the capi|
000063a0  74 61 6c 20 6f 66 20 46  72 61 6e 63 65 22 7b 66  |tal of France"{f|
000063b0  7d 0a 69 66 20 63 69 74  79 24 20 3d 20 7b 66 43  |}.if city$ = {fC|
000063c0  6f 64 65 7d 22 50 61 72  69 73 22 7b 66 7d 2e 0a  |ode}"Paris"{f}..|
000063d0  0a 7b 66 43 6f 64 65 7d  46 4e 73 75 62 73 74 76  |.{fCode}FNsubstv|
000063e0  61 72 73 28 22 a4 63 69  74 79 24 a4 20 68 61 73  |ars(".city$. has|
000063f0  20 a4 70 6f 70 a4 20 70  65 6f 70 6c 65 20 69 6e  | .pop. people in|
00006400  20 69 74 22 29 7b 66 7d  20 3d 3e 20 7b 66 43 6f  | it"){f} => {fCo|
00006410  64 65 7d 22 50 61 72 69  73 20 68 61 73 20 36 31  |de}"Paris has 61|
00006420  30 30 30 20 70 65 6f 70  6c 65 20 69 6e 20 69 74  |000 people in it|
00006430  22 7b 66 7d 0a 69 66 20  63 69 74 79 24 20 3d 20  |"{f}.if city$ = |
00006440  7b 66 43 6f 64 65 7d 22  50 61 72 69 73 22 7b 66  |{fCode}"Paris"{f|
00006450  7d 20 61 6e 64 20 70 6f  70 20 3d 20 7b 66 43 6f  |} and pop = {fCo|
00006460  64 65 7d 36 31 30 30 30  7b 66 7d 00 44 41 54 41  |de}61000{f}.DATA|
00006470  93 01 00 00 46 4e 73 75  62 73 74 76 61 72 73 70  |....FNsubstvarsp|
00006480  28 74 65 78 74 24 2c 70  72 65 66 69 78 24 29 0a  |(text$,prefix$).|
00006490  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3d 3e  |#Parent !Root.=>|
000064a0  09 7b 2f 7d 74 65 78 74  24 7b 2f 7d 09 73 74 72  |.{/}text${/}.str|
000064b0  69 6e 67 20 74 6f 20 70  72 6f 63 65 73 73 0a 3c  |ing to process.<|
000064c0  3d 09 73 75 62 73 74 69  74 75 74 65 64 20 73 74  |=.substituted st|
000064d0  72 69 6e 67 0a 0a 50 65  72 66 6f 72 6d 73 20 76  |ring..Performs v|
000064e0  61 72 69 61 62 6c 65 20  73 75 62 73 74 69 74 75  |ariable substitu|
000064f0  74 69 6f 6e 20 6f 6e 20  73 74 72 69 6e 67 20 75  |tion on string u|
00006500  73 69 6e 67 20 61 20 70  72 65 66 69 78 2e 20 53  |sing a prefix. S|
00006510  75 62 73 74 69 74 75 74  69 6f 6e 20 69 73 20 61  |ubstitution is a|
00006520  73 20 69 6e 20 3c 46 4e  73 75 62 73 74 76 61 72  |s in <FNsubstvar|
00006530  73 3e 2c 20 65 78 63 65  70 74 20 74 68 61 74 20  |s>, except that |
00006540  76 61 72 69 61 62 6c 65  20 73 75 62 73 74 69 74  |variable substit|
00006550  75 74 65 64 20 69 73 20  70 72 65 66 69 78 65 64  |uted is prefixed|
00006560  20 62 79 20 74 68 65 20  73 74 72 69 6e 67 20 7b  | by the string {|
00006570  2f 7d 70 72 65 66 69 78  24 7b 2f 7d 0a 0a 53 6f  |/}prefix${/}..So|
00006580  20 7b 66 43 6f 64 65 7d  46 4e 73 75 62 73 74 76  | {fCode}FNsubstv|
00006590  61 72 73 70 28 22 48 65  6c 6c 6f 20 a4 6e 61 6d  |arsp("Hello .nam|
000065a0  65 24 a4 22 2c 22 79 6f  75 72 22 29 7b 66 7d 20  |e$.","your"){f} |
000065b0  77 6f 75 6c 64 20 72 65  74 75 72 6e 20 7b 66 43  |would return {fC|
000065c0  6f 64 65 7d 22 48 65 6c  6c 6f 20 4a 75 73 74 69  |ode}"Hello Justi|
000065d0  6e 22 7b 66 7d 20 69 66  20 79 6f 75 72 6e 61 6d  |n"{f} if yournam|
000065e0  65 24 20 63 6f 6e 74 61  69 6e 65 64 20 7b 66 43  |e$ contained {fC|
000065f0  6f 64 65 7d 22 4a 75 73  74 69 6e 22 7b 66 7d 00  |ode}"Justin"{f}.|
00006600  44 41 54 41 c0 00 00 00  46 4e 67 73 74 72 61 6e  |DATA....FNgstran|
00006610  73 28 74 65 78 74 24 29  0a 23 50 61 72 65 6e 74  |s(text$).#Parent|
00006620  20 21 52 6f 6f 74 0a 3d  3e 09 7b 2f 7d 74 65 78  | !Root.=>.{/}tex|
00006630  74 24 7b 2f 7d 09 73 74  72 69 6e 67 20 74 6f 20  |t${/}.string to |
00006640  70 72 6f 63 65 73 73 0a  3c 3d 09 47 53 54 72 61  |process.<=.GSTra|
00006650  6e 73 27 65 64 20 73 74  72 69 6e 67 0a 0a 50 65  |ns'ed string..Pe|
00006660  72 66 6f 72 6d 73 20 61  20 3c 4f 53 5f 47 53 54  |rforms a <OS_GST|
00006670  72 61 6e 73 3d 3e 53 57  49 3a 4f 53 5f 47 53 54  |rans=>SWI:OS_GST|
00006680  72 61 6e 73 3e 20 63 61  6c 6c 20 6f 6e 20 73 74  |rans> call on st|
00006690  72 69 6e 67 20 74 6f 20  63 6f 6e 76 65 72 74 20  |ring to convert |
000066a0  27 7c 27 20 63 6f 6e 74  72 6f 6c 20 63 6f 64 65  |'|' control code|
000066b0  73 20 74 6f 20 72 65 61  6c 20 63 6f 64 65 73 2e  |s to real codes.|
000066c0  44 41 54 41 1f 02 00 00  46 4e 72 65 61 64 73 74  |DATA....FNreadst|
000066d0  61 74 75 73 66 69 6c 65  28 66 69 6c 65 24 29 0a  |atusfile(file$).|
000066e0  23 50 61 72 65 6e 74 20  21 52 6f 6f 74 0a 3d 3e  |#Parent !Root.=>|
000066f0  09 7b 2f 7d 66 69 6c 65  24 7b 2f 7d 09 66 69 6c  |.{/}file${/}.fil|
00006700  65 6e 61 6d 65 20 74 6f  20 6f 70 65 6e 0a 3c 3d  |ename to open.<=|
00006710  09 54 52 55 45 20 3d 20  61 6c 6c 20 6f 6b 2c 20  |.TRUE = all ok, |
00006720  46 41 4c 53 45 20 3d 20  65 72 72 6f 72 20 6f 63  |FALSE = error oc|
00006730  63 75 72 65 64 0a 0a 4f  70 65 6e 73 20 61 20 73  |cured..Opens a s|
00006740  74 61 74 75 73 20 66 69  6c 65 20 61 6e 64 20 72  |tatus file and r|
00006750  65 74 75 72 6e 73 20 69  74 73 20 73 75 63 63 65  |eturns its succe|
00006760  73 73 20 69 6e 20 64 6f  69 6e 67 20 73 6f 2e 20  |ss in doing so. |
00006770  52 65 61 73 6f 6e 73 20  66 6f 72 20 65 72 72 6f  |Reasons for erro|
00006780  72 73 20 69 6e 63 6c 75  64 65 20 74 68 65 20 66  |rs include the f|
00006790  69 6c 65 20 6e 6f 74 20  65 78 69 73 74 69 6e 67  |ile not existing|
000067a0  2c 20 62 65 69 6e 67 20  61 20 64 69 72 65 63 74  |, being a direct|
000067b0  6f 72 79 20 6f 72 20 62  65 6c 6f 6e 67 69 6e 67  |ory or belonging|
000067c0  20 74 6f 20 61 6e 6f 74  68 65 72 20 61 70 70 6c  | to another appl|
000067d0  69 63 61 74 69 6f 6e 2e  20 55 73 75 61 6c 6c 79  |ication. Usually|
000067e0  20 74 68 65 20 66 69 6c  65 20 73 68 6f 75 6c 64  | the file should|
000067f0  20 68 61 76 65 20 74 68  65 20 6c 65 61 66 20 4f  | have the leaf O|
00006800  70 74 69 6f 6e 73 2e 0a  0a 52 65 6c 61 74 65 64  |ptions...Related|
00006810  20 63 6f 6d 6d 61 6e 64  73 20 3a 0a 23 54 61 62  | commands :.#Tab|
00006820  3b 49 6e 64 65 6e 74 20  32 0a 3c 50 52 4f 43 73  |;Indent 2.<PROCs|
00006830  74 61 74 75 73 6e 65 78  74 3e 09 72 65 61 64 73  |tatusnext>.reads|
00006840  20 74 68 65 20 6e 65 78  74 20 65 6e 74 72 79 0a  | the next entry.|
00006850  3c 46 4e 73 74 61 74 75  73 67 65 74 3e 09 09 72  |<FNstatusget>..r|
00006860  65 61 64 73 20 61 20 73  74 72 69 6e 67 0a 3c 46  |eads a string.<F|
00006870  4e 73 74 61 74 75 73 67  65 74 76 3e 09 09 72 65  |Nstatusgetv>..re|
00006880  61 64 73 20 61 20 76 61  72 69 61 62 6c 65 0a 3c  |ads a variable.<|
00006890  46 4e 73 74 61 74 75 73  67 65 74 66 6c 61 67 3e  |FNstatusgetflag>|
000068a0  09 72 65 61 64 73 20 61  20 66 6c 61 67 0a 3c 50  |.reads a flag.<P|
000068b0  52 4f 43 63 6c 6f 73 65  73 74 61 74 75 73 66 69  |ROCclosestatusfi|
000068c0  6c 65 3e 09 66 69 6e 69  73 68 65 73 20 72 65 61  |le>.finishes rea|
000068d0  64 69 6e 67 20 74 68 65  20 66 69 6c 65 2e 0a 00  |ding the file...|
000068e0  44 41 54 41 b7 00 00 00  46 4e 73 74 61 74 75 73  |DATA....FNstatus|
000068f0  67 65 74 28 63 6f 64 65  24 29 0a 23 50 61 72 65  |get(code$).#Pare|
00006900  6e 74 20 21 52 6f 6f 74  0a 3d 3e 09 7b 2f 7d 74  |nt !Root.=>.{/}t|
00006910  61 67 24 7b 2f 7d 09 74  61 67 20 63 6f 64 65 0a  |ag${/}.tag code.|
00006920  3c 3d 09 73 74 72 69 6e  67 20 75 6e 64 65 72 20  |<=.string under |
00006930  74 61 67 20 63 6f 64 65  2c 20 6f 72 20 2a 45 2a  |tag code, or *E*|
00006940  4e 2a 44 2a 20 69 66 20  6e 6f 74 20 66 6f 75 6e  |N*D* if not foun|
00006950  64 0a 0a 54 68 69 73 20  66 75 6e 63 74 69 6f 6e  |d..This function|
00006960  20 72 65 74 75 72 6e 73  20 74 68 65 20 73 74 72  | returns the str|
00006970  69 6e 67 20 76 61 6c 75  65 20 6f 66 20 74 61 67  |ing value of tag|
00006980  20 66 72 6f 6d 20 74 68  65 20 73 74 61 74 75 73  | from the status|
00006990  20 66 69 6c 65 2e 0a 00  44 41 54 41 9d 00 00 00  | file...DATA....|
000069a0  46 4e 73 74 61 74 75 73  67 65 74 76 28 74 61 67  |FNstatusgetv(tag|
000069b0  24 29 0a 23 50 61 72 65  6e 74 20 21 52 6f 6f 74  |$).#Parent !Root|
000069c0  0a 23 57 72 61 70 20 6f  66 66 0a 3d 3e 09 7b 2f  |.#Wrap off.=>.{/|
000069d0  7d 74 61 67 24 7b 2f 7d  09 74 61 67 20 63 6f 64  |}tag${/}.tag cod|
000069e0  65 0a 3c 3d 09 76 61 6c  75 65 20 6f 66 20 74 61  |e.<=.value of ta|
000069f0  67 2c 20 6f 72 20 30 20  69 66 20 6e 6f 74 20 66  |g, or 0 if not f|
00006a00  6f 75 6e 64 2e 0a 23 57  72 61 70 0a 0a 52 65 74  |ound..#Wrap..Ret|
00006a10  75 72 6e 20 61 20 74 61  67 67 65 64 20 76 61 6c  |urn a tagged val|
00006a20  75 65 20 66 72 6f 6d 20  73 74 61 74 75 73 20 66  |ue from status f|
00006a30  69 6c 65 2e 0a 00 00 00  44 41 54 41 0b 01 00 00  |ile.....DATA....|
00006a40  46 4e 62 61 73 65 74 79  70 65 28 66 69 6c 65 24  |FNbasetype(file$|
00006a50  29 0a 23 50 61 72 65 6e  74 20 21 52 6f 6f 74 0a  |).#Parent !Root.|
00006a60  3d 3e 09 7b 2f 7d 66 69  6c 65 24 7b 2f 7d 09 66  |=>.{/}file${/}.f|
00006a70  69 6c 65 6e 61 6d 65 0a  3c 3d 09 2d 32 20 69 66  |ilename.<=.-2 if|
00006a80  20 6e 6f 74 20 66 6f 75  6e 64 0a 09 2d 31 20 69  | not found..-1 i|
00006a90  66 20 66 69 6c 65 0a 09  30 2d 26 46 46 46 20 69  |f file..0-&FFF i|
00006aa0  66 20 69 6d 61 67 65 0a  09 26 31 30 30 30 20 69  |f image..&1000 i|
00006ab0  66 20 64 69 72 65 63 74  6f 72 79 0a 09 0a 52 65  |f directory...Re|
00006ac0  74 75 72 6e 20 74 68 65  20 66 69 6c 65 20 74 79  |turn the file ty|
00006ad0  70 65 20 6f 66 20 61 6e  20 69 6d 61 67 65 20 66  |pe of an image f|
00006ae0  69 6c 65 20 6f 72 20 64  69 72 65 63 74 6f 72 79  |ile or directory|
00006af0  0a 0a 49 6e 20 57 69 6d  70 4c 69 62 32 20 74 68  |..In WimpLib2 th|
00006b00  69 73 20 64 6f 65 73 20  6e 6f 74 20 72 65 74 75  |is does not retu|
00006b10  72 6e 20 74 68 65 20 69  6d 61 67 65 20 74 79 70  |rn the image typ|
00006b20  65 20 62 65 63 61 75 73  65 20 69 6d 61 67 65 73  |e because images|
00006b30  20 61 72 65 20 6e 6f 74  20 73 75 70 70 6f 72 74  | are not support|
00006b40  65 64 2e 00 44 41 54 41  25 01 00 00 46 4e 66 69  |ed..DATA%...FNfi|
00006b50  6e 64 74 61 73 6b 28 74  61 73 6b 24 29 0a 23 50  |ndtask(task$).#P|
00006b60  61 72 65 6e 74 20 21 52  6f 6f 74 0a 3d 3e 09 7b  |arent !Root.=>.{|
00006b70  2f 7d 74 61 73 6b 24 7b  2f 7d 09 74 61 73 6b 20  |/}task${/}.task |
00006b80  6e 61 6d 65 0a 3c 3d 09  74 61 73 6b 20 68 61 6e  |name.<=.task han|
00006b90  64 6c 65 2c 20 6f 72 20  2d 31 20 69 66 20 6e 6f  |dle, or -1 if no|
00006ba0  74 20 66 6f 75 6e 64 0a  0a 53 65 61 72 63 68 20  |t found..Search |
00006bb0  66 6f 72 20 61 20 67 69  76 65 6e 20 74 61 73 6b  |for a given task|
00006bc0  20 61 6e 64 20 72 65 74  75 72 6e 20 74 68 65 20  | and return the |
00006bd0  66 69 72 73 74 20 74 61  73 6b 73 20 68 61 6e 64  |first tasks hand|
00006be0  6c 65 20 77 68 6f 73 65  20 6e 61 6d 65 20 6d 61  |le whose name ma|
00006bf0  74 63 68 65 73 2e 0a 0a  57 69 6d 70 4c 69 62 32  |tches...WimpLib2|
00006c00  20 77 69 6c 6c 20 61 6c  77 61 79 73 20 72 65 74  | will always ret|
00006c10  75 72 6e 20 2d 31 2c 20  61 73 20 3c 54 61 73 6b  |urn -1, as <Task|
00006c20  4d 61 6e 61 67 65 72 5f  45 6e 75 6d 65 72 61 74  |Manager_Enumerat|
00006c30  65 54 61 73 6b 73 3d 3e  53 57 49 3a 54 61 73 6b  |eTasks=>SWI:Task|
00006c40  4d 61 6e 61 67 65 72 5f  45 6e 75 6d 65 72 61 74  |Manager_Enumerat|
00006c50  65 54 61 73 6b 73 3e 20  69 73 20 6e 6f 74 20 73  |eTasks> is not s|
00006c60  75 70 70 6f 72 74 65 64  2e 00 00 00 44 41 54 41  |upported....DATA|
00006c70  8c 00 00 00 46 4e 73 74  61 74 75 73 67 65 74 66  |....FNstatusgetf|
00006c80  6c 61 67 28 74 61 67 24  29 0a 23 50 61 72 65 6e  |lag(tag$).#Paren|
00006c90  74 20 21 52 6f 6f 74 0a  23 57 72 61 70 20 6f 66  |t !Root.#Wrap of|
00006ca0  66 0a 3d 3e 09 7b 2f 7d  74 61 67 24 7b 2f 7d 09  |f.=>.{/}tag${/}.|
00006cb0  74 61 67 20 63 6f 64 65  0a 3c 3d 09 54 52 55 45  |tag code.<=.TRUE|
00006cc0  20 6f 72 20 46 41 4c 53  45 0a 23 57 72 61 70 0a  | or FALSE.#Wrap.|
00006cd0  0a 52 65 74 75 72 6e 20  61 20 74 61 67 67 65 64  |.Return a tagged|
00006ce0  20 66 6c 61 67 20 66 72  6f 6d 20 73 74 61 74 75  | flag from statu|
00006cf0  73 20 66 69 6c 65 2e 0a  44 41 54 41 d3 09 00 00  |s file..DATA....|
00006d00  57 69 6d 70 4c 69 62 20  72 6f 75 74 69 6e 65 73  |WimpLib routines|
00006d10  0a 4d 61 69 6e 20 61 70  70 6c 69 63 61 74 69 6f  |.Main applicatio|
00006d20  6e 0a 23 49 6e 64 65 6e  74 20 32 0a 23 54 61 62  |n.#Indent 2.#Tab|
00006d30  6c 65 20 43 6f 6c 75 6d  6e 73 20 33 0a 3c 50 52  |le Columns 3.<PR|
00006d40  4f 43 69 6e 69 74 6c 69  62 72 61 72 79 3e 0a 3c  |OCinitlibrary>.<|
00006d50  50 52 4f 43 6e 6f 74 65  6d 65 73 73 61 67 65 3e  |PROCnotemessage>|
00006d60  0a 3c 46 4e 6c 6f 61 64  74 65 6d 70 6c 61 74 65  |.<FNloadtemplate|
00006d70  3e 0a 3c 46 4e 6c 6f 61  64 73 70 72 69 74 65 73  |>.<FNloadsprites|
00006d80  3e 0a 3c 46 4e 47 65 74  45 6e 76 3e 0a 3c 46 4e  |>.<FNGetEnv>.<FN|
00006d90  73 79 73 74 65 6d 76 61  72 3e 0a 3c 50 52 4f 43  |systemvar>.<PROC|
00006da0  65 72 72 6f 72 3e 0a 3c  50 52 4f 43 65 65 72 72  |error>.<PROCeerr|
00006db0  6f 72 3e 0a 3c 46 4e 65  72 72 6f 72 62 6f 78 3e  |or>.<FNerrorbox>|
00006dc0  0a 3c 50 52 4f 43 73 68  6f 77 66 72 65 65 3e 0a  |.<PROCshowfree>.|
00006dd0  23 45 6e 64 54 61 62 6c  65 0a 23 49 6e 64 65 6e  |#EndTable.#Inden|
00006de0  74 0a 0a 4d 65 6e 75 20  6d 61 6e 69 70 75 6c 61  |t..Menu manipula|
00006df0  74 69 6f 6e 0a 23 49 6e  64 65 6e 74 20 32 0a 23  |tion.#Indent 2.#|
00006e00  54 61 62 6c 65 20 43 6f  6c 75 6d 6e 73 20 33 0a  |Table Columns 3.|
00006e10  3c 46 4e 63 72 65 61 74  65 6d 65 6e 75 3e 0a 3c  |<FNcreatemenu>.<|
00006e20  46 4e 69 6e 64 69 72 65  63 74 3e 0a 3c 50 52 4f  |FNindirect>.<PRO|
00006e30  43 69 62 6d 65 6e 75 3e  0a 3c 50 52 4f 43 6d 65  |Cibmenu>.<PROCme|
00006e40  6e 75 3e 0a 3c 50 52 4f  43 72 65 63 72 65 61 74  |nu>.<PROCrecreat|
00006e50  65 6d 65 6e 75 3e 0a 3c  50 52 4f 43 6d 65 6e 75  |emenu>.<PROCmenu|
00006e60  75 6e 74 69 63 6b 3e 0a  3c 50 52 4f 43 6d 65 6e  |untick>.<PROCmen|
00006e70  75 74 69 63 6b 3e 0a 3c  50 52 4f 43 6d 65 6e 75  |utick>.<PROCmenu|
00006e80  73 68 61 64 65 3e 0a 3c  46 4e 6d 65 6e 75 74 69  |shade>.<FNmenuti|
00006e90  63 6b 65 64 3e 0a 3c 46  4e 6d 65 6e 75 73 68 61  |cked>.<FNmenusha|
00006ea0  64 65 64 3e 0a 3c 50 52  4f 43 73 65 74 6d 65 6e  |ded>.<PROCsetmen|
00006eb0  75 74 65 78 74 3e 0a 3c  46 4e 67 65 74 6d 65 6e  |utext>.<FNgetmen|
00006ec0  75 74 65 78 74 3e 0a 3c  46 4e 64 65 63 6f 64 65  |utext>.<FNdecode|
00006ed0  6d 65 6e 75 3e 0a 3c 46  4e 67 65 74 66 6f 6e 74  |menu>.<FNgetfont|
00006ee0  6d 65 6e 75 3e 0a 3c 50  52 4f 43 72 65 6c 65 61  |menu>.<PROCrelea|
00006ef0  73 65 66 6f 6e 74 6d 65  6e 75 3e 0a 3c 46 4e 63  |sefontmenu>.<FNc|
00006f00  72 65 61 74 65 66 74 6d  65 6e 75 3e 0a 3c 50 52  |reateftmenu>.<PR|
00006f10  4f 43 72 65 6c 65 61 73  65 66 74 6d 65 6e 75 3e  |OCreleaseftmenu>|
00006f20  0a 23 45 6e 64 54 61 62  6c 65 0a 23 49 6e 64 65  |.#EndTable.#Inde|
00006f30  6e 74 0a 0a 57 69 6e 64  6f 77 20 6d 61 6e 69 70  |nt..Window manip|
00006f40  75 6c 61 74 69 6f 6e 0a  23 49 6e 64 65 6e 74 20  |ulation.#Indent |
00006f50  32 0a 23 54 61 62 6c 65  20 43 6f 6c 75 6d 6e 73  |2.#Table Columns|
00006f60  20 33 0a 3c 50 52 4f 43  63 6c 6f 73 65 77 69 6e  | 3.<PROCclosewin|
00006f70  3e 0a 3c 50 52 4f 43 6f  70 65 6e 77 69 6e 3e 0a  |>.<PROCopenwin>.|
00006f80  3c 50 52 4f 43 6f 70 65  6e 77 69 6e 61 74 3e 0a  |<PROCopenwinat>.|
00006f90  3c 50 52 4f 43 6f 70 65  6e 77 69 6e 63 65 6e 74  |<PROCopenwincent|
00006fa0  72 65 3e 0a 3c 50 52 4f  43 6f 70 65 6e 77 69 6e  |re>.<PROCopenwin|
00006fb0  74 6f 3e 0a 3c 50 52 4f  43 72 65 73 69 7a 65 77  |to>.<PROCresizew|
00006fc0  69 6e 74 6f 3e 0a 3c 50  52 4f 43 77 69 6e 73 65  |into>.<PROCwinse|
00006fd0  74 65 78 74 65 6e 74 3e  0a 3c 50 52 4f 43 66 6f  |textent>.<PROCfo|
00006fe0  72 63 65 72 65 64 72 61  77 3e 0a 3c 50 52 4f 43  |rceredraw>.<PROC|
00006ff0  77 69 6e 64 6f 77 74 69  74 6c 65 3e 0a 23 45 6e  |windowtitle>.#En|
00007000  64 54 61 62 6c 65 0a 23  49 6e 64 65 6e 74 0a 0a  |dTable.#Indent..|
00007010  49 63 6f 6e 20 6d 61 6e  69 70 75 6c 61 74 69 6f  |Icon manipulatio|
00007020  6e 0a 23 49 6e 64 65 6e  74 20 32 0a 23 54 61 62  |n.#Indent 2.#Tab|
00007030  6c 65 20 43 6f 6c 75 6d  6e 73 20 33 0a 3c 46 4e  |le Columns 3.<FN|
00007040  63 72 65 61 74 65 69 63  6f 6e 3e 0a 3c 50 52 4f  |createicon>.<PRO|
00007050  43 64 65 6c 65 74 65 69  63 6f 6e 3e 0a 3c 46 4e  |Cdeleteicon>.<FN|
00007060  43 72 65 61 74 65 49 63  6f 6e 42 61 72 49 63 6f  |CreateIconBarIco|
00007070  6e 3e 0a 3c 50 52 4f 43  69 63 6f 6e 73 68 61 64  |n>.<PROCiconshad|
00007080  65 3e 0a 3c 50 52 4f 43  69 63 6f 6e 73 74 61 74  |e>.<PROCiconstat|
00007090  65 3e 0a 3c 50 52 4f 43  73 65 74 69 63 6f 6e 62  |e>.<PROCseticonb|
000070a0  69 74 3e 0a 3c 46 4e 67  65 74 69 63 6f 6e 73 74  |it>.<FNgeticonst|
000070b0  61 74 65 3e 0a 3c 50 52  4f 43 72 65 64 72 61 77  |ate>.<PROCredraw|
000070c0  69 63 6f 6e 3e 0a 3c 46  4e 67 65 74 69 63 6f 6e  |icon>.<FNgeticon|
000070d0  74 65 78 74 3e 0a 3c 50  52 4f 43 73 65 74 69 63  |text>.<PROCsetic|
000070e0  6f 6e 74 65 78 74 3e 0a  3c 46 4e 67 65 74 69 63  |ontext>.<FNgetic|
000070f0  6f 6e 76 61 6c 69 64 3e  0a 3c 50 52 4f 43 73 65  |onvalid>.<PROCse|
00007100  74 69 63 6f 6e 76 61 6c  69 64 3e 0a 3c 50 52 4f  |ticonvalid>.<PRO|
00007110  43 64 72 61 67 69 63 6f  6e 3e 0a 3c 50 52 4f 43  |Cdragicon>.<PROC|
00007120  64 72 61 67 73 61 76 65  3e 0a 3c 50 52 4f 43 70  |dragsave>.<PROCp|
00007130  72 65 73 73 69 63 6f 6e  3e 0a 23 45 6e 64 54 61  |ressicon>.#EndTa|
00007140  62 6c 65 0a 23 49 6e 64  65 6e 74 0a 0a 21 48 65  |ble.#Indent..!He|
00007150  6c 70 20 72 65 73 70 6f  6e 73 69 76 65 20 72 6f  |lp responsive ro|
00007160  75 74 69 6e 65 73 0a 23  49 6e 64 65 6e 74 20 32  |utines.#Indent 2|
00007170  0a 23 54 61 62 6c 65 20  43 6f 6c 75 6d 6e 73 20  |.#Table Columns |
00007180  33 0a 3c 50 52 4f 43 72  65 61 64 68 65 6c 70 3e  |3.<PROCreadhelp>|
00007190  0a 3c 50 52 4f 43 73 65  6e 64 68 65 6c 70 3e 0a  |.<PROCsendhelp>.|
000071a0  23 45 6e 64 54 61 62 6c  65 0a 23 49 6e 64 65 6e  |#EndTable.#Inden|
000071b0  74 0a 0a 4d 65 73 73 61  67 65 54 72 61 6e 73 20  |t..MessageTrans |
000071c0  69 6e 74 65 72 66 61 63  65 20 72 6f 75 74 69 6e  |interface routin|
000071d0  65 73 0a 23 49 6e 64 65  6e 74 20 32 0a 23 54 61  |es.#Indent 2.#Ta|
000071e0  62 6c 65 20 43 6f 6c 75  6d 6e 73 20 32 0a 3c 50  |ble Columns 2.<P|
000071f0  52 4f 43 6f 70 65 6e 6d  65 73 73 61 67 65 73 3e  |ROCopenmessages>|
00007200  0a 3c 50 52 4f 43 63 6c  6f 73 65 6d 65 73 73 61  |.<PROCclosemessa|
00007210  67 65 73 3e 0a 3c 46 4e  6d 73 67 74 6f 6b 65 6e  |ges>.<FNmsgtoken|
00007220  3e 0a 3c 46 4e 6d 73 67  74 65 78 74 3e 0a 23 45  |>.<FNmsgtext>.#E|
00007230  6e 64 54 61 62 6c 65 0a  23 49 6e 64 65 6e 74 0a  |ndTable.#Indent.|
00007240  0a 53 74 72 69 6e 67 20  6d 61 6e 69 70 75 6c 61  |.String manipula|
00007250  74 69 6f 6e 0a 23 49 6e  64 65 6e 74 20 32 0a 23  |tion.#Indent 2.#|
00007260  54 61 62 6c 65 20 43 6f  6c 75 6d 6e 73 20 33 0a  |Table Columns 3.|
00007270  3c 46 4e 73 74 72 69 6e  67 30 3e 0a 3c 46 4e 6c  |<FNstring0>.<FNl|
00007280  6f 77 65 72 3e 0a 3c 46  4e 75 70 70 65 72 3e 0a  |ower>.<FNupper>.|
00007290  3c 46 4e 74 69 64 79 3e  0a 3c 46 4e 73 74 72 69  |<FNtidy>.<FNstri|
000072a0  70 73 70 61 63 65 73 3e  0a 3c 46 4e 73 75 62 73  |pspaces>.<FNsubs|
000072b0  74 76 61 72 73 3e 0a 3c  46 4e 73 75 62 73 74 76  |tvars>.<FNsubstv|
000072c0  61 72 73 70 3e 0a 3c 46  4e 67 73 74 72 61 6e 73  |arsp>.<FNgstrans|
000072d0  3e 0a 3c 46 4e 73 77 69  6e 75 6d 62 65 72 3e 0a  |>.<FNswinumber>.|
000072e0  23 45 6e 64 54 61 62 6c  65 0a 23 49 6e 64 65 6e  |#EndTable.#Inden|
000072f0  74 0a 0a 46 69 6c 65 20  69 6e 66 6f 72 6d 61 74  |t..File informat|
00007300  69 6f 6e 20 72 6f 75 74  69 6e 65 73 0a 23 49 6e  |ion routines.#In|
00007310  64 65 6e 74 20 32 0a 23  54 61 62 6c 65 20 43 6f  |dent 2.#Table Co|
00007320  6c 75 6d 6e 73 20 33 0a  3c 46 4e 66 69 6c 65 74  |lumns 3.<FNfilet|
00007330  79 70 65 3e 0a 3c 46 4e  62 61 73 65 74 79 70 65  |ype>.<FNbasetype|
00007340  3e 0a 3c 46 4e 66 69 6c  65 6c 65 6e 67 74 68 3e  |>.<FNfilelength>|
00007350  0a 3c 46 4e 6c 65 61 66  6e 61 6d 65 3e 0a 3c 46  |.<FNleafname>.<F|
00007360  4e 70 61 74 68 6e 61 6d  65 3e 0a 3c 46 4e 6c 6f  |Npathname>.<FNlo|
00007370  6e 67 66 69 6c 65 6e 61  6d 65 3e 0a 23 45 6e 64  |ngfilename>.#End|
00007380  54 61 62 6c 65 0a 23 49  6e 64 65 6e 74 0a 0a 4d  |Table.#Indent..M|
00007390  6f 64 75 6c 65 20 77 6f  72 6b 73 70 61 63 65 20  |odule workspace |
000073a0  6d 61 6e 69 70 75 6c 61  74 69 6f 6e 0a 23 49 6e  |manipulation.#In|
000073b0  64 65 6e 74 20 32 0a 23  54 61 62 6c 65 20 43 6f  |dent 2.#Table Co|
000073c0  6c 75 6d 6e 73 20 32 0a  3c 46 4e 63 6c 61 69 6d  |lumns 2.<FNclaim|
000073d0  3e 0a 3c 50 52 4f 43 72  65 6c 65 61 73 65 3e 0a  |>.<PROCrelease>.|
000073e0  23 45 6e 64 54 61 62 6c  65 0a 23 49 6e 64 65 6e  |#EndTable.#Inden|
000073f0  74 0a 0a 54 61 73 6b 20  69 6e 74 65 72 61 63 74  |t..Task interact|
00007400  69 6f 6e 20 72 6f 75 74  69 6e 65 73 0a 23 49 6e  |ion routines.#In|
00007410  64 65 6e 74 20 32 0a 23  54 61 62 6c 65 20 43 6f  |dent 2.#Table Co|
00007420  6c 75 6d 6e 73 20 33 0a  3c 46 4e 74 61 73 6b 6e  |lumns 3.<FNtaskn|
00007430  61 6d 65 3e 0a 3c 46 4e  77 69 6e 64 6f 77 74 61  |ame>.<FNwindowta|
00007440  73 6b 3e 0a 3c 46 4e 66  69 6e 64 74 61 73 6b 3e  |sk>.<FNfindtask>|
00007450  0a 3c 46 4e 72 65 61 64  74 61 73 6b 73 74 72 69  |.<FNreadtaskstri|
00007460  6e 67 3e 0a 3c 50 52 4f  43 72 65 61 64 74 61 73  |ng>.<PROCreadtas|
00007470  6b 61 72 65 61 3e 0a 3c  46 4e 62 61 63 6b 6f 66  |karea>.<FNbackof|
00007480  77 69 6e 73 74 61 63 6b  3e 0a 3c 46 4e 77 69 6e  |winstack>.<FNwin|
00007490  73 74 61 63 6b 6e 65 78  74 3e 0a 23 45 6e 64 54  |stacknext>.#EndT|
000074a0  61 62 6c 65 0a 23 49 6e  64 65 6e 74 0a 0a 43 61  |able.#Indent..Ca|
000074b0  72 65 74 20 61 6e 64 20  70 6f 69 6e 74 65 72 20  |ret and pointer |
000074c0  63 6f 6e 74 72 6f 6c 20  72 6f 75 74 69 6e 65 73  |control routines|
000074d0  0a 23 49 6e 64 65 6e 74  20 32 0a 23 54 61 62 6c  |.#Indent 2.#Tabl|
000074e0  65 20 43 6f 6c 75 6d 6e  73 20 32 0a 3c 50 52 4f  |e Columns 2.<PRO|
000074f0  43 73 65 74 63 61 72 65  74 65 6e 64 3e 0a 3c 50  |Csetcaretend>.<P|
00007500  52 4f 43 73 65 74 63 61  72 65 74 70 6f 73 3e 0a  |ROCsetcaretpos>.|
00007510  3c 50 52 4f 43 67 65 74  63 61 72 65 74 70 6f 73  |<PROCgetcaretpos|
00007520  3e 0a 3c 50 52 4f 43 67  65 74 70 74 72 70 6f 73  |>.<PROCgetptrpos|
00007530  3e 0a 23 45 6e 64 54 61  62 6c 65 0a 23 49 6e 64  |>.#EndTable.#Ind|
00007540  65 6e 74 0a 0a 43 6f 6e  66 69 67 75 72 61 74 69  |ent..Configurati|
00007550  6f 6e 20 73 65 74 74 69  6e 67 73 20 63 6f 6e 74  |on settings cont|
00007560  72 6f 6c 0a 23 49 6e 64  65 6e 74 20 32 0a 23 54  |rol.#Indent 2.#T|
00007570  61 62 6c 65 20 43 6f 6c  75 6d 6e 73 20 32 0a 3c  |able Columns 2.<|
00007580  46 4e 72 65 61 64 63 6d  6f 73 3e 0a 3c 50 52 4f  |FNreadcmos>.<PRO|
00007590  43 77 72 69 74 65 63 6d  6f 73 3e 0a 23 45 6e 64  |Cwritecmos>.#End|
000075a0  54 61 62 6c 65 0a 23 49  6e 64 65 6e 74 0a 0a 53  |Table.#Indent..S|
000075b0  74 61 74 75 73 20 66 69  6c 65 20 63 6f 6e 74 72  |tatus file contr|
000075c0  6f 6c 20 72 6f 75 74 69  6e 65 73 0a 23 49 6e 64  |ol routines.#Ind|
000075d0  65 6e 74 20 32 0a 23 54  61 62 6c 65 20 43 6f 6c  |ent 2.#Table Col|
000075e0  75 6d 6e 73 20 33 0a 3c  50 52 4f 43 6d 61 6b 65  |umns 3.<PROCmake|
000075f0  73 74 61 74 75 73 66 69  6c 65 3e 0a 3c 50 52 4f  |statusfile>.<PRO|
00007600  43 63 6c 6f 73 65 73 74  61 74 75 73 66 69 6c 65  |Cclosestatusfile|
00007610  3e 0a 3c 46 4e 72 65 61  64 73 74 61 74 75 73 66  |>.<FNreadstatusf|
00007620  69 6c 65 3e 0a 3c 50 52  4f 43 73 74 61 74 75 73  |ile>.<PROCstatus|
00007630  70 75 74 3e 0a 3c 50 52  4f 43 73 74 61 74 75 73  |put>.<PROCstatus|
00007640  6f 70 74 69 6f 6e 3e 0a  3c 50 52 4f 43 73 74 61  |option>.<PROCsta|
00007650  74 75 73 66 6c 61 67 3e  0a 3c 50 52 4f 43 73 74  |tusflag>.<PROCst|
00007660  61 74 75 73 6e 65 78 74  3e 0a 3c 46 4e 73 74 61  |atusnext>.<FNsta|
00007670  74 75 73 67 65 74 3e 0a  3c 46 4e 73 74 61 74 75  |tusget>.<FNstatu|
00007680  73 67 65 74 76 3e 0a 3c  46 4e 73 74 61 74 75 73  |sgetv>.<FNstatus|
00007690  67 65 74 66 6c 61 67 3e  0a 23 45 6e 64 54 61 62  |getflag>.#EndTab|
000076a0  6c 65 0a 23 49 6e 64 65  6e 74 0a 0a 3c 49 6e 66  |le.#Indent..<Inf|
000076b0  6f 72 6d 61 74 69 6f 6e  3d 3e 69 6e 66 6f 3e 20  |ormation=>info> |
000076c0  6f 6e 20 57 69 6d 70 4c  69 62 0a 00 44 41 54 41  |on WimpLib..DATA|
000076d0  89 04 00 00 4d 65 6e 75  20 63 6f 6e 74 72 6f 6c  |....Menu control|
000076e0  20 73 74 72 69 6e 67 73  0a 42 4e 46 20 64 65 66  | strings.BNF def|
000076f0  69 6e 65 73 20 61 73 20  28 2f 20 69 73 20 4f 52  |ines as (/ is OR|
00007700  2c 20 7c 20 69 73 20 7c  29 20 3a 0a 4d 65 6e 75  |, | is |) :.Menu|
00007710  09 3a 3a 3d 09 5c 3c 54  69 74 6c 65 3e 2f 5c 3c  |.::=.\<Title>/\<|
00007720  4f 70 74 69 6f 6e 3e 0a  4f 70 74 69 6f 6e 09 3a  |Option>.Option.:|
00007730  3a 3d 09 5c 3c 49 74 65  6d 3e 2f 5c 3c 49 74 65  |:=.\<Item>/\<Ite|
00007740  6d 3e 7b 66 43 6f 64 65  7d 7c 7b 66 7d 5c 3c 4f  |m>{fCode}|{f}\<O|
00007750  70 74 69 6f 6e 3e 0a 49  74 65 6d 09 3a 3a 3d 09  |ption>.Item.::=.|
00007760  5c 3c 4e 61 6d 65 3e 2f  5c 3c 4e 61 6d 65 3e 7b  |\<Name>/\<Name>{|
00007770  66 43 6f 64 65 7d 5d 7b  66 7d 5c 3c 46 6c 61 67  |fCode}]{f}\<Flag|
00007780  73 3e 0a 46 6c 61 67 73  09 3a 3a 3d 09 5c 3c 46  |s>.Flags.::=.\<F|
00007790  6c 61 67 3e 2f 5c 3c 46  6c 61 67 3e 7b 66 43 6f  |lag>/\<Flag>{fCo|
000077a0  64 65 7d 2c 7b 66 7d 5c  3c 46 6c 61 67 73 3e 0a  |de},{f}\<Flags>.|
000077b0  46 6c 61 67 09 3a 3a 3d  09 7b 66 43 6f 64 65 7d  |Flag.::=.{fCode}|
000077c0  54 7b 66 7d 2f 7b 66 43  6f 64 65 7d 44 7b 66 7d  |T{f}/{fCode}D{f}|
000077d0  2f 7b 66 43 6f 64 65 7d  57 7b 66 7d 2f 7b 66 43  |/{fCode}W{f}/{fC|
000077e0  6f 64 65 7d 4d 7b 66 7d  2f 7b 66 43 6f 64 65 7d  |ode}M{f}/{fCode}|
000077f0  53 7b 66 7d 2f 7b 66 43  6f 64 65 7d 4b 7b 66 7d  |S{f}/{fCode}K{f}|
00007800  3c 5c 3c 6b 65 79 5c 3e  3d 3e 2e 6b 65 79 73 3e  |<\<key\>=>.keys>|
00007810  2f 7b 66 43 6f 64 65 7d  3e 7b 66 7d 5c 3c 4d 65  |/{fCode}>{f}\<Me|
00007820  6e 75 25 3e 2f 7b 66 43  6f 64 65 7d 7d 7b 66 7d  |nu%>/{fCode}}{f}|
00007830  5c 3c 53 70 72 69 74 65  3e 0a 0a 43 6f 6d 6d 61  |\<Sprite>..Comma|
00007840  20 69 73 20 6e 6f 74 20  72 65 71 75 69 72 65 64  | is not required|
00007850  20 69 66 20 73 69 6e 67  6c 65 20 6c 65 74 74 65  | if single lette|
00007860  72 20 66 6c 61 67 73 20  75 73 65 64 2e 20 53 70  |r flags used. Sp|
00007870  72 69 74 65 20 69 73 20  69 6e 20 57 69 6d 70 20  |rite is in Wimp |
00007880  70 6f 6f 6c 20 61 6e 64  20 69 66 20 69 74 20 64  |pool and if it d|
00007890  6f 65 73 20 6e 6f 74 20  73 74 61 72 74 20 77 69  |oes not start wi|
000078a0  74 68 20 73 6d 20 74 68  65 6e 20 69 73 20 73 68  |th sm then is sh|
000078b0  72 75 6e 6b 20 74 6f 20  68 61 6c 66 20 73 69 7a  |runk to half siz|
000078c0  65 2e 0a 0a 45 78 61 6d  70 6c 65 20 3a 20 7b 66  |e...Example : {f|
000078d0  43 6f 64 65 7d 41 70 70  6c 69 63 7c 49 6e 66 6f  |Code}Applic|Info|
000078e0  5d 3e 69 6e 66 6f 62 6f  78 25 7c 51 75 69 74 7b  |]>infobox%|Quit{|
000078f0  66 7d 0a 0a 4d 65 6e 75  25 20 69 73 20 70 6f 69  |f}..Menu% is poi|
00007900  6e 74 65 72 20 74 6f 20  77 69 6e 64 6f 77 2f 6d  |nter to window/m|
00007910  65 6e 75 20 73 74 72 75  63 74 75 72 65 2e 0a 0a  |enu structure...|
00007920  54 20 66 6f 72 20 74 69  63 6b 65 64 0a 44 20 66  |T for ticked.D f|
00007930  6f 72 20 64 6f 74 74 65  64 20 75 6e 64 65 72 6e  |or dotted undern|
00007940  65 61 74 68 0a 57 20 66  6f 72 20 77 72 69 74 61  |eath.W for writa|
00007950  62 6c 65 0a 4d 20 66 6f  72 20 6d 65 73 73 61 67  |ble.M for messag|
00007960  65 20 77 68 65 6e 20 6f  70 65 6e 69 6e 67 0a 53  |e when opening.S|
00007970  20 66 6f 72 20 73 68 61  64 65 64 0a 4b 20 66 6f  | for shaded.K fo|
00007980  72 20 6b 65 79 62 6f 61  72 64 20 73 68 6f 72 74  |r keyboard short|
00007990  63 75 74 20 28 66 6f 6c  6c 6f 77 69 6e 67 29 0a  |cut (following).|
000079a0  5c 3e 20 66 6f 6c 6c 6f  77 65 64 20 62 79 20 76  |\> followed by v|
000079b0  61 72 69 61 62 6c 65 20  66 6f 72 20 73 75 62 2d  |ariable for sub-|
000079c0  6d 65 6e 75 20 28 7b 66  43 6f 64 65 7d 49 74 65  |menu ({fCode}Ite|
000079d0  6d 5d 3e 73 75 62 6d 65  6e 75 25 7c 7b 66 7d 29  |m]>submenu%|{f})|
000079e0  0a 7d 20 66 6f 6c 6c 6f  77 65 64 20 62 79 20 61  |.} followed by a|
000079f0  20 73 70 72 69 74 65 20  6e 61 6d 65 20 28 7b 66  | sprite name ({f|
00007a00  43 6f 64 65 7d 49 74 65  6d 5d 7d 73 70 72 69 74  |Code}Item]}sprit|
00007a10  65 7c 7b 66 7d 29 0a 23  53 75 62 70 61 67 65 20  |e|{f}).#Subpage |
00007a20  6b 65 79 73 0a 46 4e 63  72 65 61 74 65 6d 65 6e  |keys.FNcreatemen|
00007a30  75 20 6b 65 79 20 73 68  6f 72 74 2d 63 75 74 73  |u key short-cuts|
00007a40  0a 4b 65 79 73 20 6d 61  79 20 62 65 20 3a 0a 23  |.Keys may be :.#|
00007a50  49 6e 64 65 6e 74 20 32  3b 54 61 62 6c 65 20 43  |Indent 2;Table C|
00007a60  6f 6c 75 6d 6e 73 20 34  0a 46 31 2d 46 31 32 0a  |olumns 4.F1-F12.|
00007a70  45 73 63 0a 44 65 6c 0a  49 6e 73 0a 45 6e 64 0a  |Esc.Del.Ins.End.|
00007a80  48 6f 6d 0a 43 70 79 0a  50 72 74 0a 54 61 62 0a  |Hom.Cpy.Prt.Tab.|
00007a90  52 65 74 0a 23 45 6e 64  54 61 62 6c 65 0a 23 49  |Ret.#EndTable.#I|
00007aa0  6e 64 65 6e 74 0a 0a 41  6e 79 74 68 69 6e 67 20  |ndent..Anything |
00007ab0  70 72 65 66 69 78 65 64  20 62 79 20 5e 2c 20 a4  |prefixed by ^, .|
00007ac0  20 6f 72 20 a4 5e 2e 20  54 68 65 20 75 70 20 61  | or .^. The up a|
00007ad0  72 72 6f 77 20 77 69 6c  6c 20 62 65 20 73 75 62  |rrow will be sub|
00007ae0  73 74 69 74 75 74 65 64  20 66 6f 72 20 a4 20 77  |stituted for . w|
00007af0  68 65 6e 20 63 72 65 61  74 69 6e 67 20 6d 65 6e  |hen creating men|
00007b00  75 73 2e 20 57 68 65 6e  20 79 6f 75 20 64 65 63  |us. When you dec|
00007b10  6f 64 65 20 6d 65 6e 75  73 20 6b 65 79 73 74 72  |ode menus keystr|
00007b20  6f 6b 65 73 20 77 69 6c  6c 20 62 65 20 72 65 6d  |okes will be rem|
00007b30  6f 76 65 64 20 66 72 6f  6d 20 74 68 65 20 3c 46  |oved from the <F|
00007b40  4e 64 65 63 6f 64 65 6d  65 6e 75 3e 20 73 74 72  |Ndecodemenu> str|
00007b50  69 6e 67 2e 0a 00 00 00  44 41 54 41 41 00 00 00  |ing.....DATAA...|
00007b60  54 6f 67 67 6c 65 20 76  61 6c 75 65 73 0a 56 61  |Toggle values.Va|
00007b70  6c 75 65 09 4d 65 61 6e  69 6e 67 0a 23 4c 69 6e  |lue.Meaning.#Lin|
00007b80  65 0a 30 09 55 6e 73 65  74 0a 31 09 53 65 74 0a  |e.0.Unset.1.Set.|
00007b90  32 09 54 6f 67 67 6c 65  0a 00 00 00 44 41 54 41  |2.Toggle....DATA|
00007ba0  55 01 00 00 50 52 4f 43  72 65 61 64 68 65 6c 70  |U...PROCreadhelp|
00007bb0  20 66 6f 72 6d 61 74 0a  23 57 72 61 70 20 4f 66  | format.#Wrap Of|
00007bc0  66 0a 4d 61 69 6e 20 77  69 6e 64 6f 77 73 20 3a  |f.Main windows :|
00007bd0  0a 23 49 6e 64 65 6e 74  20 32 0a 5c 7b 20 77 69  |.#Indent 2.\{ wi|
00007be0  6e 64 6f 77 2c 20 68 65  6c 70 20 6d 65 73 73 61  |ndow, help messa|
00007bf0  67 65 20 66 6f 72 20 6e  6f 20 69 63 6f 6e 0a 20  |ge for no icon. |
00007c00  20 5c 7b 20 69 63 6f 6e  20 6e 75 6d 62 65 72 2c  | \{ icon number,|
00007c10  20 6d 65 73 73 61 67 65  20 7d 20 72 65 70 65 61  | message } repea|
00007c20  74 65 64 0a 7d 20 72 65  70 65 61 74 65 64 0a 2d  |ted.} repeated.-|
00007c30  32 2c 20 6d 65 73 73 61  67 65 20 66 6f 72 20 69  |2, message for i|
00007c40  63 6f 6e 20 62 61 72 20  7d 0a 2d 31 2c 2d 31 20  |con bar }.-1,-1 |
00007c50  74 6f 20 65 6e 64 0a 23  49 6e 64 65 6e 74 0a 0a  |to end.#Indent..|
00007c60  46 6f 72 6d 61 74 20 66  6f 72 20 6d 65 6e 75 20  |Format for menu |
00007c70  68 65 6c 70 20 3a 0a 23  49 6e 64 65 6e 74 20 32  |help :.#Indent 2|
00007c80  0a 5c 7b 20 6d 65 6e 75  2c 20 2d 31 2c 2d 31 2c  |.\{ menu, -1,-1,|
00007c90  2d 31 0a 09 5c 7b 20 6f  70 74 31 2c 6f 70 74 32  |-1..\{ opt1,opt2|
00007ca0  2c 6f 70 74 33 2c 68 65  6c 70 0a 6f 72 09 2d 31  |,opt3,help.or.-1|
00007cb0  2c 73 74 72 69 6e 67 2c  2d 31 2c 68 65 6c 70 20  |,string,-1,help |
00007cc0  7d 20 72 65 70 65 61 74  65 64 0a 7d 20 72 65 70  |} repeated.} rep|
00007cd0  65 61 74 65 64 0a 2d 32  2c 2d 32 2c 2d 32 2c 2d  |eated.-2,-2,-2,-|
00007ce0  32 20 74 6f 20 65 6e 64  0a 23 49 6e 64 65 6e 74  |2 to end.#Indent|
00007cf0  0a 00 00 00 44 41 54 41  65 03 00 00 57 69 6d 70  |....DATAe...Wimp|
00007d00  4c 69 62 20 68 65 6c 70  0a 23 41 6c 69 67 6e 20  |Lib help.#Align |
00007d10  43 65 6e 74 72 65 0a 7b  66 68 33 7d 4a 46 53 68  |Centre.{fh3}JFSh|
00007d20  61 72 65 64 20 57 69 6d  70 4c 69 62 20 76 31 2e  |ared WimpLib v1.|
00007d30  35 38 2f 31 2e 35 34 7b  66 7d 0a 23 41 6c 69 67  |58/1.54{f}.#Alig|
00007d40  6e 20 4c 65 66 74 0a 0a  54 68 65 20 57 69 6d 70  |n Left..The Wimp|
00007d50  20 4c 69 62 72 61 72 79  20 69 73 20 61 20 42 61  | Library is a Ba|
00007d60  73 69 63 20 4c 69 62 72  61 72 79 20 66 69 6c 65  |sic Library file|
00007d70  20 77 68 69 63 68 20 70  72 6f 76 69 64 65 73 20  | which provides |
00007d80  73 69 6d 70 6c 65 20 70  72 6f 63 65 64 75 72 65  |simple procedure|
00007d90  20 63 61 6c 6c 73 20 74  6f 20 69 6d 70 6c 65 6d  | calls to implem|
00007da0  65 6e 74 20 57 69 6d 70  20 6f 70 65 72 61 74 69  |ent Wimp operati|
00007db0  6f 6e 73 2e 20 49 6e 20  63 6f 6e 6a 75 6e 63 74  |ons. In conjunct|
00007dc0  69 6f 6e 20 77 69 74 68  20 74 68 65 20 4a 46 53  |ion with the JFS|
00007dd0  68 61 72 65 64 20 73 6b  65 6c 65 74 6f 6e 20 61  |hared skeleton a|
00007de0  70 70 6c 69 63 61 74 69  6f 6e 20 74 68 69 73 20  |pplication this |
00007df0  70 72 6f 76 69 64 65 73  20 61 20 76 65 72 79 20  |provides a very |
00007e00  73 69 6d 70 6c 65 20 77  61 79 20 6f 66 20 63 72  |simple way of cr|
00007e10  65 61 74 69 6e 67 20 61  70 70 6c 69 63 61 74 69  |eating applicati|
00007e20  6f 6e 73 2e 20 54 68 69  73 20 68 65 6c 70 20 66  |ons. This help f|
00007e30  69 6c 65 20 64 65 74 61  69 6c 73 20 74 68 65 20  |ile details the |
00007e40  72 6f 75 74 69 6e 65 73  20 70 72 6f 76 69 64 65  |routines provide|
00007e50  64 20 69 6e 20 57 69 6d  70 4c 69 62 20 61 6e 64  |d in WimpLib and|
00007e60  20 57 69 6d 70 4c 69 62  32 20 28 74 68 65 20 52  | WimpLib2 (the R|
00007e70  69 73 63 4f 53 20 32 20  73 70 65 63 69 66 69 63  |iscOS 2 specific|
00007e80  20 76 65 72 73 69 6f 6e  29 20 77 69 74 68 20 64  | version) with d|
00007e90  65 73 63 72 69 70 74 69  6f 6e 73 20 6f 66 20 74  |escriptions of t|
00007ea0  68 65 20 69 6d 70 6c 65  6d 65 6e 74 61 74 69 6f  |he implementatio|
00007eb0  6e 20 6f 66 20 62 6f 74  68 2e 0a 0a 54 68 65 20  |n of both...The |
00007ec0  57 69 6d 70 4c 69 62 72  61 72 79 20 69 73 20 72  |WimpLibrary is r|
00007ed0  65 66 65 72 65 6e 63 65  64 20 62 79 20 5c 3c 42  |eferenced by \<B|
00007ee0  61 73 69 63 4c 69 62 72  61 72 79 24 46 69 6c 65  |asicLibrary$File|
00007ef0  3e 20 61 6e 64 20 73 68  6f 75 6c 64 20 62 65 20  |> and should be |
00007f00  6c 6f 61 64 65 64 20 77  69 74 68 20 3a 0a 7b 66  |loaded with :.{f|
00007f10  43 6f 64 65 7d 4c 49 42  52 41 52 59 20 22 5c 3c  |Code}LIBRARY "\<|
00007f20  42 61 73 69 63 4c 69 62  72 61 72 79 24 46 69 6c  |BasicLibrary$Fil|
00007f30  65 3e 22 3a 50 52 4f 43  69 6e 69 74 6c 69 62 72  |e>":PROCinitlibr|
00007f40  61 72 79 7b 66 7d 0a 0a  54 68 65 20 4a 46 53 68  |ary{f}..The JFSh|
00007f50  61 72 65 64 20 61 70 70  6c 69 63 61 74 69 6f 6e  |ared application|
00007f60  20 69 73 20 a9 20 3c 4a  75 73 74 69 6e 20 46 6c  | is . <Justin Fl|
00007f70  65 74 63 68 65 72 3d 3e  46 69 6c 65 74 79 70 65  |etcher=>Filetype|
00007f80  73 3a 41 75 74 68 6f 72  73 5f 4a 75 73 74 69 6e  |s:Authors_Justin|
00007f90  46 6c 65 74 63 68 65 72  3e 2c 20 31 39 39 35 20  |Fletcher>, 1995 |
00007fa0  61 6e 64 20 69 73 20 72  65 6c 65 61 73 65 64 20  |and is released |
00007fb0  69 6e 74 6f 20 74 68 65  20 50 75 62 6c 69 63 20  |into the Public |
00007fc0  44 6f 6d 61 69 6e 20 77  69 74 68 20 74 68 65 20  |Domain with the |
00007fd0  73 61 6d 65 20 72 65 73  74 72 69 63 74 69 6f 6e  |same restriction|
00007fe0  73 20 61 73 20 73 75 62  73 69 73 74 20 69 6e 20  |s as subsist in |
00007ff0  6d 6f 73 74 20 50 44 20  73 6f 66 74 77 61 72 65  |most PD software|
00008000  2e 20 54 68 69 73 20 69  6e 63 6c 75 64 65 73 20  |. This includes |
00008010  74 68 65 20 66 61 63 74  20 74 68 61 74 20 77 68  |the fact that wh|
00008020  65 6e 20 64 69 73 74 72  69 62 75 74 65 64 20 74  |en distributed t|
00008030  68 65 20 65 6e 74 69 72  65 20 61 70 70 6c 69 63  |he entire applic|
00008040  61 74 69 6f 6e 20 6d 75  73 74 20 72 65 6d 61 69  |ation must remai|
00008050  6e 20 69 6e 74 61 63 74  2e 00 00 00              |n intact....|
0000805c