# ##########################################################################
# 
#      dthelptag.dt
# 
#      Actions and DataTypes for authoring Help information.
# 
#     (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
#     (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
#     (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
#     (c) Copyright 1993, 1994, 1995 Novell, Inc.
# 
#      $TOG: dthelptag.dt.src /main/6 1998/07/29 17:08:50 mgreess $
# 
# ##########################################################################
set DtDbVersion=1.0
# ##########################################################################
# 
# WARNING:  This file may be overwritten in subsequent installations of
#     the Common Desktop Environment (CDE).  Consequently, any system wide
#     changes should be made to an equivalent database file in
#     /usr/pkg/etc/dt/types and not in this file.
# 
# ##########################################################################
# The Help executables are shipped in ../dt/bin,  which may not be
# part of all the users' paths.  Therefore the following string is
# defined to add this to the path before invoking the client.

set HELPTAG_PATH=\$PATH:/usr/pkg/dt/bin
# ##################################################################
# 
# Data Attributes
# 
# ##################################################################
DATA_ATTRIBUTES DTHELP_HTG
{
        ACTIONS         Open,Compile,CleanUp
        ICON            Dthsrc
        NAME_TEMPLATE   %s.htg
        MIME_TYPE	text/plain
        DESCRIPTION     This is a master HelpTag source file for the \
                        desktop Help System.  Information in this file is \
                        formatted using the HelpTag markup language, and \
                        must be compiled with the HelpTag software \
                        ('dthelptag') before viewing.  The data type name \
                        is DTHELP_HTG.  DTHELP_HTG files have names ending \
                        with '.htg'.
        TYPE_LABEL      DTHELP_HTG
}
DATA_CRITERIA DTHELP_HTG1
{
	DATA_ATTRIBUTES_NAME DTHELP_HTG
        MODE            f
        NAME_PATTERN    *.htg
}
# ##################################################################
DATA_ATTRIBUTES DTHELP_CTG
{
        ACTIONS         Open,CompileCanon,CleanUp
        ICON            Dthsrc
        NAME_TEMPLATE   %s.ctg
        MIME_TYPE	text/plain
        DESCRIPTION     This is a canonical SGML master HelpTag source \
                        file for the desktop Help System.  Information in \
                        this file is formatted using the canonical HelpTag \
                        markup language, and must be compiled with the \
                        HelpTag software ('dthelptag') using the '-canon' \
                        option before viewing. The data type name is \
                        DTHELP_CTG.  DTHELP_CTG files have names ending \
                        with '.ctg'.
        TYPE_LABEL      DTHELP_CTG
}
DATA_CRITERIA DTHELP_CTG1
{
	DATA_ATTRIBUTES_NAME DTHELP_CTG
        MODE            f
        NAME_PATTERN    *.ctg
}
# ##################################################################
DATA_ATTRIBUTES DTHELP_ERR
{
        ACTIONS         Open
        ICON		Dthtop
        NAME_TEMPLATE   %s.err
        MIME_TYPE	text/plain
        DESCRIPTION     This file contains parser errors associated \
                        with a compiled Help volume.  This file is \
                        generated by the dthelptag parser only when \
                        parser errors are detected while compiling the \
                        help volume.  Its data type name is DTHELP_ERR.  \
                        DTHELP_ERR files have names ending with '.err'.
        TYPE_LABEL      DTHELP_ERR
}
DATA_CRITERIA DTHELP_ERR1
{
        DATA_ATTRIBUTES_NAME DTHELP_ERR
        NAME_PATTERN    *.err
        MODE            f
}
# ##################################################################
# ##################################################################
# 
# Actions
# 
# ##################################################################
ACTION Open
{
        LABEL           Open
        ARG_TYPE        DTHELP_HTG,DTHELP_CTG
	TYPE		MAP
        MAP_ACTION      OpenHelpTag
}
# ######
ACTION Compile
{
        LABEL           Compile
        ARG_TYPE        DTHELP_HTG
	TYPE		MAP
        MAP_ACTION	HelpTag
}
# ######
ACTION CompileCanon
{
        LABEL           CompileCanon
        ARG_TYPE        DTHELP_CTG
	TYPE		MAP
        MAP_ACTION	HelpTagCanon
}
# ######
ACTION CleanUp
{
        LABEL           Cleanup
        ARG_TYPE        DTHELP_HTG,DTHELP_CTG
	TYPE		MAP
        MAP_ACTION	CleanHelpTag
}
# ######
ACTION OpenHelpTag
{
        LABEL           OpenHelpTag
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
	EXEC_STRING	/usr/pkg/dt/bin/dtpad "%(File)Arg_1%"
	DESCRIPTION	The OpenHelpTag action opens a master HelpTag \
                        file (a '.sdl' or '.hv' file) in a text editor.
}
# ######
ACTION HelpTag
{
        LABEL           HelpTag
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
	EXEC_STRING	sh -c 'PATH=$HELPTAG_PATH dthelptag -clean 				  `basename "%(File)Arg_1"HelpTag File:"%"`; 			       PATH=$HELPTAG_PATH dthelptag 				  `basename "%(File)Arg_1%"`'
	DESCRIPTION	The HelpTag action compiles a master HelpTag \
                        file to create run-time help files.  The run-time \
                        files can be displayed by an application using the \
                        Help system, or by using the 'dthelpview' program.
}
# ######
ACTION HelpTagCanon
{
        LABEL           HelpTagCanon
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
	EXEC_STRING	sh -c 'PATH=$HELPTAG_PATH dthelptag -clean 				  `basename "%(File)Arg_1"HelpTag File:"%"`; 			       PATH=$HELPTAG_PATH dthelptag -formal 				  `basename "%(File)Arg_1%"`'
	DESCRIPTION	The HelpTagCanon action compiles a canonical SGML \
                        master HelpTag file to create run-time help files. \
                        The run-time files can be displayed by an \
                        application using the Help system, or using the \
                        'dthelpview' program.
}
# ######
ACTION CleanHelpTag
{
        LABEL           CleanHelpTag
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
	EXEC_STRING	sh -c 'PATH=$HELPTAG_PATH dthelptag -clean 				  `basename "%(File)Arg_1"HelpTag File:"%"`'
	DESCRIPTION	The CleanHelpTag action removes all run-time help \
                        files created by the HelpTag action.
}
# ######################## EOF ############################################
