DXmCreatePrintDialog(3X) DXmCreatePrintDialog(3X)
NAME
DXmCreatePrintDialog - Creates the print widget with a dialog box.
SYNOPSIS
Widget DXmCreatePrintDialog (parent, name, arglist, argcount)
Widget parent;
char *name;
Arglist arglist;
int argcount;
PARAMETERS
The identifier (widget ID) of the parent widget. The name of the cre-
ated widget. The application argument list. An integer that repre-
sents the number of arguments in the application argument list.
DESCRIPTION
The DXmCreatePrintDialog routine creates the print widget, which is a
modeless widget that provides applications with a fast, convenient
method of printing one or more files in multiple formats.
Resource Information
You can set the following widget-specific resources in the arglist:
XmString DXmNdefaultPrinter; Boolean DXmN-
deleteFile; int DXmNfileNameCount; XmStringTable
DXmNfileNameList; Boolean DXmNheader; int
DXmNinputTray; XmString DXmNjobName; XmString
DXmNlayupDefinition; int DXmNmessageLog; Boolean
DXmNnotify; int DXmNnumberCopies; int
DXmNnumberUp; XmString DXmNoptionsDialogTitle; int
DXmNorientation; int DXmNoutputTray; XmString
DXmNpageRangeFrom; XmString DXmNpageRangeTo; int
DXmNpageSize; Boolean DXmNpassAll; XmString
DXmNprintAfter; int DXmNprinterCount; XmString
DXmNprinterChoice; XmStringTable DXmNprinterList; XmString
DXmNprintFormatChoice; int DXmNprintFormatCount; Xm-
StringTable DXmNprintFormatList; int DXmNsheet-
Count; int DXmNsheetSize; int DXmN-
sides; XmString DXmNstartSheetComment; unsigned long
DXmNsuppressOptionsMask; Boolean DXmNunmanageOnCancel;
Boolean DXmNunmanageOnOk; XtCallbackList XmNcancel-
Callback; XtCallbackList XmNokCallback;
Resources
A Boolean value that, when True, indicates that autopagination (format-
ting the output into pages based on length or line count) is turned on.
When False, autopagination is turned off. By default, the value of
this resource changes when the user switches print formats. The de-
fault settings for the print formats are as follows:
tab(@); lfHB lfHB l l . _
Print Format@Default
_
Default@T{ False T}
Text (ANSI Level 0)@True
Line Printer (ANSI Level 1)@True
Terminal@True
ANSI2 (ANSI Level 2)@False
ANSI (ANSI Level 3)@False
PostScript@False
ReGIS@False
TEK (Tektronix)@False
DDIF@False
_
Access is CSG. An XmString that allows you to specify a default
printer. If you do not specify a default printer, the default
choice is either the first printer in the list or the printer
defined by the environment variable PRINTER. Access is CSG. A
Boolean value that controls whether the file is deleted after it
is printed. When True, the file is deleted. When False, the
file is not deleted. The default is False. The user must have
delete access to the file to delete it. Access is CSG. A
Boolean value that controls the state of double-spacing. When
True, double-spacing is turned on. When False, double-spacing
is turned off. The default is False. Access is CSG. An inte-
ger value that allows you to control whether there will be a
File Burst Sheet for your print job and how frequently it ap-
pears. The possible values are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmFILE_SHEET_DEFAULT@T{ Indicates that you want the default for
the queue on which the job is being printed. T}
DXmFILE_SHEET_NONE@T{ Indicates that you do not want a Burst
Page. T}
DXmFILE_SHEET_ONE@T{ Indicates that you want only a single Burst
Page that will precede the first file printed. T}
DXmFILE_SHEET_ALL@T{ Indicates that you want the Burst Page to
be printed before every file in the print job. T}
_
The default is DXmFILE_SHEET_DEFAULT, or 0. Access is CSG. An
integer value that allows you to control whether there will be a
File End Sheet for your print job and how frequently it is
printed. The possible values are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmFILE_SHEET_DEFAULT@T{ Indicates that you want the default for
the queue on which the job is being printed. T}
DXmFILE_SHEET_NONE@T{ Indicates that you do not want a File End
Sheet. T}
DXmFILE_SHEET_ONE@T{ Indicates that you want only a single File
End Sheet to follow the last file printed. T}
DXmFILE_SHEET_ALL@T{ Indicates that you want the File End Sheet
to be printed after every file in the print job. T}
_
The default is DXmFILE_SHEET_DEFAULT, or 0. Access is CSG. The
number of files specified in the DXmNfileNameList resource, ex-
pressed as an integer value. The default is 0. Access is CSG.
An XmStringTable that enables the print widget to use the files
specified by this resource to make assumptions about the print
format of the files to be printed. If you set the DXmNfile-
NameList resource, you must also set the value of the DXmNfile-
NameCount resource. The default is Null. Access is CSG. An
integer value that allows you to control whether there will be a
File Start Sheet for your print job and how frequently it is
printed. The possible values are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmFILE_SHEET_DEFAULT@T{ Indicates that you want the default for
the queue on which the job is being printed. T}
DXmFILE_SHEET_NONE@T{ Indicates that you do not want a File
Start Sheet. T}
DXmFILE_SHEET_ONE@T{ Indicates that you want only a single File
Start Sheet that will precede the first file. T}
DXmFILE_SHEET_ALL@T{ Indicates that you want the File Start
Sheet to be printed before every file in the print job. T}
_
The default is DXmFILE_SHEET_DEFAULT, or 0. Access is CSG. A
Boolean value that controls whether to print the header. When
True, the header is printed. When False, the header is not
printed. The default is False. Access is CSG. A Boolean value
that controls whether the print job will finish without further
manual intervention. If this resource is True, the print job is
held in the print queue servicing the printer until it is manu-
ally released by queue management operations. The default is
False. Access is CSG. An integer value that allows you to
specify the input tray holding the medium to be used for the
print job. The possible values for DXmNinputTray are as fol-
lows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmINPUT_TRAY_DEFAULT@T{ The default input tray is that which is
specified for the queue. T}
DXmINPUT_TRAY_TOP@T{ The top input tray is the source of the
medium on which to print. T}
DXmINPUT_TRAY_MIDDLE@T{ source of the medium on which to print.
T}
DXmINPUT_TRAY_BOTTOM@T{ source of the medium on which to print.
T}
_
The default is DXmINPUT_TRAY_DEFAULT, or 0. Access is CSG. A
pointer to an XmString that identifies the print job name. If
no job name is specified, the job name is derived from the name
of the first file being printed. The default is Null. Access
is CSG. An XmString that allows you to enter a module name
contained in the layup library. This module, in conjunction
with the DXmNnumberUp resource, controls how the image is de-
posited on the medium. The default is Null. Access is CSG. An
integer value that allows you to specify what is to be done with
error messages that are created in the course of printing. The
possible values for DXmNmessageLog are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmMESSAGE_LOG_DEFAULT@T{ Accept whatever is specified for the
print queue. T}
DXmMESSAGE_LOG_IGNORE@T{ Nothing is done with the error mes-
sages. T}
DXmMESSAGE_LOG_PRINT@T{ The error messages are written to the
File End Sheet. T}
DXmMESSAGE_LOG_KEEP@T{ The error messages are retained in a
file. T}
DXmMESSAGE_LOG_KEEP_AND_PRINT@T{ The error messages are written
to the File End Sheet (or additional job error sheet) and are
retained in a log file. T}
_
The default is DXmMESSAGE_LOG_DEFAULT, or 0. Access is CSG. A
Boolean value that determines whether the user is notified when
the file is printed. When True, the user is notified. When
False, the user is not notified. The default is True. Access
is CSG. An integer value that determines the number of copies
of the file to print. The allowable range is from 1 to 255
copies. The default is 0 (which means to use the system de-
fault). Access is CSG. An integer value in the range of 0--100
that specifies how many logical images are to be printed on one
side of a page. The default is 0 (one logical image, without
any adjustments to how the image is deposited on the medium).
Access is CSG. An XmString that allows you to enter a text
field to be displayed on the operator's console when the job
first starts printing. DXmNoperatorMessage can be used to pass
messages to the operator concerning the handling of the printed
output. The default is Null. Access is CSG. Specifies the ti-
tle for the secondary dialog box that lists additional print op-
tions. The default is "Print: Options". Access is CSG. An in-
teger value that determines the paper orientation (on printers
that support this feature). The possible values for orientation
are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmORIENTATION_DEFAULT@T{ Allows you to accept the orientation
that is defined for the print queue you have selected. T}
DXmORIENTATION_PORTRAIT@T{ Allows you to force a portrait orien-
tation to the resulting printout. T}
DXmORIENTATION_LANDSCAPE@T{ Allows you to force a landscape ori-
entation to the resulting printout. T}
_
The default is DXmORIENTATION_DEFAULT, or 0. Access is CSG. An
integer value that allows you to specify the output tray in
which the medium is to be placed after the sheet is printed.
The possible values for DXmNoutputTray are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmOUTPUT_TRAY_DEFAULT@T{ The default output tray is that which
is specified for the queue. T}
DXmOUTPUT_TRAY_TOP@T{ Allows you to select the top output tray
to receive the printed medium. T}
DXmOUTPUT_TRAY_SIDE@T{ Allows you to select the side output tray
to receive the printed medium. T}
DXmOUTPUT_TRAY_FACE_UP@T{ Allows you to select the faceup output
tray to receive the printed medium. T}
DXmOUTPUT_TRAY_UPPER@T{ Allows you to select the upper output
tray to receive the printed medium. T}
DXmOUTPUT_TRAY_LOWER@T{ Allows you to select the lower output
tray to receive the printed medium. T}
_
The default is DXmOUTPUT_TRAY_DEFAULT, or 0. Access is CSG. A
pointer to an XmString that identifies the starting page of the
file to print. The DXmNpageRangeFrom and DXmNpageRangeTo re-
sources allow you to enter a range of pages to be printed if you
chose not to print a file in its entirety. When using this re-
source, note the following: If you want to start printing at the
first page of the file, you may leave the DXmNpageRangeFrom re-
source blank (no value specified). If you specify a value for
the DXmNpageRangeTo resource, the DXmNpageRangeFrom resource
must be less than or equal to that value.
The default is Null. Access is CSG. A pointer to an XmString
that identifies the last page of the file to print. The DXmN-
pageRangeFrom and DXmNpageRangeTo resources allow you to enter a
range of pages to be printed if you chose not to print a file in
its entirety.
The DXmNpageRangeTo resource may be left blank to print to the
last page of the file. The default is Null. Access is CSG. An
integer value that determines the logical (or virtual) size of
the print image. The possible values for page size are as fol-
lows:
tab(@); lfHB lfHB lfHB l l l . _
Value@Size in Inches@Size in MM
_
DXmSIZE_DEFAULT@Queue Default@T{ Queue Default T}
[email protected] x 11@T{ 216 x 279 T}
DXmSIZE_LEDGER@11 x 17@T{ 279 x 432 T}
[email protected] x 14@T{ 216 x 356 T}
[email protected] x QQQ10@T{ 191 x 254 T}
[email protected] x 8.3@T{ 148 x 210 T}
[email protected] x 11.7@T{ 210 x 297 T}
[email protected] x 16.5@T{ 297 x 420 T}
DXmSIZE_B5@ 7.2 x QQQ10.1@T{ 176 x 250 T}
[email protected] x 14.3@T{ 250 x 353 T}
DXmSIZE_C4_ENVELOPE@9 x 12.8@T{ 229 x 324 T}
[email protected] x 9@T{ 162 x 229 T}
[email protected] x 8.7@T{ 110 x 220 T}
DXmSIZE_10X13_ENVELOPE@10 x 13@T{ 254 x 330.2 T}
DXmSIZE_9X12_ENVELOPE@9 x 12@T{ 228.6 x 304.8 T}
[email protected] x 9.5@T{ 104.8 x 241.3 T}
_
The default is DXmSIZE_DEFAULT. Access is CSG. A Boolean value
that, when True, allows all control characters to be passed to
the printer. By default, the value of this resource changes
when the user switches print formats. The default settings for
the print formats are as follows:
tab(@); lfHB lfHB l l . _
Print Format@Default
_
Default@False
Text (ANSI Level 0)@False
Line Printer (ANSI Level 1)@False
Terminal@False
ANSI2 (ANSI Level 2)@True
ANSI (ANSI Level 3)@True
PostScript@False
ReGIS@False
TEK (Tektronix)@True
DDIF@True
_
Access is CSG. An XmString that allows you to enter a time and
date when this print job first becomes eligible to be scheduled
for printing. The XmString for the time and date must be the
standard format for your operating system. Check the at(1) ref-
erence page to obtain the proper format.
If this resource is not specified, the job becomes eligible for immedi-
ate print scheduling. The job also becomes eligible for immediate
print scheduling if the user specifies this resource but specifies ei-
ther nothing or "now" as the XmString. The default is "now". Access
is CSG. An XmString that specifies the printer to use for the current
print format. Applications usually use this resource to store informa-
tion about a user's printer preference.
If you set this resource, the XmString must exactly match one of
the print widget's supported printers, including the character
set. The recommended approach is to not specify this resource
when the print widget is first managed. Then, once the user has
selected a print format, call the XtGetValues routine to obtain
the value and then XtSetArg to set DXmNprinterChoice.
The print widget sets this resource as follows: If the user se-
lects a new print format, the printer queue box might be re-pop-
ulated (assuming the user has set up the print queue logicals).
If the user has chosen this print format before and has already
chosen a printer for this format, the print widget identifies
this printer as the DXmNprinterChoice resource. The printer is
automatically selected, regardless of the previous queue choice.
If the user has not previously selected this print format, the
print widget determines whether there is a printer that matches
the one defined by DXmNdefaultPrinter. If that printer is
available, the print widget selects it; otherwise the print wid-
get selects the first printer in the list. The default is Null.
Access is CSG. The number of printers specified in the DXmN-
printerList resource, expressed as an integer. If your applica-
tion requires the value of this resource, call the XtGetValues
routine to obtain the value.
You cannot set a value for this resource. The default is 0.
Access is G. An XmString that specifies the printer form to use
as the default. Use this resource when you want your applica-
tion to record a user's printer preference.
Note that if you set this resource, the XmString must exactly
match one of the operating system's supported printer forms.
(Use the DXmCvtOSToCS routine to convert the string to an Xm-
String.) Digital recommends that you do not specify this re-
source when the print widget is first managed. Instead, after
the user has selected a printer form, call the Intrinsic rou-
tines XtGetValues to obtain the value and XtSetArg to set DXmN-
printerFormChoice. The default is Null. Access is CSG. An Xm-
StringTable list of the available printer forms. If your appli-
cation requires the value of this resource, call the XtGetValues
routine to obtain the value.
You cannot set a value for this resource. The default is Null.
Access is G. The number of printer forms specified in the DXmN-
printerFormList resource, expressed as an integer value. If
your application requires the value of this resource, call the
XtGetValues routine to obtain the value.
You cannot set a value for this resource. The default is 0. Ac-
cess is G. An XmStringTable that determines the names to appear
in the Printer list box. If your application requires the value
of this resource, call the XtGetValues routine to obtain the
value.
You cannot set a value for this resource. The default is Null.
Access is G. An XmString that specifies the print format to use
as the default. Use this resource when you want your applica-
tion to record a user's print format preference.
Note that if you set this resource, the XmString must exactly
match one of the print widget's supported print formats, includ-
ing the character set. Digital recommends that you do not spec-
ify this resource when the print widget is first managed. In-
stead, after the user has selected a print format, call the In-
trinsic routines XtGetValues to obtain the value and XtSetArg to
set DXmNprintFormatChoice. The default is Null. Access is CSG.
The number of print formats specified in the DXmNprintFormatList
resource, expressed as an integer value. The default is 0. Ac-
cess is CSG. An XmStringTable that determines the print wid-
get's print format list, which is the list of print formats that
are understood by the print widget. If you set this resource,
each XmString in the table must exactly match one of the print
widget's supported print formats.
The print widget supports the following data formats: Default
(no data type specification is output) Text (ANSI Level 0) Line
Printer (ANSI Level 1) Terminal ANSI2 (ANSI Level 2) ANSI (ANSI
Level 3) PostScript ReGIS Tektronix DDIF
The default is Null. Access is CSG. An integer value that de-
termines the priority of the job (0--255) in the print queue.
If no priority is specified (a value of 0), the default priority
for that queue is used. The default is 0. Access is CSG. An
XmString that allows you to enter the comma-separated names of
one or more setup modules to be transmitted to the printer ahead
of the file to be printed. The default is Null. Access is CSG.
An integer value in the range of 0--10000 that specifies how
many times each sheet is to be printed. This option is most
frequently used with PostScript printers, which require only a
single transmission of information to replicate a complex image
(instead of multiple transmissions of the same information).
The default is 0. Access is CSG. An integer value that deter-
mines the size of the medium on which the printing is to take
place. The possible values for sheet size are as follows:
tab(@); lfHB lfHB lfHB l l l . _
Value@Size in Inches@Size in MM
_
DXmSIZE_DEFAULT@Queue Default@T{ Queue Default T}
[email protected] x 11@T{ 216 x 279 T}
DXmSIZE_LEDGER@11 x 17@T{ 279 x 432 T}
[email protected] x 14@T{ 216 x 356 T}
[email protected] x QQQ10@T{ 191 x 254 T}
[email protected] x 8.3@T{ 148 x 210 T}
[email protected] x 11.7@T{ 210 x 297 T}
[email protected] x 16.5@T{ 297 x 420 T}
DXmSIZE_B5@ 7.2 x QQQ10.1@T{ 176 x 250 T}
[email protected] x 14.3@T{ 250 x 353 T}
DXmSIZE_C4_ENVELOPE@9 x 12.8@T{ 229 x 324 T}
[email protected] x 9@T{ 162 x 229 T}
[email protected] x 8.7@T{ 110 x 220 T}
DXmSIZE_10X13_ENVELOPE@10 x 13@T{ 254 x 330.2 T}
DXmSIZE_9X12_ENVELOPE@9 x 12@T{ 228.6 x 304.8 T}
[email protected] x 9.5@T{ 104.8 x 241.3 T}
_
The default is DXmSIZE_DEFAULT, or 0. Access is CSG. An inte-
ger value that determines on how many sides of a medium the
printing is to take place and the manner in which the medium is
turned when switching from one side to the other.
The possible values for DXmNsides are as follows:
tab(@); lfHB lfHB l l . _
Value@Description
_
DXmSIDES_DEFAULT@T{ The default for the queue on which you are
printing. T}
DXmSIDES_SIMPLEX_ONE@T{ Prints on one side only. This is also
known as one-sided-simplex. T}
DXmSIDES_SIMPLEX_TWO@T{ Prints on two sides of the sheet, but
uses the same page layout conventions required for single-sided
printing. The layout reflects margin and page number locations
and related specifications. T}
DXmSIDES_DUPLEX_ONE@T{ Prints only on the first side of each
sheet, but retains the page layout intended for duplex printing.
The layout reflects margin and page number locations and related
specifications. T}
DXmSIDES_DUPLEX_TWO@T{ Prints on two sides; the second side is
accessed by flipping the page along its left edge, like turning
the pages of a book. This is also known as two-sided-duplex.
T}
DXmSIDES_TUMBLE_ONE@T{ Prints only on the first side of each
sheet, but retains the page layout intended for tumble printing.
The layout reflects margin and page number locations and related
specifications. T}
DXmSIDES_TUMBLE_TWO@T{ Prints on two sides, and the second side
is reached by flipping the page along its top edge, like turning
the pages of a legal document. This is also known as two-sided-
tumble. T}
_
The default is DXmSIDES_DEFAULT, or 0. Access is CSG. The Xm-
String to appear on your File Start Sheet. The default is Null.
Access is CSG. Suppresses certain print widget features, such
as the number of print choices available to the user. The pos-
sible values for this resource are as follows: DXmSUPPRESS_AUTO-
MATIC_PAGINATION DXmSUPPRESS_DELETE_FILE DXmSUPPRESS_DOU-
BLE_SPACING DXmSUPPRESS_FILE_BURST_SHEET DXmSUP-
PRESS_FILE_END_SHEET DXmSUPPRESS_FILE_START_SHEET DXmSUP-
PRESS_HEADER DXmSUPPRESS_HOLD_JOB DXmSUPPRESS_INPUT_TRAY DXmSUP-
PRESS_JOB_NAME DXmSUPPRESS_LAYUP_DEFINITION DXmSUPPRESS_MES-
SAGE_LOG DXmSUPPRESS_NONE DXmSUPPRESS_NOTIFY DXmSUPPRESS_NUM-
BER_COPIES DXmSUPPRESS_NUMBER_UP DXmSUPPRESS_OPERATOR_MESSAGE
DXmSUPPRESS_ORIENTATION DXmSUPPRESS_OUTPUT_TRAY DXmSUP-
PRESS_PAGE_RANGE DXmSUPPRESS_PAGE_SIZE DXmSUPPRESS_PASS_ALL DXm-
SUPPRESS_PRINT_AFTER DXmSUPPRESS_PRINT_FORMAT DXmSUP-
PRESS_PRINTER DXmSUPPRESS_PRINTER_FORM DXmSUPPRESS_PRIORITY DXm-
SUPPRESS_SETUP DXmSUPPRESS_SHEET_COUNT DXmSUPPRESS_SHEET_SIZE
DXmSUPPRESS_SIDES DXmSUPPRESS_START_SHEET_COMMENT
The default value is dependent upon the print capabilities of
the particular operating system. Access is CSG. A Boolean
value that specifies whether the print widget automatically un-
manages itself when the Cancel button in the primary box is
pressed. The default is False. Access is CSG. A Boolean value
that specifies whether the print widget automatically unmanages
itself when the Ok button in the primary box is pressed. The
default is False. Access is CSG. Callback made when the user
clicks on the Cancel pushbutton in the print widget primary dia-
log box. If the DXmNunmanageOnCancel resource is set, the print
widget automatically unmanages itself when the Cancel button in
the primary box is pressed. The callback reason is XmCR_CANCEL.
The default is Null. Access is CSG.
Your application can use the XmNcancelCallback callback to per-
form related functions as well. Callback made when the user
clicks on the Ok pushbutton in the print widget primary dialog
box. If the DXmNunmanageOnOk resource is set, the print widget
automatically unmanages itself when the Ok button in the primary
box is pressed. The callback reason is XmCR_OK. The default is
Null. Access is CSG.
Note that your application can use the XmNokCallback callback to
perform other functions, such as calling DXmPrintWgtPrintJob to
submit the print job.
Resource Information
typedef struct {
int reason;
XEvent *event; } XmAnyCallbackStruct;
Callback Field Descriptions
An integer set to the callback reason. See the Callback Reasons sec-
tion for the values that are valid for this widget. A pointer to the X
event structure describing the event that generated this callback.
Callback Reasons
The user activated the Ok pushbutton in the print widget primary dialog
box. The user activated the Cancel pushbutton in the print widget pri-
mary dialog box.
Inherited Resources
DXmCreatePrintDialog inherits behaviour and resources from the follow-
ing superclasses:
Core Resource Set Composite Resource Set Constraint Resource Set XmMan-
ager Resource Set XmBulletinBoard Resource Set DXmPrintDialog Resource
Set
RETURN VALUES
The identifier (widget ID) of the created print widget.
RELATED INFORMATION
DXmPrintWgtAugmentList(3X), DXmPrintWgtPrintJob(3X) delim off
DXmCreatePrintDialog(3X)