PrintSet.sgm 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <!-- $XConsortium: PrintSet.sgm /main/10 1996/09/08 20:10:10 rws $ -->
  2. <!-- (c) Copyright 1996 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1996 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1996 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1996 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1996 Novell, Inc. -->
  7. <!-- (c) Copyright 1996 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1996 Hitachi. -->
  9. <![ %CDE.C.CDE; [<refentry id="CDE.XPRINT.DtPrintSetupBox">]]>
  10. <![ %CDE.C.XO; [<refentry id="XCSA.XPRINT.DtPrintSetupBox">]]>
  11. <refmeta><refentrytitle>
  12. DtPrintSetupBox</refentrytitle><manvolnum>library call</manvolnum></refmeta><refnamediv>
  13. <refname><function>DtPrintSetupBox</function></refname><refpurpose>application
  14. print setup widget</refpurpose></refnamediv><refsynopsisdiv>
  15. <synopsis><?Pub Caret>#include &lt;Dt/Print.h></synopsis>
  16. </refsynopsisdiv><refsect1>
  17. <title>DESCRIPTION</title>
  18. <para><function>DtPrintSetupBox</function> is a widget that is typically the
  19. initial window used to set various options prior to printing from an application.
  20. This widget is designed primarily for use by applications that utilize the
  21. X Print Service. However, it can also be used by applications employing other
  22. printing methods.</para>
  23. <para><function>DtPrintSetupBox</function> is organized based on generic print
  24. options and application specific print options. The sections are clearly
  25. demarcated with separators to set off the generic section from the application
  26. specific section(s). By utilizing the <Symbol>DtNworkAreaLocation</Symbol>
  27. resource, the application developer can choose to utilize an area above the
  28. generic section, below the generic section, or both above and below the generic
  29. section.</para>
  30. <para>The four default buttons (<literal>Print</literal>, <literal>Setup</literal>, <literal>Cancel</literal>, and <literal>Help</literal>) are considered generic buttons.
  31. Applications can create additional pushbuttons as children of <function>DtPrintSetupBox</function>. These buttons will be laid out following the <literal>Print</literal>
  32. button.</para>
  33. <para>The <literal>Printer Name</literal> combo box contains the X printer
  34. specifier of the printer to be used for the print job. The X printer specifier
  35. is an identifier that uniquely identifies an X printer. The format of this
  36. specifier is <emphasis>printerName</emphasis>@<emphasis>host</emphasis>: <emphasis>display</emphasis>.</para>
  37. <refsect2>
  38. <title>Descendants</title>
  39. <para><function>DtPrintSetupBox</function> creates the descendants shown in
  40. the following table. An application can use <Symbol>XtNameToWidget</Symbol>
  41. to gain access to the named descendent. In addition, a user or an application
  42. can use the descendant name when specifying resource values.</para>
  43. <informaltable>
  44. <tgroup cols="3" colsep="0" rowsep="0">
  45. <colspec align="left" colwidth="2.16in">
  46. <colspec align="left" colwidth="1.95in">
  47. <colspec align="left" colwidth="2.53in">
  48. <thead>
  49. <row><entry align="left" valign="bottom"><para>Named Descendant</para></entry>
  50. <entry align="left" valign="bottom"><para>Class</para></entry><entry align="left"
  51. valign="bottom"><para>Identity</para></entry></row></thead>
  52. <tbody>
  53. <row>
  54. <entry align="left" valign="top"><para>BottomWorkAreaSeparator</para></entry>
  55. <entry align="left" valign="top"><para>XmSeparatorGadget</para></entry>
  56. <entry align="left" valign="top"><para>Separator above the bottom work area
  57. </para></entry></row>
  58. <row>
  59. <entry align="left" valign="top"><para>ButtonSeparator</para></entry>
  60. <entry align="left" valign="top"><para>XmSeparatorGadget</para></entry>
  61. <entry align="left" valign="top"><para>Separator above the pushbuttons</para></entry>
  62. </row>
  63. <row>
  64. <entry align="left" valign="top"><para>Cancel</para></entry>
  65. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  66. <entry align="left" valign="top"><para>Cancel button</para></entry></row>
  67. <row>
  68. <entry align="left" valign="top"><para>Copies</para></entry>
  69. <entry align="left" valign="top"><para>XmSimpleSpinBox</para></entry>
  70. <entry align="left" valign="top"><para>SpinBox containing the number of copies
  71. </para></entry></row>
  72. <row>
  73. <entry align="left" valign="top"><para>CopiesLabel</para></entry>
  74. <entry align="left" valign="top"><para>XmLabelGadget</para></entry>
  75. <entry align="left" valign="top"><para>Label for the Copies SpinBox</para></entry>
  76. </row>
  77. <row>
  78. <entry align="left" valign="top"><para>DescriptionLabel</para></entry>
  79. <entry align="left" valign="top"><para>XmLabelGadget</para></entry>
  80. <entry align="left" valign="top"><para>Label for the printer description</para></entry>
  81. </row>
  82. <row>
  83. <entry align="left" valign="top"><para>FileName</para></entry>
  84. <entry align="left" valign="top"><para>XmTextField</para></entry>
  85. <entry align="left" valign="top"><para>File name field</para></entry>
  86. </row>
  87. <row>
  88. <entry align="left" valign="top"><para>FileNameCheckBox</para></entry>
  89. <entry align="left" valign="top"><para>XmRowColumn</para></entry>
  90. <entry align="left" valign="top"><para>Check box (includes label) for file
  91. name field</para></entry></row>
  92. <row>
  93. <entry align="left" valign="top"><para>Help</para></entry>
  94. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  95. <entry align="left" valign="top"><para>Help button</para></entry></row>
  96. <row>
  97. <entry align="left" valign="top"><para>Info</para></entry>
  98. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  99. <entry align="left" valign="top"><para>Printer information button</para></entry>
  100. </row>
  101. <row>
  102. <entry align="left" valign="top"><para>Name</para></entry>
  103. <entry align="left" valign="top"><para>XmComboBox</para></entry>
  104. <entry align="left" valign="top"><para>Printer name</para></entry></row>
  105. <row>
  106. <entry align="left" valign="top"><para>NameLabel</para></entry>
  107. <entry align="left" valign="top"><para>XmLabelGadget</para></entry>
  108. <entry align="left" valign="top"><para>Label for the printer name field</para></entry>
  109. </row>
  110. <row>
  111. <entry align="left" valign="top"><para>Print</para></entry>
  112. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  113. <entry align="left" valign="top"><para>Print button</para></entry></row>
  114. <row>
  115. <entry align="left" valign="top"><para>SelectFile</para></entry>
  116. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  117. <entry align="left" valign="top"><para>Select File button</para></entry></row>
  118. <row>
  119. <entry align="left" valign="top"><para>SelectPrinter</para></entry>
  120. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  121. <entry align="left" valign="top"><para>Select Printer button</para></entry>
  122. </row>
  123. <row>
  124. <entry align="left" valign="top"><para>Setup</para></entry>
  125. <entry align="left" valign="top"><para>XmPushButtonGadget</para></entry>
  126. <entry align="left" valign="top"><para>Setup button</para></entry></row>
  127. <row>
  128. <entry align="left" valign="top"><para>TopWorkAreaSeparator</para></entry>
  129. <entry align="left" valign="top"><para>XmSeparatorGadget</para></entry>
  130. <entry align="left" valign="top"><para>Separator below the top work area</para></entry>
  131. </row></tbody></tgroup></informaltable>
  132. </refsect2>
  133. <refsect2>
  134. <title>Classes</title>
  135. <para><function>DtPrintSetupBox</function> inherits behavior and resources
  136. from the Core, Composite, Constraint, XmManager, and XmBulletinBoard superclasses.
  137. </para>
  138. <para>The class pointer is <Symbol>dtPrintSetupBoxWidgetClass</Symbol>.
  139. </para>
  140. <para>The class name is <Symbol>DtPrintSetupBox</Symbol>.</para>
  141. </refsect2>
  142. <refsect2>
  143. <title>Resources</title>
  144. <para>The following table lists the <function>DtPrintSetupBox</function> resources.
  145. </para>
  146. <informaltable>
  147. <tgroup cols="4" colsep="0" rowsep="0">
  148. <colspec align="left" colwidth="2.27in">
  149. <colspec align="left" colwidth="2.92in">
  150. <colspec align="left" colwidth="0.86in">
  151. <colspec align="left" colwidth="1.24in">
  152. <thead>
  153. <row><entry align="left" valign="bottom"><para>Name</para></entry><entry align="left"
  154. valign="bottom"><para>Class/Type</para></entry><entry align="left" valign="bottom"><para>Access</para></entry><entry align="left" valign="bottom"><para>Default Value
  155. </para></entry></row></thead>
  156. <tbody>
  157. <row>
  158. <entry align="left" valign="top"><para>DtNcancelCallback</para></entry>
  159. <entry align="left" valign="top"><para>DtCCancelCallback/XtCallbackList</para></entry>
  160. <entry align="left" valign="top"><para>C</para></entry>
  161. <entry align="left" valign="top"><para>NULL</para></entry></row>
  162. <row>
  163. <entry align="left" valign="top"><para>DtNclosePrintDisplayCallback</para></entry>
  164. <entry align="left" valign="top"><para>DtCCloseDisplayCallback/XtCallbackList
  165. </para></entry>
  166. <entry align="left" valign="top"><para>C</para></entry>
  167. <entry align="left" valign="top"><para>NULL</para></entry></row>
  168. <row>
  169. <entry align="left" valign="top"><para>DtNcopies</para></entry>
  170. <entry align="left" valign="top"><para>DtCCopies/int</para></entry>
  171. <entry align="left" valign="top"><para>CSG</para></entry>
  172. <entry align="left" valign="top"><para>1</para></entry></row>
  173. <row>
  174. <entry align="left" valign="top"><para>DtNdescription</para></entry>
  175. <entry align="left" valign="top"><para>DtCDescription/XmString</para></entry>
  176. <entry align="left" valign="top"><para>CSG</para></entry>
  177. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  178. <row>
  179. <entry align="left" valign="top"><para>DtNfileName</para></entry>
  180. <entry align="left" valign="top"><para>DtCPrintToFileName/String</para></entry>
  181. <entry align="left" valign="top"><para>CSG</para></entry>
  182. <entry align="left" valign="top"><para>NULL</para></entry></row>
  183. <row>
  184. <entry align="left" valign="top"><para>DtNgetAttributesCallback</para></entry>
  185. <entry align="left" valign="top"><para>DtCGetAttributesCallback/XtCallbackList
  186. </para></entry>
  187. <entry align="left" valign="top"><para>C</para></entry>
  188. <entry align="left" valign="top"><para>NULL</para></entry></row>
  189. <row>
  190. <entry align="left" valign="top"><para>DtNminimizeButtons</para></entry>
  191. <entry align="left" valign="top"><para>DtCminimizeButtons/Boolean</para></entry>
  192. <entry align="left" valign="top"><para>CSG</para></entry>
  193. <entry align="left" valign="top"><para>False</para></entry></row>
  194. <row>
  195. <entry align="left" valign="top"><para>DtNprintCallback</para></entry>
  196. <entry align="left" valign="top"><para>DtCPrintCallback/XtCallbackList</para></entry>
  197. <entry align="left" valign="top"><para>C</para></entry>
  198. <entry align="left" valign="top"><para>NULL</para></entry></row>
  199. <row>
  200. <entry align="left" valign="top"><para>DtNprintDestination</para></entry>
  201. <entry align="left" valign="top"><para>DtCPrintDestination/XtEnum</para></entry>
  202. <entry align="left" valign="top"><para>CSG</para></entry>
  203. <entry align="left" valign="top"><para>DtPRINT_TO_PRINTER</para></entry></row>
  204. <row>
  205. <entry align="left" valign="top"><para>DtNprinterInfoProc</para></entry>
  206. <entry align="left" valign="top"><para>DtCPrinterInfoProc/DtPrintSetupProc
  207. </para></entry>
  208. <entry align="left" valign="top"><para>CSG</para></entry>
  209. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  210. <row>
  211. <entry align="left" valign="top"><para>DtNprinterName</para></entry>
  212. <entry align="left" valign="top"><para>DtCPrinter/String</para></entry>
  213. <entry align="left" valign="top"><para>CSG</para></entry>
  214. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  215. <row>
  216. <entry align="left" valign="top"><para>DtNprintSetupMode</para></entry>
  217. <entry align="left" valign="top"><para>DtCPrintSetupMode/XtEnum</para></entry>
  218. <entry align="left" valign="top"><para>CG</para></entry>
  219. <entry align="left" valign="top"><para>DtPRINT_SETUP_XP</para></entry></row>
  220. <row>
  221. <entry align="left" valign="top"><para>DtNselectFileProc</para></entry>
  222. <entry align="left" valign="top"><para>DtCSelectFileProc/DtPrintSetupProc
  223. </para></entry>
  224. <entry align="left" valign="top"><para>CSG</para></entry>
  225. <entry align="left" valign="top"><para>default procedure</para></entry></row>
  226. <row>
  227. <entry align="left" valign="top"><para>DtNselectPrinterProc</para></entry>
  228. <entry align="left" valign="top"><para>DtCSelectPrinterProc/DtPrintSetupProc
  229. </para></entry>
  230. <entry align="left" valign="top"><para>CSG</para></entry>
  231. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  232. <row>
  233. <entry align="left" valign="top"><para>DtNsetAttributesCallback</para></entry>
  234. <entry align="left" valign="top"><para>DtCSetAttributesCallback/XtCallbackList
  235. </para></entry>
  236. <entry align="left" valign="top"><para>C</para></entry>
  237. <entry align="left" valign="top"><para>NULL</para></entry></row>
  238. <row>
  239. <entry align="left" valign="top"><para>DtNsetupProc</para></entry>
  240. <entry align="left" valign="top"><para>DtCSetupProc/DtPrintSetupProc</para></entry>
  241. <entry align="left" valign="top"><para>CSG</para></entry>
  242. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  243. <row>
  244. <entry align="left" valign="top"><para>DtNsetupProc</para></entry>
  245. <entry align="left" valign="top"><para>DtCSetupProc/DtPrintSetupProc</para></entry>
  246. <entry align="left" valign="top"><para>CSG</para></entry>
  247. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  248. <row>
  249. <entry align="left" valign="top"><para>DtNverifyPrinterProc</para></entry>
  250. <entry align="left" valign="top"><para>DtCVerifyPrinterProc/DtPrintSetupProc
  251. </para></entry>
  252. <entry align="left" valign="top"><para>CSG</para></entry>
  253. <entry align="left" valign="top"><para>dynamic</para></entry></row>
  254. <row>
  255. <entry align="left" valign="top"><para>DtNworkAreaLocation</para></entry>
  256. <entry align="left" valign="top"><para>DtCworkAreaLocation/XtEnum</para></entry>
  257. <entry align="left" valign="top"><para>CSG</para></entry>
  258. <entry align="left" valign="top"><para>DtWORK_AREA_BOTTOM</para></entry></row>
  259. </tbody></tgroup></informaltable>
  260. <para>The <function>DtPrintSetupBox</function> resources are defined as follows:
  261. </para>
  262. <variablelist>
  263. <varlistentry><term><Symbol>DtNcancelCallback</Symbol></term>
  264. <listitem>
  265. <para>Specifies the list of callbacks that is called when the Cancel button
  266. is activated. The callback reason is <Symbol>DtPRINT_CR_CANCEL</Symbol>.
  267. </para>
  268. </listitem>
  269. </varlistentry>
  270. <varlistentry><term><Symbol>DtNclosePrintDisplayCallback</Symbol></term>
  271. <listitem>
  272. <para>When the value of the <Symbol>DtNprintSetupMode</Symbol> resource
  273. is <Symbol>DtPRINT_SETUP_XP</Symbol>, <function>DtPrintSetupBox</function>
  274. will manage the X printing display connection and print context. As such, <Symbol>DtNclosePrintDisplayCallback</Symbol> is provided to allow an application
  275. to perform any desired processing (such as destroying windows created on the
  276. print display) before <function>DtPrintSetupBox</function> destroys the current
  277. print context and closes the current print display connection.</para>
  278. <para>This callback list will not be called if the value of the <Symbol>DtNprintSetupMode</Symbol> resource is anything other than <Symbol>DtPRINT_SETUP_XP</Symbol>.</para>
  279. <para>The callback reason is <Symbol>DtPRINT_CR_CLOSE_PRINT_DISPLAY</Symbol>.
  280. </para>
  281. </listitem>
  282. </varlistentry>
  283. <varlistentry><term><Symbol>DtNcopies</Symbol></term>
  284. <listitem>
  285. <para>The number of copies of the document to print. This is a spin box into
  286. which the user may enter a positive integer.</para>
  287. </listitem>
  288. </varlistentry>
  289. <varlistentry><term><Symbol>DtNdescription</Symbol></term>
  290. <listitem>
  291. <para>A description of the printer as provided by the system administrator.
  292. </para>
  293. </listitem>
  294. </varlistentry>
  295. <varlistentry><term><Symbol>DtNfileName</Symbol></term>
  296. <listitem>
  297. <para>Specifies the name of the destination file. Setting this resource will
  298. update the value of the File Name text field.</para>
  299. </listitem>
  300. </varlistentry>
  301. <varlistentry><term><Symbol>DtNgetAttributesCallback</Symbol></term>
  302. <listitem>
  303. <para>Specifies the list of callbacks that is called whenever <function>DtPrintSetupBox</function> receives an <Symbol>XPAttributeNotify</Symbol> event, or immediately
  304. after a new X printer connection is established. This callback list will only
  305. be called if the value of the <Symbol>DtNprintSetupMode</Symbol> resource
  306. is <Symbol>DtPRINT_SETUP_XP</Symbol>.</para>
  307. <para>This callback is intended to be used by applications that utilize X
  308. Print Service attributes directly. These applications will be interested in
  309. changes made to the printing attributes by <function>DtPrintSetupBox</function>
  310. or by other processes, such as the Print Dialog Manager (PDM).</para>
  311. <para>One of two callback reason codes will be set for this callback. The
  312. two reasons are of particular interest to applications that elect to present
  313. information in their GUI based on X Print Service attributes. The following
  314. indicates how such applications should respond to each code:</para>
  315. <variablelist>
  316. <varlistentry><term><Symbol>DtPRINT_CR_GET_STATIC_ATTRIBUTES</Symbol></term>
  317. <listitem>
  318. <para>The application should update only those controls that cannot be modified
  319. by the user. This reason is set in response to encountering a new set of attributes
  320. as the result of <function>DtPrintSetupBox</function>'s establishing a new
  321. X printer connection. Additionally, subsequent immediate action to be taken
  322. by <function>DtPrintSetupBox</function>'s will result in the <Symbol>DtNsetAttributesCallback</Symbol> list being called followed by either the <Symbol>DtNprintCallback</Symbol> list or the <Symbol>DtNsetupProc</Symbol>. If the application
  323. were to update dynamic GUI controls within this <Symbol>DtNgetAttributesCallback</Symbol>, any input the user provided would be overridden by the printer
  324. defaults in the resulting print job or setup dialog.</para>
  325. </listitem>
  326. </varlistentry>
  327. <varlistentry><term><Symbol>DtPRINT_CR_GET_ATTRIBUTES</Symbol></term>
  328. <listitem>
  329. <para>The application should update all static and dynamic controls. This
  330. reason is set in response to <function>DtPrintSetupBox</function>'s receiving
  331. an <Symbol>XpAttributeNotify</Symbol> event, or if a new X printer connection
  332. was established as the result of the user activating the Printer Info button.
  333. </para>
  334. </listitem>
  335. </varlistentry>
  336. </variablelist>
  337. </listitem>
  338. </varlistentry>
  339. <varlistentry><term><Symbol>DtNminimizeButtons</Symbol></term>
  340. <listitem>
  341. <para>If false, sets the dimensions of all of the buttons at the bottom of
  342. the widget to the width of the widest button and the height of the tallest
  343. button. If true, the dimensions of the buttons are not altered.</para>
  344. </listitem>
  345. </varlistentry>
  346. <varlistentry><term><Symbol>DtNprintCallback</Symbol></term>
  347. <listitem>
  348. <para>Specifies the list of callbacks that is called when the Print button
  349. is activated. The callback reason is <Symbol>DtPRINT_CR_PRINT</Symbol>.
  350. This callback is used to initiate the print job.</para>
  351. </listitem>
  352. </varlistentry>
  353. <varlistentry><term><Symbol>DtNprintDestination</Symbol></term>
  354. <listitem>
  355. <para>Indicates where the print output should be directed. Valid values for
  356. this resource are:</para>
  357. <variablelist>
  358. <varlistentry><term><Symbol>DtPRINT_TO_FILE</Symbol></term>
  359. <listitem>
  360. <para>Direct print output to a file. The destination file name is indicated
  361. by the <Symbol>DtNfileName</Symbol> resource. Setting this value will cause
  362. the Print To File checkbox to be selected, enable the File Name text field,
  363. and enable the Select File button.</para>
  364. </listitem>
  365. </varlistentry>
  366. <varlistentry><term><Symbol>DtPRINT_TO_PRINTER</Symbol></term>
  367. <listitem>
  368. <para>Direct print output to a printer. The destination printer is indicated
  369. by the <Symbol>DtNprinterName</Symbol> resource. Setting this value will
  370. cause the Print To File checkbox to be deselected, disable the File Name text
  371. field, and disable the Select File button.</para>
  372. </listitem>
  373. </varlistentry>
  374. </variablelist>
  375. </listitem>
  376. </varlistentry>
  377. <varlistentry><term><Symbol>DtNprinterInfoProc</Symbol></term>
  378. <listitem>
  379. <para>This resource specifies the procedure that will be used to present printer
  380. information in response to activation of the Printer Information button. The
  381. printer selection dialog presented by the default <Symbol>DtNselectPrinterProc</Symbol> will also call this procedure in response to activation of its
  382. Printer Information button.</para>
  383. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>, a default procedure that presents a printer information
  384. dialog is used. For other values of <Symbol>DtNprintSetupMode</Symbol>,
  385. the default value of <Symbol>DtNprinterInfoProc</Symbol> is NULL.</para>
  386. <para>Typically, this procedure does not update <Symbol>DtPrintSetupBox</Symbol>
  387. resources nor X Print Service attributes. The return value of this procedure
  388. is ignored by <function>DtPrintSetupBox</function>. However, it is recommended
  389. that the procedure follow the conventions presented in the "DtPrintSetupProc"
  390. section to ensure future compatibility.</para>
  391. </listitem>
  392. </varlistentry>
  393. <varlistentry><term><Symbol>DtNprinterName</Symbol></term>
  394. <listitem>
  395. <para>The name of the printer to send the print job to.</para>
  396. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>, setting this resource will update the Printer
  397. Name field based on the value of the <Symbol>XpPrinterNameMode</Symbol>
  398. XRM resource. See the "EXTERNAL INFLUENCES" section in this man page for more
  399. information. If the value of the <Symbol>DtNprintSetupMode</Symbol> resource
  400. is <Symbol>DtPRINT_SETUP_PLAIN</Symbol>, setting this resource will update
  401. the value of the Printer Name text field with the value of this resource.
  402. </para>
  403. </listitem>
  404. </varlistentry>
  405. <varlistentry><term><Symbol>DtNprintSetupMode</Symbol></term>
  406. <listitem>
  407. <para>Instructs the widget as to whether or not it is being used in an application
  408. that utilizes the X Print Service. If so, then the widget will manage the
  409. X printing display connection and print context, and provide defaults for
  410. a number of X printing operations, such as printer selection and information
  411. dialogs, and printer verification. Refer to individual resource descriptions
  412. to determine if and how they are affected by the value of this resource. Valid
  413. values for this resource are:</para>
  414. <variablelist>
  415. <varlistentry><term><Symbol>DtPRINT_SETUP_PLAIN</Symbol></term>
  416. <listitem>
  417. <para>This widget will be used by an application that performs its own print
  418. document format generation and print job submission.</para>
  419. </listitem>
  420. </varlistentry>
  421. <varlistentry><term><Symbol>DtPRINT_SETUP_XP</Symbol></term>
  422. <listitem>
  423. <para>This widget will be used by an application that utilizes the X Print
  424. Service to perform print document format generation and print job submission.
  425. </para>
  426. </listitem>
  427. </varlistentry>
  428. </variablelist>
  429. </listitem>
  430. </varlistentry>
  431. <varlistentry><term><Symbol>DtNselectFileProc</Symbol></term>
  432. <listitem>
  433. <para>This resource specifies the procedure that will be used in response
  434. to activation of the Select File button. The default value for this resource
  435. is a pointer to a procedure which will invoke an <Symbol>XmFileSelectionBox</Symbol> dialog to select a file name.</para>
  436. <para>If the user cancels the file selection dialog, no <function>DtPrintSetupBox</function> components will be updated. If the user selects a file name, the
  437. file name will be set as the value for the <Symbol>DtNfileName</Symbol>
  438. resource. This procedure communicates the newly selected file name to <function>DtPrintSetupBox</function> by setting the <Symbol>DtNfileName</Symbol> resource.
  439. </para>
  440. <para>Since the default procedure presents a File Selection Dialog, the resource
  441. is actually set after the procedure returns, due to the asynchronous nature
  442. of widgets and callbacks. The return value of this procedure is ignored by <function>DtPrintSetupBox</function>. However, it is recommended that the procedure
  443. follow the conventions presented in the "DtPrintSetupProc" section to ensure
  444. future compatibility.</para>
  445. </listitem>
  446. </varlistentry>
  447. <varlistentry><term><Symbol>DtNselectPrinterProc</Symbol></term>
  448. <listitem>
  449. <para>This resource specifies the procedure that will be used in response
  450. to activation of the Select Printer button. If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>,
  451. a default procedure that invokes a <Symbol>DtPrinterSelectionDialog</Symbol>
  452. is used. If the user cancels the printer selection dialog no <function>DtPrintSetupBox</function> components will be updated. If the user selects a printer, the
  453. printer will be set as the value for the <Symbol>DtNprinterName</Symbol>
  454. resource.</para>
  455. <para>This procedure communicates the newly selected printer name to <function>DtPrintSetupBox</function> by setting the <Symbol>DtNprinterName</Symbol>
  456. resource. Since the default procedure presents a Printer Selection Dialog,
  457. the resource is actually set after the procedure returns, due to the asynchronous
  458. nature of widgets and callbacks.</para>
  459. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is
  460. anything other than <Symbol>DtPRINT_SETUP_XP</Symbol>, the default value
  461. of <Symbol>DtNselectPrinterProc</Symbol> is NULL.</para>
  462. <para>The return value of this procedure is ignored by <function>DtPrintSetupBox</function>. However, it is recommended that the procedure follow the conventions
  463. presented in the "DtPrintSetupProc" section to ensure future compatibility.
  464. </para>
  465. </listitem>
  466. </varlistentry>
  467. <varlistentry><term><Symbol>DtNsetAttributesCallback</Symbol></term>
  468. <listitem>
  469. <para>Specifies the list of callbacks that is called whenever <function>DtPrintSetupBox</function> is about to perform an operation that will utilize X Print Service
  470. attributes. This callback list will only be called if the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>.
  471. </para>
  472. <para>This callback is intended to be used by applications that utilize X
  473. Print Service attributes directly. This callback provides these applications
  474. with a chance to set attributes whenever a subsequent <function>DtPrintSetupBox</function> operation will utilize the current set of attributes (for example,
  475. prior to calling the <Symbol>DtNprintCallback</Symbol> list).</para>
  476. <para>The callback reason is <Symbol>DtPRINT_CR_SET_ATTRIBUTES</Symbol>.
  477. </para>
  478. </listitem>
  479. </varlistentry>
  480. <varlistentry><term><Symbol>DtNsetupProc</Symbol></term>
  481. <listitem>
  482. <para>This resource specifies the procedure that will be used in response
  483. to activation of the Setup button. If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>, a default procedure
  484. is provided that will call <Symbol>XpNotifyPDM</Symbol> in order to present
  485. the setup dialog provided by the Print Dialog Manager.</para>
  486. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is
  487. anything other than <Symbol>DtPRINT_SETUP_XP</Symbol>, the default value
  488. of <Symbol>DtNsetupProc</Symbol> is NULL.</para>
  489. <para>This procedure typically updates X Print Service attributes, and does
  490. not set any <function>DtPrintSetupBox</function> resources.</para>
  491. <para>The return value of this procedure is ignored by <function>DtPrintSetupBox</function>. However, it is recommended that the procedure follow the conventions
  492. presented in the "DtPrintSetupProc" section to ensure future compatibility.
  493. </para>
  494. </listitem>
  495. </varlistentry>
  496. <varlistentry><term><Symbol>DtNverifyPrinterProc</Symbol></term>
  497. <listitem>
  498. <para>This resource specifies the procedure that will be used to verify the
  499. current value of the <Symbol>DtNprinterName</Symbol> resource before any
  500. operation requiring a valid printer is performed. If the current value of
  501. the <Symbol>DtNprinterName</Symbol> resource is NULL, this procedure will
  502. set a default printer as the value of the <Symbol>DtNprinterName</Symbol>
  503. resource.</para>
  504. <para>If this procedure provides a default printer name, or a fully qualified
  505. X printer name, it should communicate the new name to <function>DtPrintSetupBox</function> by setting the <Symbol>DtNprinterName</Symbol> resource before
  506. returning.</para>
  507. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is <Symbol>DtPRINT_SETUP_XP</Symbol>, a default procedure will be set as the value of
  508. the <Symbol>DtNverifyPrinterProc</Symbol> resource. This default procedure
  509. will verify the X printer, and establish a print display connection and print
  510. context for the printer. The procedure communicates the new print display
  511. and context to <function>DtPrintSetupBox</function> by updating the <literal>print_data->print_display</literal> and <literal>print_data->print_context</literal> elements of the callback structure prior to returning.</para>
  512. <para>If the value of the <Symbol>DtNprintSetupMode</Symbol> resource is
  513. anything other than <Symbol>DtPRINT_SETUP_XP</Symbol>, the default value
  514. of <Symbol>DtNverifyPrinterProc</Symbol> is NULL.</para>
  515. <para>If the value of the <Symbol>DtNverifyPrinterProc</Symbol> resource
  516. is NULL, the printer name is always considered valid.</para>
  517. <para>If this procedure determines the printer name is valid or sets a valid
  518. printer name (and X printer connection information), it should return <Symbol>DtPRINT_SUCCESS</Symbol>. If the printer name is invalid or no valid default
  519. can be determined, this procedure should return <Symbol>DtPRINT_FAILURE</Symbol>.
  520. </para>
  521. </listitem>
  522. </varlistentry>
  523. <varlistentry><term><Symbol>DtNworkAreaLocation</Symbol></term>
  524. <listitem>
  525. <para>Indicates how to position work area children within the <function>DtPrintSetupBox</function>. Possible values are:</para>
  526. <variablelist>
  527. <varlistentry><term><Symbol>DtWORK_AREA_BOTTOM</Symbol></term>
  528. <listitem>
  529. <para>A single work area child may be added, and will be placed below the
  530. generic controls and above the pushbuttons at the bottom of the window. A
  531. managed separator will be placed between the work area and the generic controls.
  532. This is the default.</para>
  533. </listitem>
  534. </varlistentry>
  535. <varlistentry><term><Symbol>DtWORK_AREA_TOP</Symbol></term>
  536. <listitem>
  537. <para>A single work area child may be added, and will be placed above the
  538. generic controls and below the top of the window. A managed separator will
  539. be placed between the work area and the generic controls.</para>
  540. </listitem>
  541. </varlistentry>
  542. <varlistentry><term><Symbol>DtWORK_AREA_TOP_AND_BOTTOM</Symbol></term>
  543. <listitem>
  544. <para>Two work area children may be added. The first work area created will
  545. become the top work area, positioned with a separator as for <Symbol>DtWORK_AREA_TOP</Symbol>, and the second will become the bottom work area, positioned with
  546. a separator as for <Symbol>DtWORK_AREA_BOTTOM</Symbol>.</para>
  547. </listitem>
  548. </varlistentry>
  549. </variablelist>
  550. <para>The effect of adding more work area children than indicated by the value
  551. of <Symbol>DtNworkAreaLocation</Symbol> is undefined.</para>
  552. </listitem>
  553. </varlistentry>
  554. </variablelist>
  555. </refsect2>
  556. <refsect2>
  557. <title>Inherited Resources</title>
  558. <para><function>DtPrintSetupBox</function> inherits resources from the <Symbol>XmBulletinBoard</Symbol>, <Symbol>XmManager</Symbol>, <Symbol>Constraint</Symbol>, <Symbol>Composite</Symbol>, and <Symbol>Core</Symbol> superclasses.
  559. Refer to the reference pages for these superclasses for inherited resources
  560. and their descriptions.</para>
  561. </refsect2>
  562. <refsect2>
  563. <title>Callback And Procedure Resource Information</title>
  564. <para><function>DtPrintSetupBox</function> defines a new structure, <structname role="typedef">DtPrintSetupData</structname>, that is passed to callbacks
  565. and procedure resource values. For callbacks only, <function>DtPrintSetupBox</function> defines a new callback structure, <structname role="typedef">DtPrintSetupCallbackStruct</structname>. Not all fields in these structures
  566. are valid for all callbacks and procedures. For callbacks, the application
  567. must first look at the <symbol role="Variable">reason</symbol> field, and
  568. use only the structure members that are valid for that particular reason.
  569. For each procedure, the application should only reference structure members
  570. that are defined as valid for that particular procedure. The <structname role="typedef">DtPrintSetupData</structname> and <structname role="typedef">DtPrintSetupCallbackStruct</structname> structures are defined as follows:</para>
  571. <programlisting>typedef struct
  572. {
  573. String <symbol role="Variable">printer_name</symbol>;
  574. Display *<symbol role="Variable">print_display</symbol>;
  575. XPContext <symbol role="Variable">print_context</symbol>;
  576. XtEnum <symbol role="Variable">destination</symbol>;
  577. String <symbol role="Variable">dest_info</symbol>;
  578. } DtPrintSetupData;</programlisting>
  579. <variablelist>
  580. <varlistentry><term><symbol role="Variable">printer_name</symbol></term>
  581. <listitem>
  582. <para>Contains the current value of the <Symbol>DtNprinterName</Symbol>
  583. resource.</para>
  584. </listitem>
  585. </varlistentry>
  586. <varlistentry><term><symbol role="Variable">print_display</symbol></term>
  587. <listitem>
  588. <para>If <Symbol>DtNprintSetupMode</Symbol> is <Symbol>DtPRINT_SETUP_XP</Symbol>, <symbol role="Variable">print_display</symbol> contains a pointer
  589. to the Display structure for the current X Printer. For other values of <Symbol>DtNprintSetupMode</Symbol>, this field is NULL.</para>
  590. </listitem>
  591. </varlistentry>
  592. <varlistentry><term><symbol role="Variable">print_context</symbol></term>
  593. <listitem>
  594. <para>If <Symbol>DtNprintSetupMode</Symbol> is <Symbol>DtPRINT_SETUP_XP</Symbol>, <symbol role="Variable">print_context</symbol> contains the print
  595. context handle for the current X Printer. For other values of <Symbol>DtNprintSetupMode</Symbol>, this field is NULL.</para>
  596. </listitem>
  597. </varlistentry>
  598. <varlistentry><term><symbol role="Variable">destination</symbol></term>
  599. <listitem>
  600. <para>Contains the current value of the <Symbol>DtNprintDestination</Symbol>
  601. resource.</para>
  602. </listitem>
  603. </varlistentry>
  604. <varlistentry><term><symbol role="Variable">dest_info</symbol></term>
  605. <listitem>
  606. <para>Additional information about the print destination as indicated by the
  607. destination field.</para>
  608. <para>If destination is <Symbol>DtPRINT_TO_FILE</Symbol>, this field contains
  609. the name of the file to print to.</para>
  610. <para>If destination is <Symbol>DtPRINT_TO_PRINTER</Symbol>, this field
  611. contains the name of the currently selected printer as determined by the current
  612. value of the <Symbol>XpPrinterNameMode</Symbol> resource. This is useful
  613. for display within dialogs displaying print status, etc. because it is the
  614. printer name as presented to the user in <function>DtPrintSetupBox</function>.
  615. </para>
  616. </listitem>
  617. </varlistentry>
  618. </variablelist>
  619. <programlisting>typedef struct
  620. {
  621. int <symbol role="Variable">reason</symbol>;
  622. XEvent *<symbol role="Variable">event</symbol>;
  623. DtPrintSetupData *<symbol role="Variable">print_data</symbol>;
  624. } DtPrintSetupCallbackStruct;</programlisting>
  625. <variablelist>
  626. <varlistentry><term><symbol role="Variable">reason</symbol></term>
  627. <listitem>
  628. <para>Indicates why the callback was invoked.</para>
  629. </listitem>
  630. </varlistentry>
  631. <varlistentry><term><symbol role="Variable">event</symbol></term>
  632. <listitem>
  633. <para>Points to the XEvent that triggered the callback. It can be NULL.</para>
  634. </listitem>
  635. </varlistentry>
  636. <varlistentry><term><symbol role="Variable">print_data</symbol></term>
  637. <listitem>
  638. <para>Points to a <structname role="typedef">DtPrintSetupData</structname>
  639. structure containing additional callback information.</para>
  640. </listitem>
  641. </varlistentry>
  642. </variablelist>
  643. <para>The following table indicates for each callback reason which <structname role="typedef">DtPrintSetupCallbackStruct</structname> and <structname role="typedef">DtPrintSetupData</structname> members are valid.</para>
  644. <informaltable>
  645. <tgroup cols="2" colsep="0" rowsep="0">
  646. <colspec align="left" colwidth="3.66in">
  647. <colspec align="left" colwidth="2.88in">
  648. <thead>
  649. <row><entry align="left" valign="bottom"><para>Reason</para></entry><entry
  650. align="left" valign="bottom"><para>Valid Fields</para></entry></row></thead>
  651. <tbody>
  652. <row>
  653. <entry align="left" valign="top"><para>DtPRINT_CR_CANCEL</para></entry>
  654. <entry align="left" valign="top"><para>reason, event</para></entry></row>
  655. <row>
  656. <entry align="left" valign="top"><para>DtPRINT_CR_CLOSE_PRINT_DISPLAY</para></entry>
  657. <entry align="left" valign="top"><para>reason, printer_name, print_display,
  658. print_context</para></entry></row>
  659. <row>
  660. <entry align="left" valign="top"><para>DtPRINT_CR_GET_ATTRIBUTES</para></entry>
  661. <entry align="left" valign="top"><para>reason, event, printer_name, print_display,
  662. print_context</para></entry></row>
  663. <row>
  664. <entry align="left" valign="top"><para>DtPRINT_CR_GET_STATIC_ATTRIBUTES</para></entry>
  665. <entry align="left" valign="top"><para>reason, event, printer_name, print_display,
  666. print_context</para></entry></row>
  667. <row>
  668. <entry align="left" valign="top"><para>DtPRINT_CR_PRINT</para></entry>
  669. <entry align="left" valign="top"><para>reason, event, printer_name, print_display,
  670. print_context, destination, dest_info</para></entry></row>
  671. <row>
  672. <entry align="left" valign="top"><para>DtPRINT_CR_SET_ATTRIBUTES</para></entry>
  673. <entry align="left" valign="top"><para>reason, event, printer_name, print_display,
  674. print_context</para></entry></row></tbody></tgroup></informaltable>
  675. <para>The following table indicates for each procedure resource which <structname role="typedef">DtPrintSetupData</structname> members are valid:</para>
  676. <informaltable>
  677. <tgroup cols="2" colsep="0" rowsep="0">
  678. <colspec align="left" colwidth="158*">
  679. <colspec align="left" colwidth="298*">
  680. <thead>
  681. <row><entry align="left" valign="bottom"><para>Procedure</para></entry><entry
  682. align="left" valign="bottom"><para>Valid Fields</para></entry></row></thead>
  683. <tbody>
  684. <row>
  685. <entry align="left" valign="top"><para>DtNprinterInfoProc</para></entry>
  686. <entry align="left" valign="top"><para>printer_name, print_display, print_context
  687. </para></entry></row>
  688. <row>
  689. <entry align="left" valign="top"><para>DtNselectFileProc</para></entry>
  690. <entry align="left" valign="top"><para>destination, dest_info</para></entry>
  691. </row>
  692. <row>
  693. <entry align="left" valign="top"><para>DtNsetupProc</para></entry>
  694. <entry align="left" valign="top"><para>printer_name, print_display, print_context
  695. </para></entry></row>
  696. <row>
  697. <entry align="left" valign="top"><para>DtNverifyPrinterProc</para></entry>
  698. <entry align="left" valign="top"><para>printer_name, print_display, print_context
  699. </para></entry></row></tbody></tgroup></informaltable>
  700. </refsect2>
  701. <refsect2>
  702. <title>Translations</title>
  703. <para><function>DtPrintSetupBox</function> inherits translations from <Symbol>XmBulletinBoard</Symbol>.</para>
  704. </refsect2>
  705. <refsect2>
  706. <title>Virtual Bindings</title>
  707. <para>The bindings for virtual keys are implementation-dependent. For information
  708. about bindings for virtual buttons and keys, see &cdeman.VirtualBindings;.</para>
  709. </refsect2>
  710. </refsect1><refsect1>
  711. <title>EXTERNAL INFLUENCES</title>
  712. <para>This section specifies application resources and environment variables
  713. that will influence the behavior of <function>DtPrintSetupBox</function>.
  714. If a given resource is defined, it will have precedence over the corresponding
  715. environment variable. There is no corresponding environment variable for the <systemitem class="resource">XpPrinterNameMode</systemitem> resource.</para>
  716. <refsect2>
  717. <title>XRM Application Resources</title>
  718. <variablelist>
  719. <varlistentry><term><systemitem class="resource">XpPrinter</systemitem></term>
  720. <listitem>
  721. <para>This variable defines the default destination X Printer Specifier for <function>DtPrintSetupBox</function>. If the specifier is just a <emphasis>printerName</emphasis>, the <emphasis>host:display</emphasis> portion of the specifier
  722. is obtained by checking if the X Server to which the client application is
  723. connected is an X Print Server managing <emphasis>printerName</emphasis>.
  724. Otherwise, the first server in the <systemitem class="resource">XpServerList</systemitem> or <systemitem class="environvar">XPSERVERLIST</systemitem>
  725. that manages the printer will be used. If the <emphasis>:display</emphasis>
  726. number is omitted, <literal>:0</literal> is assumed.</para>
  727. <para>Example:</para>
  728. <programlisting>Dtmail*XpPrinter: laser_1@callisto:6</programlisting>
  729. </listitem>
  730. </varlistentry>
  731. <varlistentry><term><systemitem class="resource">XpPrinterNameMode</systemitem></term>
  732. <listitem>
  733. <para>This resource indicates how an X Printer Specifier shall be shown in
  734. the Printer Name combo box text. Valid values for this resource are:</para>
  735. <variablelist>
  736. <varlistentry><term><Symbol>DtSHORT_NAME</Symbol></term>
  737. <listitem>
  738. <para>Display only the <emphasis>printerName</emphasis> portion of the X Printer
  739. Specifier.</para>
  740. </listitem>
  741. </varlistentry>
  742. <varlistentry><term><Symbol>DtMEDIUM_NAME</Symbol></term>
  743. <listitem>
  744. <para>Display the printer name as a combination of the <emphasis>printerName</emphasis> and the host portions of the X Printer Specifier with an intervening
  745. "at" (@) symbol. For example:</para>
  746. <programlisting>printer@host</programlisting>
  747. </listitem>
  748. </varlistentry>
  749. <varlistentry><term><Symbol>DtLONG_NAME</Symbol></term>
  750. <listitem>
  751. <para>Display the fully qualified X Printer Specifier. For example:</para>
  752. <programlisting>printer@host:6</programlisting>
  753. </listitem>
  754. </varlistentry>
  755. </variablelist>
  756. <para>If this resource is not specified, <function>DtPrintSetupBox</function>
  757. will assume a default of <Symbol>DtSHORT_NAME</Symbol>.</para>
  758. </listitem>
  759. </varlistentry>
  760. <varlistentry><term><systemitem class="resource">XpPrinterList</systemitem></term>
  761. <listitem>
  762. <para>This resource defines the initial set of X Printer Specifiers shown
  763. in the Printer Name combo box list.</para>
  764. <para>The resource value is a whitespace-delimited list of partially or fully
  765. specified X Printer Specifiers. When the user selects a specifier from this
  766. list, if the specifier is just a <emphasis>printerName</emphasis>, the <emphasis>host:display</emphasis> portion of the specifier is obtained by checking if
  767. the X Server to which the client application is connected is an X Print Server
  768. managing <emphasis>printerName</emphasis>. Otherwise the first server in the <systemitem class="resource">XpServerList</systemitem> or <systemitem class="environvar">XPSERVERLIST</systemitem> that manages the printer will be used. If the: <emphasis>display</emphasis> number is omitted, <literal>:0</literal> is assumed.</para>
  769. <para>Example:</para>
  770. <programlisting>*xpPrinterList: laser laser2@argon:3 laser7@xenon</programlisting>
  771. </listitem>
  772. </varlistentry>
  773. <varlistentry><term><systemitem class="resource">XpServerList</systemitem></term>
  774. <listitem>
  775. <para>This resource contains a list of X Print Server specifiers. Each entry
  776. in the list is of the form <emphasis>host:display</emphasis>, and is separated
  777. from other entries by whitespace. <function>DtPrintSetupBox</function> uses
  778. this list to fully qualify partial X Printer Specifiers consisting of just
  779. the <emphasis>printerName</emphasis>.</para>
  780. <para>Example:</para>
  781. <programlisting>*.XpServerList: hanz:6 franz:6 ahnold:6</programlisting>
  782. </listitem>
  783. </varlistentry>
  784. </variablelist>
  785. </refsect2>
  786. <refsect2>
  787. <title>Environment Variables</title>
  788. <variablelist>
  789. <varlistentry><term><systemitem class="environvar">PDPRINTER</systemitem>, <systemitem class="environvar">LPDEST</systemitem>, <systemitem class="environvar">PRINTER</systemitem></term>
  790. <listitem>
  791. <para>If the <systemitem class="environvar">XPRINTER</systemitem>, environment
  792. variable and the <systemitem class="resource">XpPrinter</systemitem> resource
  793. are not specified, <function>DtPrintSetupBox</function> will check the environment
  794. variables (in order) <systemitem class="environvar">PDPRINTER</systemitem>, <systemitem class="environvar">LPDEST</systemitem>, and <systemitem class="environvar">PRINTER</systemitem> to obtain' a <emphasis>printerName</emphasis> that can
  795. be used to generate an X Printer Specifier to use for the default X Printer
  796. shown in the Printer Name combo box text field. The <emphasis>host:display</emphasis> portion of the specifier is obtained by checking if the X Server
  797. to which the client application is connected is an X Print Server managing <emphasis>printerName</emphasis>. If not, the list of X Print Servers specified in
  798. the <systemitem class="resource">XpServerList</systemitem> or <systemitem class="environvar">XPSERVERLIST</systemitem> is queried, until the first X
  799. Printer with a matching <emphasis>printerName</emphasis> is found.</para>
  800. </listitem>
  801. </varlistentry>
  802. <varlistentry><term><systemitem class="environvar">XPRINTER</systemitem></term>
  803. <listitem>
  804. <para>The specification of the <systemitem class="environvar">XPRINTER</systemitem>
  805. environment variable is the same as the <systemitem class="resource">XpPrinter</systemitem> resource.</para>
  806. </listitem>
  807. </varlistentry>
  808. <varlistentry><term><systemitem class="environvar">XPRINTERLIST</systemitem></term>
  809. <listitem>
  810. <para>The specification of the <systemitem class="environvar">XPRINTERLIST</systemitem> environment variable is the same as the the <systemitem class="resource">XpPrinterList</systemitem> resource.</para>
  811. </listitem>
  812. </varlistentry>
  813. <varlistentry><term><systemitem class="environvar">XPSERVERLIST</systemitem></term>
  814. <listitem>
  815. <para>The specification of the <systemitem class="environvar">XPSERVERLIST</systemitem> environment variable is the same as the the <systemitem class="resource">XpServerList</systemitem> resource.</para>
  816. </listitem>
  817. </varlistentry>
  818. </variablelist>
  819. </refsect2>
  820. </refsect1><refsect1>
  821. <title>EXAMPLES</title>
  822. <para>Sample code can be found in the
  823. <filename>/proj/cde/examples/dtprint</filename> directory.</para>
  824. </refsect1><refsect1>
  825. <title>SEE ALSO</title>
  826. <para>&cdeman.DtPrintSetupProc;, &cdeman.DtCreatePrintSetupDialog;, &cdeman.DtPrintSetupProc;, <function>DtPrinterSelectionDialog</function>(3)</para>
  827. </refsect1></refentry>
  828. <?Pub *0000046688>