2
0

template.htg 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <metainfo>
  2. <title>template (Sample Application)
  3. <copyright>
  4. Copyright &copy; 1993, 1994 Hewlett-Packard
  5. Copyright &copy; 1993, 1994 International Business Machines Corp.
  6. Copyright &copy; 1993, 1994 Sun Microsystems, Inc.
  7. Copyright &copy; 1993, 1994 Novell, Inc.
  8. All Rights Reserved.
  9. !!This program is for demonstration purposes only! !!
  10. <abstract>This online help volume is used with the `template' application.
  11. <\metainfo>
  12. <hometopic>Template Help Information
  13. <idx|introduction|
  14. This is the home topic. This is the top level of your ``template'' help
  15. information.
  16. Choose one of the following links to find out more about the ``template''
  17. application.
  18. <list bullet>
  19. * <xref chap1ID>
  20. * <xref chap2ID>
  21. <\list>
  22. <chapter id=chap1ID> User feature description
  23. The template application illustrates how a simple application
  24. can be integrated fully into the CDE desktop.
  25. The application's user-visible features are:
  26. <list bullet>
  27. * Draw using mouse button 1.
  28. * Load and Save drawings as .template files.
  29. * File manager recognition of .template files.
  30. * Print system recognition of .template files.
  31. * Front panel recognition of .template files and Template actions.
  32. * Dropping of .template file onto application will load file.
  33. * All application messages can be localized.
  34. <\list>
  35. <chapter id=chap2ID> Application description
  36. This is a template CDE application. It illustrates how to write
  37. a simple application integrated with the CDE desktop.
  38. The application provides a simple airbrush drawing facility using
  39. Motif. It defines a new file type '*.template' which contains a list
  40. of x, y coordinates for the drawn points. The application and data
  41. format favor simplicity over performance, and could obviously
  42. be improved.
  43. <procedure>Actions
  44. A set of actions are provided to allow integration into the CDE desktop:
  45. TemplateNew (labeled New) - to create a new Template data file.
  46. TemplateOpen (labeled Open) - to open an existing Template data file.
  47. TemplatePrint (labeled Print) - to Print a Template data file.
  48. <procedure>Datatypes
  49. The template data file is described by the datatype TemplateData, defined
  50. in C/template.dt
  51. <procedure>Icons
  52. A minimal set of icons are provided to integrate with the CDE desktop. The
  53. application group icons, window manager icon, Action icons and data file
  54. icons are identical. In a more sophisticated application, these would
  55. most likely be similar, but visually differentiated in some way.
  56. <procedure>Help
  57. A simple help file is provided. This can be displayed from within the
  58. application using the Help viewer widget (by selecting 'Overview' in the
  59. 'Help' menu. It can also be view using the dthelpview tool.
  60. <procedure>Message Catalog
  61. All user-visible text in the application is loaded from the message catalog
  62. template.cat.
  63. <procedure>App-defaults file
  64. The app-defaults file 'Template' contains resources to set the initial
  65. size of the application window.
  66. <procedure>Example file
  67. As recommended in the Programmer's Guide, an example .template file is
  68. provided.
  69. <procedure>The Application Package
  70. The Makefile provided will build the application binary and associated
  71. files. It then copies these into the newly created template directory
  72. hierarchy. The ./dt/ subdirectory hierarchy is described in the Programmer's
  73. Guide. The other directories (bin, app-defaults, msg) are arbitrary and
  74. may vary for your application and installation script.
  75. This application package can then be installed using an application
  76. installation script. This script should be written to ensure that
  77. the bin, app-defaults and message catalog get installed correctly
  78. on your target system, and available in the appropriate user or
  79. system search paths.
  80. The final step of the installation script should be to execute
  81. 'dtappintegrate -s template' This will ensure that the desktop
  82. files under the ./dt/ subdirectory are installed correctly and
  83. inserted into the appropriate system and user paths.
  84. <procedure>Localization
  85. The application is ready for localization. This directory contains
  86. the non-localizable portions of the application.
  87. The ./C/ directory contains the localizable portions of the application
  88. in US English. Some or all of these files should be translated and
  89. placed in a separate locale-specific directory.