4 ; Load window template resources
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
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)
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.
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.
27 ;----- Overview -------------------------------------------------------------
38 [ :LNOT::DEF:template__dfn
41 ; --- template_find ---
43 ; On entry: R0 == pointer to name to match
45 ; On exit: R0 == pointer to window definition if found
48 ; Use: Locates a template in the list and gives you a pointer to
49 ; the corresponding window defintion. You may update the
50 ; definition to store an updated window state if you really
55 ; --- template_copy ---
57 ; On entry: R0 == pointer to name to match
59 ; On exit: R0 == pointer to copy of a window definition
62 ; Use: Returns a copy of a window template (for the use of the
63 ; dialogue box system mainly), including all indirected data
64 ; set up properly and everything. The copy is writable. To
65 ; get rid of the copy, call template_free.
69 ; --- template_embedded ---
71 ; On entry: R0 == pointer to embedded template definition
73 ; On exit: R0 == pointer to copy (as for template_copy)
75 ; Use: Extracts an embedded template into a template block.
76 ; Embedded templates can be generated using the templAOF
77 ; program, and then linked into your application.
79 IMPORT template_embedded
81 ; --- template_free ---
83 ; On entry: R0 == pointer to block allocated with template_copy
87 ; Use: Frees a template copy created using template_copy.
91 ; --- template_load ---
93 ; On entry: R0 == pointer to name of template file to load
95 ; On exit: May return an error
97 ; Use: Loads the specified template file, and adds its window
98 ; definitions into the template list so they can be used when
99 ; creating dialogue boxes or windows.
101 ; If the templates can't be loaded (e.g. there isn't enough
102 ; memory) an error is generated (and can be caught using the
103 ; standard Sapphire except mechanism).
107 ; --- template_init ---
109 ; On entry: R0 == pointer to application name
113 ; Use: Initialises the template list and font array, and loads the
114 ; `Templates' resource file.
120 ;----- That's all, folks ----------------------------------------------------