Rename "dtapp" to "dtopen"
[oweals/cde.git] / cde / programs / localized / C / types / dthelptag.dt
1 # ##########################################################################
2
3 #      dthelptag.dt
4
5 #      Actions and DataTypes for authoring Help information.
6
7 #     (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
8 #     (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
9 #     (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
10 #     (c) Copyright 1993, 1994, 1995 Novell, Inc.
11
12 #      $TOG: dthelptag.dt.src /main/6 1998/07/29 17:08:50 mgreess $
13
14 # ##########################################################################
15
16 set DtDbVersion=1.0
17
18 # ##########################################################################
19
20 # WARNING:  This file may be overwritten in subsequent installations of
21 #     the Common Desktop Environment (CDE).  Consequently, any system wide
22 #     changes should be made to an equivalent database file in
23 #     /etc/dt/types and not in this file.
24
25 # ##########################################################################
26
27 # The Help executables are shipped in ../dt/bin,  which may not be
28 # part of all the users' paths.  Therefore the following string is
29 # defined to add this to the path before invoking the client.
30
31 set HELPTAG_PATH=\$PATH:/usr/dt/bin
32
33 # ##################################################################
34
35 # Data Attributes
36
37 # ##################################################################
38 DATA_ATTRIBUTES DTHELP_HTG
39 {
40         ACTIONS         Open,Compile,CleanUp
41         ICON            Dthsrc
42         NAME_TEMPLATE   %s.htg
43         MIME_TYPE       text/plain
44         DESCRIPTION     This is a master HelpTag source file for the \
45                         desktop Help System.  Information in this file is \
46                         formatted using the HelpTag markup language, and \
47                         must be compiled with the HelpTag software \
48                         ('dthelptag') before viewing.  The data type name \
49                         is DTHELP_HTG.  DTHELP_HTG files have names ending \
50                         with '.htg'.
51         TYPE_LABEL      DTHELP_HTG
52 }
53
54 DATA_CRITERIA DTHELP_HTG1
55 {
56         DATA_ATTRIBUTES_NAME DTHELP_HTG
57         MODE            f
58         NAME_PATTERN    *.htg
59 }
60
61 # ##################################################################
62
63 DATA_ATTRIBUTES DTHELP_CTG
64 {
65         ACTIONS         Open,CompileCanon,CleanUp
66         ICON            Dthsrc
67         NAME_TEMPLATE   %s.ctg
68         MIME_TYPE       text/plain
69         DESCRIPTION     This is a canonical SGML master HelpTag source \
70                         file for the desktop Help System.  Information in \
71                         this file is formatted using the canonical HelpTag \
72                         markup language, and must be compiled with the \
73                         HelpTag software ('dthelptag') using the '-canon' \
74                         option before viewing. The data type name is \
75                         DTHELP_CTG.  DTHELP_CTG files have names ending \
76                         with '.ctg'.
77         TYPE_LABEL      DTHELP_CTG
78 }
79
80 DATA_CRITERIA DTHELP_CTG1
81 {
82         DATA_ATTRIBUTES_NAME DTHELP_CTG
83         MODE            f
84         NAME_PATTERN    *.ctg
85 }
86
87 # ##################################################################
88
89 DATA_ATTRIBUTES DTHELP_ERR
90 {
91         ACTIONS         Open
92         ICON            Dthtop
93         NAME_TEMPLATE   %s.err
94         MIME_TYPE       text/plain
95         DESCRIPTION     This file contains parser errors associated \
96                         with a compiled Help volume.  This file is \
97                         generated by the dthelptag parser only when \
98                         parser errors are detected while compiling the \
99                         help volume.  Its data type name is DTHELP_ERR.  \
100                         DTHELP_ERR files have names ending with '.err'.
101         TYPE_LABEL      DTHELP_ERR
102 }
103
104 DATA_CRITERIA DTHELP_ERR1
105 {
106         DATA_ATTRIBUTES_NAME DTHELP_ERR
107         NAME_PATTERN    *.err
108         MODE            f
109 }
110
111 # ##################################################################
112 # ##################################################################
113
114 # Actions
115
116 # ##################################################################
117 ACTION Open
118 {
119         LABEL           Open
120         ARG_TYPE        DTHELP_HTG,DTHELP_CTG
121         TYPE            MAP
122         MAP_ACTION      OpenHelpTag
123 }
124
125 # ######
126
127 ACTION Compile
128 {
129         LABEL           Compile
130         ARG_TYPE        DTHELP_HTG
131         TYPE            MAP
132         MAP_ACTION      HelpTag
133 }
134
135 # ######
136
137 ACTION CompileCanon
138 {
139         LABEL           CompileCanon
140         ARG_TYPE        DTHELP_CTG
141         TYPE            MAP
142         MAP_ACTION      HelpTagCanon
143 }
144
145 # ######
146
147 ACTION CleanUp
148 {
149         LABEL           Cleanup
150         ARG_TYPE        DTHELP_HTG,DTHELP_CTG
151         TYPE            MAP
152         MAP_ACTION      CleanHelpTag
153 }
154
155 # ######
156
157 ACTION OpenHelpTag
158 {
159         LABEL           OpenHelpTag
160         TYPE            COMMAND
161         WINDOW_TYPE     NO_STDIO
162         EXEC_STRING     /usr/dt/bin/dtpad "%(File)Arg_1%"
163         DESCRIPTION     The OpenHelpTag action opens a master HelpTag \
164                         file (a '.sdl' or '.hv' file) in a text editor.
165 }
166
167 # ######
168
169 ACTION HelpTag
170 {
171         LABEL           HelpTag
172         TYPE            COMMAND
173         WINDOW_TYPE     NO_STDIO
174         EXEC_STRING     sh -c 'PATH=$HELPTAG_PATH dthelptag -clean                                `basename "%(File)Arg_1"HelpTag File:"%"`;                           PATH=$HELPTAG_PATH dthelptag                               `basename "%(File)Arg_1%"`'
175
176
177
178         DESCRIPTION     The HelpTag action compiles a master HelpTag \
179                         file to create run-time help files.  The run-time \
180                         files can be displayed by an application using the \
181                         Help system, or by using the 'dthelpview' program.
182 }
183
184 # ######
185
186 ACTION HelpTagCanon
187 {
188         LABEL           HelpTagCanon
189         TYPE            COMMAND
190         WINDOW_TYPE     NO_STDIO
191         EXEC_STRING     sh -c 'PATH=$HELPTAG_PATH dthelptag -clean                                `basename "%(File)Arg_1"HelpTag File:"%"`;                           PATH=$HELPTAG_PATH dthelptag -formal                               `basename "%(File)Arg_1%"`'
192
193
194
195         DESCRIPTION     The HelpTagCanon action compiles a canonical SGML \
196                         master HelpTag file to create run-time help files. \
197                         The run-time files can be displayed by an \
198                         application using the Help system, or using the \
199                         'dthelpview' program.
200 }
201
202 # ######
203
204 ACTION CleanHelpTag
205 {
206         LABEL           CleanHelpTag
207         TYPE            COMMAND
208         WINDOW_TYPE     NO_STDIO
209         EXEC_STRING     sh -c 'PATH=$HELPTAG_PATH dthelptag -clean                                `basename "%(File)Arg_1"HelpTag File:"%"`'
210
211         DESCRIPTION     The CleanHelpTag action removes all run-time help \
212                         files created by the HelpTag action.
213 }
214 # ######################## EOF ############################################