ch06.sgm 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <!-- $XConsortium: ch06.sgm /main/10 1996/09/08 19:46:58 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <chapter id="RDMAP.recin.div.1">
  10. <title id="RDMAP.recin.mkr.1">Recommended Integration</title>
  11. <para>The<indexterm><primary>recommended integration &lt;$startrange></primary></indexterm><indexterm><primary>levels of
  12. integration</primary><secondary>recommended &lt;$startrange></secondary></indexterm><indexterm><primary>integration</primary><secondary>recommended &lt;$startrange></secondary></indexterm> Common Desktop Environment contains
  13. components and guidelines to use so that your application will integrate
  14. well with other applications on the desktop. This chapter provides an overview
  15. of each recommended component and guideline that you should use to enhance
  16. your application's level of consistency with the desktop.</para>
  17. <informaltable id="RDMAP.recin.itbl.1" frame="All">
  18. <tgroup cols="1">
  19. <colspec colname="1" colwidth="4.0 in">
  20. <tbody>
  21. <row rowsep="1">
  22. <entry><para><!--Original XRef content: 'Help System46'--><xref role="JumpText"
  23. linkend="RDMAP.recin.mkr.2"></para></entry></row>
  24. <row rowsep="1">
  25. <entry><para><!--Original XRef content: 'ToolTalk Messaging Service47'--><xref
  26. role="JumpText" linkend="RDMAP.recin.mkr.3"></para></entry></row>
  27. <row rowsep="1">
  28. <entry><para><!--Original XRef content: 'Session Manager50'--><xref role="JumpText"
  29. linkend="RDMAP.recin.mkr.9"></para></entry></row>
  30. <row rowsep="1">
  31. <entry><para><!--Original XRef content: 'Drag and Drop52'--><xref role="JumpText"
  32. linkend="RDMAP.recin.mkr.10"></para></entry></row>
  33. <row rowsep="1">
  34. <entry><para><!--Original XRef content: 'Internationalization54'--><xref role="JumpText"
  35. linkend="RDMAP.recin.mkr.11"></para></entry></row>
  36. <row rowsep="1">
  37. <entry><para><!--Original XRef content: 'Standard Font Names55'--><xref role="JumpText"
  38. linkend="RDMAP.recin.mkr.12"></para></entry></row>
  39. <row rowsep="1">
  40. <entry><para><!--Original XRef content: 'Displaying Error Messages from Your
  41. Application57'--><xref role="JumpText" linkend="RDMAP.recin.mkr.13"></para></entry>
  42. </row>
  43. <row rowsep="1">
  44. <entry><para>Printing ??
  45. </para></entry>
  46. </row>
  47. <row rowsep="1">
  48. <entry><para><!--Original XRef content: 'User Customization Issues59'--><xref
  49. role="JumpText" linkend="RDMAP.recin.mkr.14"></para></entry></row></tbody>
  50. </tgroup></informaltable>
  51. <note>
  52. <para>In addition to incorporating the components and following the guidelines
  53. in this section, you should also follow the basic integration steps outlined
  54. in <!--Original XRef content: 'Chapter&numsp;5, &xd2;Basic Application Integration'--><xref
  55. role="ChapNumAndTitle" linkend="RDMAP.BIntg.mkr.1">.</para>
  56. </note>
  57. <para>For more information on recommended integration, see the <emphasis>Programmer's Guide</emphasis>.</para>
  58. <sect1 id="RDMAP.recin.div.2">
  59. <title id="RDMAP.recin.mkr.2">Help System</title>
  60. <para>The Common Desktop Environment Help system is a complete system for
  61. developing and displaying online help for application software. It enables
  62. authors to write online help that includes rich graphics and text formatting,
  63. hyperlinks, and access to the Help system from within the application. The
  64. Help system provides a programmer's toolkit for integrating the help facilities
  65. into an application.</para>
  66. <para>Creating and integrating online help into an application can be done
  67. as a collaborative project. Developers design and implement how an application
  68. responds to a user's request for help. Authors organize and write the actual
  69. help information that is displayed.</para>
  70. <para>The Help system includes support for authors and programmers.</para>
  71. <sect2 id="RDMAP.recin.div.3">
  72. <title>For Authors<indexterm><primary>Help system</primary><secondary>authors,
  73. for</secondary></indexterm></title>
  74. <itemizedlist remap="Bullet1"><listitem><para>Common Desktop Environment HelpTag
  75. markup language&mdash;a set of <symbol role="Variable">tags</symbol> used
  76. in text files to mark organization and content of online help<indexterm><primary>HelpTag</primary></indexterm><indexterm><primary>Help system</primary><secondary>Help Tag</secondary></indexterm></para>
  77. </listitem><listitem><para>Common Desktop Environment HelpTag software&mdash;a
  78. set of software tools for converting HelpTag files into run-time help files
  79. </para>
  80. </listitem><listitem><para>Common Desktop Environment Helpview application&mdash;a
  81. viewer program for displaying online help</para>
  82. </listitem></itemizedlist>
  83. <para>Authors create help topics using the Help tag set and follow Structured
  84. Generalized Markup Language (SGML) tagging conventions. SGML markup is the
  85. primary data format. When compiled, the run-time distribution format is SGML-compliant.<indexterm>
  86. <primary>Standard Generalized Markup Language (SGML)</primary></indexterm><indexterm>
  87. <primary>Help system</primary><secondary>SGML</secondary></indexterm></para>
  88. <para>The Help system also supports non-SGML formats such as UNIX man pages,
  89. text files, and text strings.<indexterm><primary>UNIX</primary></indexterm><indexterm>
  90. <primary>Help system</primary><secondary>UNIX man pages</secondary></indexterm>
  91. </para>
  92. <sect3 id="RDMAP.recin.div.4">
  93. <title>For Programmers<indexterm><primary>Help system</primary><secondary>programmers, for</secondary></indexterm></title>
  94. <itemizedlist remap="Bullet1"><listitem><para><command>DtHelp</command> programming
  95. library&mdash;Application program interface (API) for creating and integrating
  96. help windows into your application</para>
  97. </listitem><listitem><para><command>DtHelp</command><indexterm><primary>widget</primary><secondary>Help system</secondary></indexterm> widgets&mdash; <command>DtHelpDialog</command> and <command>DtHelpQuickDialog</command> widgets to
  98. create help dialog boxes and quick help dialog boxes (these are also part
  99. of the Help library)</para>
  100. </listitem></itemizedlist>
  101. </sect3>
  102. </sect2>
  103. <sect2 id="RDMAP.recin.div.5">
  104. <title><indexterm><primary>Help system</primary><secondary>library and header
  105. files</secondary></indexterm>Library and Header Files</title>
  106. <para>The Help library, <command>libDtHelp</command>, provides support for
  107. creating and managing help dialogs based on Motif. The <command>libDtHelp</command> header files are:</para>
  108. <itemizedlist remap="Bullet1"><listitem><para><filename>Dt/Help.h</filename></para>
  109. </listitem><listitem><para><filename>Dt/HelpDialog.h</filename></para>
  110. </listitem><listitem><para><filename>Dt/HelpQuickD.h</filename></para>
  111. </listitem></itemizedlist>
  112. </sect2>
  113. <sect2 id="RDMAP.recin.div.6">
  114. <title>Demo Programs<indexterm><primary>Help system</primary><secondary>demo
  115. programs</secondary></indexterm><indexterm><primary>demo programs</primary>
  116. </indexterm></title>
  117. <para>You can find the Help system demos in <filename>/usr/dt/examples/dthelp</filename>. Read the <command>README</command> file for detailed information
  118. on the demos.</para>
  119. <sect3 id="RDMAP.recin.div.7">
  120. <title>Related Documentation</title>
  121. <para>For more information on the Help system, see the relevant man pages
  122. and the <emphasis>Help System Author's and Programmer's Guide</emphasis>.
  123. </para>
  124. </sect3>
  125. </sect2>
  126. </sect1>
  127. <sect1 id="RDMAP.recin.div.8">
  128. <title id="RDMAP.recin.mkr.3">ToolTalk Messaging Service</title>
  129. <para>The Common Desktop Environment defines two standard ToolTalk protocols
  130. known as <emphasis><indexterm><primary>message sets</primary></indexterm><indexterm>
  131. <primary>ToolTalk Messaging Service</primary><secondary>message sets</secondary>
  132. </indexterm>message sets</emphasis>. A message set contains a number of messages
  133. that can be exchanged between a sender and a handler process. These message
  134. are grouped together because they describe related requests and notices.
  135. The sender and recipient can be within the same process or on different hosts.
  136. Message sets have associated utility functions that enable you to concentrate
  137. on the semantics of the protocol without getting too involved in low-level
  138. details. Some message set functions enable you to easily defer to default
  139. behavior.</para>
  140. <para>The <emphasis>desktop message set</emphasis> encompasses three areas:<indexterm>
  141. <primary>desktop message set</primary></indexterm><indexterm><primary>ToolTalk
  142. Messaging Service</primary><secondary>desktop message set</secondary></indexterm></para>
  143. <itemizedlist remap="Bullet1"><listitem><para>Windowing behavior</para>
  144. </listitem><listitem><para>File access and short-term file lifecycle control
  145. </para>
  146. </listitem><listitem><para>Application extension languages</para>
  147. </listitem></itemizedlist>
  148. <para>See <!--Original XRef content: '&xd2;Handle Desktop'--><xref role="SectionTitle"
  149. linkend="RDMAP.recin.mkr.4"> and <!--Original XRef content: '&xd2;Send
  150. Desktop'--><xref role="SectionTitle" linkend="RDMAP.recin.mkr.5">
  151. for information on windowing behavior. See <!--Original XRef content: '&xd2;Desktop
  152. File'--><xref role="SectionTitle" linkend="RDMAP.recin.mkr.8"> for
  153. information on file access and short-term file lifecycle control. Implementing
  154. the <filename>Do_Command</filename> request is specific to the application's
  155. extension language and is not assisted by the ToolTalk Messaging Service.
  156. </para>
  157. <para>The <emphasis><indexterm><primary>media message set</primary></indexterm><indexterm>
  158. <primary>ToolTalk Messaging Service</primary><secondary>media message set</secondary></indexterm>media message set</emphasis> enables an application
  159. to be a container for arbitrary media or to be a media player and editor
  160. that can be driven from such a container. The media message set enables a
  161. container application to compose, display, edit, and print a document of
  162. an arbitrary media type, without understanding anything about the format
  163. of that media type. The ToolTalk Messaging Service routes a container's requests
  164. to the user's preferred tool for the given media type and operation. This
  165. includes routing the request to an already-running instance of the tool,
  166. if that instance can best handle the request. See <!--Original XRef content:
  167. '&xd2;Send Media'--><xref role="SectionTitle" linkend="RDMAP.recin.mkr.7">
  168. and <!--Original XRef content: '&xd2;Handle Media&xd3; on page&numsp;49'--><xref
  169. role="SecTitleAndPageNum" linkend="RDMAP.recin.mkr.6">.</para>
  170. <para>The ToolTalk Messaging Service provides support for these message sets:
  171. </para>
  172. <itemizedlist remap="Bullet1"><listitem><para id="RDMAP.recin.mkr.4">Handle
  173. Desktop</para>
  174. <para>Handling desktop requests is the most basic level of messaging integration.
  175. Any application that sends ToolTalk messages, either through calling
  176. <filename>tt_message_send()</filename> or <filename>DtActionInvoke()</filename>, should
  177. handle the desktop requests. This enables other applications to set or query
  178. things such as your application's current directory, iconic state, and
  179. <filename>$DISPLAY</filename>. For further information, see the man pages for
  180. <filename>ttdt_open()</filename>, <filename>ttdt_session_join()</filename>,
  181. <filename>ttdt_session_quit()</filename>, and <filename>ttdt_close()</filename>.</para>
  182. </listitem><listitem><para id="RDMAP.recin.mkr.5">Send Desktop</para>
  183. <para>When an application is started by <command>ttsession</command> to handle
  184. some ToolTalk request, it is a child of <command>ttsession</command> rather
  185. than of the request sender. The application will usually be started on the
  186. same X display session as the sender, but not necessarily on the same X11
  187. screen or in the same current directory context. If the application is implemented
  188. as a server process, it may already be displaying on a particular screen
  189. or in a particular directory context.</para>
  190. <para>Using desktop requests, a handling application can inherit from the
  191. sender attributes that might otherwise be inherited through command-line
  192. invocation. Use the desktop message set in this way to reset the handler's
  193. locale, current working directory, and even <filename>$DISPLAY</filename>.
  194. This enables a carefully coded receiving application to come up on the same
  195. X11 screen as the sender. A request handler can also find out the request
  196. sender's current directory and window geometry. Knowing the window geometry
  197. enables the request handler's window to avoid obscuring the request sender's
  198. window, if possible. For more information, see the <filename>ttdt_sender_imprint_on()</filename> man page.</para>
  199. </listitem><listitem><para id="RDMAP.recin.mkr.6">Handle Media</para>
  200. <para>The ToolTalk Messaging Service enables an editor to easily handle the
  201. standard media requests for the media types for which the editor is responsible.
  202. For further information, see the man pages for <filename>ttmedia_ptype_declare()</filename>, <filename>ttdt_message_accept()</filename>, <filename>ttmedia_load_reply()</filename>, and <filename>ttmedia_Deposit()</filename>.</para>
  203. </listitem><listitem><para id="RDMAP.recin.mkr.7">Send Media</para>
  204. <para>The ToolTalk Messaging Service enables a container to easily send media
  205. requests and manage the subsequent document updates sent back by the handler.
  206. In those cases in which the container doesn't engage in any ongoing ToolTalk
  207. dialog with a media handler, use the actions API instead of directly using
  208. these ToolTalk APIs. Equivalent actions (Open and Print) represent a higher
  209. level of abstraction that supports the equivalent of ToolTalk and non- ToolTalk
  210. aware media handlers.For further information, see the man pages for
  211. <filename>ttmedia_load()</filename> and <filename>ttdt_subcontract_manage()</filename>.
  212. Note that, in most cases, a container application should perform operations
  213. on objects using <filename>DtActionInvoke()</filename> instead of
  214. <filename>ttmedia_load()</filename>. See the <emphasis>ToolTalk Messaging Overview</emphasis> for a description of how ToolTalk applications can be driven
  215. using actions.</para>
  216. </listitem><listitem><para id="RDMAP.recin.mkr.8">Desktop File</para>
  217. <para>The ToolTalk Messaging Service makes it easy to send and receive the
  218. desktop messages about files. These messages enable applications to coordinate
  219. access to files. For further information, see the man pages for
  220. <filename>ttdt_file_join()</filename>, <filename>ttdt_file_quit()</filename>,
  221. <filename>ttdt_file_event()</filename>, <filename>ttdt_Get_Modified()</filename>,
  222. <filename>ttdt_Save()</filename>, and <filename>ttdt_Revert()</filename>.</para>
  223. </listitem></itemizedlist>
  224. <para>Examples of applications that already use the ToolTalk Messaging Service
  225. include the Common Desktop Environment Icon Editor, Mailer, Text Editor,
  226. and Calendar. Other parts of the Common Desktop Environment use the ToolTalk
  227. Messaging Service indirectly by defining actions that send messages.</para>
  228. <sect2 id="RDMAP.recin.div.9">
  229. <title>Library and Header Files<indexterm><primary>ToolTalk Messaging Service</primary><secondary>library and header files</secondary></indexterm></title>
  230. <para>The ToolTalk messaging library is called <command>libtt</command>. The <command>libtt</command> header files are:</para>
  231. <itemizedlist remap="Bullet1"><listitem><para><filename>Tt/tt_c.h</filename></para>
  232. </listitem><listitem><para><filename>Tt/tttk.h</filename></para>
  233. </listitem></itemizedlist>
  234. </sect2>
  235. <sect2 id="RDMAP.recin.div.10">
  236. <title>Demo Programs<indexterm><primary>ToolTalk Messaging Service</primary>
  237. <secondary>demo programs</secondary></indexterm><indexterm><primary>demo
  238. programs</primary></indexterm></title>
  239. <para>You can find the ToolTalk Messaging Service demos in <filename>/usr/dt/examples/tt</filename>. Read the <command>README</command> file for detailed information
  240. on the demos.</para>
  241. <sect3 id="RDMAP.recin.div.11">
  242. <title>Related Documentation</title>
  243. <para>For more information on the ToolTalk Messaging Service, see the relevant
  244. man pages and the <emphasis>ToolTalk Messaging</emphasis> <emphasis>Overview</emphasis>.</para>
  245. </sect3>
  246. </sect2>
  247. </sect1>
  248. <sect1 id="RDMAP.recin.div.12">
  249. <title id="RDMAP.recin.mkr.9">Session Manager</title>
  250. <para>Session Manager supports the ICCCM 1.1 <filename><indexterm><primary>WM_COMMAND</primary></indexterm><indexterm><primary>Session Manager</primary>
  251. <secondary>WM_COMMAND</secondary></indexterm>WM_COMMAND</filename> and <filename><indexterm>
  252. <primary>WM_SAVE_YOURSELF</primary></indexterm><indexterm><primary>Session
  253. Manager</primary><secondary>WM_SAVE_YOURSELF</secondary></indexterm>WM_SAVE_YOURSELF</filename><indexterm><primary>protocols</primary><secondary>WM_COMMAND</secondary></indexterm><indexterm><primary>protocols</primary><secondary>WM_SAVE_YOURSELF</secondary></indexterm> protocols, which permit:</para>
  254. <itemizedlist remap="Bullet1"><listitem><para>Your application to save state
  255. information at logout</para>
  256. </listitem><listitem><para>Session Manager to restart your application at
  257. login</para>
  258. </listitem></itemizedlist>
  259. <para>Session Manager also provides an API to assist your application in saving
  260. and restoring its state at logout and login.</para>
  261. <para>Session Manager is responsible for restarting applications at login.
  262. To do this, your application must tell Session Manager what command and command-line
  263. options are required to restart it. Use Xlib's <filename>XSetCommand()</filename>
  264. to set the <filename>WM_COMMAND</filename> property on your application's
  265. top-level window.</para>
  266. <para>When Session Manager saves a session, such as at logout, your application
  267. might need to save some state information so it can be restored to a similar
  268. state. Session Manager can optionally notify your application that the session
  269. is being saved. Your application must inform Session Manager that it wants
  270. such notification. It does this by registering the <filename>WM_SAVE_YOURSELF</filename> protocol with its top-level window <filename>WM_PROTOCOLS</filename>
  271. property and setting up a callback procedure to handle the notification.
  272. To do this, use the <filename><indexterm><primary>XmAddWMProtocols()</primary>
  273. </indexterm><indexterm><primary>Session Manager</primary><secondary>XmAddWMProtocols()</secondary></indexterm>XmAddWMProtocols()</filename> and <filename><indexterm>
  274. <primary>XmAddWMProtocolsCallback()</primary></indexterm><indexterm><primary>Session Manager</primary><secondary>XmAddWMProtocolsCallback()</secondary>
  275. </indexterm>XmAddWMProtocolsCallback()</filename> functions. Your application
  276. should not interact with the user in any way when processing the
  277. <filename>WM_SAVE_YOURSELF</filename> callback. (For example, it should not display
  278. a Save As dialog box.) It must set the <filename>WM_COMMAND</filename> property
  279. on its top-level window to notify Session Manager that it is done saving
  280. its state.</para>
  281. <para>To enable your application to save state information, use the <filename><indexterm>
  282. <primary>DtSessionSavePath()</primary></indexterm><indexterm><primary>Session
  283. Manager</primary><secondary>DtSessionSavePath()</secondary></indexterm>DtSessionSavePath()</filename> function to obtain the full path name of a file in which this
  284. information can be saved. At session restore time, use the <filename><indexterm>
  285. <primary>DtSessionRestorePath()</primary></indexterm><indexterm><primary>Session Manager</primary><secondary>DtSessionRestorePath()</secondary></indexterm>DtSessionRestorePath()</filename> function to obtain the full path name of the state file your
  286. application uses to restore its state.</para>
  287. <para>The Common Desktop Environment<indexterm><primary>Workspace Manager</primary></indexterm> Workspace Manager is responsible for restoring an application's
  288. main top-level window (containing the <filename>WM_COMMAND</filename>) property
  289. to the proper workspace, geometry, and icon state. If an application has
  290. multiple top-level windows, it is the application's responsibility to restore
  291. the states of the other top-level windows. Refer to <!--Original XRef content:
  292. '&xd2;Workspace Manager&xd3; on page&numsp;70'--><xref role="SecTitleAndPageNum"
  293. linkend="RDMAP.optin.mkr.5"> for additional information.</para>
  294. <sect2 id="RDMAP.recin.div.13">
  295. <title>Library and Header Files<indexterm><primary>Session Manager</primary>
  296. <secondary>library and header files</secondary></indexterm></title>
  297. <para>The Desktop Services library, <command>libDtSvc</command>, provides
  298. access to many desktop APIs, including the one for session management. Include
  299. the <filename>Dt/Dt.h</filename> and <filename>Dt/Session.h</filename> header
  300. files to access the Session Manager API.</para>
  301. <note>
  302. <para>If your application uses any of the Session Manager APIs, it must first
  303. initialize the <command>libDtSvc</command> library by calling either <filename><indexterm>
  304. <primary>DtInitialize()</primary></indexterm>DtInitialize()</filename> or
  305. <filename><indexterm><primary>DtAppInitialize()</primary></indexterm>DtAppInitialize()</filename>. Refer to the <filename>DtInitialize</filename>(3) or
  306. <filename>DtAppInitialize</filename>(3) man page for more information.</para>
  307. </note>
  308. </sect2>
  309. <sect2 id="RDMAP.recin.div.14">
  310. <title>Demo Programs<indexterm><primary>Session Manager</primary><secondary>demo programs</secondary></indexterm><indexterm><primary>demo programs</primary>
  311. </indexterm></title>
  312. <para>You can find the Session Manager demos in <filename>/usr/dt/examples/dtsession</filename>. Read the <command>README</command> file for detailed information
  313. on the demos.</para>
  314. <sect3 id="RDMAP.recin.div.15">
  315. <title>Related Documentation</title>
  316. <para>For more information on Session Manager, see the relevant man pages
  317. and the <emphasis>Programmer's Guide</emphasis>.</para>
  318. </sect3>
  319. </sect2>
  320. </sect1>
  321. <sect1 id="RDMAP.recin.div.16">
  322. <title id="RDMAP.recin.mkr.10">Drag and Drop</title>
  323. <para>The Common Desktop Environment provides a drag-and-drop API, that is
  324. layered on top of the Motif 2.1 drag-and-drop API, to provide convenient,
  325. consistent, and interoperable drag and drop across the desktop. The Common
  326. Desktop Environment drag-and-drop API makes it easier for developers to
  327. implement drag and drop. With drag and drop, users can manipulate objects
  328. on the screen directly by grabbing them, dragging them around the display,
  329. and dropping them on other objects to change the object's location or perform
  330. a data transfer.</para>
  331. <para>Motif 2.1 drag and drop provides low-level drag-and-drop mechanisms;
  332. Common Desktop Environment drag and drop incorporates policies for those
  333. mechanisms.<indexterm><primary>drag and drop</primary><secondary>and Motif
  334. 2.1 drag and drop</secondary></indexterm></para>
  335. <para>Common Desktop Environment drag and drop consists of an API and protocols
  336. to simplify the interface to Motif drag and drop. It implements policies
  337. such as the buffer transfer protocol and the drag cursors' appearances. Use
  338. the Common Desktop Environment drag-and-drop API, with its built-in policies,
  339. to ensure interoperability through consistency. Common Desktop Environment
  340. drag-and-drop policies are compatible with standard Motif 2.1 drag-and-drop
  341. protocols for text and file name transfers.</para>
  342. <para>Common Desktop Environment drag and drop uses the X selection mechanism
  343. to transfer data. Suitable targets exist and are registered with the X Consortium.
  344. Two desktop applications can agree to transfer data through the text, file
  345. name, or data transfer protocols.</para>
  346. <para>The existing Motif 2.1 API for drag and drop is flexible and, therefore,
  347. is somewhat difficult for nonexpert developers to use. The Common Desktop
  348. Environment drag-and-drop API provides some convenience functions that result
  349. in an API that is simpler and easier to use:</para>
  350. <itemizedlist remap="Bullet1"><listitem><para>Manages the configuration and
  351. appearance of drag icons.</para>
  352. <para>Common Desktop Environment drag and drop provides graphics for the
  353. default source, state, and operation icons that compose the drag icon in
  354. Motif 2.1.</para>
  355. </listitem><listitem><para>Defines a buffer transfer protocol.</para>
  356. <para>Motif 2.1 drag and drop defines protocols for file name and text string
  357. only.</para>
  358. </listitem><listitem><para>Enables animation upon drop.</para>
  359. <para>The drop zone can define an animation procedure that is called when
  360. the drop completes.</para>
  361. </listitem><listitem><para>Provides enumeration of targets for <command>TEXT</command> and <filename>FILE_NAME</filename> transfers.</para>
  362. </listitem><listitem><para>Provides dual registration.</para>
  363. <para>You can register a text widget as a drop zone for data other than text,
  364. while preserving the ability to accept text drops.</para>
  365. </listitem><listitem><para>Provides prioritized drop formats.</para>
  366. <para>The order in which you specify protocols for the drop zone indicates
  367. the relative priority of the protocols desired.</para>
  368. </listitem></itemizedlist>
  369. <sect2 id="RDMAP.recin.div.17">
  370. <title>Library and Header Files<indexterm><primary>drag and drop</primary>
  371. <secondary>library and header files</secondary></indexterm></title>
  372. <para>The Desktop Services library, <command>libDtSvc</command>, provides
  373. access to many desktop APIs, including that for drag and drop. Include the
  374. <filename>Dt/Dt.h</filename> and <filename>Dt/Dnd.h</filename> header files to access
  375. the drag-and-drop API.</para>
  376. <note>
  377. <para>If your application uses any of the drag-and-drop APIs, it must first
  378. initialize the <command>libDtSvc</command> library by calling either <filename><indexterm>
  379. <primary>DtInitialize()</primary></indexterm>DtInitialize()</filename> or
  380. <filename><indexterm><primary>DtAppInitialize()</primary></indexterm>DtAppInitialize()</filename>. Refer to the <filename>DtInitialize</filename>(3) or
  381. <filename>DtAppInitialize</filename>(3) man page for more information.</para>
  382. </note>
  383. </sect2>
  384. <sect2 id="RDMAP.recin.div.18">
  385. <title>Demo Programs<indexterm><primary>drag and drop</primary><secondary>demo programs</secondary></indexterm></title>
  386. <para>You can find the drag-and-drop demos in <filename>/usr/dt/examples/dtdnd</filename>. Read the <command>README</command> file for detailed information
  387. on the demos.</para>
  388. <sect3 id="RDMAP.recin.div.19">
  389. <title>Related Documentation</title>
  390. <para>For more information on Common Desktop Environment drag and drop, see
  391. the relevant man pages and the <emphasis>Programmer's Guide</emphasis>.</para>
  392. </sect3>
  393. </sect2>
  394. </sect1>
  395. <sect1 id="RDMAP.recin.div.20">
  396. <title id="RDMAP.recin.mkr.11">Internationalization</title>
  397. <para>The Common Desktop Environment is internationalized to support single-byte
  398. and multibyte locales. Developers can write internationalized applications
  399. that can be easily localized to run on any Common Desktop Environment platform.<indexterm>
  400. <primary>guidelines</primary><secondary>internationalization &lt;$startrange></secondary></indexterm><indexterm>
  401. <primary>single-byte locales</primary></indexterm><indexterm><primary>locales</primary><secondary>single-byte</secondary></indexterm><indexterm><primary>internationalization</primary><secondary>single-byte locales</secondary>
  402. </indexterm><indexterm><primary>multibyte locales</primary></indexterm><indexterm>
  403. <primary>locales</primary><secondary>multibyte</secondary></indexterm><indexterm>
  404. <primary>internationalization</primary><secondary>multibyte locales</secondary>
  405. </indexterm></para>
  406. <para>Common Desktop Environment applications (both source and binary) can
  407. be localized into regional languages and territories, and across multiple
  408. vendors and hardware platforms:<indexterm><primary>locales</primary><secondary>applications can be localized into</secondary></indexterm><indexterm><primary>internationalization</primary><secondary>locales</secondary></indexterm></para>
  409. <itemizedlist remap="Bullet1"><listitem><para>Latin American</para>
  410. </listitem><listitem><para>Western European</para>
  411. </listitem><listitem><para>Japanese</para>
  412. </listitem><listitem><para>Korean</para>
  413. </listitem><listitem><para>Chinese (Traditional and Simplified)</para>
  414. </listitem></itemizedlist>
  415. <para>The Common Desktop Environment takes advantage of internationalization
  416. features in these standards:<indexterm><primary>standards</primary><secondary>internationalization</secondary></indexterm><indexterm><primary>internationalization</primary><secondary>standards</secondary></indexterm></para>
  417. <itemizedlist remap="Bullet1"><listitem><para>IEEE 1003.2-1992 (<indexterm>
  418. <primary>POSIX</primary></indexterm> POSIX.2 Annex B)</para>
  419. </listitem><listitem><para>X Window System, Version 11 Release 6.2 (Locales
  420. and Internationalization Text Functions)<indexterm><primary>X11R6.2</primary>
  421. </indexterm></para>
  422. </listitem><listitem><para>Motif 2.1 (Internationalizing and Localizing Motif
  423. clients)<indexterm><primary>Motif 2.1</primary></indexterm></para>
  424. </listitem></itemizedlist>
  425. <para>If you intend to internationalize your application, you must ensure
  426. that it supports input and output of multibyte characters. CDE supports
  427. vertical writing, which is useful for rendering some Asian
  428. languages. Also, make sure
  429. that message catalogs are used and code can be fully localized.</para>
  430. <sect2 id="RDMAP.recin.div.21">
  431. <title>Demo Programs<indexterm><primary>internationalization</primary><secondary>demo programs</secondary></indexterm><indexterm><primary>demo programs</primary>
  432. </indexterm></title>
  433. <para>The drawing program demo in <filename>/usr/dt/examples/template</filename>
  434. is internationalized. Read the <command>README</command> file for detailed
  435. information on this demo.</para>
  436. <sect3 id="RDMAP.recin.div.22">
  437. <title>Related Documentation</title>
  438. <para>For more information on Common Desktop Environment internationalization,
  439. see the development environment component man pages and the <emphasis>Internationalization
  440. Programmer's Guid</emphasis><emphasis>e</emphasis>.<indexterm><primary>guidelines</primary><secondary>internationalization &lt;$endrange></secondary></indexterm></para>
  441. </sect3>
  442. </sect2>
  443. </sect1>
  444. <sect1 id="RDMAP.recin.div.23">
  445. <title id="RDMAP.recin.mkr.12">Standard Font Names</title>
  446. <para>The standard font names defined by the Common Desktop Environment are
  447. guaranteed to be available on all Common Desktop Environment-compliant systems.
  448. These names do not specify actual fonts. Instead, they are aliases that each
  449. system vendor maps to the vendor's best available fonts. If you use only
  450. these font names in your application, you can be sure of getting the closest
  451. matching font on any Common Desktop Environment-compliant system. These
  452. comprise a set of X Window System font names you can use for the most common
  453. categories of type designs and styles.<indexterm><primary>fonts</primary>
  454. <secondary>standard font names</secondary></indexterm><indexterm><primary>guidelines</primary><secondary>font use &lt;$startrange></secondary></indexterm></para>
  455. <para>The standard font names are mapped to different fonts on different Common
  456. Desktop Environment platforms, typically using the X font alias mechanism.
  457. This eliminates the problem of having to select from a varying set of fonts
  458. on different platforms. It also enables you to make use of the default set
  459. of fonts on a particular vendor's Common Desktop Environment implementation.
  460. </para>
  461. <para>The Common Desktop Environment defines two types of standard fonts:
  462. application fonts and interface fonts. Use the application fonts for output
  463. produced by your application. Motif widgets and the desktop use interface
  464. fonts; do <symbol role="Variable">not</symbol> change their default fonts.<indexterm>
  465. <primary>interface fonts</primary></indexterm><indexterm><primary>fonts</primary><secondary>interface</secondary></indexterm></para>
  466. <sect2 id="RDMAP.recin.div.24">
  467. <title>Application Fonts<indexterm><primary>application fonts &lt;$startrange></primary></indexterm><indexterm>
  468. <primary>fonts</primary><secondary>application &lt;$startrange></secondary></indexterm></title>
  469. <para>At least six point sizes are available on all Common Desktop Environment
  470. platforms for each font associated with a Standard Font Name: 8, 10, 12,
  471. 14, 18, and 24. XLFD font descriptions for Common Desktop Environment fonts
  472. look like:</para>
  473. <programlisting><filename>-dt-application-*</filename></programlisting>
  474. <para>when used where such patterns are valid.</para>
  475. <para>Two of the most common design variations in fonts used to display text
  476. are the presence or absence of serifs and the choice between proportional
  477. or regularly spaced (monospaced) characters. Combining these two design variations
  478. yields four generic font designs:</para>
  479. <itemizedlist remap="Bullet1"><listitem><para>Serif proportionally spaced
  480. </para>
  481. </listitem><listitem><para>Sans serif proportionally spaced</para>
  482. </listitem><listitem><para>Serif monospaced</para>
  483. </listitem><listitem><para>Sans serif monospaced</para>
  484. </listitem></itemizedlist>
  485. <para>Common examples of each of these four designs (in corresponding order)
  486. are:</para>
  487. <itemizedlist remap="Bullet1"><listitem><para>Times Roman</para>
  488. </listitem><listitem><para>Helvetica</para>
  489. </listitem><listitem><para>Courier</para>
  490. </listitem><listitem><para>Lucida Typewriter</para>
  491. </listitem></itemizedlist>
  492. <para>Each of these designs for text fonts typically come in four styles (combinations
  493. of weight and slant):</para>
  494. <itemizedlist remap="Bullet1"><listitem><para>Plain</para>
  495. </listitem><listitem><para>Bold</para>
  496. </listitem><listitem><para>Italic</para>
  497. </listitem><listitem><para>Bold-italic</para>
  498. </listitem></itemizedlist>
  499. <para>The four styles of each of the four design variations yield 16 generic
  500. font variations. These 16 generic fonts are among the most commonly used
  501. in general desktop computing. For example, Times Roman, Helvetica, and Courier,
  502. each in the four style variations, along with the Symbol font, constitute
  503. the <emphasis>Adobe&reg; 13</emphasis>&mdash;the minimum set of fonts built
  504. into all PostScript printers.</para>
  505. <para>Your application might not require an exact font family or name, but
  506. will need to use, for example, a monospaced font, a sans serif font, or a
  507. serif font. You do not have to know the exact font names present on a particular
  508. Common Desktop Environment platform. The Common Desktop Environment standard
  509. fonts default to the vendor's selection of the best font of a particular
  510. design on the vendor's platform.</para>
  511. <para>Specify the<indexterm><primary>XLFD font names</primary></indexterm><indexterm>
  512. <primary>fonts</primary><secondary>XLFD</secondary></indexterm><indexterm>
  513. <primary>standard font names</primary><secondary>XLFD font names</secondary>
  514. </indexterm> XLFD font names for the standard application fonts your application
  515. needs as font resource values in the application's <filename><indexterm><primary>app-defaults file</primary></indexterm><indexterm><primary>standard font
  516. names</primary><secondary>app-defaults file</secondary></indexterm>app-defaults</filename> file. If you do not use these font names, you might need to supply
  517. a different <computeroutput>app-defaults</computeroutput> file for each application
  518. on each Common Desktop Environment platform<literal><indexterm><primary>application fonts &lt;$endrange></primary></indexterm><indexterm><primary>fonts</primary><secondary>application &lt;$endrange></secondary></indexterm></literal>.
  519. </para>
  520. </sect2>
  521. <sect2 id="RDMAP.recin.div.25">
  522. <title>Interface Fonts<indexterm><primary>interface fonts</primary></indexterm><indexterm>
  523. <primary>fonts</primary><secondary>interface</secondary></indexterm><indexterm>
  524. <primary>standard font names</primary><secondary>interface fonts</secondary>
  525. </indexterm></title>
  526. <para>Interface fonts are the small set of finely optimized fonts that define
  527. the look of the desktop on a particular platform. These fonts cleanly and
  528. quickly convey small amounts of information, such as that appearing in window
  529. titles, buttons, menus, and text fields.</para>
  530. <para>The desktop and the Motif toolkit widgets use interface fonts. Do not
  531. use these fonts directly within your application windows.</para>
  532. <para>The standard interface font names are different from the standard application
  533. font names. They, like the application font names, are mapped to different
  534. fonts on different Common Desktop Environment platforms. Interface fonts
  535. come in three styles:</para>
  536. <itemizedlist remap="Bullet1"><listitem><para><emphasis>System</emphasis>&mdash;Read-only
  537. text (used for limited amounts of text, for example, on menus, buttons, and
  538. labels)</para>
  539. </listitem><listitem><para><emphasis>User</emphasis>&mdash;Text the end user
  540. enters, or text appearing in objects built from <command>XmText</command>-type
  541. and <command>DtTerm</command>-type widgets</para>
  542. </listitem><listitem><para><emphasis>User bold</emphasis>&mdash;Like the User
  543. font, but in bold</para>
  544. </listitem></itemizedlist>
  545. <para>Each style comes in seven sizes. Using the<indexterm><primary>Style
  546. Manager</primary></indexterm><indexterm><primary>fonts</primary><secondary>interface</secondary><tertiary>and the Style Manager</tertiary></indexterm> Style
  547. Manager, users can choose the size of interface fonts they want on their
  548. desktop.</para>
  549. </sect2>
  550. <sect2 id="RDMAP.recin.div.26">
  551. <title>Demo Programs<indexterm><primary>standard font names</primary><secondary>demo programs</secondary></indexterm></title>
  552. <para>The drawing program demo in <filename>/usr/dt/examples/template</filename>
  553. does not specify any of its own interface fonts. It serves as an example
  554. of how the Common Desktop Environment Motif interface fonts appear. However,
  555. this demo does not take advantage of application fonts.</para>
  556. <sect3 id="RDMAP.recin.div.27">
  557. <title>Related Documentation</title>
  558. <para>For more information on standard fonts, see the relevant man pages&mdash;particularly
  559. <filename>DtStdAppFontNames(5)</filename> and <filename>DtStdInterfaceFontNames(5)</filename> for the list of XLFD font names&mdash;and the <emphasis>Programmer's
  560. Guid</emphasis><emphasis>e</emphasis>.<indexterm><primary>XLFD font names</primary></indexterm><indexterm><primary>fonts</primary><secondary>XLFD</secondary></indexterm><indexterm><primary>fonts</primary><secondary>standard
  561. font names</secondary></indexterm><indexterm><primary>guidelines</primary>
  562. <secondary>font use &lt;$endrange></secondary></indexterm></para>
  563. </sect3>
  564. </sect2>
  565. </sect1>
  566. <sect1 id="RDMAP.recin.div.28">
  567. <title id="rdmap.recin.mkr.13">Displaying Error Messages from Your Application<indexterm>
  568. <primary>error messages</primary><secondary>displaying</secondary></indexterm><indexterm>
  569. <primary>guidelines</primary><secondary>error message display &lt;$startrange></secondary></indexterm></title>
  570. <para>Applications in the Common Desktop Environment follow a common model
  571. for presenting error messages and warnings. Users running your application
  572. expect messages to be displayed in message footers, error dialog boxes, or
  573. warning dialog boxes, with further explanations available in online help,
  574. when appropriate.</para>
  575. <para>This section outlines conventions for displaying error messages in your
  576. application. Because of the way message text is handled, it is important
  577. to follow these error presentation guidelines precisely. For example, casual
  578. users who start your application from the Front Panel never see messages
  579. that you send to standard error or standard out. In the Common Desktop Environment,
  580. such messages are directed to log files (<filename>$HOME/.dt/*log</filename>)
  581. that many users do not routinely examine or know about.</para>
  582. <sect2 id="RDMAP.recin.div.29">
  583. <title>How to Present Error Messages<indexterm><primary>error messages</primary>
  584. <secondary>how to display</secondary></indexterm></title>
  585. <para>Follow these rules when deciding where to tell users about warnings,
  586. messages, and error conditions:</para>
  587. <itemizedlist remap="Bullet1"><listitem><para><emphasis>If this message is
  588. informational,</emphasis> display the text in the message footer of the application.
  589. (<emphasis>Example:</emphasis> &ldquo;<command>MyDoc</command> file copied.&rdquo;)
  590. </para>
  591. </listitem><listitem><para><emphasis>If this message is about an error or
  592. serious warning</emphasis>&mdash;a problem where an operation important to
  593. the user has failed&mdash;display an error dialog box or warning dialog box.
  594. </para>
  595. </listitem></itemizedlist>
  596. </sect2>
  597. <sect2 id="RDMAP.recin.div.30">
  598. <title>What Information to Present in Error Dialogs<indexterm><primary>error
  599. messages</primary><secondary>information to present in error dialogs</secondary>
  600. </indexterm></title>
  601. <para>A good error dialog or warning dialog gives a user the following information:
  602. </para>
  603. <itemizedlist remap="Bullet1"><listitem><para>What happened (from the user's
  604. point of view)</para>
  605. </listitem><listitem><para>Why it happened, in simple language</para>
  606. </listitem><listitem><para>How to fix the problem</para>
  607. </listitem></itemizedlist>
  608. </sect2>
  609. <sect2 id="RDMAP.recin.div.31">
  610. <title>Linking Message Dialogs to Online Help<indexterm><primary>error messages</primary><secondary>linking message dialogs to online help</secondary></indexterm></title>
  611. <para>In cases where additional background information is required, or where
  612. it takes more than four or five lines of a dialog to completely explain an
  613. error, add a button that links the user to the appropriate section of online
  614. help.</para>
  615. <sect3 id="RDMAP.recin.div.32">
  616. <title>Related Documentation</title>
  617. <para>For details on displaying error messages in your application and linking
  618. message dialogs to online help, see the <emphasis>Programmer's Guide</emphasis> .<indexterm>
  619. <primary>error messages</primary><secondary>displaying</secondary></indexterm><indexterm>
  620. <primary>guidelines</primary><secondary>error message display &lt;$endrange></secondary></indexterm></para>
  621. </sect3>
  622. </sect2>
  623. <sect2 id="RDMAP.recin.div.32a">
  624. <title>Using Message Logging</title>
  625. <indexterm><primary>error messages</primary><secondary>logging</secondary></indexterm>
  626. <para>The message logging service logs messages
  627. for CDE applications. This service
  628. provides a central location for messages
  629. that users and system administrators
  630. can consult to diagnose problems.
  631. </para>
  632. <para>The message logging service supports
  633. several message types: Informational,
  634. Stderr, Debug, Warning, and Error. In addition
  635. to logging messages, the
  636. API supports the use of alternative
  637. message logging handlers and the ability
  638. to open message log files.
  639. </para>
  640. </sect2>
  641. </sect1>
  642. <sect1 id="RDMAP.recin.div.32b">
  643. <title>Printing</title>
  644. <indexterm><primary>printing</primary></indexterm>
  645. <para>The CDE printing facility is for use primarily by applications
  646. that perform X printing, but is sufficiently generalized for
  647. use by any CDE application. The application user typically prints files through a set of dialogs
  648. that are invoked when the user selects (for example) the application's
  649. pull-down menu for printing a file.
  650. </para>
  651. <para>Two facilities for supporting printing are available to the application
  652. developer:
  653. </para>
  654. <itemizedlist>
  655. <listitem>
  656. <para>The DtPrint convenience functions &mdash These provide the user dialogs for
  657. setting print options. This facility also establishes and maintains print connections,
  658. initiates printing, and maintains the print setup data.
  659. </para>
  660. </listitem>
  661. <listitem>
  662. <para>The Print Dialog Manager &mdash This process is separate from the X Print Server
  663. and X Printing Application; it provides printer- and spooler-specific setup
  664. dialogs.
  665. </para>
  666. </listitem>
  667. </itemizedlist>
  668. </sect1>
  669. <sect1 id="RDMAP.recin.div.33">
  670. <title id="RDMAP.recin.mkr.14">User Customization Issues<indexterm><primary>user customization issues</primary></indexterm><indexterm><primary>customization</primary><secondary>user issues &lt;$startrange></secondary></indexterm></title>
  671. <para>This section presents guidelines to follow when designing your application's
  672. user interface.</para>
  673. <sect2 id="RDMAP.recin.div.34">
  674. <title>Color Use<indexterm><primary>user customization issues</primary><secondary>color use</secondary></indexterm><indexterm><primary>color use and user
  675. customization</primary></indexterm><indexterm><primary>guidelines</primary>
  676. <secondary>color use</secondary></indexterm></title>
  677. <para>When you design your application's user interface, do not specify color
  678. settings that override the default color scheme that the Common Desktop
  679. Environment provides for Motif and desktop widgets. For application-defined
  680. colors, use the following colors to promote sharing with other desktop applications:
  681. </para>
  682. <itemizedlist remap="Bullet1"><listitem><para>Black</para>
  683. </listitem><listitem><para>White</para>
  684. </listitem><listitem><para>Red</para>
  685. </listitem><listitem><para>Green</para>
  686. </listitem><listitem><para>Blue</para>
  687. </listitem><listitem><para>Yellow</para>
  688. </listitem><listitem><para>Cyan</para>
  689. </listitem><listitem><para>Magenta</para>
  690. </listitem><listitem><para>Gray (eight shades: #de, #bd, #ab, #94, #73, #63,
  691. #42, and #21)</para>
  692. </listitem></itemizedlist>
  693. <para>In most cases, you should not specify colors, so that your application
  694. uses the colors chosen by the end user in the desktop Style Manager.</para>
  695. </sect2>
  696. <sect2 id="RDMAP.recin.div.35">
  697. <title>Font Use<indexterm><primary>user customization issues</primary><secondary>font use</secondary></indexterm><indexterm><primary>fonts</primary><secondary>user customization issues</secondary></indexterm><indexterm><primary>guidelines</primary><secondary>font use</secondary></indexterm></title>
  698. <para>For your Motif widgets, use the fonts supplied by the Common Desktop
  699. Environment so that your application's windows look like other desktop client
  700. windows and so that users can change the size of these fonts using the Style
  701. Manager. If you override the supplied fonts by changing the Motif <computeroutput>fontList</computeroutput> resource specifications, then you must provide
  702. additional functionality if you want users to be able to customize the fonts
  703. in your application.</para>
  704. <para>Use the fonts from the Common Desktop Environment standard application
  705. font names to specify&mdash;in your <computeroutput><indexterm><primary>app-defaults file</primary></indexterm>app-defaults</computeroutput> file&mdash;resources
  706. you use within your application (aside from the ones Motif uses for its widgets).
  707. This ensures that your application finds the appropriate fonts on all Common
  708. Desktop Environment platforms, which makes your application more portable
  709. across such platforms. For more information, see <!--Original XRef content:
  710. '&xd2;Standard Font Names&xd3; on page&numsp;55'--><xref role="SecTitleAndPageNum"
  711. linkend="RDMAP.recin.mkr.12">.</para>
  712. <note>
  713. <para>The<indexterm><primary>Style Manager</primary></indexterm> Style Manager
  714. only controls fonts for applications written using Motif version 2.1 or later.
  715. It will <symbol role="Variable">not</symbol> supply correct fonts for Motif
  716. 1.1 (or earlier) applications. These applications must specify their own
  717. fonts in the <filename>app-defaults</filename> file.</para>
  718. </note>
  719. </sect2>
  720. <sect2 id="RDMAP.recin.div.36">
  721. <title>Accessibility<indexterm><primary>user customization issues</primary>
  722. <secondary>accessibility &lt;$startrange></secondary></indexterm><indexterm><primary>guidelines</primary>
  723. <secondary>accessibility &lt;$startrange></secondary></indexterm></title>
  724. <para>This section provides guidelines for making software applications accessible
  725. to people with disabilities.</para>
  726. <sect3 id="RDMAP.recin.div.37">
  727. <title>Physical Disabilities<indexterm><primary>accessibility</primary><secondary>physical disabilities</secondary></indexterm><indexterm><primary>physical
  728. disabilities and user customization</primary></indexterm><indexterm><primary>disabilities and user customization</primary><secondary>physical</secondary>
  729. </indexterm></title>
  730. <para>Provide keyboard access to all application features, such as those usually
  731. accessible through menus or drag and drop, to enable people with physical
  732. disabilities to more easily use your application.</para>
  733. </sect3>
  734. <sect3 id="RDMAP.recin.div.38">
  735. <title>Visual Disabilities<indexterm><primary>accessibility</primary><secondary>visual disabilities</secondary></indexterm><indexterm><primary>visual disabilities
  736. and user customization</primary></indexterm><indexterm><primary>disabilities
  737. and user customization</primary><secondary>visual</secondary></indexterm></title>
  738. <para>Follow these guidelines to make your application more accessible to
  739. people with visual disabilities:</para>
  740. <itemizedlist remap="Bullet1"><listitem><para>Do not hardcode application
  741. colors.</para>
  742. </listitem><listitem><para>Do not hardcode graphic attributes such as line,
  743. border, and shadow thickness. These attributes should scale with font size.
  744. </para>
  745. </listitem><listitem><para>Do not hardcode font sizes and styles.</para>
  746. </listitem><listitem><para>Provide descriptive names for all widgets. In particular,
  747. include descriptive names <emphasis>in your application code</emphasis> for
  748. widgets that do not display labels on the screen; for example, palette items
  749. or icons. This often enables screen-reading software to provide descriptive
  750. information to blind users.</para>
  751. </listitem></itemizedlist>
  752. </sect3>
  753. <sect3 id="RDMAP.recin.div.39">
  754. <title>Hearing Disabilities<indexterm><primary>accessibility</primary><secondary>hearing disabilities</secondary></indexterm><indexterm><primary>hearing disabilities
  755. and user customization</primary></indexterm><indexterm><primary>disabilities
  756. and user customization</primary><secondary>hearing</secondary></indexterm></title>
  757. <para>Follow these guidelines to make your application more accessible to
  758. people with hearing disabilities:</para>
  759. <itemizedlist remap="Bullet1"><listitem><para>Never assume that an end user
  760. will hear an audible notification.</para>
  761. </listitem><listitem><para>Where appropriate, allow end users to choose between
  762. audible or visual cues.</para>
  763. </listitem><listitem><para>Do not overuse or rely exclusively on audible cues.
  764. </para>
  765. </listitem><listitem><para>Enable end users to configure frequency and volume
  766. of audible cues.</para>
  767. </listitem></itemizedlist>
  768. </sect3>
  769. <sect3 id="RDMAP.recin.div.40">
  770. <title>Language, Cognitive, and Other Disabilities<indexterm><primary>accessibility</primary><secondary>language, cognitive, and other disabilities</secondary>
  771. </indexterm><indexterm><primary>language disabilities and user customization</primary></indexterm><indexterm><primary>disabilities and user customization</primary><secondary>language, cognitive, and other</secondary></indexterm></title>
  772. <para>The access guidelines outlined for visual, hearing, and physical disabilities
  773. typically benefit end users with cognitive, language, and other disabilities.
  774. In addition to those guidelines, include tear-off menus and user-configurable
  775. menus for important application features whenever possible.<indexterm>
  776. <primary>user customization issues</primary><secondary>accessibility &lt;$endrange></secondary></indexterm><indexterm>
  777. <primary>guidelines</primary><secondary>accessibility &lt;$endrange></secondary></indexterm></para>
  778. </sect3>
  779. </sect2>
  780. <sect2 id="RDMAP.recin.div.41">
  781. <title>Mouse Double-Click Speed<indexterm><primary>mouse double-click speed</primary></indexterm><indexterm><primary>guidelines</primary><secondary>mouse double-click speed</secondary></indexterm><indexterm><primary>user
  782. customization issues</primary><secondary>mouse double-click speed</secondary>
  783. </indexterm></title>
  784. <para>For the end user to experience consistency across applications, you
  785. should not hardcode double-click durations into your application or <filename><indexterm>
  786. <primary>app-defaults file</primary></indexterm>app-defaults</filename> files.
  787. This way, when the user changes the double-click time in the<indexterm>
  788. <primary>Style Manager</primary></indexterm> Style Manager, your application
  789. responds along with the other desktop applications.</para>
  790. </sect2>
  791. <sect2 id="RDMAP.recin.div.42">
  792. <title>Demo Programs<indexterm><primary>user customization issues</primary>
  793. <secondary>demo program</secondary></indexterm></title>
  794. <para>The drawing program demo in <filename>/usr/dt/examples/template</filename>
  795. uses the Common Desktop Environment's default colors and fonts. This enables
  796. the user to customize the colors and fonts in this program by using the Style
  797. Manager. Read the <command>README</command> file for detailed information
  798. on this demo.</para>
  799. <sect3 id="RDMAP.recin.div.43">
  800. <title>Related Documentation</title>
  801. <para>For more information on user customization issues, see the <emphasis>Style Guide and Certification Checklist</emphasis>.<indexterm><primary>customization</primary><secondary>user issues &lt;$endrange></secondary></indexterm><indexterm><primary>recommended integration &lt;$endrange></primary></indexterm><indexterm>
  802. <primary>levels of integration</primary><secondary>recommended &lt;$endrange></secondary></indexterm><indexterm>
  803. <primary>integration</primary><secondary>recommended &lt;$endrange></secondary></indexterm></para>
  804. </sect3>
  805. </sect2>
  806. </sect1>
  807. </chapter>
  808. <!--fickle 1.14 mif-to-docbook 1.7 01/02/96 04:30:53-->
  809. <?Pub *0000053768>