Home » Archimedes archive » Micro User » MU 1992-08.adf » PD » Utils/!FileTree/FntMenuDoc

Utils/!FileTree/FntMenuDoc

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

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

Tape/disk: Home » Archimedes archive » Micro User » MU 1992-08.adf » PD
Filename: Utils/!FileTree/FntMenuDoc
Read OK:
File size: 3C22 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents

               Documentation for the FontMenu module v.1.06

                             � J.R�ling 1990



                               Introduction

 As more and more outlined fonts for the Archimedes are becoming available,
a problem arrises for applications accessing these fonts. The number of
fonts is not known in advance, so to create a font menu the application has
to figure out the number of fonts, claim enough space to hold a font menu,
and create it. This can be done in the dull single level (straight foreward)
way. This saves some space, and code complexety, but it is not prefered, as
the user will be presented by a sometimes very long menu containing items
with the same prefix, e.g. 

                             Trinity
                             Trinity.Bold
                             Trinity.Bold.Italic
                             Trinity.Medium
                             Trinity.Medium.Italic
                             etc.

 The more fonts become available, the longer this menu becomes, the more
irritating it is. 

 Many applications now are even uncapable of creating menus longer then a
certain amount. Examples of these are !Edit (48 entries), !Draw (64
entries), and even !Impression reacts sick.

 When running more then one application with a font menu, there is arises
another disadvantage of this method. Several applications using a identical
menu structure but not sharing the resource, is not the policy of Acorn on
other subjects. 

 So here is a neat solution for everyone who wants a proper font menu,
without the hassel to create one, and without claiming extra space.

                                                 
                          

                          What does FontMenu do ?

 The FontMenu module is able of creating a multi-level font menu, and lets
every application share the joy. It contains several SWI's to create, and
access this resource. If no application is using the structure anymore
(because they were all quited for example) the memory for the menu structure
will be realesed by FontMenu, so no unnecessary memory is in use. It has no
problems if more than one font directory is in use. The menu is sorted
alphabeticly (even when more than one font directoris are used), so the user
is able to find the required font at an instance. It requires a minimum of
disc access when a new menu is created. New menus are only created if one is
required, and there isn't already a valid one. When a font menu exsists, and
the user has selected a new font directory, the font menu will be rebuild as
soon as the application accesses this font menu. 

 FontMenu creates an multi-leveled font menu. In the example above this is a
menu where 'Trinity' occurs only once, but it will have a submenu containing
two items: 'Bold' and 'Medium'. Because there are two types of
'Trinity.Bold' ('Trinity.Bold' and 'Triniy.Bold.Italic') 'Bold' will have
another submenu. In this submenu the first item will be 'Plain'. This name
is made up, but it is more clear then a empty meny entry. The second entry
will of course be 'Italic'.



                          How does FontMenu work ?

 To use FontMenu it is necessary to understand how the Wimp works, and how
to create a application on the Archimedes environment. It is assumed that
the reader understands the above for the rest of this document.

 When a application wants to access the FontMenu menu structure, it has to
call SWI "FontMenu_Create" before any other FontMenu SWI's are called. This
will assure that a proper font menu structure will be available. This can be
done on initialisation of the application, but is not absolutly necessary.
When exiting the application, SWI "FontMenu_Release" has to be called, so if
this was the only application using the font menu, FontMenu can release the
memory for it. Every time SWI "FontMenu_Create" is called, a counter is
incremented, and if it was zero (this is the initial value), it will create
a new font menu. When calling SWI "FontMenu_Release", the counter is
decremented, and if it reached zero FontMenu will release the menu memory,
as no application is using the menu structure anymore.


 From here on there are two ways of programming when using FontMenu. The
first is the simple one, the second a little bit more complicated, as it
involves the use the Wimp message system.

 The easy way
 ------------
 Whenever the user opens the menu structure of the application by pressing
the MENU button, a call has to be made to FontMenu_Select with R0 pointing
to a point sepearted (zero terminated) font string, and in R1 the value 0 or
1 to tell FontMenu if it allows the user to select the SystemFont. The call
will return with a pointer to the font menu structure in R1. Now it is up to
the programmer what to do with this pointer. When passed in R1 when calling
Wimp_CreateMenu, the menu tree will consist entirely of FontMenu structures.
If the font menu should be a submenu of the applications own menu structure,
the pointer should be put in the submenu-word of the parent menu entry, and
Wimp_CreateMenu should be called with a pointer to the applications own menu
structure.

 When a menu selection was done, the application should determine by the
returned 'menu tree so far' values if the user selected a entry in the font
menu. If so, it should set an internal flag (say 'FontMenuSelected') to
TRUE, else it should set it to FALSE, so later on it is still known if the
user may have selected a new font. After that it should call SWI
"FontMenu_DecodeFontMenu" with R0 pointing to the first menu selection in
the 'menu tree so far' block wich determines the selected font. R1 should
point to a buffer to contain the answer. This buffer must be at least 48
bytes. If on return of this call R0 > 0, the user selected a new font. The
buffer passed in R1 will contain the font name (a point seperated, zero
terminated font string).

 After a menu selction, and taking appropriate actions, the application
should check the mouse button state to see if it has to call SWI
"Wimp_CreateMenu" again. If adjust was used to make the selection, it has to
check  the 'FontMenuSelected' flag to determine if the user selected a font
menu entry. If so, it should call FontMenu_Select as discribed above. This
should be done with R0 pointing to the string FontMenu_DecodeFontMenu
returned. The menu pointer returned by FontMenu_Select has to be put in the
'sub-menu pointer' word of the 'Fonts' entry. Now the call to
Wimp_CreateMenu can be done. In this way it is possible for the user to
click with adjust in the font menu, and keeping the menu on screen after the
selection.

 There is one little drawback of this method. If the user selected a new
!Fonts directory, it will be noted be the FontMenu_Select code, and a new
font menu structure will be generated. This is always the case, also with
the method discribed below. But it could be possible that the user was going
to do something else in the menu, not selecting a font at all. He could for
instance want to quit. Now he (she) has to wait for the FontMenu module to
create the new menu structure, before he (she) is able to access the 'Quit'
entry. So the next solution is to wait with calling FontMenu_Select, until
the user wants to select a new font. This can only be done by making use of
the Wimp message system. The difficult thing of this method (as discribed
later) is that the Wimp is unable to re-open the menu structure entirely
after a menu selection using the ADJUST button. So a little trick has to
solve this problem.

 The hard way
 ------------
 In the applications own menu structure, there should be a menu entry (e.g.
'Fonts') with bit 3 if its menu flags set. The application has to assure
that this bit is set whenever it calls SWI "Wimp_CreateMenu" as it may be
corrupted (see below). So whenever the user puts the pointer above the arrow
on the right of this entry, a warning message (&400C0) will be send by the
Wimp. On receiving of this message, the application should respond by calling
SWI "FontMenu_Select" with R0 pointing to a point sepearted (zero
terminated) font string, and in R1 the value 0 or 1 to tell FontMenu if it
allows the user to select the SystemFont. The font string may be a zero
length string, wich means that no current font is selected. FontMenu will
select the font in its menu structure. If 1 was passed in R1, the first item
in the menu structure will be 'SystemFonts'. In case R1 = 0, this entry will
not be there. This call will return with a pointer to the menu structure in
R1. This pointer should be passed to SWI "Wimp_CreateSubMenu".

 When a menu selection was done, the application should determine by the
returned 'menu tree so far' values if the user selected a entry in the font
menu. If so, it should set an internal flag (say 'FontMenuSelected') to
TRUE, else it should set it to FALSE, so later on it is still known if the
user may have selected a new font. After that it should call SWI
"FontMenu_DecodeFontMenu" with R0 pointing to the first menu selection in
the 'menu tree so far' block wich determines the selected font. R1 should
point to a buffer to contain the answer. This buffer must be at least 48
bytes. If on return of this call R0 > 0, the user selected a new font. The
buffer passed in R1 will contain the font name (a point seperated, zero
terminated font string).

 After a menu selction, and taking appropriate actions, the application
should check the mouse button state to see if it has to call SWI
"Wimp_CreateMenu" again. If adjust was used to make the selection, it has to
check  the 'FontMenuSelected' flag to determine if the user selected a font
menu entry. If so, it should call SWI "FontMenu_Select" as discribed above.
This should be done with R0 pointing to the string SWI
"FontMenu_DecodeFontMenu" returned.  As the MenuWarningFlag in the menu
flags of the menu entry (e.g. 'Fonts') preceding the font menu was set
(phhh!), the Wimp is unable to recreating the whole menu tree automaticly.
So a litle trick has to assure that it will work correct. The menu pointer
returned by SWI "FontMenu_Select" has to be put in the 'sub-menu pointer'
word of the 'Fonts' entry, and the MenuWarningFlag (bit 3) of the menu flags
word of this entry should be cleared. Now the call to SWI "Wimp_CreateMenu"
can be done. In this way it is possible for the user to click with adjust in
the font menu, and keeping the menu on screen after the selection. The next
time the user opens the application menu, the MenuWarningFlag (bit 3) should
be set again, as other applications may have used the font menu in the
meanwhile, and it is necessary that SWI "FontMenu_Select" is called just
before the font menu opens.

 Because it is possible that SWI "FontMenu_Create" takes some time to create
a new menu, it is recomended that there is a SWI "Hourglass_On" before, and
a SWI "Hourglass_Off" after this call. In case of a SWI "FontMenu_Select",
when Font$Path has changed (so a new font menu has to be created), this call
may take some time aswell, so the two Hourglass SWI's should be used here as
well.




                            Notes from the author

 The reason why I wrote this module, is because I'm not only a programmer,
but also a user who likes to work with the Archimedes. This is because it's
a fast machine and because most parts of Risc-OS allow applications to be
very intuitive. I didn't like the way the available fonts were presented in
most applications, so I started to figure out a proper solution: FontMenu.

 I hope that future applications adopt to this method, so please pass it on.
Everybody is free to use it, even in commercial code. The only restriction
is that this document should not be seperated from the FontMenu module, and
that both the module and this document remain unchanged. In case of
commercial use I would like to know this in advance (I could than provide
you with its latest release). My address is at the end of this document. You
can always contact me if you found some bug, or when having other
suggestions.




                                FontMenu SWI's

           Below are the short discriptions of the FontMenu SWI's.
           

FontMenu_Create &8D080
----------------------
On entry: --
On exit : R0 = Number of fonts found

 This will create a font menu structure in RMA, if not already done so. An
error occurs if there is not enough room in RMA to create the menu.



FontMenu_Release &8D081
-----------------------
On entry: --
On exit : --

 This will release the memory taken by the font menu if no tasks are using
it anymore.



FontMenu_Select &8D082
----------------------
On entry: R0 = pointer to point seperated, ctrl terminated font string 
          R1 = SystemFont flag            

On exit : R0 = State flag
          R1 = pointer to font menu structure

 This will tick the font passed in R0 on entry. R1 determines if
'SystemFont' should occur in the menu as follows:

  Value Meaning
    0   'SystemFont' does not occur in the menu
    1   'SystemFont' does occur in the menu
                         
 On exit R0 shows the selection state as follows:

  Value Meaning
    0   To be selected font not found, no ticks
    1   To be selected font found, and ticked  
    2   No font entries found, menu consists one item; 'SystemFont',
        and is ticked
                                                                                  
 R1 will point to the font menu on exit. An error occurs if no font menu exists. 



FontMenu_Deselect &8D083
------------------------
On entry: ---
On exit : --

 This will clear all ticks and marks of the font menu. It is not necessary
to call this SWI before a FontMenu_Select call, as FontMenu_Select will take
care of cleaning up old selection. An error occurs if no font menu exists. 
  
                              

FontMenu_DecodeFontMenu &8D084
------------------------------
On entry: R0 = pointer to a list of font menu selections
          R1 = pointer to a buffer to contain the answer 
               (at least 48 bytes long)
On exit : --

 This will decode the font menu selection into a font string for the
FontManager. This string can be passed back to FontMenu_Select to tick the
appropriate entries. An error occurs if no font menu exists. This call makes
use of Wimp_DecodeMenu, but as it is possible that the returned string ends
with 'Plain' (a made up name to distinguise an empty sub-name from the rest
of the sub-names), it has to check for this, and throw away this last
sub-name so the FontManager can recognise the required font.



FontMenu_Smash &8D085
---------------------
On entry: --
On exit : --

 This will release the font menu memory without looking at the amount of
times FontMenu_Create was called.



FontMenu_ReCreate &8D086
------------------------
On entry: --
On exit : R0 = Number of fonts found

 This will release a existing font menu, and recreate it.



       ===========================================================

                To contact the author of FontMenu, please write to:

                                           Joris R�ling
                                           Verlengde Willemstraat 8a
                                           9725 AW Groningen
                                           The Netherlands

                                Telephone: 050-271895

00000000  0a 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00000010  20 44 6f 63 75 6d 65 6e  74 61 74 69 6f 6e 20 66  | Documentation f|
00000020  6f 72 20 74 68 65 20 46  6f 6e 74 4d 65 6e 75 20  |or the FontMenu |
00000030  6d 6f 64 75 6c 65 20 76  2e 31 2e 30 36 0a 0a 20  |module v.1.06.. |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000050  20 20 20 20 20 20 20 20  20 20 20 20 a9 20 4a 2e  |            . J.|
00000060  52 d6 6c 69 6e 67 20 31  39 39 30 0a 0a 0a 0a 20  |R.ling 1990.... |
00000070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000080  20 20 20 20 20 20 20 20  20 20 20 20 20 20 49 6e  |              In|
00000090  74 72 6f 64 75 63 74 69  6f 6e 0a 0a 20 41 73 20  |troduction.. As |
000000a0  6d 6f 72 65 20 61 6e 64  20 6d 6f 72 65 20 6f 75  |more and more ou|
000000b0  74 6c 69 6e 65 64 20 66  6f 6e 74 73 20 66 6f 72  |tlined fonts for|
000000c0  20 74 68 65 20 41 72 63  68 69 6d 65 64 65 73 20  | the Archimedes |
000000d0  61 72 65 20 62 65 63 6f  6d 69 6e 67 20 61 76 61  |are becoming ava|
000000e0  69 6c 61 62 6c 65 2c 0a  61 20 70 72 6f 62 6c 65  |ilable,.a proble|
000000f0  6d 20 61 72 72 69 73 65  73 20 66 6f 72 20 61 70  |m arrises for ap|
00000100  70 6c 69 63 61 74 69 6f  6e 73 20 61 63 63 65 73  |plications acces|
00000110  73 69 6e 67 20 74 68 65  73 65 20 66 6f 6e 74 73  |sing these fonts|
00000120  2e 20 54 68 65 20 6e 75  6d 62 65 72 20 6f 66 0a  |. The number of.|
00000130  66 6f 6e 74 73 20 69 73  20 6e 6f 74 20 6b 6e 6f  |fonts is not kno|
00000140  77 6e 20 69 6e 20 61 64  76 61 6e 63 65 2c 20 73  |wn in advance, s|
00000150  6f 20 74 6f 20 63 72 65  61 74 65 20 61 20 66 6f  |o to create a fo|
00000160  6e 74 20 6d 65 6e 75 20  74 68 65 20 61 70 70 6c  |nt menu the appl|
00000170  69 63 61 74 69 6f 6e 20  68 61 73 0a 74 6f 20 66  |ication has.to f|
00000180  69 67 75 72 65 20 6f 75  74 20 74 68 65 20 6e 75  |igure out the nu|
00000190  6d 62 65 72 20 6f 66 20  66 6f 6e 74 73 2c 20 63  |mber of fonts, c|
000001a0  6c 61 69 6d 20 65 6e 6f  75 67 68 20 73 70 61 63  |laim enough spac|
000001b0  65 20 74 6f 20 68 6f 6c  64 20 61 20 66 6f 6e 74  |e to hold a font|
000001c0  20 6d 65 6e 75 2c 0a 61  6e 64 20 63 72 65 61 74  | menu,.and creat|
000001d0  65 20 69 74 2e 20 54 68  69 73 20 63 61 6e 20 62  |e it. This can b|
000001e0  65 20 64 6f 6e 65 20 69  6e 20 74 68 65 20 64 75  |e done in the du|
000001f0  6c 6c 20 73 69 6e 67 6c  65 20 6c 65 76 65 6c 20  |ll single level |
00000200  28 73 74 72 61 69 67 68  74 20 66 6f 72 65 77 61  |(straight forewa|
00000210  72 64 29 0a 77 61 79 2e  20 54 68 69 73 20 73 61  |rd).way. This sa|
00000220  76 65 73 20 73 6f 6d 65  20 73 70 61 63 65 2c 20  |ves some space, |
00000230  61 6e 64 20 63 6f 64 65  20 63 6f 6d 70 6c 65 78  |and code complex|
00000240  65 74 79 2c 20 62 75 74  20 69 74 20 69 73 20 6e  |ety, but it is n|
00000250  6f 74 20 70 72 65 66 65  72 65 64 2c 20 61 73 0a  |ot prefered, as.|
00000260  74 68 65 20 75 73 65 72  20 77 69 6c 6c 20 62 65  |the user will be|
00000270  20 70 72 65 73 65 6e 74  65 64 20 62 79 20 61 20  | presented by a |
00000280  73 6f 6d 65 74 69 6d 65  73 20 76 65 72 79 20 6c  |sometimes very l|
00000290  6f 6e 67 20 6d 65 6e 75  20 63 6f 6e 74 61 69 6e  |ong menu contain|
000002a0  69 6e 67 20 69 74 65 6d  73 0a 77 69 74 68 20 74  |ing items.with t|
000002b0  68 65 20 73 61 6d 65 20  70 72 65 66 69 78 2c 20  |he same prefix, |
000002c0  65 2e 67 2e 20 0a 0a 20  20 20 20 20 20 20 20 20  |e.g. ..         |
000002d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002e0  20 20 20 20 54 72 69 6e  69 74 79 0a 20 20 20 20  |    Trinity.    |
000002f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000300  20 20 20 20 20 20 20 20  20 54 72 69 6e 69 74 79  |         Trinity|
00000310  2e 42 6f 6c 64 0a 20 20  20 20 20 20 20 20 20 20  |.Bold.          |
00000320  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000330  20 20 20 54 72 69 6e 69  74 79 2e 42 6f 6c 64 2e  |   Trinity.Bold.|
00000340  49 74 61 6c 69 63 0a 20  20 20 20 20 20 20 20 20  |Italic.         |
00000350  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000360  20 20 20 20 54 72 69 6e  69 74 79 2e 4d 65 64 69  |    Trinity.Medi|
00000370  75 6d 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |um.             |
00000380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000390  54 72 69 6e 69 74 79 2e  4d 65 64 69 75 6d 2e 49  |Trinity.Medium.I|
000003a0  74 61 6c 69 63 0a 20 20  20 20 20 20 20 20 20 20  |talic.          |
000003b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003c0  20 20 20 65 74 63 2e 0a  0a 20 54 68 65 20 6d 6f  |   etc... The mo|
000003d0  72 65 20 66 6f 6e 74 73  20 62 65 63 6f 6d 65 20  |re fonts become |
000003e0  61 76 61 69 6c 61 62 6c  65 2c 20 74 68 65 20 6c  |available, the l|
000003f0  6f 6e 67 65 72 20 74 68  69 73 20 6d 65 6e 75 20  |onger this menu |
00000400  62 65 63 6f 6d 65 73 2c  20 74 68 65 20 6d 6f 72  |becomes, the mor|
00000410  65 0a 69 72 72 69 74 61  74 69 6e 67 20 69 74 20  |e.irritating it |
00000420  69 73 2e 20 0a 0a 20 4d  61 6e 79 20 61 70 70 6c  |is. .. Many appl|
00000430  69 63 61 74 69 6f 6e 73  20 6e 6f 77 20 61 72 65  |ications now are|
00000440  20 65 76 65 6e 20 75 6e  63 61 70 61 62 6c 65 20  | even uncapable |
00000450  6f 66 20 63 72 65 61 74  69 6e 67 20 6d 65 6e 75  |of creating menu|
00000460  73 20 6c 6f 6e 67 65 72  20 74 68 65 6e 20 61 0a  |s longer then a.|
00000470  63 65 72 74 61 69 6e 20  61 6d 6f 75 6e 74 2e 20  |certain amount. |
00000480  45 78 61 6d 70 6c 65 73  20 6f 66 20 74 68 65 73  |Examples of thes|
00000490  65 20 61 72 65 20 21 45  64 69 74 20 28 34 38 20  |e are !Edit (48 |
000004a0  65 6e 74 72 69 65 73 29  2c 20 21 44 72 61 77 20  |entries), !Draw |
000004b0  28 36 34 0a 65 6e 74 72  69 65 73 29 2c 20 61 6e  |(64.entries), an|
000004c0  64 20 65 76 65 6e 20 21  49 6d 70 72 65 73 73 69  |d even !Impressi|
000004d0  6f 6e 20 72 65 61 63 74  73 20 73 69 63 6b 2e 0a  |on reacts sick..|
000004e0  0a 20 57 68 65 6e 20 72  75 6e 6e 69 6e 67 20 6d  |. When running m|
000004f0  6f 72 65 20 74 68 65 6e  20 6f 6e 65 20 61 70 70  |ore then one app|
00000500  6c 69 63 61 74 69 6f 6e  20 77 69 74 68 20 61 20  |lication with a |
00000510  66 6f 6e 74 20 6d 65 6e  75 2c 20 74 68 65 72 65  |font menu, there|
00000520  20 69 73 20 61 72 69 73  65 73 0a 61 6e 6f 74 68  | is arises.anoth|
00000530  65 72 20 64 69 73 61 64  76 61 6e 74 61 67 65 20  |er disadvantage |
00000540  6f 66 20 74 68 69 73 20  6d 65 74 68 6f 64 2e 20  |of this method. |
00000550  53 65 76 65 72 61 6c 20  61 70 70 6c 69 63 61 74  |Several applicat|
00000560  69 6f 6e 73 20 75 73 69  6e 67 20 61 20 69 64 65  |ions using a ide|
00000570  6e 74 69 63 61 6c 0a 6d  65 6e 75 20 73 74 72 75  |ntical.menu stru|
00000580  63 74 75 72 65 20 62 75  74 20 6e 6f 74 20 73 68  |cture but not sh|
00000590  61 72 69 6e 67 20 74 68  65 20 72 65 73 6f 75 72  |aring the resour|
000005a0  63 65 2c 20 69 73 20 6e  6f 74 20 74 68 65 20 70  |ce, is not the p|
000005b0  6f 6c 69 63 79 20 6f 66  20 41 63 6f 72 6e 20 6f  |olicy of Acorn o|
000005c0  6e 0a 6f 74 68 65 72 20  73 75 62 6a 65 63 74 73  |n.other subjects|
000005d0  2e 20 0a 0a 20 53 6f 20  68 65 72 65 20 69 73 20  |. .. So here is |
000005e0  61 20 6e 65 61 74 20 73  6f 6c 75 74 69 6f 6e 20  |a neat solution |
000005f0  66 6f 72 20 65 76 65 72  79 6f 6e 65 20 77 68 6f  |for everyone who|
00000600  20 77 61 6e 74 73 20 61  20 70 72 6f 70 65 72 20  | wants a proper |
00000610  66 6f 6e 74 20 6d 65 6e  75 2c 0a 77 69 74 68 6f  |font menu,.witho|
00000620  75 74 20 74 68 65 20 68  61 73 73 65 6c 20 74 6f  |ut the hassel to|
00000630  20 63 72 65 61 74 65 20  6f 6e 65 2c 20 61 6e 64  | create one, and|
00000640  20 77 69 74 68 6f 75 74  20 63 6c 61 69 6d 69 6e  | without claimin|
00000650  67 20 65 78 74 72 61 20  73 70 61 63 65 2e 0a 0a  |g extra space...|
00000660  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000690  20 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | .              |
000006a0  20 20 20 20 20 20 20 20  20 20 20 20 0a 0a 20 20  |            ..  |
000006b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006c0  20 20 20 20 20 20 20 20  57 68 61 74 20 64 6f 65  |        What doe|
000006d0  73 20 46 6f 6e 74 4d 65  6e 75 20 64 6f 20 3f 0a  |s FontMenu do ?.|
000006e0  0a 20 54 68 65 20 46 6f  6e 74 4d 65 6e 75 20 6d  |. The FontMenu m|
000006f0  6f 64 75 6c 65 20 69 73  20 61 62 6c 65 20 6f 66  |odule is able of|
00000700  20 63 72 65 61 74 69 6e  67 20 61 20 6d 75 6c 74  | creating a mult|
00000710  69 2d 6c 65 76 65 6c 20  66 6f 6e 74 20 6d 65 6e  |i-level font men|
00000720  75 2c 20 61 6e 64 20 6c  65 74 73 0a 65 76 65 72  |u, and lets.ever|
00000730  79 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 73 68  |y application sh|
00000740  61 72 65 20 74 68 65 20  6a 6f 79 2e 20 49 74 20  |are the joy. It |
00000750  63 6f 6e 74 61 69 6e 73  20 73 65 76 65 72 61 6c  |contains several|
00000760  20 53 57 49 27 73 20 74  6f 20 63 72 65 61 74 65  | SWI's to create|
00000770  2c 20 61 6e 64 0a 61 63  63 65 73 73 20 74 68 69  |, and.access thi|
00000780  73 20 72 65 73 6f 75 72  63 65 2e 20 49 66 20 6e  |s resource. If n|
00000790  6f 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 69 73  |o application is|
000007a0  20 75 73 69 6e 67 20 74  68 65 20 73 74 72 75 63  | using the struc|
000007b0  74 75 72 65 20 61 6e 79  6d 6f 72 65 0a 28 62 65  |ture anymore.(be|
000007c0  63 61 75 73 65 20 74 68  65 79 20 77 65 72 65 20  |cause they were |
000007d0  61 6c 6c 20 71 75 69 74  65 64 20 66 6f 72 20 65  |all quited for e|
000007e0  78 61 6d 70 6c 65 29 20  74 68 65 20 6d 65 6d 6f  |xample) the memo|
000007f0  72 79 20 66 6f 72 20 74  68 65 20 6d 65 6e 75 20  |ry for the menu |
00000800  73 74 72 75 63 74 75 72  65 0a 77 69 6c 6c 20 62  |structure.will b|
00000810  65 20 72 65 61 6c 65 73  65 64 20 62 79 20 46 6f  |e realesed by Fo|
00000820  6e 74 4d 65 6e 75 2c 20  73 6f 20 6e 6f 20 75 6e  |ntMenu, so no un|
00000830  6e 65 63 65 73 73 61 72  79 20 6d 65 6d 6f 72 79  |necessary memory|
00000840  20 69 73 20 69 6e 20 75  73 65 2e 20 49 74 20 68  | is in use. It h|
00000850  61 73 20 6e 6f 0a 70 72  6f 62 6c 65 6d 73 20 69  |as no.problems i|
00000860  66 20 6d 6f 72 65 20 74  68 61 6e 20 6f 6e 65 20  |f more than one |
00000870  66 6f 6e 74 20 64 69 72  65 63 74 6f 72 79 20 69  |font directory i|
00000880  73 20 69 6e 20 75 73 65  2e 20 54 68 65 20 6d 65  |s in use. The me|
00000890  6e 75 20 69 73 20 73 6f  72 74 65 64 0a 61 6c 70  |nu is sorted.alp|
000008a0  68 61 62 65 74 69 63 6c  79 20 28 65 76 65 6e 20  |habeticly (even |
000008b0  77 68 65 6e 20 6d 6f 72  65 20 74 68 61 6e 20 6f  |when more than o|
000008c0  6e 65 20 66 6f 6e 74 20  64 69 72 65 63 74 6f 72  |ne font director|
000008d0  69 73 20 61 72 65 20 75  73 65 64 29 2c 20 73 6f  |is are used), so|
000008e0  20 74 68 65 20 75 73 65  72 0a 69 73 20 61 62 6c  | the user.is abl|
000008f0  65 20 74 6f 20 66 69 6e  64 20 74 68 65 20 72 65  |e to find the re|
00000900  71 75 69 72 65 64 20 66  6f 6e 74 20 61 74 20 61  |quired font at a|
00000910  6e 20 69 6e 73 74 61 6e  63 65 2e 20 49 74 20 72  |n instance. It r|
00000920  65 71 75 69 72 65 73 20  61 20 6d 69 6e 69 6d 75  |equires a minimu|
00000930  6d 20 6f 66 0a 64 69 73  63 20 61 63 63 65 73 73  |m of.disc access|
00000940  20 77 68 65 6e 20 61 20  6e 65 77 20 6d 65 6e 75  | when a new menu|
00000950  20 69 73 20 63 72 65 61  74 65 64 2e 20 4e 65 77  | is created. New|
00000960  20 6d 65 6e 75 73 20 61  72 65 20 6f 6e 6c 79 20  | menus are only |
00000970  63 72 65 61 74 65 64 20  69 66 20 6f 6e 65 20 69  |created if one i|
00000980  73 0a 72 65 71 75 69 72  65 64 2c 20 61 6e 64 20  |s.required, and |
00000990  74 68 65 72 65 20 69 73  6e 27 74 20 61 6c 72 65  |there isn't alre|
000009a0  61 64 79 20 61 20 76 61  6c 69 64 20 6f 6e 65 2e  |ady a valid one.|
000009b0  20 57 68 65 6e 20 61 20  66 6f 6e 74 20 6d 65 6e  | When a font men|
000009c0  75 20 65 78 73 69 73 74  73 2c 20 61 6e 64 0a 74  |u exsists, and.t|
000009d0  68 65 20 75 73 65 72 20  68 61 73 20 73 65 6c 65  |he user has sele|
000009e0  63 74 65 64 20 61 20 6e  65 77 20 66 6f 6e 74 20  |cted a new font |
000009f0  64 69 72 65 63 74 6f 72  79 2c 20 74 68 65 20 66  |directory, the f|
00000a00  6f 6e 74 20 6d 65 6e 75  20 77 69 6c 6c 20 62 65  |ont menu will be|
00000a10  20 72 65 62 75 69 6c 64  20 61 73 0a 73 6f 6f 6e  | rebuild as.soon|
00000a20  20 61 73 20 74 68 65 20  61 70 70 6c 69 63 61 74  | as the applicat|
00000a30  69 6f 6e 20 61 63 63 65  73 73 65 73 20 74 68 69  |ion accesses thi|
00000a40  73 20 66 6f 6e 74 20 6d  65 6e 75 2e 20 0a 0a 20  |s font menu. .. |
00000a50  46 6f 6e 74 4d 65 6e 75  20 63 72 65 61 74 65 73  |FontMenu creates|
00000a60  20 61 6e 20 6d 75 6c 74  69 2d 6c 65 76 65 6c 65  | an multi-levele|
00000a70  64 20 66 6f 6e 74 20 6d  65 6e 75 2e 20 49 6e 20  |d font menu. In |
00000a80  74 68 65 20 65 78 61 6d  70 6c 65 20 61 62 6f 76  |the example abov|
00000a90  65 20 74 68 69 73 20 69  73 20 61 0a 6d 65 6e 75  |e this is a.menu|
00000aa0  20 77 68 65 72 65 20 27  54 72 69 6e 69 74 79 27  | where 'Trinity'|
00000ab0  20 6f 63 63 75 72 73 20  6f 6e 6c 79 20 6f 6e 63  | occurs only onc|
00000ac0  65 2c 20 62 75 74 20 69  74 20 77 69 6c 6c 20 68  |e, but it will h|
00000ad0  61 76 65 20 61 20 73 75  62 6d 65 6e 75 20 63 6f  |ave a submenu co|
00000ae0  6e 74 61 69 6e 69 6e 67  0a 74 77 6f 20 69 74 65  |ntaining.two ite|
00000af0  6d 73 3a 20 27 42 6f 6c  64 27 20 61 6e 64 20 27  |ms: 'Bold' and '|
00000b00  4d 65 64 69 75 6d 27 2e  20 42 65 63 61 75 73 65  |Medium'. Because|
00000b10  20 74 68 65 72 65 20 61  72 65 20 74 77 6f 20 74  | there are two t|
00000b20  79 70 65 73 20 6f 66 0a  27 54 72 69 6e 69 74 79  |ypes of.'Trinity|
00000b30  2e 42 6f 6c 64 27 20 28  27 54 72 69 6e 69 74 79  |.Bold' ('Trinity|
00000b40  2e 42 6f 6c 64 27 20 61  6e 64 20 27 54 72 69 6e  |.Bold' and 'Trin|
00000b50  69 79 2e 42 6f 6c 64 2e  49 74 61 6c 69 63 27 29  |iy.Bold.Italic')|
00000b60  20 27 42 6f 6c 64 27 20  77 69 6c 6c 20 68 61 76  | 'Bold' will hav|
00000b70  65 0a 61 6e 6f 74 68 65  72 20 73 75 62 6d 65 6e  |e.another submen|
00000b80  75 2e 20 49 6e 20 74 68  69 73 20 73 75 62 6d 65  |u. In this subme|
00000b90  6e 75 20 74 68 65 20 66  69 72 73 74 20 69 74 65  |nu the first ite|
00000ba0  6d 20 77 69 6c 6c 20 62  65 20 27 50 6c 61 69 6e  |m will be 'Plain|
00000bb0  27 2e 20 54 68 69 73 20  6e 61 6d 65 0a 69 73 20  |'. This name.is |
00000bc0  6d 61 64 65 20 75 70 2c  20 62 75 74 20 69 74 20  |made up, but it |
00000bd0  69 73 20 6d 6f 72 65 20  63 6c 65 61 72 20 74 68  |is more clear th|
00000be0  65 6e 20 61 20 65 6d 70  74 79 20 6d 65 6e 79 20  |en a empty meny |
00000bf0  65 6e 74 72 79 2e 20 54  68 65 20 73 65 63 6f 6e  |entry. The secon|
00000c00  64 20 65 6e 74 72 79 0a  77 69 6c 6c 20 6f 66 20  |d entry.will of |
00000c10  63 6f 75 72 73 65 20 62  65 20 27 49 74 61 6c 69  |course be 'Itali|
00000c20  63 27 2e 0a 0a 0a 0a 20  20 20 20 20 20 20 20 20  |c'.....         |
00000c30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000c40  20 48 6f 77 20 64 6f 65  73 20 46 6f 6e 74 4d 65  | How does FontMe|
00000c50  6e 75 20 77 6f 72 6b 20  3f 0a 0a 20 54 6f 20 75  |nu work ?.. To u|
00000c60  73 65 20 46 6f 6e 74 4d  65 6e 75 20 69 74 20 69  |se FontMenu it i|
00000c70  73 20 6e 65 63 65 73 73  61 72 79 20 74 6f 20 75  |s necessary to u|
00000c80  6e 64 65 72 73 74 61 6e  64 20 68 6f 77 20 74 68  |nderstand how th|
00000c90  65 20 57 69 6d 70 20 77  6f 72 6b 73 2c 20 61 6e  |e Wimp works, an|
00000ca0  64 20 68 6f 77 0a 74 6f  20 63 72 65 61 74 65 20  |d how.to create |
00000cb0  61 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 6f 6e  |a application on|
00000cc0  20 74 68 65 20 41 72 63  68 69 6d 65 64 65 73 20  | the Archimedes |
00000cd0  65 6e 76 69 72 6f 6e 6d  65 6e 74 2e 20 49 74 20  |environment. It |
00000ce0  69 73 20 61 73 73 75 6d  65 64 20 74 68 61 74 0a  |is assumed that.|
00000cf0  74 68 65 20 72 65 61 64  65 72 20 75 6e 64 65 72  |the reader under|
00000d00  73 74 61 6e 64 73 20 74  68 65 20 61 62 6f 76 65  |stands the above|
00000d10  20 66 6f 72 20 74 68 65  20 72 65 73 74 20 6f 66  | for the rest of|
00000d20  20 74 68 69 73 20 64 6f  63 75 6d 65 6e 74 2e 0a  | this document..|
00000d30  0a 20 57 68 65 6e 20 61  20 61 70 70 6c 69 63 61  |. When a applica|
00000d40  74 69 6f 6e 20 77 61 6e  74 73 20 74 6f 20 61 63  |tion wants to ac|
00000d50  63 65 73 73 20 74 68 65  20 46 6f 6e 74 4d 65 6e  |cess the FontMen|
00000d60  75 20 6d 65 6e 75 20 73  74 72 75 63 74 75 72 65  |u menu structure|
00000d70  2c 20 69 74 20 68 61 73  20 74 6f 0a 63 61 6c 6c  |, it has to.call|
00000d80  20 53 57 49 20 22 46 6f  6e 74 4d 65 6e 75 5f 43  | SWI "FontMenu_C|
00000d90  72 65 61 74 65 22 20 62  65 66 6f 72 65 20 61 6e  |reate" before an|
00000da0  79 20 6f 74 68 65 72 20  46 6f 6e 74 4d 65 6e 75  |y other FontMenu|
00000db0  20 53 57 49 27 73 20 61  72 65 20 63 61 6c 6c 65  | SWI's are calle|
00000dc0  64 2e 20 54 68 69 73 0a  77 69 6c 6c 20 61 73 73  |d. This.will ass|
00000dd0  75 72 65 20 74 68 61 74  20 61 20 70 72 6f 70 65  |ure that a prope|
00000de0  72 20 66 6f 6e 74 20 6d  65 6e 75 20 73 74 72 75  |r font menu stru|
00000df0  63 74 75 72 65 20 77 69  6c 6c 20 62 65 20 61 76  |cture will be av|
00000e00  61 69 6c 61 62 6c 65 2e  20 54 68 69 73 20 63 61  |ailable. This ca|
00000e10  6e 20 62 65 0a 64 6f 6e  65 20 6f 6e 20 69 6e 69  |n be.done on ini|
00000e20  74 69 61 6c 69 73 61 74  69 6f 6e 20 6f 66 20 74  |tialisation of t|
00000e30  68 65 20 61 70 70 6c 69  63 61 74 69 6f 6e 2c 20  |he application, |
00000e40  62 75 74 20 69 73 20 6e  6f 74 20 61 62 73 6f 6c  |but is not absol|
00000e50  75 74 6c 79 20 6e 65 63  65 73 73 61 72 79 2e 0a  |utly necessary..|
00000e60  57 68 65 6e 20 65 78 69  74 69 6e 67 20 74 68 65  |When exiting the|
00000e70  20 61 70 70 6c 69 63 61  74 69 6f 6e 2c 20 53 57  | application, SW|
00000e80  49 20 22 46 6f 6e 74 4d  65 6e 75 5f 52 65 6c 65  |I "FontMenu_Rele|
00000e90  61 73 65 22 20 68 61 73  20 74 6f 20 62 65 20 63  |ase" has to be c|
00000ea0  61 6c 6c 65 64 2c 20 73  6f 20 69 66 0a 74 68 69  |alled, so if.thi|
00000eb0  73 20 77 61 73 20 74 68  65 20 6f 6e 6c 79 20 61  |s was the only a|
00000ec0  70 70 6c 69 63 61 74 69  6f 6e 20 75 73 69 6e 67  |pplication using|
00000ed0  20 74 68 65 20 66 6f 6e  74 20 6d 65 6e 75 2c 20  | the font menu, |
00000ee0  46 6f 6e 74 4d 65 6e 75  20 63 61 6e 20 72 65 6c  |FontMenu can rel|
00000ef0  65 61 73 65 20 74 68 65  0a 6d 65 6d 6f 72 79 20  |ease the.memory |
00000f00  66 6f 72 20 69 74 2e 20  45 76 65 72 79 20 74 69  |for it. Every ti|
00000f10  6d 65 20 53 57 49 20 22  46 6f 6e 74 4d 65 6e 75  |me SWI "FontMenu|
00000f20  5f 43 72 65 61 74 65 22  20 69 73 20 63 61 6c 6c  |_Create" is call|
00000f30  65 64 2c 20 61 20 63 6f  75 6e 74 65 72 20 69 73  |ed, a counter is|
00000f40  0a 69 6e 63 72 65 6d 65  6e 74 65 64 2c 20 61 6e  |.incremented, an|
00000f50  64 20 69 66 20 69 74 20  77 61 73 20 7a 65 72 6f  |d if it was zero|
00000f60  20 28 74 68 69 73 20 69  73 20 74 68 65 20 69 6e  | (this is the in|
00000f70  69 74 69 61 6c 20 76 61  6c 75 65 29 2c 20 69 74  |itial value), it|
00000f80  20 77 69 6c 6c 20 63 72  65 61 74 65 0a 61 20 6e  | will create.a n|
00000f90  65 77 20 66 6f 6e 74 20  6d 65 6e 75 2e 20 57 68  |ew font menu. Wh|
00000fa0  65 6e 20 63 61 6c 6c 69  6e 67 20 53 57 49 20 22  |en calling SWI "|
00000fb0  46 6f 6e 74 4d 65 6e 75  5f 52 65 6c 65 61 73 65  |FontMenu_Release|
00000fc0  22 2c 20 74 68 65 20 63  6f 75 6e 74 65 72 20 69  |", the counter i|
00000fd0  73 0a 64 65 63 72 65 6d  65 6e 74 65 64 2c 20 61  |s.decremented, a|
00000fe0  6e 64 20 69 66 20 69 74  20 72 65 61 63 68 65 64  |nd if it reached|
00000ff0  20 7a 65 72 6f 20 46 6f  6e 74 4d 65 6e 75 20 77  | zero FontMenu w|
00001000  69 6c 6c 20 72 65 6c 65  61 73 65 20 74 68 65 20  |ill release the |
00001010  6d 65 6e 75 20 6d 65 6d  6f 72 79 2c 0a 61 73 20  |menu memory,.as |
00001020  6e 6f 20 61 70 70 6c 69  63 61 74 69 6f 6e 20 69  |no application i|
00001030  73 20 75 73 69 6e 67 20  74 68 65 20 6d 65 6e 75  |s using the menu|
00001040  20 73 74 72 75 63 74 75  72 65 20 61 6e 79 6d 6f  | structure anymo|
00001050  72 65 2e 0a 0a 0a 20 46  72 6f 6d 20 68 65 72 65  |re.... From here|
00001060  20 6f 6e 20 74 68 65 72  65 20 61 72 65 20 74 77  | on there are tw|
00001070  6f 20 77 61 79 73 20 6f  66 20 70 72 6f 67 72 61  |o ways of progra|
00001080  6d 6d 69 6e 67 20 77 68  65 6e 20 75 73 69 6e 67  |mming when using|
00001090  20 46 6f 6e 74 4d 65 6e  75 2e 20 54 68 65 0a 66  | FontMenu. The.f|
000010a0  69 72 73 74 20 69 73 20  74 68 65 20 73 69 6d 70  |irst is the simp|
000010b0  6c 65 20 6f 6e 65 2c 20  74 68 65 20 73 65 63 6f  |le one, the seco|
000010c0  6e 64 20 61 20 6c 69 74  74 6c 65 20 62 69 74 20  |nd a little bit |
000010d0  6d 6f 72 65 20 63 6f 6d  70 6c 69 63 61 74 65 64  |more complicated|
000010e0  2c 20 61 73 20 69 74 0a  69 6e 76 6f 6c 76 65 73  |, as it.involves|
000010f0  20 74 68 65 20 75 73 65  20 74 68 65 20 57 69 6d  | the use the Wim|
00001100  70 20 6d 65 73 73 61 67  65 20 73 79 73 74 65 6d  |p message system|
00001110  2e 0a 0a 20 54 68 65 20  65 61 73 79 20 77 61 79  |... The easy way|
00001120  0a 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 20  |. ------------. |
00001130  57 68 65 6e 65 76 65 72  20 74 68 65 20 75 73 65  |Whenever the use|
00001140  72 20 6f 70 65 6e 73 20  74 68 65 20 6d 65 6e 75  |r opens the menu|
00001150  20 73 74 72 75 63 74 75  72 65 20 6f 66 20 74 68  | structure of th|
00001160  65 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 62 79  |e application by|
00001170  20 70 72 65 73 73 69 6e  67 0a 74 68 65 20 4d 45  | pressing.the ME|
00001180  4e 55 20 62 75 74 74 6f  6e 2c 20 61 20 63 61 6c  |NU button, a cal|
00001190  6c 20 68 61 73 20 74 6f  20 62 65 20 6d 61 64 65  |l has to be made|
000011a0  20 74 6f 20 46 6f 6e 74  4d 65 6e 75 5f 53 65 6c  | to FontMenu_Sel|
000011b0  65 63 74 20 77 69 74 68  20 52 30 20 70 6f 69 6e  |ect with R0 poin|
000011c0  74 69 6e 67 0a 74 6f 20  61 20 70 6f 69 6e 74 20  |ting.to a point |
000011d0  73 65 70 65 61 72 74 65  64 20 28 7a 65 72 6f 20  |sepearted (zero |
000011e0  74 65 72 6d 69 6e 61 74  65 64 29 20 66 6f 6e 74  |terminated) font|
000011f0  20 73 74 72 69 6e 67 2c  20 61 6e 64 20 69 6e 20  | string, and in |
00001200  52 31 20 74 68 65 20 76  61 6c 75 65 20 30 20 6f  |R1 the value 0 o|
00001210  72 0a 31 20 74 6f 20 74  65 6c 6c 20 46 6f 6e 74  |r.1 to tell Font|
00001220  4d 65 6e 75 20 69 66 20  69 74 20 61 6c 6c 6f 77  |Menu if it allow|
00001230  73 20 74 68 65 20 75 73  65 72 20 74 6f 20 73 65  |s the user to se|
00001240  6c 65 63 74 20 74 68 65  20 53 79 73 74 65 6d 46  |lect the SystemF|
00001250  6f 6e 74 2e 20 54 68 65  20 63 61 6c 6c 0a 77 69  |ont. The call.wi|
00001260  6c 6c 20 72 65 74 75 72  6e 20 77 69 74 68 20 61  |ll return with a|
00001270  20 70 6f 69 6e 74 65 72  20 74 6f 20 74 68 65 20  | pointer to the |
00001280  66 6f 6e 74 20 6d 65 6e  75 20 73 74 72 75 63 74  |font menu struct|
00001290  75 72 65 20 69 6e 20 52  31 2e 20 4e 6f 77 20 69  |ure in R1. Now i|
000012a0  74 20 69 73 20 75 70 20  74 6f 0a 74 68 65 20 70  |t is up to.the p|
000012b0  72 6f 67 72 61 6d 6d 65  72 20 77 68 61 74 20 74  |rogrammer what t|
000012c0  6f 20 64 6f 20 77 69 74  68 20 74 68 69 73 20 70  |o do with this p|
000012d0  6f 69 6e 74 65 72 2e 20  57 68 65 6e 20 70 61 73  |ointer. When pas|
000012e0  73 65 64 20 69 6e 20 52  31 20 77 68 65 6e 20 63  |sed in R1 when c|
000012f0  61 6c 6c 69 6e 67 0a 57  69 6d 70 5f 43 72 65 61  |alling.Wimp_Crea|
00001300  74 65 4d 65 6e 75 2c 20  74 68 65 20 6d 65 6e 75  |teMenu, the menu|
00001310  20 74 72 65 65 20 77 69  6c 6c 20 63 6f 6e 73 69  | tree will consi|
00001320  73 74 20 65 6e 74 69 72  65 6c 79 20 6f 66 20 46  |st entirely of F|
00001330  6f 6e 74 4d 65 6e 75 20  73 74 72 75 63 74 75 72  |ontMenu structur|
00001340  65 73 2e 0a 49 66 20 74  68 65 20 66 6f 6e 74 20  |es..If the font |
00001350  6d 65 6e 75 20 73 68 6f  75 6c 64 20 62 65 20 61  |menu should be a|
00001360  20 73 75 62 6d 65 6e 75  20 6f 66 20 74 68 65 20  | submenu of the |
00001370  61 70 70 6c 69 63 61 74  69 6f 6e 73 20 6f 77 6e  |applications own|
00001380  20 6d 65 6e 75 20 73 74  72 75 63 74 75 72 65 2c  | menu structure,|
00001390  0a 74 68 65 20 70 6f 69  6e 74 65 72 20 73 68 6f  |.the pointer sho|
000013a0  75 6c 64 20 62 65 20 70  75 74 20 69 6e 20 74 68  |uld be put in th|
000013b0  65 20 73 75 62 6d 65 6e  75 2d 77 6f 72 64 20 6f  |e submenu-word o|
000013c0  66 20 74 68 65 20 70 61  72 65 6e 74 20 6d 65 6e  |f the parent men|
000013d0  75 20 65 6e 74 72 79 2c  20 61 6e 64 0a 57 69 6d  |u entry, and.Wim|
000013e0  70 5f 43 72 65 61 74 65  4d 65 6e 75 20 73 68 6f  |p_CreateMenu sho|
000013f0  75 6c 64 20 62 65 20 63  61 6c 6c 65 64 20 77 69  |uld be called wi|
00001400  74 68 20 61 20 70 6f 69  6e 74 65 72 20 74 6f 20  |th a pointer to |
00001410  74 68 65 20 61 70 70 6c  69 63 61 74 69 6f 6e 73  |the applications|
00001420  20 6f 77 6e 20 6d 65 6e  75 0a 73 74 72 75 63 74  | own menu.struct|
00001430  75 72 65 2e 0a 0a 20 57  68 65 6e 20 61 20 6d 65  |ure... When a me|
00001440  6e 75 20 73 65 6c 65 63  74 69 6f 6e 20 77 61 73  |nu selection was|
00001450  20 64 6f 6e 65 2c 20 74  68 65 20 61 70 70 6c 69  | done, the appli|
00001460  63 61 74 69 6f 6e 20 73  68 6f 75 6c 64 20 64 65  |cation should de|
00001470  74 65 72 6d 69 6e 65 20  62 79 20 74 68 65 0a 72  |termine by the.r|
00001480  65 74 75 72 6e 65 64 20  27 6d 65 6e 75 20 74 72  |eturned 'menu tr|
00001490  65 65 20 73 6f 20 66 61  72 27 20 76 61 6c 75 65  |ee so far' value|
000014a0  73 20 69 66 20 74 68 65  20 75 73 65 72 20 73 65  |s if the user se|
000014b0  6c 65 63 74 65 64 20 61  20 65 6e 74 72 79 20 69  |lected a entry i|
000014c0  6e 20 74 68 65 20 66 6f  6e 74 0a 6d 65 6e 75 2e  |n the font.menu.|
000014d0  20 49 66 20 73 6f 2c 20  69 74 20 73 68 6f 75 6c  | If so, it shoul|
000014e0  64 20 73 65 74 20 61 6e  20 69 6e 74 65 72 6e 61  |d set an interna|
000014f0  6c 20 66 6c 61 67 20 28  73 61 79 20 27 46 6f 6e  |l flag (say 'Fon|
00001500  74 4d 65 6e 75 53 65 6c  65 63 74 65 64 27 29 20  |tMenuSelected') |
00001510  74 6f 0a 54 52 55 45 2c  20 65 6c 73 65 20 69 74  |to.TRUE, else it|
00001520  20 73 68 6f 75 6c 64 20  73 65 74 20 69 74 20 74  | should set it t|
00001530  6f 20 46 41 4c 53 45 2c  20 73 6f 20 6c 61 74 65  |o FALSE, so late|
00001540  72 20 6f 6e 20 69 74 20  69 73 20 73 74 69 6c 6c  |r on it is still|
00001550  20 6b 6e 6f 77 6e 20 69  66 20 74 68 65 0a 75 73  | known if the.us|
00001560  65 72 20 6d 61 79 20 68  61 76 65 20 73 65 6c 65  |er may have sele|
00001570  63 74 65 64 20 61 20 6e  65 77 20 66 6f 6e 74 2e  |cted a new font.|
00001580  20 41 66 74 65 72 20 74  68 61 74 20 69 74 20 73  | After that it s|
00001590  68 6f 75 6c 64 20 63 61  6c 6c 20 53 57 49 0a 22  |hould call SWI."|
000015a0  46 6f 6e 74 4d 65 6e 75  5f 44 65 63 6f 64 65 46  |FontMenu_DecodeF|
000015b0  6f 6e 74 4d 65 6e 75 22  20 77 69 74 68 20 52 30  |ontMenu" with R0|
000015c0  20 70 6f 69 6e 74 69 6e  67 20 74 6f 20 74 68 65  | pointing to the|
000015d0  20 66 69 72 73 74 20 6d  65 6e 75 20 73 65 6c 65  | first menu sele|
000015e0  63 74 69 6f 6e 20 69 6e  0a 74 68 65 20 27 6d 65  |ction in.the 'me|
000015f0  6e 75 20 74 72 65 65 20  73 6f 20 66 61 72 27 20  |nu tree so far' |
00001600  62 6c 6f 63 6b 20 77 69  63 68 20 64 65 74 65 72  |block wich deter|
00001610  6d 69 6e 65 73 20 74 68  65 20 73 65 6c 65 63 74  |mines the select|
00001620  65 64 20 66 6f 6e 74 2e  20 52 31 20 73 68 6f 75  |ed font. R1 shou|
00001630  6c 64 0a 70 6f 69 6e 74  20 74 6f 20 61 20 62 75  |ld.point to a bu|
00001640  66 66 65 72 20 74 6f 20  63 6f 6e 74 61 69 6e 20  |ffer to contain |
00001650  74 68 65 20 61 6e 73 77  65 72 2e 20 54 68 69 73  |the answer. This|
00001660  20 62 75 66 66 65 72 20  6d 75 73 74 20 62 65 20  | buffer must be |
00001670  61 74 20 6c 65 61 73 74  20 34 38 0a 62 79 74 65  |at least 48.byte|
00001680  73 2e 20 49 66 20 6f 6e  20 72 65 74 75 72 6e 20  |s. If on return |
00001690  6f 66 20 74 68 69 73 20  63 61 6c 6c 20 52 30 20  |of this call R0 |
000016a0  3e 20 30 2c 20 74 68 65  20 75 73 65 72 20 73 65  |> 0, the user se|
000016b0  6c 65 63 74 65 64 20 61  20 6e 65 77 20 66 6f 6e  |lected a new fon|
000016c0  74 2e 20 54 68 65 0a 62  75 66 66 65 72 20 70 61  |t. The.buffer pa|
000016d0  73 73 65 64 20 69 6e 20  52 31 20 77 69 6c 6c 20  |ssed in R1 will |
000016e0  63 6f 6e 74 61 69 6e 20  74 68 65 20 66 6f 6e 74  |contain the font|
000016f0  20 6e 61 6d 65 20 28 61  20 70 6f 69 6e 74 20 73  | name (a point s|
00001700  65 70 65 72 61 74 65 64  2c 20 7a 65 72 6f 0a 74  |eperated, zero.t|
00001710  65 72 6d 69 6e 61 74 65  64 20 66 6f 6e 74 20 73  |erminated font s|
00001720  74 72 69 6e 67 29 2e 0a  0a 20 41 66 74 65 72 20  |tring)... After |
00001730  61 20 6d 65 6e 75 20 73  65 6c 63 74 69 6f 6e 2c  |a menu selction,|
00001740  20 61 6e 64 20 74 61 6b  69 6e 67 20 61 70 70 72  | and taking appr|
00001750  6f 70 72 69 61 74 65 20  61 63 74 69 6f 6e 73 2c  |opriate actions,|
00001760  20 74 68 65 20 61 70 70  6c 69 63 61 74 69 6f 6e  | the application|
00001770  0a 73 68 6f 75 6c 64 20  63 68 65 63 6b 20 74 68  |.should check th|
00001780  65 20 6d 6f 75 73 65 20  62 75 74 74 6f 6e 20 73  |e mouse button s|
00001790  74 61 74 65 20 74 6f 20  73 65 65 20 69 66 20 69  |tate to see if i|
000017a0  74 20 68 61 73 20 74 6f  20 63 61 6c 6c 20 53 57  |t has to call SW|
000017b0  49 0a 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |I."Wimp_CreateMe|
000017c0  6e 75 22 20 61 67 61 69  6e 2e 20 49 66 20 61 64  |nu" again. If ad|
000017d0  6a 75 73 74 20 77 61 73  20 75 73 65 64 20 74 6f  |just was used to|
000017e0  20 6d 61 6b 65 20 74 68  65 20 73 65 6c 65 63 74  | make the select|
000017f0  69 6f 6e 2c 20 69 74 20  68 61 73 20 74 6f 0a 63  |ion, it has to.c|
00001800  68 65 63 6b 20 20 74 68  65 20 27 46 6f 6e 74 4d  |heck  the 'FontM|
00001810  65 6e 75 53 65 6c 65 63  74 65 64 27 20 66 6c 61  |enuSelected' fla|
00001820  67 20 74 6f 20 64 65 74  65 72 6d 69 6e 65 20 69  |g to determine i|
00001830  66 20 74 68 65 20 75 73  65 72 20 73 65 6c 65 63  |f the user selec|
00001840  74 65 64 20 61 20 66 6f  6e 74 0a 6d 65 6e 75 20  |ted a font.menu |
00001850  65 6e 74 72 79 2e 20 49  66 20 73 6f 2c 20 69 74  |entry. If so, it|
00001860  20 73 68 6f 75 6c 64 20  63 61 6c 6c 20 46 6f 6e  | should call Fon|
00001870  74 4d 65 6e 75 5f 53 65  6c 65 63 74 20 61 73 20  |tMenu_Select as |
00001880  64 69 73 63 72 69 62 65  64 20 61 62 6f 76 65 2e  |discribed above.|
00001890  20 54 68 69 73 0a 73 68  6f 75 6c 64 20 62 65 20  | This.should be |
000018a0  64 6f 6e 65 20 77 69 74  68 20 52 30 20 70 6f 69  |done with R0 poi|
000018b0  6e 74 69 6e 67 20 74 6f  20 74 68 65 20 73 74 72  |nting to the str|
000018c0  69 6e 67 20 46 6f 6e 74  4d 65 6e 75 5f 44 65 63  |ing FontMenu_Dec|
000018d0  6f 64 65 46 6f 6e 74 4d  65 6e 75 0a 72 65 74 75  |odeFontMenu.retu|
000018e0  72 6e 65 64 2e 20 54 68  65 20 6d 65 6e 75 20 70  |rned. The menu p|
000018f0  6f 69 6e 74 65 72 20 72  65 74 75 72 6e 65 64 20  |ointer returned |
00001900  62 79 20 46 6f 6e 74 4d  65 6e 75 5f 53 65 6c 65  |by FontMenu_Sele|
00001910  63 74 20 68 61 73 20 74  6f 20 62 65 20 70 75 74  |ct has to be put|
00001920  20 69 6e 20 74 68 65 0a  27 73 75 62 2d 6d 65 6e  | in the.'sub-men|
00001930  75 20 70 6f 69 6e 74 65  72 27 20 77 6f 72 64 20  |u pointer' word |
00001940  6f 66 20 74 68 65 20 27  46 6f 6e 74 73 27 20 65  |of the 'Fonts' e|
00001950  6e 74 72 79 2e 20 4e 6f  77 20 74 68 65 20 63 61  |ntry. Now the ca|
00001960  6c 6c 20 74 6f 0a 57 69  6d 70 5f 43 72 65 61 74  |ll to.Wimp_Creat|
00001970  65 4d 65 6e 75 20 63 61  6e 20 62 65 20 64 6f 6e  |eMenu can be don|
00001980  65 2e 20 49 6e 20 74 68  69 73 20 77 61 79 20 69  |e. In this way i|
00001990  74 20 69 73 20 70 6f 73  73 69 62 6c 65 20 66 6f  |t is possible fo|
000019a0  72 20 74 68 65 20 75 73  65 72 20 74 6f 0a 63 6c  |r the user to.cl|
000019b0  69 63 6b 20 77 69 74 68  20 61 64 6a 75 73 74 20  |ick with adjust |
000019c0  69 6e 20 74 68 65 20 66  6f 6e 74 20 6d 65 6e 75  |in the font menu|
000019d0  2c 20 61 6e 64 20 6b 65  65 70 69 6e 67 20 74 68  |, and keeping th|
000019e0  65 20 6d 65 6e 75 20 6f  6e 20 73 63 72 65 65 6e  |e menu on screen|
000019f0  20 61 66 74 65 72 20 74  68 65 0a 73 65 6c 65 63  | after the.selec|
00001a00  74 69 6f 6e 2e 0a 0a 20  54 68 65 72 65 20 69 73  |tion... There is|
00001a10  20 6f 6e 65 20 6c 69 74  74 6c 65 20 64 72 61 77  | one little draw|
00001a20  62 61 63 6b 20 6f 66 20  74 68 69 73 20 6d 65 74  |back of this met|
00001a30  68 6f 64 2e 20 49 66 20  74 68 65 20 75 73 65 72  |hod. If the user|
00001a40  20 73 65 6c 65 63 74 65  64 20 61 20 6e 65 77 0a  | selected a new.|
00001a50  21 46 6f 6e 74 73 20 64  69 72 65 63 74 6f 72 79  |!Fonts directory|
00001a60  2c 20 69 74 20 77 69 6c  6c 20 62 65 20 6e 6f 74  |, it will be not|
00001a70  65 64 20 62 65 20 74 68  65 20 46 6f 6e 74 4d 65  |ed be the FontMe|
00001a80  6e 75 5f 53 65 6c 65 63  74 20 63 6f 64 65 2c 20  |nu_Select code, |
00001a90  61 6e 64 20 61 20 6e 65  77 0a 66 6f 6e 74 20 6d  |and a new.font m|
00001aa0  65 6e 75 20 73 74 72 75  63 74 75 72 65 20 77 69  |enu structure wi|
00001ab0  6c 6c 20 62 65 20 67 65  6e 65 72 61 74 65 64 2e  |ll be generated.|
00001ac0  20 54 68 69 73 20 69 73  20 61 6c 77 61 79 73 20  | This is always |
00001ad0  74 68 65 20 63 61 73 65  2c 20 61 6c 73 6f 20 77  |the case, also w|
00001ae0  69 74 68 0a 74 68 65 20  6d 65 74 68 6f 64 20 64  |ith.the method d|
00001af0  69 73 63 72 69 62 65 64  20 62 65 6c 6f 77 2e 20  |iscribed below. |
00001b00  42 75 74 20 69 74 20 63  6f 75 6c 64 20 62 65 20  |But it could be |
00001b10  70 6f 73 73 69 62 6c 65  20 74 68 61 74 20 74 68  |possible that th|
00001b20  65 20 75 73 65 72 20 77  61 73 20 67 6f 69 6e 67  |e user was going|
00001b30  0a 74 6f 20 64 6f 20 73  6f 6d 65 74 68 69 6e 67  |.to do something|
00001b40  20 65 6c 73 65 20 69 6e  20 74 68 65 20 6d 65 6e  | else in the men|
00001b50  75 2c 20 6e 6f 74 20 73  65 6c 65 63 74 69 6e 67  |u, not selecting|
00001b60  20 61 20 66 6f 6e 74 20  61 74 20 61 6c 6c 2e 20  | a font at all. |
00001b70  48 65 20 63 6f 75 6c 64  20 66 6f 72 0a 69 6e 73  |He could for.ins|
00001b80  74 61 6e 63 65 20 77 61  6e 74 20 74 6f 20 71 75  |tance want to qu|
00001b90  69 74 2e 20 4e 6f 77 20  68 65 20 28 73 68 65 29  |it. Now he (she)|
00001ba0  20 68 61 73 20 74 6f 20  77 61 69 74 20 66 6f 72  | has to wait for|
00001bb0  20 74 68 65 20 46 6f 6e  74 4d 65 6e 75 20 6d 6f  | the FontMenu mo|
00001bc0  64 75 6c 65 20 74 6f 0a  63 72 65 61 74 65 20 74  |dule to.create t|
00001bd0  68 65 20 6e 65 77 20 6d  65 6e 75 20 73 74 72 75  |he new menu stru|
00001be0  63 74 75 72 65 2c 20 62  65 66 6f 72 65 20 68 65  |cture, before he|
00001bf0  20 28 73 68 65 29 20 69  73 20 61 62 6c 65 20 74  | (she) is able t|
00001c00  6f 20 61 63 63 65 73 73  20 74 68 65 20 27 51 75  |o access the 'Qu|
00001c10  69 74 27 0a 65 6e 74 72  79 2e 20 53 6f 20 74 68  |it'.entry. So th|
00001c20  65 20 6e 65 78 74 20 73  6f 6c 75 74 69 6f 6e 20  |e next solution |
00001c30  69 73 20 74 6f 20 77 61  69 74 20 77 69 74 68 20  |is to wait with |
00001c40  63 61 6c 6c 69 6e 67 20  46 6f 6e 74 4d 65 6e 75  |calling FontMenu|
00001c50  5f 53 65 6c 65 63 74 2c  20 75 6e 74 69 6c 0a 74  |_Select, until.t|
00001c60  68 65 20 75 73 65 72 20  77 61 6e 74 73 20 74 6f  |he user wants to|
00001c70  20 73 65 6c 65 63 74 20  61 20 6e 65 77 20 66 6f  | select a new fo|
00001c80  6e 74 2e 20 54 68 69 73  20 63 61 6e 20 6f 6e 6c  |nt. This can onl|
00001c90  79 20 62 65 20 64 6f 6e  65 20 62 79 20 6d 61 6b  |y be done by mak|
00001ca0  69 6e 67 20 75 73 65 20  6f 66 0a 74 68 65 20 57  |ing use of.the W|
00001cb0  69 6d 70 20 6d 65 73 73  61 67 65 20 73 79 73 74  |imp message syst|
00001cc0  65 6d 2e 20 54 68 65 20  64 69 66 66 69 63 75 6c  |em. The difficul|
00001cd0  74 20 74 68 69 6e 67 20  6f 66 20 74 68 69 73 20  |t thing of this |
00001ce0  6d 65 74 68 6f 64 20 28  61 73 20 64 69 73 63 72  |method (as discr|
00001cf0  69 62 65 64 0a 6c 61 74  65 72 29 20 69 73 20 74  |ibed.later) is t|
00001d00  68 61 74 20 74 68 65 20  57 69 6d 70 20 69 73 20  |hat the Wimp is |
00001d10  75 6e 61 62 6c 65 20 74  6f 20 72 65 2d 6f 70 65  |unable to re-ope|
00001d20  6e 20 74 68 65 20 6d 65  6e 75 20 73 74 72 75 63  |n the menu struc|
00001d30  74 75 72 65 20 65 6e 74  69 72 65 6c 79 0a 61 66  |ture entirely.af|
00001d40  74 65 72 20 61 20 6d 65  6e 75 20 73 65 6c 65 63  |ter a menu selec|
00001d50  74 69 6f 6e 20 75 73 69  6e 67 20 74 68 65 20 41  |tion using the A|
00001d60  44 4a 55 53 54 20 62 75  74 74 6f 6e 2e 20 53 6f  |DJUST button. So|
00001d70  20 61 20 6c 69 74 74 6c  65 20 74 72 69 63 6b 20  | a little trick |
00001d80  68 61 73 20 74 6f 0a 73  6f 6c 76 65 20 74 68 69  |has to.solve thi|
00001d90  73 20 70 72 6f 62 6c 65  6d 2e 0a 0a 20 54 68 65  |s problem... The|
00001da0  20 68 61 72 64 20 77 61  79 0a 20 2d 2d 2d 2d 2d  | hard way. -----|
00001db0  2d 2d 2d 2d 2d 2d 2d 0a  20 49 6e 20 74 68 65 20  |-------. In the |
00001dc0  61 70 70 6c 69 63 61 74  69 6f 6e 73 20 6f 77 6e  |applications own|
00001dd0  20 6d 65 6e 75 20 73 74  72 75 63 74 75 72 65 2c  | menu structure,|
00001de0  20 74 68 65 72 65 20 73  68 6f 75 6c 64 20 62 65  | there should be|
00001df0  20 61 20 6d 65 6e 75 20  65 6e 74 72 79 20 28 65  | a menu entry (e|
00001e00  2e 67 2e 0a 27 46 6f 6e  74 73 27 29 20 77 69 74  |.g..'Fonts') wit|
00001e10  68 20 62 69 74 20 33 20  69 66 20 69 74 73 20 6d  |h bit 3 if its m|
00001e20  65 6e 75 20 66 6c 61 67  73 20 73 65 74 2e 20 54  |enu flags set. T|
00001e30  68 65 20 61 70 70 6c 69  63 61 74 69 6f 6e 20 68  |he application h|
00001e40  61 73 20 74 6f 20 61 73  73 75 72 65 0a 74 68 61  |as to assure.tha|
00001e50  74 20 74 68 69 73 20 62  69 74 20 69 73 20 73 65  |t this bit is se|
00001e60  74 20 77 68 65 6e 65 76  65 72 20 69 74 20 63 61  |t whenever it ca|
00001e70  6c 6c 73 20 53 57 49 20  22 57 69 6d 70 5f 43 72  |lls SWI "Wimp_Cr|
00001e80  65 61 74 65 4d 65 6e 75  22 20 61 73 20 69 74 20  |eateMenu" as it |
00001e90  6d 61 79 20 62 65 0a 63  6f 72 72 75 70 74 65 64  |may be.corrupted|
00001ea0  20 28 73 65 65 20 62 65  6c 6f 77 29 2e 20 53 6f  | (see below). So|
00001eb0  20 77 68 65 6e 65 76 65  72 20 74 68 65 20 75 73  | whenever the us|
00001ec0  65 72 20 70 75 74 73 20  74 68 65 20 70 6f 69 6e  |er puts the poin|
00001ed0  74 65 72 20 61 62 6f 76  65 20 74 68 65 20 61 72  |ter above the ar|
00001ee0  72 6f 77 0a 6f 6e 20 74  68 65 20 72 69 67 68 74  |row.on the right|
00001ef0  20 6f 66 20 74 68 69 73  20 65 6e 74 72 79 2c 20  | of this entry, |
00001f00  61 20 77 61 72 6e 69 6e  67 20 6d 65 73 73 61 67  |a warning messag|
00001f10  65 20 28 26 34 30 30 43  30 29 20 77 69 6c 6c 20  |e (&400C0) will |
00001f20  62 65 20 73 65 6e 64 20  62 79 20 74 68 65 0a 57  |be send by the.W|
00001f30  69 6d 70 2e 20 4f 6e 20  72 65 63 65 69 76 69 6e  |imp. On receivin|
00001f40  67 20 6f 66 20 74 68 69  73 20 6d 65 73 73 61 67  |g of this messag|
00001f50  65 2c 20 74 68 65 20 61  70 70 6c 69 63 61 74 69  |e, the applicati|
00001f60  6f 6e 20 73 68 6f 75 6c  64 20 72 65 73 70 6f 6e  |on should respon|
00001f70  64 20 62 79 20 63 61 6c  6c 69 6e 67 0a 53 57 49  |d by calling.SWI|
00001f80  20 22 46 6f 6e 74 4d 65  6e 75 5f 53 65 6c 65 63  | "FontMenu_Selec|
00001f90  74 22 20 77 69 74 68 20  52 30 20 70 6f 69 6e 74  |t" with R0 point|
00001fa0  69 6e 67 20 74 6f 20 61  20 70 6f 69 6e 74 20 73  |ing to a point s|
00001fb0  65 70 65 61 72 74 65 64  20 28 7a 65 72 6f 0a 74  |epearted (zero.t|
00001fc0  65 72 6d 69 6e 61 74 65  64 29 20 66 6f 6e 74 20  |erminated) font |
00001fd0  73 74 72 69 6e 67 2c 20  61 6e 64 20 69 6e 20 52  |string, and in R|
00001fe0  31 20 74 68 65 20 76 61  6c 75 65 20 30 20 6f 72  |1 the value 0 or|
00001ff0  20 31 20 74 6f 20 74 65  6c 6c 20 46 6f 6e 74 4d  | 1 to tell FontM|
00002000  65 6e 75 20 69 66 20 69  74 0a 61 6c 6c 6f 77 73  |enu if it.allows|
00002010  20 74 68 65 20 75 73 65  72 20 74 6f 20 73 65 6c  | the user to sel|
00002020  65 63 74 20 74 68 65 20  53 79 73 74 65 6d 46 6f  |ect the SystemFo|
00002030  6e 74 2e 20 54 68 65 20  66 6f 6e 74 20 73 74 72  |nt. The font str|
00002040  69 6e 67 20 6d 61 79 20  62 65 20 61 20 7a 65 72  |ing may be a zer|
00002050  6f 0a 6c 65 6e 67 74 68  20 73 74 72 69 6e 67 2c  |o.length string,|
00002060  20 77 69 63 68 20 6d 65  61 6e 73 20 74 68 61 74  | wich means that|
00002070  20 6e 6f 20 63 75 72 72  65 6e 74 20 66 6f 6e 74  | no current font|
00002080  20 69 73 20 73 65 6c 65  63 74 65 64 2e 20 46 6f  | is selected. Fo|
00002090  6e 74 4d 65 6e 75 20 77  69 6c 6c 0a 73 65 6c 65  |ntMenu will.sele|
000020a0  63 74 20 74 68 65 20 66  6f 6e 74 20 69 6e 20 69  |ct the font in i|
000020b0  74 73 20 6d 65 6e 75 20  73 74 72 75 63 74 75 72  |ts menu structur|
000020c0  65 2e 20 49 66 20 31 20  77 61 73 20 70 61 73 73  |e. If 1 was pass|
000020d0  65 64 20 69 6e 20 52 31  2c 20 74 68 65 20 66 69  |ed in R1, the fi|
000020e0  72 73 74 20 69 74 65 6d  0a 69 6e 20 74 68 65 20  |rst item.in the |
000020f0  6d 65 6e 75 20 73 74 72  75 63 74 75 72 65 20 77  |menu structure w|
00002100  69 6c 6c 20 62 65 20 27  53 79 73 74 65 6d 46 6f  |ill be 'SystemFo|
00002110  6e 74 73 27 2e 20 49 6e  20 63 61 73 65 20 52 31  |nts'. In case R1|
00002120  20 3d 20 30 2c 20 74 68  69 73 20 65 6e 74 72 79  | = 0, this entry|
00002130  20 77 69 6c 6c 0a 6e 6f  74 20 62 65 20 74 68 65  | will.not be the|
00002140  72 65 2e 20 54 68 69 73  20 63 61 6c 6c 20 77 69  |re. This call wi|
00002150  6c 6c 20 72 65 74 75 72  6e 20 77 69 74 68 20 61  |ll return with a|
00002160  20 70 6f 69 6e 74 65 72  20 74 6f 20 74 68 65 20  | pointer to the |
00002170  6d 65 6e 75 20 73 74 72  75 63 74 75 72 65 20 69  |menu structure i|
00002180  6e 0a 52 31 2e 20 54 68  69 73 20 70 6f 69 6e 74  |n.R1. This point|
00002190  65 72 20 73 68 6f 75 6c  64 20 62 65 20 70 61 73  |er should be pas|
000021a0  73 65 64 20 74 6f 20 53  57 49 20 22 57 69 6d 70  |sed to SWI "Wimp|
000021b0  5f 43 72 65 61 74 65 53  75 62 4d 65 6e 75 22 2e  |_CreateSubMenu".|
000021c0  0a 0a 20 57 68 65 6e 20  61 20 6d 65 6e 75 20 73  |.. When a menu s|
000021d0  65 6c 65 63 74 69 6f 6e  20 77 61 73 20 64 6f 6e  |election was don|
000021e0  65 2c 20 74 68 65 20 61  70 70 6c 69 63 61 74 69  |e, the applicati|
000021f0  6f 6e 20 73 68 6f 75 6c  64 20 64 65 74 65 72 6d  |on should determ|
00002200  69 6e 65 20 62 79 20 74  68 65 0a 72 65 74 75 72  |ine by the.retur|
00002210  6e 65 64 20 27 6d 65 6e  75 20 74 72 65 65 20 73  |ned 'menu tree s|
00002220  6f 20 66 61 72 27 20 76  61 6c 75 65 73 20 69 66  |o far' values if|
00002230  20 74 68 65 20 75 73 65  72 20 73 65 6c 65 63 74  | the user select|
00002240  65 64 20 61 20 65 6e 74  72 79 20 69 6e 20 74 68  |ed a entry in th|
00002250  65 20 66 6f 6e 74 0a 6d  65 6e 75 2e 20 49 66 20  |e font.menu. If |
00002260  73 6f 2c 20 69 74 20 73  68 6f 75 6c 64 20 73 65  |so, it should se|
00002270  74 20 61 6e 20 69 6e 74  65 72 6e 61 6c 20 66 6c  |t an internal fl|
00002280  61 67 20 28 73 61 79 20  27 46 6f 6e 74 4d 65 6e  |ag (say 'FontMen|
00002290  75 53 65 6c 65 63 74 65  64 27 29 20 74 6f 0a 54  |uSelected') to.T|
000022a0  52 55 45 2c 20 65 6c 73  65 20 69 74 20 73 68 6f  |RUE, else it sho|
000022b0  75 6c 64 20 73 65 74 20  69 74 20 74 6f 20 46 41  |uld set it to FA|
000022c0  4c 53 45 2c 20 73 6f 20  6c 61 74 65 72 20 6f 6e  |LSE, so later on|
000022d0  20 69 74 20 69 73 20 73  74 69 6c 6c 20 6b 6e 6f  | it is still kno|
000022e0  77 6e 20 69 66 20 74 68  65 0a 75 73 65 72 20 6d  |wn if the.user m|
000022f0  61 79 20 68 61 76 65 20  73 65 6c 65 63 74 65 64  |ay have selected|
00002300  20 61 20 6e 65 77 20 66  6f 6e 74 2e 20 41 66 74  | a new font. Aft|
00002310  65 72 20 74 68 61 74 20  69 74 20 73 68 6f 75 6c  |er that it shoul|
00002320  64 20 63 61 6c 6c 20 53  57 49 0a 22 46 6f 6e 74  |d call SWI."Font|
00002330  4d 65 6e 75 5f 44 65 63  6f 64 65 46 6f 6e 74 4d  |Menu_DecodeFontM|
00002340  65 6e 75 22 20 77 69 74  68 20 52 30 20 70 6f 69  |enu" with R0 poi|
00002350  6e 74 69 6e 67 20 74 6f  20 74 68 65 20 66 69 72  |nting to the fir|
00002360  73 74 20 6d 65 6e 75 20  73 65 6c 65 63 74 69 6f  |st menu selectio|
00002370  6e 20 69 6e 0a 74 68 65  20 27 6d 65 6e 75 20 74  |n in.the 'menu t|
00002380  72 65 65 20 73 6f 20 66  61 72 27 20 62 6c 6f 63  |ree so far' bloc|
00002390  6b 20 77 69 63 68 20 64  65 74 65 72 6d 69 6e 65  |k wich determine|
000023a0  73 20 74 68 65 20 73 65  6c 65 63 74 65 64 20 66  |s the selected f|
000023b0  6f 6e 74 2e 20 52 31 20  73 68 6f 75 6c 64 0a 70  |ont. R1 should.p|
000023c0  6f 69 6e 74 20 74 6f 20  61 20 62 75 66 66 65 72  |oint to a buffer|
000023d0  20 74 6f 20 63 6f 6e 74  61 69 6e 20 74 68 65 20  | to contain the |
000023e0  61 6e 73 77 65 72 2e 20  54 68 69 73 20 62 75 66  |answer. This buf|
000023f0  66 65 72 20 6d 75 73 74  20 62 65 20 61 74 20 6c  |fer must be at l|
00002400  65 61 73 74 20 34 38 0a  62 79 74 65 73 2e 20 49  |east 48.bytes. I|
00002410  66 20 6f 6e 20 72 65 74  75 72 6e 20 6f 66 20 74  |f on return of t|
00002420  68 69 73 20 63 61 6c 6c  20 52 30 20 3e 20 30 2c  |his call R0 > 0,|
00002430  20 74 68 65 20 75 73 65  72 20 73 65 6c 65 63 74  | the user select|
00002440  65 64 20 61 20 6e 65 77  20 66 6f 6e 74 2e 20 54  |ed a new font. T|
00002450  68 65 0a 62 75 66 66 65  72 20 70 61 73 73 65 64  |he.buffer passed|
00002460  20 69 6e 20 52 31 20 77  69 6c 6c 20 63 6f 6e 74  | in R1 will cont|
00002470  61 69 6e 20 74 68 65 20  66 6f 6e 74 20 6e 61 6d  |ain the font nam|
00002480  65 20 28 61 20 70 6f 69  6e 74 20 73 65 70 65 72  |e (a point seper|
00002490  61 74 65 64 2c 20 7a 65  72 6f 0a 74 65 72 6d 69  |ated, zero.termi|
000024a0  6e 61 74 65 64 20 66 6f  6e 74 20 73 74 72 69 6e  |nated font strin|
000024b0  67 29 2e 0a 0a 20 41 66  74 65 72 20 61 20 6d 65  |g)... After a me|
000024c0  6e 75 20 73 65 6c 63 74  69 6f 6e 2c 20 61 6e 64  |nu selction, and|
000024d0  20 74 61 6b 69 6e 67 20  61 70 70 72 6f 70 72 69  | taking appropri|
000024e0  61 74 65 20 61 63 74 69  6f 6e 73 2c 20 74 68 65  |ate actions, the|
000024f0  20 61 70 70 6c 69 63 61  74 69 6f 6e 0a 73 68 6f  | application.sho|
00002500  75 6c 64 20 63 68 65 63  6b 20 74 68 65 20 6d 6f  |uld check the mo|
00002510  75 73 65 20 62 75 74 74  6f 6e 20 73 74 61 74 65  |use button state|
00002520  20 74 6f 20 73 65 65 20  69 66 20 69 74 20 68 61  | to see if it ha|
00002530  73 20 74 6f 20 63 61 6c  6c 20 53 57 49 0a 22 57  |s to call SWI."W|
00002540  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 22 20  |imp_CreateMenu" |
00002550  61 67 61 69 6e 2e 20 49  66 20 61 64 6a 75 73 74  |again. If adjust|
00002560  20 77 61 73 20 75 73 65  64 20 74 6f 20 6d 61 6b  | was used to mak|
00002570  65 20 74 68 65 20 73 65  6c 65 63 74 69 6f 6e 2c  |e the selection,|
00002580  20 69 74 20 68 61 73 20  74 6f 0a 63 68 65 63 6b  | it has to.check|
00002590  20 20 74 68 65 20 27 46  6f 6e 74 4d 65 6e 75 53  |  the 'FontMenuS|
000025a0  65 6c 65 63 74 65 64 27  20 66 6c 61 67 20 74 6f  |elected' flag to|
000025b0  20 64 65 74 65 72 6d 69  6e 65 20 69 66 20 74 68  | determine if th|
000025c0  65 20 75 73 65 72 20 73  65 6c 65 63 74 65 64 20  |e user selected |
000025d0  61 20 66 6f 6e 74 0a 6d  65 6e 75 20 65 6e 74 72  |a font.menu entr|
000025e0  79 2e 20 49 66 20 73 6f  2c 20 69 74 20 73 68 6f  |y. If so, it sho|
000025f0  75 6c 64 20 63 61 6c 6c  20 53 57 49 20 22 46 6f  |uld call SWI "Fo|
00002600  6e 74 4d 65 6e 75 5f 53  65 6c 65 63 74 22 20 61  |ntMenu_Select" a|
00002610  73 20 64 69 73 63 72 69  62 65 64 20 61 62 6f 76  |s discribed abov|
00002620  65 2e 0a 54 68 69 73 20  73 68 6f 75 6c 64 20 62  |e..This should b|
00002630  65 20 64 6f 6e 65 20 77  69 74 68 20 52 30 20 70  |e done with R0 p|
00002640  6f 69 6e 74 69 6e 67 20  74 6f 20 74 68 65 20 73  |ointing to the s|
00002650  74 72 69 6e 67 20 53 57  49 0a 22 46 6f 6e 74 4d  |tring SWI."FontM|
00002660  65 6e 75 5f 44 65 63 6f  64 65 46 6f 6e 74 4d 65  |enu_DecodeFontMe|
00002670  6e 75 22 20 72 65 74 75  72 6e 65 64 2e 20 20 41  |nu" returned.  A|
00002680  73 20 74 68 65 20 4d 65  6e 75 57 61 72 6e 69 6e  |s the MenuWarnin|
00002690  67 46 6c 61 67 20 69 6e  20 74 68 65 20 6d 65 6e  |gFlag in the men|
000026a0  75 0a 66 6c 61 67 73 20  6f 66 20 74 68 65 20 6d  |u.flags of the m|
000026b0  65 6e 75 20 65 6e 74 72  79 20 28 65 2e 67 2e 20  |enu entry (e.g. |
000026c0  27 46 6f 6e 74 73 27 29  20 70 72 65 63 65 64 69  |'Fonts') precedi|
000026d0  6e 67 20 74 68 65 20 66  6f 6e 74 20 6d 65 6e 75  |ng the font menu|
000026e0  20 77 61 73 20 73 65 74  0a 28 70 68 68 68 21 29  | was set.(phhh!)|
000026f0  2c 20 74 68 65 20 57 69  6d 70 20 69 73 20 75 6e  |, the Wimp is un|
00002700  61 62 6c 65 20 74 6f 20  72 65 63 72 65 61 74 69  |able to recreati|
00002710  6e 67 20 74 68 65 20 77  68 6f 6c 65 20 6d 65 6e  |ng the whole men|
00002720  75 20 74 72 65 65 20 61  75 74 6f 6d 61 74 69 63  |u tree automatic|
00002730  6c 79 2e 0a 53 6f 20 61  20 6c 69 74 6c 65 20 74  |ly..So a litle t|
00002740  72 69 63 6b 20 68 61 73  20 74 6f 20 61 73 73 75  |rick has to assu|
00002750  72 65 20 74 68 61 74 20  69 74 20 77 69 6c 6c 20  |re that it will |
00002760  77 6f 72 6b 20 63 6f 72  72 65 63 74 2e 20 54 68  |work correct. Th|
00002770  65 20 6d 65 6e 75 20 70  6f 69 6e 74 65 72 0a 72  |e menu pointer.r|
00002780  65 74 75 72 6e 65 64 20  62 79 20 53 57 49 20 22  |eturned by SWI "|
00002790  46 6f 6e 74 4d 65 6e 75  5f 53 65 6c 65 63 74 22  |FontMenu_Select"|
000027a0  20 68 61 73 20 74 6f 20  62 65 20 70 75 74 20 69  | has to be put i|
000027b0  6e 20 74 68 65 20 27 73  75 62 2d 6d 65 6e 75 20  |n the 'sub-menu |
000027c0  70 6f 69 6e 74 65 72 27  0a 77 6f 72 64 20 6f 66  |pointer'.word of|
000027d0  20 74 68 65 20 27 46 6f  6e 74 73 27 20 65 6e 74  | the 'Fonts' ent|
000027e0  72 79 2c 20 61 6e 64 20  74 68 65 20 4d 65 6e 75  |ry, and the Menu|
000027f0  57 61 72 6e 69 6e 67 46  6c 61 67 20 28 62 69 74  |WarningFlag (bit|
00002800  20 33 29 20 6f 66 20 74  68 65 20 6d 65 6e 75 20  | 3) of the menu |
00002810  66 6c 61 67 73 0a 77 6f  72 64 20 6f 66 20 74 68  |flags.word of th|
00002820  69 73 20 65 6e 74 72 79  20 73 68 6f 75 6c 64 20  |is entry should |
00002830  62 65 20 63 6c 65 61 72  65 64 2e 20 4e 6f 77 20  |be cleared. Now |
00002840  74 68 65 20 63 61 6c 6c  20 74 6f 20 53 57 49 20  |the call to SWI |
00002850  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
00002860  22 0a 63 61 6e 20 62 65  20 64 6f 6e 65 2e 20 49  |".can be done. I|
00002870  6e 20 74 68 69 73 20 77  61 79 20 69 74 20 69 73  |n this way it is|
00002880  20 70 6f 73 73 69 62 6c  65 20 66 6f 72 20 74 68  | possible for th|
00002890  65 20 75 73 65 72 20 74  6f 20 63 6c 69 63 6b 20  |e user to click |
000028a0  77 69 74 68 20 61 64 6a  75 73 74 20 69 6e 0a 74  |with adjust in.t|
000028b0  68 65 20 66 6f 6e 74 20  6d 65 6e 75 2c 20 61 6e  |he font menu, an|
000028c0  64 20 6b 65 65 70 69 6e  67 20 74 68 65 20 6d 65  |d keeping the me|
000028d0  6e 75 20 6f 6e 20 73 63  72 65 65 6e 20 61 66 74  |nu on screen aft|
000028e0  65 72 20 74 68 65 20 73  65 6c 65 63 74 69 6f 6e  |er the selection|
000028f0  2e 20 54 68 65 20 6e 65  78 74 0a 74 69 6d 65 20  |. The next.time |
00002900  74 68 65 20 75 73 65 72  20 6f 70 65 6e 73 20 74  |the user opens t|
00002910  68 65 20 61 70 70 6c 69  63 61 74 69 6f 6e 20 6d  |he application m|
00002920  65 6e 75 2c 20 74 68 65  20 4d 65 6e 75 57 61 72  |enu, the MenuWar|
00002930  6e 69 6e 67 46 6c 61 67  20 28 62 69 74 20 33 29  |ningFlag (bit 3)|
00002940  20 73 68 6f 75 6c 64 0a  62 65 20 73 65 74 20 61  | should.be set a|
00002950  67 61 69 6e 2c 20 61 73  20 6f 74 68 65 72 20 61  |gain, as other a|
00002960  70 70 6c 69 63 61 74 69  6f 6e 73 20 6d 61 79 20  |pplications may |
00002970  68 61 76 65 20 75 73 65  64 20 74 68 65 20 66 6f  |have used the fo|
00002980  6e 74 20 6d 65 6e 75 20  69 6e 20 74 68 65 0a 6d  |nt menu in the.m|
00002990  65 61 6e 77 68 69 6c 65  2c 20 61 6e 64 20 69 74  |eanwhile, and it|
000029a0  20 69 73 20 6e 65 63 65  73 73 61 72 79 20 74 68  | is necessary th|
000029b0  61 74 20 53 57 49 20 22  46 6f 6e 74 4d 65 6e 75  |at SWI "FontMenu|
000029c0  5f 53 65 6c 65 63 74 22  20 69 73 20 63 61 6c 6c  |_Select" is call|
000029d0  65 64 20 6a 75 73 74 0a  62 65 66 6f 72 65 20 74  |ed just.before t|
000029e0  68 65 20 66 6f 6e 74 20  6d 65 6e 75 20 6f 70 65  |he font menu ope|
000029f0  6e 73 2e 0a 0a 20 42 65  63 61 75 73 65 20 69 74  |ns... Because it|
00002a00  20 69 73 20 70 6f 73 73  69 62 6c 65 20 74 68 61  | is possible tha|
00002a10  74 20 53 57 49 20 22 46  6f 6e 74 4d 65 6e 75 5f  |t SWI "FontMenu_|
00002a20  43 72 65 61 74 65 22 20  74 61 6b 65 73 20 73 6f  |Create" takes so|
00002a30  6d 65 20 74 69 6d 65 20  74 6f 20 63 72 65 61 74  |me time to creat|
00002a40  65 0a 61 20 6e 65 77 20  6d 65 6e 75 2c 20 69 74  |e.a new menu, it|
00002a50  20 69 73 20 72 65 63 6f  6d 65 6e 64 65 64 20 74  | is recomended t|
00002a60  68 61 74 20 74 68 65 72  65 20 69 73 20 61 20 53  |hat there is a S|
00002a70  57 49 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 6e  |WI "Hourglass_On|
00002a80  22 20 62 65 66 6f 72 65  2c 20 61 6e 64 0a 61 20  |" before, and.a |
00002a90  53 57 49 20 22 48 6f 75  72 67 6c 61 73 73 5f 4f  |SWI "Hourglass_O|
00002aa0  66 66 22 20 61 66 74 65  72 20 74 68 69 73 20 63  |ff" after this c|
00002ab0  61 6c 6c 2e 20 49 6e 20  63 61 73 65 20 6f 66 20  |all. In case of |
00002ac0  61 20 53 57 49 20 22 46  6f 6e 74 4d 65 6e 75 5f  |a SWI "FontMenu_|
00002ad0  53 65 6c 65 63 74 22 2c  0a 77 68 65 6e 20 46 6f  |Select",.when Fo|
00002ae0  6e 74 24 50 61 74 68 20  68 61 73 20 63 68 61 6e  |nt$Path has chan|
00002af0  67 65 64 20 28 73 6f 20  61 20 6e 65 77 20 66 6f  |ged (so a new fo|
00002b00  6e 74 20 6d 65 6e 75 20  68 61 73 20 74 6f 20 62  |nt menu has to b|
00002b10  65 20 63 72 65 61 74 65  64 29 2c 20 74 68 69 73  |e created), this|
00002b20  20 63 61 6c 6c 0a 6d 61  79 20 74 61 6b 65 20 73  | call.may take s|
00002b30  6f 6d 65 20 74 69 6d 65  20 61 73 77 65 6c 6c 2c  |ome time aswell,|
00002b40  20 73 6f 20 74 68 65 20  74 77 6f 20 48 6f 75 72  | so the two Hour|
00002b50  67 6c 61 73 73 20 53 57  49 27 73 20 73 68 6f 75  |glass SWI's shou|
00002b60  6c 64 20 62 65 20 75 73  65 64 20 68 65 72 65 20  |ld be used here |
00002b70  61 73 0a 77 65 6c 6c 2e  0a 0a 0a 0a 0a 20 20 20  |as.well......   |
00002b80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002b90  20 20 20 20 20 20 20 20  20 4e 6f 74 65 73 20 66  |         Notes f|
00002ba0  72 6f 6d 20 74 68 65 20  61 75 74 68 6f 72 0a 0a  |rom the author..|
00002bb0  20 54 68 65 20 72 65 61  73 6f 6e 20 77 68 79 20  | The reason why |
00002bc0  49 20 77 72 6f 74 65 20  74 68 69 73 20 6d 6f 64  |I wrote this mod|
00002bd0  75 6c 65 2c 20 69 73 20  62 65 63 61 75 73 65 20  |ule, is because |
00002be0  49 27 6d 20 6e 6f 74 20  6f 6e 6c 79 20 61 20 70  |I'm not only a p|
00002bf0  72 6f 67 72 61 6d 6d 65  72 2c 0a 62 75 74 20 61  |rogrammer,.but a|
00002c00  6c 73 6f 20 61 20 75 73  65 72 20 77 68 6f 20 6c  |lso a user who l|
00002c10  69 6b 65 73 20 74 6f 20  77 6f 72 6b 20 77 69 74  |ikes to work wit|
00002c20  68 20 74 68 65 20 41 72  63 68 69 6d 65 64 65 73  |h the Archimedes|
00002c30  2e 20 54 68 69 73 20 69  73 20 62 65 63 61 75 73  |. This is becaus|
00002c40  65 20 69 74 27 73 0a 61  20 66 61 73 74 20 6d 61  |e it's.a fast ma|
00002c50  63 68 69 6e 65 20 61 6e  64 20 62 65 63 61 75 73  |chine and becaus|
00002c60  65 20 6d 6f 73 74 20 70  61 72 74 73 20 6f 66 20  |e most parts of |
00002c70  52 69 73 63 2d 4f 53 20  61 6c 6c 6f 77 20 61 70  |Risc-OS allow ap|
00002c80  70 6c 69 63 61 74 69 6f  6e 73 20 74 6f 20 62 65  |plications to be|
00002c90  0a 76 65 72 79 20 69 6e  74 75 69 74 69 76 65 2e  |.very intuitive.|
00002ca0  20 49 20 64 69 64 6e 27  74 20 6c 69 6b 65 20 74  | I didn't like t|
00002cb0  68 65 20 77 61 79 20 74  68 65 20 61 76 61 69 6c  |he way the avail|
00002cc0  61 62 6c 65 20 66 6f 6e  74 73 20 77 65 72 65 20  |able fonts were |
00002cd0  70 72 65 73 65 6e 74 65  64 20 69 6e 0a 6d 6f 73  |presented in.mos|
00002ce0  74 20 61 70 70 6c 69 63  61 74 69 6f 6e 73 2c 20  |t applications, |
00002cf0  73 6f 20 49 20 73 74 61  72 74 65 64 20 74 6f 20  |so I started to |
00002d00  66 69 67 75 72 65 20 6f  75 74 20 61 20 70 72 6f  |figure out a pro|
00002d10  70 65 72 20 73 6f 6c 75  74 69 6f 6e 3a 20 46 6f  |per solution: Fo|
00002d20  6e 74 4d 65 6e 75 2e 0a  0a 20 49 20 68 6f 70 65  |ntMenu... I hope|
00002d30  20 74 68 61 74 20 66 75  74 75 72 65 20 61 70 70  | that future app|
00002d40  6c 69 63 61 74 69 6f 6e  73 20 61 64 6f 70 74 20  |lications adopt |
00002d50  74 6f 20 74 68 69 73 20  6d 65 74 68 6f 64 2c 20  |to this method, |
00002d60  73 6f 20 70 6c 65 61 73  65 20 70 61 73 73 20 69  |so please pass i|
00002d70  74 20 6f 6e 2e 0a 45 76  65 72 79 62 6f 64 79 20  |t on..Everybody |
00002d80  69 73 20 66 72 65 65 20  74 6f 20 75 73 65 20 69  |is free to use i|
00002d90  74 2c 20 65 76 65 6e 20  69 6e 20 63 6f 6d 6d 65  |t, even in comme|
00002da0  72 63 69 61 6c 20 63 6f  64 65 2e 20 54 68 65 20  |rcial code. The |
00002db0  6f 6e 6c 79 20 72 65 73  74 72 69 63 74 69 6f 6e  |only restriction|
00002dc0  0a 69 73 20 74 68 61 74  20 74 68 69 73 20 64 6f  |.is that this do|
00002dd0  63 75 6d 65 6e 74 20 73  68 6f 75 6c 64 20 6e 6f  |cument should no|
00002de0  74 20 62 65 20 73 65 70  65 72 61 74 65 64 20 66  |t be seperated f|
00002df0  72 6f 6d 20 74 68 65 20  46 6f 6e 74 4d 65 6e 75  |rom the FontMenu|
00002e00  20 6d 6f 64 75 6c 65 2c  20 61 6e 64 0a 74 68 61  | module, and.tha|
00002e10  74 20 62 6f 74 68 20 74  68 65 20 6d 6f 64 75 6c  |t both the modul|
00002e20  65 20 61 6e 64 20 74 68  69 73 20 64 6f 63 75 6d  |e and this docum|
00002e30  65 6e 74 20 72 65 6d 61  69 6e 20 75 6e 63 68 61  |ent remain uncha|
00002e40  6e 67 65 64 2e 20 49 6e  20 63 61 73 65 20 6f 66  |nged. In case of|
00002e50  0a 63 6f 6d 6d 65 72 63  69 61 6c 20 75 73 65 20  |.commercial use |
00002e60  49 20 77 6f 75 6c 64 20  6c 69 6b 65 20 74 6f 20  |I would like to |
00002e70  6b 6e 6f 77 20 74 68 69  73 20 69 6e 20 61 64 76  |know this in adv|
00002e80  61 6e 63 65 20 28 49 20  63 6f 75 6c 64 20 74 68  |ance (I could th|
00002e90  61 6e 20 70 72 6f 76 69  64 65 0a 79 6f 75 20 77  |an provide.you w|
00002ea0  69 74 68 20 69 74 73 20  6c 61 74 65 73 74 20 72  |ith its latest r|
00002eb0  65 6c 65 61 73 65 29 2e  20 4d 79 20 61 64 64 72  |elease). My addr|
00002ec0  65 73 73 20 69 73 20 61  74 20 74 68 65 20 65 6e  |ess is at the en|
00002ed0  64 20 6f 66 20 74 68 69  73 20 64 6f 63 75 6d 65  |d of this docume|
00002ee0  6e 74 2e 20 59 6f 75 0a  63 61 6e 20 61 6c 77 61  |nt. You.can alwa|
00002ef0  79 73 20 63 6f 6e 74 61  63 74 20 6d 65 20 69 66  |ys contact me if|
00002f00  20 79 6f 75 20 66 6f 75  6e 64 20 73 6f 6d 65 20  | you found some |
00002f10  62 75 67 2c 20 6f 72 20  77 68 65 6e 20 68 61 76  |bug, or when hav|
00002f20  69 6e 67 20 6f 74 68 65  72 0a 73 75 67 67 65 73  |ing other.sugges|
00002f30  74 69 6f 6e 73 2e 0a 0a  0a 0a 0a 20 20 20 20 20  |tions......     |
00002f40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002f50  20 20 20 20 20 20 20 20  20 20 20 46 6f 6e 74 4d  |           FontM|
00002f60  65 6e 75 20 53 57 49 27  73 0a 0a 20 20 20 20 20  |enu SWI's..     |
00002f70  20 20 20 20 20 20 42 65  6c 6f 77 20 61 72 65 20  |      Below are |
00002f80  74 68 65 20 73 68 6f 72  74 20 64 69 73 63 72 69  |the short discri|
00002f90  70 74 69 6f 6e 73 20 6f  66 20 74 68 65 20 46 6f  |ptions of the Fo|
00002fa0  6e 74 4d 65 6e 75 20 53  57 49 27 73 2e 0a 20 20  |ntMenu SWI's..  |
00002fb0  20 20 20 20 20 20 20 20  20 0a 0a 46 6f 6e 74 4d  |         ..FontM|
00002fc0  65 6e 75 5f 43 72 65 61  74 65 20 26 38 44 30 38  |enu_Create &8D08|
00002fd0  30 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |0.--------------|
00002fe0  2d 2d 2d 2d 2d 2d 2d 2d  0a 4f 6e 20 65 6e 74 72  |--------.On entr|
00002ff0  79 3a 20 2d 2d 0a 4f 6e  20 65 78 69 74 20 3a 20  |y: --.On exit : |
00003000  52 30 20 3d 20 4e 75 6d  62 65 72 20 6f 66 20 66  |R0 = Number of f|
00003010  6f 6e 74 73 20 66 6f 75  6e 64 0a 0a 20 54 68 69  |onts found.. Thi|
00003020  73 20 77 69 6c 6c 20 63  72 65 61 74 65 20 61 20  |s will create a |
00003030  66 6f 6e 74 20 6d 65 6e  75 20 73 74 72 75 63 74  |font menu struct|
00003040  75 72 65 20 69 6e 20 52  4d 41 2c 20 69 66 20 6e  |ure in RMA, if n|
00003050  6f 74 20 61 6c 72 65 61  64 79 20 64 6f 6e 65 20  |ot already done |
00003060  73 6f 2e 20 41 6e 0a 65  72 72 6f 72 20 6f 63 63  |so. An.error occ|
00003070  75 72 73 20 69 66 20 74  68 65 72 65 20 69 73 20  |urs if there is |
00003080  6e 6f 74 20 65 6e 6f 75  67 68 20 72 6f 6f 6d 20  |not enough room |
00003090  69 6e 20 52 4d 41 20 74  6f 20 63 72 65 61 74 65  |in RMA to create|
000030a0  20 74 68 65 20 6d 65 6e  75 2e 0a 0a 0a 0a 46 6f  | the menu.....Fo|
000030b0  6e 74 4d 65 6e 75 5f 52  65 6c 65 61 73 65 20 26  |ntMenu_Release &|
000030c0  38 44 30 38 31 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |8D081.----------|
000030d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 4f 6e  |-------------.On|
000030e0  20 65 6e 74 72 79 3a 20  2d 2d 0a 4f 6e 20 65 78  | entry: --.On ex|
000030f0  69 74 20 3a 20 2d 2d 0a  0a 20 54 68 69 73 20 77  |it : --.. This w|
00003100  69 6c 6c 20 72 65 6c 65  61 73 65 20 74 68 65 20  |ill release the |
00003110  6d 65 6d 6f 72 79 20 74  61 6b 65 6e 20 62 79 20  |memory taken by |
00003120  74 68 65 20 66 6f 6e 74  20 6d 65 6e 75 20 69 66  |the font menu if|
00003130  20 6e 6f 20 74 61 73 6b  73 20 61 72 65 20 75 73  | no tasks are us|
00003140  69 6e 67 0a 69 74 20 61  6e 79 6d 6f 72 65 2e 0a  |ing.it anymore..|
00003150  0a 0a 0a 46 6f 6e 74 4d  65 6e 75 5f 53 65 6c 65  |...FontMenu_Sele|
00003160  63 74 20 26 38 44 30 38  32 0a 2d 2d 2d 2d 2d 2d  |ct &8D082.------|
00003170  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003180  0a 4f 6e 20 65 6e 74 72  79 3a 20 52 30 20 3d 20  |.On entry: R0 = |
00003190  70 6f 69 6e 74 65 72 20  74 6f 20 70 6f 69 6e 74  |pointer to point|
000031a0  20 73 65 70 65 72 61 74  65 64 2c 20 63 74 72 6c  | seperated, ctrl|
000031b0  20 74 65 72 6d 69 6e 61  74 65 64 20 66 6f 6e 74  | terminated font|
000031c0  20 73 74 72 69 6e 67 20  0a 20 20 20 20 20 20 20  | string .       |
000031d0  20 20 20 52 31 20 3d 20  53 79 73 74 65 6d 46 6f  |   R1 = SystemFo|
000031e0  6e 74 20 66 6c 61 67 20  20 20 20 20 20 20 20 20  |nt flag         |
000031f0  20 20 20 0a 0a 4f 6e 20  65 78 69 74 20 3a 20 52  |   ..On exit : R|
00003200  30 20 3d 20 53 74 61 74  65 20 66 6c 61 67 0a 20  |0 = State flag. |
00003210  20 20 20 20 20 20 20 20  20 52 31 20 3d 20 70 6f  |         R1 = po|
00003220  69 6e 74 65 72 20 74 6f  20 66 6f 6e 74 20 6d 65  |inter to font me|
00003230  6e 75 20 73 74 72 75 63  74 75 72 65 0a 0a 20 54  |nu structure.. T|
00003240  68 69 73 20 77 69 6c 6c  20 74 69 63 6b 20 74 68  |his will tick th|
00003250  65 20 66 6f 6e 74 20 70  61 73 73 65 64 20 69 6e  |e font passed in|
00003260  20 52 30 20 6f 6e 20 65  6e 74 72 79 2e 20 52 31  | R0 on entry. R1|
00003270  20 64 65 74 65 72 6d 69  6e 65 73 20 69 66 0a 27  | determines if.'|
00003280  53 79 73 74 65 6d 46 6f  6e 74 27 20 73 68 6f 75  |SystemFont' shou|
00003290  6c 64 20 6f 63 63 75 72  20 69 6e 20 74 68 65 20  |ld occur in the |
000032a0  6d 65 6e 75 20 61 73 20  66 6f 6c 6c 6f 77 73 3a  |menu as follows:|
000032b0  0a 0a 20 20 56 61 6c 75  65 20 4d 65 61 6e 69 6e  |..  Value Meanin|
000032c0  67 0a 20 20 20 20 30 20  20 20 27 53 79 73 74 65  |g.    0   'Syste|
000032d0  6d 46 6f 6e 74 27 20 64  6f 65 73 20 6e 6f 74 20  |mFont' does not |
000032e0  6f 63 63 75 72 20 69 6e  20 74 68 65 20 6d 65 6e  |occur in the men|
000032f0  75 0a 20 20 20 20 31 20  20 20 27 53 79 73 74 65  |u.    1   'Syste|
00003300  6d 46 6f 6e 74 27 20 64  6f 65 73 20 6f 63 63 75  |mFont' does occu|
00003310  72 20 69 6e 20 74 68 65  20 6d 65 6e 75 0a 20 20  |r in the menu.  |
00003320  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003330  20 20 20 20 20 20 20 0a  20 4f 6e 20 65 78 69 74  |       . On exit|
00003340  20 52 30 20 73 68 6f 77  73 20 74 68 65 20 73 65  | R0 shows the se|
00003350  6c 65 63 74 69 6f 6e 20  73 74 61 74 65 20 61 73  |lection state as|
00003360  20 66 6f 6c 6c 6f 77 73  3a 0a 0a 20 20 56 61 6c  | follows:..  Val|
00003370  75 65 20 4d 65 61 6e 69  6e 67 0a 20 20 20 20 30  |ue Meaning.    0|
00003380  20 20 20 54 6f 20 62 65  20 73 65 6c 65 63 74 65  |   To be selecte|
00003390  64 20 66 6f 6e 74 20 6e  6f 74 20 66 6f 75 6e 64  |d font not found|
000033a0  2c 20 6e 6f 20 74 69 63  6b 73 0a 20 20 20 20 31  |, no ticks.    1|
000033b0  20 20 20 54 6f 20 62 65  20 73 65 6c 65 63 74 65  |   To be selecte|
000033c0  64 20 66 6f 6e 74 20 66  6f 75 6e 64 2c 20 61 6e  |d font found, an|
000033d0  64 20 74 69 63 6b 65 64  20 20 0a 20 20 20 20 32  |d ticked  .    2|
000033e0  20 20 20 4e 6f 20 66 6f  6e 74 20 65 6e 74 72 69  |   No font entri|
000033f0  65 73 20 66 6f 75 6e 64  2c 20 6d 65 6e 75 20 63  |es found, menu c|
00003400  6f 6e 73 69 73 74 73 20  6f 6e 65 20 69 74 65 6d  |onsists one item|
00003410  3b 20 27 53 79 73 74 65  6d 46 6f 6e 74 27 2c 0a  |; 'SystemFont',.|
00003420  20 20 20 20 20 20 20 20  61 6e 64 20 69 73 20 74  |        and is t|
00003430  69 63 6b 65 64 0a 20 20  20 20 20 20 20 20 20 20  |icked.          |
00003440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00003480  20 20 20 20 20 20 20 20  0a 20 52 31 20 77 69 6c  |        . R1 wil|
00003490  6c 20 70 6f 69 6e 74 20  74 6f 20 74 68 65 20 66  |l point to the f|
000034a0  6f 6e 74 20 6d 65 6e 75  20 6f 6e 20 65 78 69 74  |ont menu on exit|
000034b0  2e 20 41 6e 20 65 72 72  6f 72 20 6f 63 63 75 72  |. An error occur|
000034c0  73 20 69 66 20 6e 6f 20  66 6f 6e 74 20 6d 65 6e  |s if no font men|
000034d0  75 20 65 78 69 73 74 73  2e 20 0a 0a 0a 0a 46 6f  |u exists. ....Fo|
000034e0  6e 74 4d 65 6e 75 5f 44  65 73 65 6c 65 63 74 20  |ntMenu_Deselect |
000034f0  26 38 44 30 38 33 0a 2d  2d 2d 2d 2d 2d 2d 2d 2d  |&8D083.---------|
00003500  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |---------------.|
00003510  4f 6e 20 65 6e 74 72 79  3a 20 2d 2d 2d 0a 4f 6e  |On entry: ---.On|
00003520  20 65 78 69 74 20 3a 20  2d 2d 0a 0a 20 54 68 69  | exit : --.. Thi|
00003530  73 20 77 69 6c 6c 20 63  6c 65 61 72 20 61 6c 6c  |s will clear all|
00003540  20 74 69 63 6b 73 20 61  6e 64 20 6d 61 72 6b 73  | ticks and marks|
00003550  20 6f 66 20 74 68 65 20  66 6f 6e 74 20 6d 65 6e  | of the font men|
00003560  75 2e 20 49 74 20 69 73  20 6e 6f 74 20 6e 65 63  |u. It is not nec|
00003570  65 73 73 61 72 79 0a 74  6f 20 63 61 6c 6c 20 74  |essary.to call t|
00003580  68 69 73 20 53 57 49 20  62 65 66 6f 72 65 20 61  |his SWI before a|
00003590  20 46 6f 6e 74 4d 65 6e  75 5f 53 65 6c 65 63 74  | FontMenu_Select|
000035a0  20 63 61 6c 6c 2c 20 61  73 20 46 6f 6e 74 4d 65  | call, as FontMe|
000035b0  6e 75 5f 53 65 6c 65 63  74 20 77 69 6c 6c 20 74  |nu_Select will t|
000035c0  61 6b 65 0a 63 61 72 65  20 6f 66 20 63 6c 65 61  |ake.care of clea|
000035d0  6e 69 6e 67 20 75 70 20  6f 6c 64 20 73 65 6c 65  |ning up old sele|
000035e0  63 74 69 6f 6e 2e 20 41  6e 20 65 72 72 6f 72 20  |ction. An error |
000035f0  6f 63 63 75 72 73 20 69  66 20 6e 6f 20 66 6f 6e  |occurs if no fon|
00003600  74 20 6d 65 6e 75 20 65  78 69 73 74 73 2e 20 0a  |t menu exists. .|
00003610  20 20 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |  .             |
00003620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003630  20 0a 0a 46 6f 6e 74 4d  65 6e 75 5f 44 65 63 6f  | ..FontMenu_Deco|
00003640  64 65 46 6f 6e 74 4d 65  6e 75 20 26 38 44 30 38  |deFontMenu &8D08|
00003650  34 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |4.--------------|
00003660  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003670  0a 4f 6e 20 65 6e 74 72  79 3a 20 52 30 20 3d 20  |.On entry: R0 = |
00003680  70 6f 69 6e 74 65 72 20  74 6f 20 61 20 6c 69 73  |pointer to a lis|
00003690  74 20 6f 66 20 66 6f 6e  74 20 6d 65 6e 75 20 73  |t of font menu s|
000036a0  65 6c 65 63 74 69 6f 6e  73 0a 20 20 20 20 20 20  |elections.      |
000036b0  20 20 20 20 52 31 20 3d  20 70 6f 69 6e 74 65 72  |    R1 = pointer|
000036c0  20 74 6f 20 61 20 62 75  66 66 65 72 20 74 6f 20  | to a buffer to |
000036d0  63 6f 6e 74 61 69 6e 20  74 68 65 20 61 6e 73 77  |contain the answ|
000036e0  65 72 20 0a 20 20 20 20  20 20 20 20 20 20 20 20  |er .            |
000036f0  20 20 20 28 61 74 20 6c  65 61 73 74 20 34 38 20  |   (at least 48 |
00003700  62 79 74 65 73 20 6c 6f  6e 67 29 0a 4f 6e 20 65  |bytes long).On e|
00003710  78 69 74 20 3a 20 2d 2d  0a 0a 20 54 68 69 73 20  |xit : --.. This |
00003720  77 69 6c 6c 20 64 65 63  6f 64 65 20 74 68 65 20  |will decode the |
00003730  66 6f 6e 74 20 6d 65 6e  75 20 73 65 6c 65 63 74  |font menu select|
00003740  69 6f 6e 20 69 6e 74 6f  20 61 20 66 6f 6e 74 20  |ion into a font |
00003750  73 74 72 69 6e 67 20 66  6f 72 20 74 68 65 0a 46  |string for the.F|
00003760  6f 6e 74 4d 61 6e 61 67  65 72 2e 20 54 68 69 73  |ontManager. This|
00003770  20 73 74 72 69 6e 67 20  63 61 6e 20 62 65 20 70  | string can be p|
00003780  61 73 73 65 64 20 62 61  63 6b 20 74 6f 20 46 6f  |assed back to Fo|
00003790  6e 74 4d 65 6e 75 5f 53  65 6c 65 63 74 20 74 6f  |ntMenu_Select to|
000037a0  20 74 69 63 6b 20 74 68  65 0a 61 70 70 72 6f 70  | tick the.approp|
000037b0  72 69 61 74 65 20 65 6e  74 72 69 65 73 2e 20 41  |riate entries. A|
000037c0  6e 20 65 72 72 6f 72 20  6f 63 63 75 72 73 20 69  |n error occurs i|
000037d0  66 20 6e 6f 20 66 6f 6e  74 20 6d 65 6e 75 20 65  |f no font menu e|
000037e0  78 69 73 74 73 2e 20 54  68 69 73 20 63 61 6c 6c  |xists. This call|
000037f0  20 6d 61 6b 65 73 0a 75  73 65 20 6f 66 20 57 69  | makes.use of Wi|
00003800  6d 70 5f 44 65 63 6f 64  65 4d 65 6e 75 2c 20 62  |mp_DecodeMenu, b|
00003810  75 74 20 61 73 20 69 74  20 69 73 20 70 6f 73 73  |ut as it is poss|
00003820  69 62 6c 65 20 74 68 61  74 20 74 68 65 20 72 65  |ible that the re|
00003830  74 75 72 6e 65 64 20 73  74 72 69 6e 67 20 65 6e  |turned string en|
00003840  64 73 0a 77 69 74 68 20  27 50 6c 61 69 6e 27 20  |ds.with 'Plain' |
00003850  28 61 20 6d 61 64 65 20  75 70 20 6e 61 6d 65 20  |(a made up name |
00003860  74 6f 20 64 69 73 74 69  6e 67 75 69 73 65 20 61  |to distinguise a|
00003870  6e 20 65 6d 70 74 79 20  73 75 62 2d 6e 61 6d 65  |n empty sub-name|
00003880  20 66 72 6f 6d 20 74 68  65 20 72 65 73 74 0a 6f  | from the rest.o|
00003890  66 20 74 68 65 20 73 75  62 2d 6e 61 6d 65 73 29  |f the sub-names)|
000038a0  2c 20 69 74 20 68 61 73  20 74 6f 20 63 68 65 63  |, it has to chec|
000038b0  6b 20 66 6f 72 20 74 68  69 73 2c 20 61 6e 64 20  |k for this, and |
000038c0  74 68 72 6f 77 20 61 77  61 79 20 74 68 69 73 20  |throw away this |
000038d0  6c 61 73 74 0a 73 75 62  2d 6e 61 6d 65 20 73 6f  |last.sub-name so|
000038e0  20 74 68 65 20 46 6f 6e  74 4d 61 6e 61 67 65 72  | the FontManager|
000038f0  20 63 61 6e 20 72 65 63  6f 67 6e 69 73 65 20 74  | can recognise t|
00003900  68 65 20 72 65 71 75 69  72 65 64 20 66 6f 6e 74  |he required font|
00003910  2e 0a 0a 0a 0a 46 6f 6e  74 4d 65 6e 75 5f 53 6d  |.....FontMenu_Sm|
00003920  61 73 68 20 26 38 44 30  38 35 0a 2d 2d 2d 2d 2d  |ash &8D085.-----|
00003930  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003940  0a 4f 6e 20 65 6e 74 72  79 3a 20 2d 2d 0a 4f 6e  |.On entry: --.On|
00003950  20 65 78 69 74 20 3a 20  2d 2d 0a 0a 20 54 68 69  | exit : --.. Thi|
00003960  73 20 77 69 6c 6c 20 72  65 6c 65 61 73 65 20 74  |s will release t|
00003970  68 65 20 66 6f 6e 74 20  6d 65 6e 75 20 6d 65 6d  |he font menu mem|
00003980  6f 72 79 20 77 69 74 68  6f 75 74 20 6c 6f 6f 6b  |ory without look|
00003990  69 6e 67 20 61 74 20 74  68 65 20 61 6d 6f 75 6e  |ing at the amoun|
000039a0  74 20 6f 66 0a 74 69 6d  65 73 20 46 6f 6e 74 4d  |t of.times FontM|
000039b0  65 6e 75 5f 43 72 65 61  74 65 20 77 61 73 20 63  |enu_Create was c|
000039c0  61 6c 6c 65 64 2e 0a 0a  0a 0a 46 6f 6e 74 4d 65  |alled.....FontMe|
000039d0  6e 75 5f 52 65 43 72 65  61 74 65 20 26 38 44 30  |nu_ReCreate &8D0|
000039e0  38 36 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |86.-------------|
000039f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 4f 6e 20 65  |-----------.On e|
00003a00  6e 74 72 79 3a 20 2d 2d  0a 4f 6e 20 65 78 69 74  |ntry: --.On exit|
00003a10  20 3a 20 52 30 20 3d 20  4e 75 6d 62 65 72 20 6f  | : R0 = Number o|
00003a20  66 20 66 6f 6e 74 73 20  66 6f 75 6e 64 0a 0a 20  |f fonts found.. |
00003a30  54 68 69 73 20 77 69 6c  6c 20 72 65 6c 65 61 73  |This will releas|
00003a40  65 20 61 20 65 78 69 73  74 69 6e 67 20 66 6f 6e  |e a existing fon|
00003a50  74 20 6d 65 6e 75 2c 20  61 6e 64 20 72 65 63 72  |t menu, and recr|
00003a60  65 61 74 65 20 69 74 2e  0a 0a 0a 0a 20 20 20 20  |eate it.....    |
00003a70  20 20 20 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |   =============|
00003a80  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00003aa0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 0a 0a  |==============..|
00003ab0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003ac0  54 6f 20 63 6f 6e 74 61  63 74 20 74 68 65 20 61  |To contact the a|
00003ad0  75 74 68 6f 72 20 6f 66  20 46 6f 6e 74 4d 65 6e  |uthor of FontMen|
00003ae0  75 2c 20 70 6c 65 61 73  65 20 77 72 69 74 65 20  |u, please write |
00003af0  74 6f 3a 0a 0a 20 20 20  20 20 20 20 20 20 20 20  |to:..           |
00003b00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00003b20  4a 6f 72 69 73 20 52 d6  6c 69 6e 67 0a 20 20 20  |Joris R.ling.   |
00003b30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00003b50  20 20 20 20 20 20 20 20  56 65 72 6c 65 6e 67 64  |        Verlengd|
00003b60  65 20 57 69 6c 6c 65 6d  73 74 72 61 61 74 20 38  |e Willemstraat 8|
00003b70  61 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |a.              |
00003b80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003b90  20 20 20 20 20 20 20 20  20 20 20 20 20 39 37 32  |             972|
00003ba0  35 20 41 57 20 47 72 6f  6e 69 6e 67 65 6e 0a 20  |5 AW Groningen. |
00003bb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00003bd0  20 20 20 20 20 20 20 20  20 20 54 68 65 20 4e 65  |          The Ne|
00003be0  74 68 65 72 6c 61 6e 64  73 0a 0a 20 20 20 20 20  |therlands..     |
00003bf0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003c00  20 20 20 20 20 20 20 20  20 20 20 54 65 6c 65 70  |           Telep|
00003c10  68 6f 6e 65 3a 20 30 35  30 2d 32 37 31 38 39 35  |hone: 050-271895|
00003c20  0a 0a                                             |..|
00003c22