Home » Archimedes archive » Acorn User » AU 1995-05.adf » !Internet_StarterPak » !TCPIP/TCPIP_Doc/Notes/MenuFiles

!TCPIP/TCPIP_Doc/Notes/MenuFiles

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

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

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-05.adf » !Internet_StarterPak
Filename: !TCPIP/TCPIP_Doc/Notes/MenuFiles
Read OK:
File size: 0436 bytes
Load address: 0000
Exec address: 0000
File contents
!TCPIP (vterm) Menu file format
===============================

The file format for menu definitions was very lazily based upon that
used by RISC_OSLib for specifying menus and sort of grew from there.

While reading this, it is worth looking at one or more of the menu file
in !TCPIPUser.Menus.

The first line in the menu file is a list of the actual menu items as
seen on a menu in the following format:

<menu entry> [<sep> <menu entry> ...]

  <sep> is an item separatr as follows:

    "," is a normal separator.
    "|" shows a line between the entries.

  Any <menu entry> may be prefixed with "~" to cause it to be greyed
out, and so unselectable.


Subsequent lines in the menu file contain the actual macro, one line for
each menu entry in the following format:

['@'<submenu file>] [<command> [ '|' <command> ...] ]

For example:

@Mail
  Specifies a submenu only.

@Time time read
  Specifies a submenu 'time' with action command 'time read'.
  
filer run <Newsbase$Dir>.!Run|filer run <TTFN$Dir>.!Run
 Note the separator ---------^
 This loads Newsbase and !TTFN
00000000  21 54 43 50 49 50 20 28  76 74 65 72 6d 29 20 4d  |!TCPIP (vterm) M|
00000010  65 6e 75 20 66 69 6c 65  20 66 6f 72 6d 61 74 0a  |enu file format.|
00000020  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000030  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0a  |===============.|
00000040  0a 54 68 65 20 66 69 6c  65 20 66 6f 72 6d 61 74  |.The file format|
00000050  20 66 6f 72 20 6d 65 6e  75 20 64 65 66 69 6e 69  | for menu defini|
00000060  74 69 6f 6e 73 20 77 61  73 20 76 65 72 79 20 6c  |tions was very l|
00000070  61 7a 69 6c 79 20 62 61  73 65 64 20 75 70 6f 6e  |azily based upon|
00000080  20 74 68 61 74 0a 75 73  65 64 20 62 79 20 52 49  | that.used by RI|
00000090  53 43 5f 4f 53 4c 69 62  20 66 6f 72 20 73 70 65  |SC_OSLib for spe|
000000a0  63 69 66 79 69 6e 67 20  6d 65 6e 75 73 20 61 6e  |cifying menus an|
000000b0  64 20 73 6f 72 74 20 6f  66 20 67 72 65 77 20 66  |d sort of grew f|
000000c0  72 6f 6d 20 74 68 65 72  65 2e 0a 0a 57 68 69 6c  |rom there...Whil|
000000d0  65 20 72 65 61 64 69 6e  67 20 74 68 69 73 2c 20  |e reading this, |
000000e0  69 74 20 69 73 20 77 6f  72 74 68 20 6c 6f 6f 6b  |it is worth look|
000000f0  69 6e 67 20 61 74 20 6f  6e 65 20 6f 72 20 6d 6f  |ing at one or mo|
00000100  72 65 20 6f 66 20 74 68  65 20 6d 65 6e 75 20 66  |re of the menu f|
00000110  69 6c 65 0a 69 6e 20 21  54 43 50 49 50 55 73 65  |ile.in !TCPIPUse|
00000120  72 2e 4d 65 6e 75 73 2e  0a 0a 54 68 65 20 66 69  |r.Menus...The fi|
00000130  72 73 74 20 6c 69 6e 65  20 69 6e 20 74 68 65 20  |rst line in the |
00000140  6d 65 6e 75 20 66 69 6c  65 20 69 73 20 61 20 6c  |menu file is a l|
00000150  69 73 74 20 6f 66 20 74  68 65 20 61 63 74 75 61  |ist of the actua|
00000160  6c 20 6d 65 6e 75 20 69  74 65 6d 73 20 61 73 0a  |l menu items as.|
00000170  73 65 65 6e 20 6f 6e 20  61 20 6d 65 6e 75 20 69  |seen on a menu i|
00000180  6e 20 74 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 20  |n the following |
00000190  66 6f 72 6d 61 74 3a 0a  0a 3c 6d 65 6e 75 20 65  |format:..<menu e|
000001a0  6e 74 72 79 3e 20 5b 3c  73 65 70 3e 20 3c 6d 65  |ntry> [<sep> <me|
000001b0  6e 75 20 65 6e 74 72 79  3e 20 2e 2e 2e 5d 0a 0a  |nu entry> ...]..|
000001c0  20 20 3c 73 65 70 3e 20  69 73 20 61 6e 20 69 74  |  <sep> is an it|
000001d0  65 6d 20 73 65 70 61 72  61 74 72 20 61 73 20 66  |em separatr as f|
000001e0  6f 6c 6c 6f 77 73 3a 0a  0a 20 20 20 20 22 2c 22  |ollows:..    ","|
000001f0  20 69 73 20 61 20 6e 6f  72 6d 61 6c 20 73 65 70  | is a normal sep|
00000200  61 72 61 74 6f 72 2e 0a  20 20 20 20 22 7c 22 20  |arator..    "|" |
00000210  73 68 6f 77 73 20 61 20  6c 69 6e 65 20 62 65 74  |shows a line bet|
00000220  77 65 65 6e 20 74 68 65  20 65 6e 74 72 69 65 73  |ween the entries|
00000230  2e 0a 0a 20 20 41 6e 79  20 3c 6d 65 6e 75 20 65  |...  Any <menu e|
00000240  6e 74 72 79 3e 20 6d 61  79 20 62 65 20 70 72 65  |ntry> may be pre|
00000250  66 69 78 65 64 20 77 69  74 68 20 22 7e 22 20 74  |fixed with "~" t|
00000260  6f 20 63 61 75 73 65 20  69 74 20 74 6f 20 62 65  |o cause it to be|
00000270  20 67 72 65 79 65 64 0a  6f 75 74 2c 20 61 6e 64  | greyed.out, and|
00000280  20 73 6f 20 75 6e 73 65  6c 65 63 74 61 62 6c 65  | so unselectable|
00000290  2e 0a 0a 0a 53 75 62 73  65 71 75 65 6e 74 20 6c  |....Subsequent l|
000002a0  69 6e 65 73 20 69 6e 20  74 68 65 20 6d 65 6e 75  |ines in the menu|
000002b0  20 66 69 6c 65 20 63 6f  6e 74 61 69 6e 20 74 68  | file contain th|
000002c0  65 20 61 63 74 75 61 6c  20 6d 61 63 72 6f 2c 20  |e actual macro, |
000002d0  6f 6e 65 20 6c 69 6e 65  20 66 6f 72 0a 65 61 63  |one line for.eac|
000002e0  68 20 6d 65 6e 75 20 65  6e 74 72 79 20 69 6e 20  |h menu entry in |
000002f0  74 68 65 20 66 6f 6c 6c  6f 77 69 6e 67 20 66 6f  |the following fo|
00000300  72 6d 61 74 3a 0a 0a 5b  27 40 27 3c 73 75 62 6d  |rmat:..['@'<subm|
00000310  65 6e 75 20 66 69 6c 65  3e 5d 20 5b 3c 63 6f 6d  |enu file>] [<com|
00000320  6d 61 6e 64 3e 20 5b 20  27 7c 27 20 3c 63 6f 6d  |mand> [ '|' <com|
00000330  6d 61 6e 64 3e 20 2e 2e  2e 5d 20 5d 0a 0a 46 6f  |mand> ...] ]..Fo|
00000340  72 20 65 78 61 6d 70 6c  65 3a 0a 0a 40 4d 61 69  |r example:..@Mai|
00000350  6c 0a 20 20 53 70 65 63  69 66 69 65 73 20 61 20  |l.  Specifies a |
00000360  73 75 62 6d 65 6e 75 20  6f 6e 6c 79 2e 0a 0a 40  |submenu only...@|
00000370  54 69 6d 65 20 74 69 6d  65 20 72 65 61 64 0a 20  |Time time read. |
00000380  20 53 70 65 63 69 66 69  65 73 20 61 20 73 75 62  | Specifies a sub|
00000390  6d 65 6e 75 20 27 74 69  6d 65 27 20 77 69 74 68  |menu 'time' with|
000003a0  20 61 63 74 69 6f 6e 20  63 6f 6d 6d 61 6e 64 20  | action command |
000003b0  27 74 69 6d 65 20 72 65  61 64 27 2e 0a 20 20 0a  |'time read'..  .|
000003c0  66 69 6c 65 72 20 72 75  6e 20 3c 4e 65 77 73 62  |filer run <Newsb|
000003d0  61 73 65 24 44 69 72 3e  2e 21 52 75 6e 7c 66 69  |ase$Dir>.!Run|fi|
000003e0  6c 65 72 20 72 75 6e 20  3c 54 54 46 4e 24 44 69  |ler run <TTFN$Di|
000003f0  72 3e 2e 21 52 75 6e 0a  20 4e 6f 74 65 20 74 68  |r>.!Run. Note th|
00000400  65 20 73 65 70 61 72 61  74 6f 72 20 2d 2d 2d 2d  |e separator ----|
00000410  2d 2d 2d 2d 2d 5e 0a 20  54 68 69 73 20 6c 6f 61  |-----^. This loa|
00000420  64 73 20 4e 65 77 73 62  61 73 65 20 61 6e 64 20  |ds Newsbase and |
00000430  21 54 54 46 4e 0a                                 |!TTFN.|
00000436