chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / menu
1 ;
2 ; menu.sh
3 ;
4 ; RISC OS menu handling facilities
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire.  If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ;  menu_create
32 ;  menu_help
33 ;  menu_init
34
35                 [       :LNOT::DEF:menu__dfn
36                 GBLL    menu__dfn
37
38 ; --- menu_create ---
39 ;
40 ; On entry:     R0 == pointer to menu definition table
41 ;               R1 == event handler to use
42 ;               R2 == R10 value for handler
43 ;               R3 == R12 value for handler
44 ;
45 ; On exit:      --
46 ;
47 ; Use:          Creates a menu from the given menu definition
48 ;               table. If this call is called more than once before
49 ;               a menu is opened then the menu definiton are concatenated
50 ;               into a large menu. Only the first menu title read is
51 ;               taken notice of. Notice therefore, that the call doesn't
52 ;               actually open a menu.
53
54                 IMPORT  menu_create
55
56 ; --- menu_help ---
57 ;
58 ; On entry:     R0 == pointer to base message tag
59 ;               R1 == index of menu item
60 ;
61 ; On exit:      --
62 ;
63 ; Use:          Adds a string to the help message found by adding the menu
64 ;               item number to the base message tag.
65
66                 IMPORT  menu_help
67
68 ; --- menu_init ---
69 ;
70 ; On entry:     --
71 ;
72 ; On exit:      --
73 ;
74 ; Use:          Initialises the menu system.
75
76                 IMPORT  menu_init
77
78                 ]
79
80 ;----- That's all, folks ----------------------------------------------------
81
82                 END