chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / _tms / tmsCreate
1 ;
2 ; tmsCreate.sh
3 ;
4 ; Creation, recreation and destruction of tearoff menus
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 ;  tms_create
32 ;  tms__destroy
33 ;  tms__width
34 ;  tms_recreate
35
36 ; --- tms_create ---
37 ;
38 ; On entry:     R0 == pointer to a menu block
39 ;               R1 == pointer to event handler for the menu section
40 ;               R2 == R10 value to pass to the event handler
41 ;               R3 == R12 value to pass to the event handler
42 ;
43 ; On exit:      R0 == tearoff handle for this menu
44 ;               May return an error
45 ;
46 ; Use:          Creates a new menu, or adds sections to an existing one.
47
48                 IMPORT  tms_create
49
50 ; --- tms__destroy ---
51 ;
52 ; On entry:     R0 == handle of tearoff menu to destroy
53 ;
54 ; On exit:      --
55 ;
56 ; Use:          Zaps a tearoff menu entirely, leaving no survivors
57
58                 IMPORT  tms__destroy
59
60 ; --- tms__width ---
61 ;
62 ; On entry:     R10 == pointer to the menu
63 ;
64 ; On exit:      CS if the width has changed, CC otherwise
65 ;
66 ; Use:          Calculates what the appropriate width fields of the given
67 ;               menu should be.
68
69                 IMPORT  tms__width
70
71 ; --- tms_recreate ---
72 ;
73 ; On entry:     --
74 ;
75 ; On exit:      --
76 ;
77 ; Use:          Recreates the existing menu structure, making changes where
78 ;               appropriate.
79
80                 IMPORT  tms_recreate
81
82 ;----- That's all, folks ----------------------------------------------------
83
84                 END