Blame doc/man/man3/XmPrintPopupPDM.3

Packit b099d7
'\" t
Packit b099d7
...\" PrtPopup.sgm /main/9 1996/08/31 15:27:41 rws $
Packit b099d7
.de P!
Packit b099d7
.fl
Packit b099d7
\!!1 setgray
Packit b099d7
.fl
Packit b099d7
\\&.\"
Packit b099d7
.fl
Packit b099d7
\!!0 setgray
Packit b099d7
.fl			\" force out current output buffer
Packit b099d7
\!!save /psv exch def currentpoint translate 0 0 moveto
Packit b099d7
\!!/showpage{}def
Packit b099d7
.fl			\" prolog
Packit b099d7
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
Packit b099d7
\!!psv restore
Packit b099d7
.
Packit b099d7
.de pF
Packit b099d7
.ie     ?\\*(f1?? .ds f1 \\n(.f
Packit b099d7
.el .ie ?\\*(f2?? .ds f2 \\n(.f
Packit b099d7
.el .ie ?\\*(f3?? .ds f3 \\n(.f
Packit b099d7
.el .ie ?\\*(f4?? .ds f4 \\n(.f
Packit b099d7
.el .tm ? font overflow
Packit b099d7
.ft \\$1
Packit b099d7
..
Packit b099d7
.de fP
Packit b099d7
.ie     !?\\*(f4?? \{\
Packit b099d7
.	ft \\*(f4
Packit b099d7
.	ds f4\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f3?? \{\
Packit b099d7
.	ft \\*(f3
Packit b099d7
.	ds f3\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f2?? \{\
Packit b099d7
.	ft \\*(f2
Packit b099d7
.	ds f2\"
Packit b099d7
'	br \}
Packit b099d7
.el .ie !?\\*(f1?? \{\
Packit b099d7
.	ft \\*(f1
Packit b099d7
.	ds f1\"
Packit b099d7
'	br \}
Packit b099d7
.el .tm ? font underflow
Packit b099d7
..
Packit b099d7
.ds f1\"
Packit b099d7
.ds f2\"
Packit b099d7
.ds f3\"
Packit b099d7
.ds f4\"
Packit b099d7
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
Packit b099d7
.TH "XmPrintPopupPDM" "library call"
Packit b099d7
.SH "NAME"
Packit b099d7
\fBXmPrintPopupPDM\fR \(em Send a notification for the PDM to be popped up
Packit b099d7
.SH "SYNOPSIS"
Packit b099d7
.PP
Packit b099d7
.nf
Packit b099d7
#include <Xm/Print\&.h>
Packit b099d7
\fBXtEnum \fBXmPrintPopupPDM\fP\fR(
Packit b099d7
\fBWidget\fBprint_shell\fR\fR,
Packit b099d7
\fBWidget\fBvideo_transient_for\fR\fR);
Packit b099d7
.fi
Packit b099d7
.SH "DESCRIPTION"
Packit b099d7
.PP
Packit b099d7
A convenience function that sends a notification to start a
Packit b099d7
Print Dialog Manager on behalf of the application,
Packit b099d7
\fBXmPrintPopupPDM\fP
Packit b099d7
hides the details of the X selection
Packit b099d7
mechanism used to notify the PDM that a new dialog must be popped up for this application\&.
Packit b099d7
.PP
Packit b099d7
\fBXmPrintPopupPDM\fP sends a selection request
Packit b099d7
to either the print display of the
Packit b099d7
print shell, or the video display of the
Packit b099d7
transient_for video widget (depending on
Packit b099d7
the environment variable \fBXPDMDISPLAY\fP,
Packit b099d7
which can only takes the value "print" or "video"),
Packit b099d7
asking for the PDM windows to be popped up on behalf
Packit b099d7
of the app\&.
Packit b099d7
.PP
Packit b099d7
Return right away with status of
Packit b099d7
\fBXmPDM_NOTIFY_FAIL\fP
Packit b099d7
(e\&.g\&. if the function couldn\&'t malloc
Packit b099d7
memory for the selection value, or if
Packit b099d7
\fBXPDMDISPLAY\fP
Packit b099d7
is not "print" or "video") or with
Packit b099d7
\fBXmPDM_NOTIFY_SUCCESS\fP
Packit b099d7
, which only means a "message" was sent out to the
Packit b099d7
PDM specified by
Packit b099d7
\fBXPDMSELECTION\fP
Packit b099d7
, not that it\&'s already up on the screen yet\&.
Packit b099d7
.PP
Packit b099d7
In order to know if the PDM is up, or not running,
Packit b099d7
the application must register a
Packit b099d7
\fBXmNpdmNotificationCallback\fP
Packit b099d7
with the Print Shell\&.
Packit b099d7
.PP
Packit b099d7
\fBXmPrintPopupPDM\fP puts up an \fBInputOnly\fP
Packit b099d7
window on top of the dialog, so that
Packit b099d7
the end user doesn\&'t use the print setup dialog while the PDM is trying to
Packit b099d7
come up\&. This window is automatically removed when the shell is
Packit b099d7
about to call the callback for the first time\&.
Packit b099d7
.IP "\fIprint_shell\fP" 10
Packit b099d7
The Print Shell used for this print job and context\&.
Packit b099d7
.IP "\fIvideo_transient_for\fP" 10
Packit b099d7
The video widget dealing with application print setup\&.
Packit b099d7
.SH "RETURN VALUE"
Packit b099d7
.PP
Packit b099d7
Returns
Packit b099d7
\fBXmPDM_NOTIFY_SUCCESS\fP if the function
Packit b099d7
was able to send the notification out to the PDM process,
Packit b099d7
\fBXmPDM_NOTIFY_FAIL\fP otherwise\&.
Packit b099d7
.SH "ERRORS/WARNINGS"
Packit b099d7
.PP
Packit b099d7
Not applicable\&.
Packit b099d7
.SH "EXAMPLES"
Packit b099d7
.PP
Packit b099d7
Example of callback from a Print set up dialog box "Setup\&.\&.\&." button:
Packit b099d7
.PP
Packit b099d7
.nf
Packit b099d7
\f(CWPrintSetupCallback(print_dialog\&.\&.\&.)
Packit b099d7
/*-------------*/
Packit b099d7
{
Packit b099d7
    if (XmPrintPopupPDM (pshell, XtParent(print_dialog)) !=
Packit b099d7
                                    XmPDM_NOTIFY_SUCCESS) {
Packit b099d7
        /* some error dialog */
Packit b099d7
    }
Packit b099d7
}\fR
Packit b099d7
.fi
Packit b099d7
.PP
Packit b099d7
.PP
Packit b099d7
Example of \fBXmNpdmNotificationCallback\fP from a Print Shell:
Packit b099d7
.PP
Packit b099d7
.nf
Packit b099d7
\f(CWpdmNotifyCB(print_shell\&.\&.\&.)
Packit b099d7
{
Packit b099d7
    XmPrintShellCallBackStruct * pr_cb = \&.\&.\&.
Packit b099d7
Packit b099d7
    switch (pr_cb->reason) {
Packit b099d7
       case XmCR_PDM_NONE:
Packit b099d7
           /* no PDM available */
Packit b099d7
           PostErrorDialog(\&.\&.\&.;;
Packit b099d7
           break;
Packit b099d7
       case XmCR_PDM_VXAUTH:
Packit b099d7
           /* PDM is not authorized \&.\&.\&. */
Packit b099d7
           PostErrorDialog(\&.\&.\&.;;
Packit b099d7
           break;
Packit b099d7
       case XmCR_PDM_UP: the PDM is up and running
Packit b099d7
           /* everything is fine */
Packit b099d7
           break;
Packit b099d7
               default: /* other cases */
Packit b099d7
   }
Packit b099d7
}\fR
Packit b099d7
.fi
Packit b099d7
.PP
Packit b099d7
.SH "SEE ALSO"
Packit b099d7
.PP
Packit b099d7
\fBXmPrintSetup\fP(3),
Packit b099d7
\fBXmPrintShell\fP(3),
Packit b099d7
\fBXmRedisplayWidget\fP(3),
Packit b099d7
\fBXmPrintToFile\fP(3)
Packit b099d7
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:27