Blob Blame History Raw
'\" t
...\" PrtSetup.sgm /main/9 1996/10/02 11:48:23 cdedoc $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmPrintSetup" "library call"
.SH "NAME"
\fBXmPrintSetup\fR \(em setup and create a Print Shell widget
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Print\&.h>
\fBWidget \fBXmPrintSetup\fP\fR(
\fBWidget \fBvideo_widget\fR\fR,
\fBScreen \fB*print_screen\fR\fR,
\fBString \fBprint_shell_name\fR\fR,
\fBArgList \fBargs\fR\fR,
\fBCardinal \fBnum_args\fR\fR);
.fi
.SH "DESCRIPTION"
.PP
A function that does the appropriate setting and creates a realized 
\fBXmPrintShell\fP that it returns to the caller\&. This
function hides the details of the \fBXt\fP to set up a valid print shell
heirarchy for the application\&. It is also meant
to encourage consistency in the way applications root their print widget
hierarchy\&.
.PP
\fBprint_screen\fP must belong to a Display connection that
has already been initialized with \fBXt\fP\&. 
.PP
The \fBvideo_widget\fP
is used to get at the application context, application name
and class, and \fBargc/argv\fP stored on the
\fBapplicationShell\fP that roots this widget\&. If
no \fBapplicationShell\fP is found, \fBNULL argv/argc\fP are used\&.
.PP
\fBXmPrintSetup\fP then creates an unrealized \fBApplicationShell\fP
with the same name and class as the one given by the video
display, on the print display and on the print screen specified\&.
.PP
An \fBXmPrintShell\fP
is then created as a child of this toplevel shell, using
\fBXtCreatePopupShell\fP, with the name
\fBprint_shell_name\fP, and using the
\fBargs\fP
provided\&. It then realizes and maps the print shell, using
\fBXtPopup\fP with \fBXtGrabNone\fP\&.
.PP
This way, application resource files and users can specify
print specific attributes using the following syntax
(if \fBprint_shell_name\fP is "Print"):
.PP
.nf
\f(CWDtpad\&.Print*textFontList: somefont
*Print*background:white
*Print*highlightThickness:0\fR
.fi
.PP
.IP "\fIvideo_widget\fP" 10
A video widget to fetch app video data from\&.
.IP "\fIprint_screen\fP" 10
A print screen on the print display - specifies the screen onto which the new
shell is created\&.
.IP "\fIprint_shell_name\fP" 10
Specifies the name of the XmPrintShell created on the X Print server\&.
.IP "\fIargs\fP" 10
Specifies the argument list from which to get the resources for the XmPrintShell\&.
.IP "\fInum_args\fP" 10
Specifies the number of arguments in the argument list\&.
.SH "RETURN VALUE"
.PP
The id the \fBXmPrintShell\fP widget created on the
X Print Server connection, or NULL if an error has occured\&.
.SH "ERRORS/WARNINGS"
.PP
None\&.
.SH "EXAMPLES"
.PP
From the \fBOK\fP callback and the
\fBSetUp\fP callback of the primary print dialog widget:
.PP
.nf
\f(CWstatic void
printOKCB(Widget, XtPointer call_data, XtPointer client_data)
{
  AppPrint *p = (AppPrint *) client_data;
  DtPrintSetupCallbackStruct *pbs =
                         (XmPrintCallbackStruct *) call_data;

  /* connect if not already done\&.
     the print dialog callback always provides valid
             printer name, print display and screen
             already initialized: XpInitContext called */
 */
  p->print_shell = XmPrintSetup (widget, pbs->print_screen,
                                              "Print", NULL, 0);

  \&.\&.\&.
}\fR
.fi
.PP
.SH "SEE ALSO"
.PP
\fBXmPrintShell\fP(3),
\fBXmRedisplayWidget\fP(3),
\fBXmPrintToFile\fP(3),
\fBXmPrintPopupPDM\fP(3)
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:27