home *** CD-ROM | disk | FTP | other *** search
- Instructions for !WimpPatch and OutlineWimp by Andrew Sellors
-
- *****************************************************************************
- * NOTE: *
- * !WimpPatch and OutlineWimp (outlnwimp) are Shareware. *
- * They are part of the Outline Wimp desktop enhancement package and must *
- * not distributed without the accompanying files. *
- * *
- * You may use this software for a trial period of 30 days. If, after this *
- * you decide you would like to continue using it then you are required to *
- * Register. See the ReadMe1st file for details of registering *
- * *
- * This version maybe freely copied and distributed, provided that it is *
- * complete with all original files, and that you do not sell it. *
- * PD libraries may charge a nominal fee for the cost of duplication, *
- * postage etc. *
- * *
- * In no circumstances shall the author be liable for any damage, loss of *
- * profits, time or data or any indirect or consequential loss rising out of *
- * the use of this software or inability to use this software. *
- *****************************************************************************
-
- Contents:
- ---------
-
- Features
- OverView
- Patching the WindowManager
- Installing the new WindowManager
- Configuring the new WindowManager
- Justification
- OS_Write replacement SWIs
- Text and sprite indirected icons with right justified text
- Technical information
- Contacting the author
-
- ********************************************************************************
-
- Features
- --------
-
- !WimpPatch (new WindowManager)
- ------------------------------
-
- Uses outline fonts instead of the system font in all icons (both single and
- multiple line varieties).
- Note: Some text may still appear in the system font. This is due to the fact
- that it is the application concerned is plotting the text and not the WIMP.
- Particular offenders are BASIC programs which use PRINT to display text on
- the WIMP.
-
- Right justifies key short-cut text in menus. (configurable)
-
- Replaces the up arrow with a specified character as most outline fonts do not
- have an up arrow character. (configurable)
-
- Uses font 'WimpMisc' (supplied) for the characters that are undefined in normal
- outline fonts such as the arrow characters. (configurable)
-
- Caret positioning takes account of proportional spaced letters.
-
- Does not intercept SWI vector and so does not slow SWI system down.
-
- OutlineWimp (support module)
- ----------------------------
-
- Handles outline font on mode changes to make sure the correct font aspect ratio
- is used at all times.
-
- Provides * commands to set all the options mentioned above.
-
- Saves current settings in the "DeskBoot" file.
-
- Provides SWIs as replacements for OS_WriteC, OS_Write0 and OS_WriteN which plot
- outline fonts rather than the system font to allow other programs that write
- directly to the screen to be patched easily (like the filer, see !OutFiler)
-
- Installs font 'WimpMisc' into ResourceFS with the other ROM Fonts to allow
- its use without having to install it into a !Font directory on a disc.
-
- ********************************************************************************
-
- OverView
- --------
-
- !WimpPatch patches the original WindowManager module so that it uses outline
- fonts instead of the system font.
-
- OutlineWimp (the file outlnwimp) must be run at the same time as the patched
- WindowManager module and allows the font name, size, justification of key
- short-cuts, replacement of the up arrow character and the use of the symbol
- font 'WimpMisc' to be configured.
- Failure to run this module will result in no text appearing.
-
- ********************************************************************************
-
- Patching the WindowManager
- --------------------------
-
- Note: This patch only works with WindowManager version 3.16 (the one in
- RISC OS 3.1x)
-
- Simply double click on the !WimpPatch application. This should create a new
- file called "NewWimp" in the same directory. This is the patched WindowManager
- module.
-
- When run, the version number of the WindowManager is checked, and if it is not
- 3.16 then an error is reported.
-
- ********************************************************************************
-
- Installing the new WindowManager
- --------------------------------
-
- The new WindowManager module created by !WimpPatch and outlnwimp must be loaded
- before the desktop is started. This is easily done as part of your boot sequence
- by, for example, adding the following lines
- *RMLoad SCSI::SCSI_4.$.!Boot.NewWimp
- *RMLoad SCSI::SCSI_4.$.!Boot.outlnwimp
- (Note: replace the path to the !Boot application with that for your own system
- or your preferred location of the files)
-
- You may also want to save the fontcache after all the letters have been cached
- and load it up in your boot sequence so that the text appears instantly the
- first time it is printed. (If you are not already doing this then it will make
- the desktop startup box appear instantly as well.)
-
- It is also advisable to setup a fontcache large enough to hold the fonts used by
- the WindowManager and to set it using !Configure so that the memory is allocated
- every time the computer is Reset. As a minimum I would recommend a setting of
- 64K but if you intend to use other outline fonts by using programs like !Draw
- then a higher setting should be used.
-
- ********************************************************************************
-
- Configuring the new WindowManager
- ---------------------------------
-
- The OutLineWimp module provides 7 * commands to allow the WindowManager to be
- configured.
-
- *WimpFont <FontName>
-
- This command set the current font to "FontName"
- An error is reported if you try to select a font that does not exist.
- Eg. *WimpFont Trinity.Medium
- The default is Corpus.Bold
-
- *WimpFontSize <Xsize> <Ysize>
-
- This command sets the fontsize in the x and y directions in units of 1/16th
- points.
- Eg. *WimpFont 192 192
- sets the fontsize to 12pts in x and y directions
- The default is 172 x 176 (10.75x11.0 points)
-
- *WimpInfo
-
- This command displays the current selections of all the configuration items.
-
- *WimpJustify <0|1>
-
- This command selects whether the key short-cuts are right justified.
- Eg. *WimpJustify 1
- turns on justification
- The default is off.
-
- *WimpUpArrow <0|1>
-
- This command selects whether the up arrow character (ASCII 139) is to be
- replaced with a different character. Most outline fonts do no contain an
- up arrow character so without it being replaced, the key short-cuts are
- rather confusing.
- When this feature is selected, the use of the font 'WimpMisc' is turned
- off.
- Eg. *WimpUpArrow 0
- turns off the up arrow replacement
- The default is on.
-
- *WimpNewUpArrow <ASCII code>
-
- This command sets the ASCII code of the character that the up arrow is
- replaced with.
- Eg. *WimpNewUpArrow 165
- sets the replacement character to ¥
- The default is ASCII 182, the ¶ character.
-
- *WimpMiscFont <0|1>
-
- This command selects the use of the font 'WimpMisc' for the characters that
- are undefined in the normal outline fonts such as the arrow characters.
- When this feature is selected, the up arrow replacement is turned off.
- Eg. *WimpMiscFont 1
- turns on the use of the font 'WimpMisc'.
- The default is off.
-
- The default values emulate the system font by selecting corpus.bold which is
- a monospaced font at the same size as the system font characters. Thus the
- menus look OK with justification off and programs that rely on the font used
- being not proportionally spaced also look OK.
-
- The settings that I use are:
-
- *WimpFont Trinity.Medium
- *WimpFontSize 192 192
- *WimpJustify 1
- *WimpMiscFont 1
-
- (Note the fontsize here is 12pts)
-
- The * commands that select the current settings are saved in the "Desktop Boot
- File" when it is saved from the task manager.
-
- ********************************************************************************
-
- Justification
- -------------
-
- When the justification option is turned on the windowmanager searches through
- all the text it prints in single line icons for those containing key short-cut
- text on the right hand side. As all the text printed is searched for key short-
- cuts, the algorithm is very selective, for example if the key short-cut sequence
- is detected but there is one or more space characters between it and the right
- hand side then the justification is not applied.
- In addition to detecting key short-cuts for right justification, the sequence of
- hard space and then left bracket with any number of spaces between them and the
- right hand side is searched for. This is included to allow the mode menu on the
- palette utility to have the mode description text right justified if the
- messages file is altered to include hard spaces between the mode numbers and the
- descriptions.
- Eg.
-
- ----------------------
- | Mode |
- ----------------------
- | 20 (16 colours) |
- | 21 (256 colours) |
- |€31 (SVGA 16 cols) |
- | |
- ----------------------
-
- Note: a hard space is obtained by pressing the alt and space keys at the same
- time.
-
- ********************************************************************************
-
- OS_Write replacement SWIs
- -------------------------
-
- The module OutlineWimp provides 6 SWIs to replace the main text printing calls
- with ones that use the same outline font as the rest of the desktop.
- They have the same entry and exit conditions and so can directly replace the
- OS_Write calls.
-
- OutlineWimp_WriteC &496C3 replaces OS_WriteC
- OutlineWimp_Write0 &496C4 replaces OS_Write0
- OutlineWimp_WriteN &496C5 replaces OS_WriteN
-
- With these three routines the graphics cursor is advanced to the position it
- would have been if the OS_Write calls were used after the text is printed. (ie.
- the width of the system font is used to move the graphics cursor)
-
-
- OutlineWimp_PWriteC &496C6 replaces OS_WriteC
- OutlineWimp_PWrite0 &496C7 replaces OS_Write0
- OutlineWimp_PWriteN &496C8 replaces OS_WriteN
-
- With these three routines the graphics cursor is advanced to the end of the
- actual text on the screen.
-
- In both cases, only the X position of the graphics cursor is altered, the Y
- position remains the same.
-
- NOTE: The text always has a foreground colour of 7 and a background colour of 1.
- (In this version anyway)
-
- ********************************************************************************
-
- Text and sprite indirected icons with right justified text
- ----------------------------------------------------------
-
- Normally when calculating the length of the text in an icon the WindowManager
- uses the actual length of the outline font characters.
- In certain circumstances, however this does not achieve the correct results. An
- example of this is the "Full info" display by the filer. The filename icons are
- of the type described by the title of this section. As the text is right
- justified the Filer pads the filename out with spaces at the end so that all
- the filenames are ten characters long. With the system font this causes the
- start of the text to line up with each other, however, as the outline font is
- proportionally spaced the starts of the text would no not line up with each
- other. To remedy this problem, the patched WindowManager detects that type of
- icon when calculating the length of the text and uses the length the system
- font would have if it is longer then the actual length of the outline font.
- Thus the starts of the text now line up.
-
- Another program that uses spaces of positioning is !StrongHlp v1.x by Guttorm
- Vik. This formats the text lines by using centred text with spaces added on the
- end to make the start of the lines line up with each other when the system font.
- At the moment I cannot see any way to make the WindowManager format the text
- correctly when a proportionally spaced font is used.
-
- ********************************************************************************
-
- Technical information
- ---------------------
-
- The module OutlineWimp provides a set of SWI calls for use of the patched
- windowmanager and other programs that want to use outline fonts in the desktop.
-
- SWI Chunk number: &496C0
- SWI group prefix: OutlineWimp_ (Both allocated by Acorn)
-
- ===========
-
- SWI &496C0 : OutlineWimp_Fonthandle
-
- On Entry:
- ---
-
- On Exit:
- R0 = fonthandle of current desktop font
-
- Use:
- This call is used by the WindowManager to get the fonthandle of the normal
- desktop font.
-
- ===========
-
- SWI &496C1 : OutlineWimp_KeyShortCut
-
- On Entry:
- ---
-
- On Exit:
- R8 = flags
- bit 0 set => right justification of key short-cuts on
- bit 1 set => replacement of up arrow character on
- bit 2 set => use of font 'WimpMisc' on
- bits 3 - 10 => ASCII value of character used to replace up arrow by
- all other bits reserved
-
- Use:
- This call is used by the WindowManager to obtain the configuration of the
- various features provided.
-
- ===========
-
- SWI &496C2 : OutlineWimp_Configuration
-
- On Entry:
- ---
-
- On Exit:
- R0 = pointer to name of current desktop font
- R1 = fontsize in X direction in units of 1/16th points.
- R2 = fontsize in Y direction in units of 1/16th points.
- R3 = flags
- bit 0 set => right justification of key short-cuts on
- bit 1 set => replacement of up arrow character on
- bit 2 set => use of font 'WimpMisc' on
- bits 3 - 10 => ASCII value of character used to replace up arrow by
- all other bits reserved
-
- Use:
- This call provides information on the current state of the outline font
- WindowManager. It is used by the program !DeskCtrl to find the current
- configuration for the "Desktop Font Setup" window.
-
- ===========
-
- SWI &496C3 : OutlineWimp_WriteC
-
- On Entry:
- R0 = ASCII character to write
-
- On Exit:
- R0 preserved
-
- Use:
- This call writes the character whose ASCII value is in R0 at the current
- graphics cursor position using the current desktop font and then moves the
- cursor on the width of the letter if the system font was used. This SWI can
- be used as a direct replacement to OS_WriteC.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C4 : OutlineWimp_Write0
-
- On Entry:
- R0 = pointer to null terminated string
-
- On Exit:
- R0 preserved
-
- Use:
- This call writes the string whose pointer is in R0 at the current graphics
- cursor position using the current desktop font and then moves the cursor on
- the width of the string if the system font was used. This SWI can be used
- as a direct replacement to OS_Write0.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C5 : OutlineWimp_WriteN
-
- On Entry:
- R0 = pointer to string
- R1 = number of characters to write
-
- On Exit:
- R0 - R1 preserved
-
- Use:
- This call writes the number of specified characters from the string pointed
- to by R0 at the current graphics cursor position using the current desktop
- font and then moves the cursor on the width of the string written if the
- system font was used. This SWI can be used as a direct replacement to
- OS_WriteN.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C6 : OutlineWimp_PWriteC
-
- On Entry:
- R0 = ASCII character to write
-
- On Exit:
- R0 preserved
-
- Use:
- This call writes the character whose ASCII value is in R0 at the current
- graphics cursor position using the current desktop font and then moves the
- cursor on the actual width of the letter. This SWI can be used as a direct
- replacement to OS_WriteC.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C7 : OutlineWimp_PWrite0
-
- On Entry:
- R0 = pointer to null terminated string
-
- On Exit:
- R0 preserved
-
- Use:
- This call writes the string whose pointer is in R0 at the current graphics
- cursor position using the current desktop font and then moves the cursor
- on the actual width of the string. This SWI can be used as a direct
- replacement to OS_Write0.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C8 : OutlineWimp_PWriteN
-
- On Entry:
- R0 = pointer to string
- R1 = number of characters to write
-
- On Exit:
- R0 - R1 preserved
-
- Use:
- This call writes the number of specified characters from the string pointed
- to by R0 at the current graphics cursor position using the current desktop
- font and then moves the cursor on the actual width of the string written.
- SWI can be used as a direct replacement to OS_WriteN.
- The fontcolours are fixed at wimp colour 7 for the foreground and wimp
- colour 1 for the background.
-
- ===========
-
- SWI &496C9 : OutlineWimp_MiscFontHandle
-
- On Entry:
- ---
-
- On Exit:
- R0 = fonthandle of font 'WimpMisc' or 0 if font not used
-
- Use:
- This call is used by the WindowManager to get the fonthandle of the font
- 'WimpMisc' that is used to plot the arrow characters etc.
-
- ********************************************************************************
-
- Contacting the author
- --------------------
-
- I, Andrew Sellors, can be contacted either at
- 57 Boundaries Road
- Feltham
- Middlesex
- TW13 5DR
- England
-
- Or via Internet email at
- asellors@orac2.demon.co.uk
-
- Any feedback from users (bugs reports, requests for new features etc.) is
- gladly received.
-