123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <metainfo>
- <title>template (Sample Application)
- <copyright>
- Copyright © 1993, 1994 Hewlett-Packard
- Copyright © 1993, 1994 International Business Machines Corp.
- Copyright © 1993, 1994 Sun Microsystems, Inc.
- Copyright © 1993, 1994 Novell, Inc.
- All Rights Reserved.
- !!This program is for demonstration purposes only! !!
- <abstract>This online help volume is used with the `template' application.
- <\metainfo>
- <hometopic>Template Help Information
- <idx|introduction|
- This is the home topic. This is the top level of your ``template'' help
- information.
- Choose one of the following links to find out more about the ``template''
- application.
- <list bullet>
- * <xref chap1ID>
- * <xref chap2ID>
- <\list>
- <chapter id=chap1ID> User feature description
- The template application illustrates how a simple application
- can be integrated fully into the CDE desktop.
- The application's user-visible features are:
- <list bullet>
- * Draw using mouse button 1.
- * Load and Save drawings as .template files.
- * File manager recognition of .template files.
- * Print system recognition of .template files.
- * Front panel recognition of .template files and Template actions.
- * Dropping of .template file onto application will load file.
- * All application messages can be localized.
- <\list>
- <chapter id=chap2ID> Application description
- This is a template CDE application. It illustrates how to write
- a simple application integrated with the CDE desktop.
- The application provides a simple airbrush drawing facility using
- Motif. It defines a new file type '*.template' which contains a list
- of x, y coordinates for the drawn points. The application and data
- format favor simplicity over performance, and could obviously
- be improved.
- <procedure>Actions
- A set of actions are provided to allow integration into the CDE desktop:
- TemplateNew (labeled New) - to create a new Template data file.
- TemplateOpen (labeled Open) - to open an existing Template data file.
- TemplatePrint (labeled Print) - to Print a Template data file.
- <procedure>Datatypes
- The template data file is described by the datatype TemplateData, defined
- in C/template.dt
- <procedure>Icons
- A minimal set of icons are provided to integrate with the CDE desktop. The
- application group icons, window manager icon, Action icons and data file
- icons are identical. In a more sophisticated application, these would
- most likely be similar, but visually differentiated in some way.
- <procedure>Help
- A simple help file is provided. This can be displayed from within the
- application using the Help viewer widget (by selecting 'Overview' in the
- 'Help' menu. It can also be view using the dthelpview tool.
- <procedure>Message Catalog
- All user-visible text in the application is loaded from the message catalog
- template.cat.
- <procedure>App-defaults file
- The app-defaults file 'Template' contains resources to set the initial
- size of the application window.
- <procedure>Example file
- As recommended in the Programmer's Guide, an example .template file is
- provided.
- <procedure>The Application Package
- The Makefile provided will build the application binary and associated
- files. It then copies these into the newly created template directory
- hierarchy. The ./dt/ subdirectory hierarchy is described in the Programmer's
- Guide. The other directories (bin, app-defaults, msg) are arbitrary and
- may vary for your application and installation script.
- This application package can then be installed using an application
- installation script. This script should be written to ensure that
- the bin, app-defaults and message catalog get installed correctly
- on your target system, and available in the appropriate user or
- system search paths.
- The final step of the installation script should be to execute
- 'dtappintegrate -s template' This will ensure that the desktop
- files under the ./dt/ subdirectory are installed correctly and
- inserted into the appropriate system and user paths.
- <procedure>Localization
- The application is ready for localization. This directory contains
- the non-localizable portions of the application.
- The ./C/ directory contains the localizable portions of the application
- in US English. Some or all of these files should be translated and
- placed in a separate locale-specific directory.
|