'\" t .\" PrtPopup.sgm /main/9 1996/08/31 15:27:41 rws $ .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 "XmPrintPopupPDM" 3 .SH "NAME" \fBXmPrintPopupPDM\fR \(em Send a notification for the PDM to be popped up .SH "SYNOPSIS" .PP .nf #include \fBXtEnum \fBXmPrintPopupPDM\fP\fR( \fBWidget\fBprint_shell\fR\fR, \fBWidget\fBvideo_transient_for\fR\fR); .fi .SH "DESCRIPTION" .PP A convenience function that sends a notification to start a Print Dialog Manager on behalf of the application, \fBXmPrintPopupPDM\fP hides the details of the X selection mechanism used to notify the PDM that a new dialog must be popped up for this application\&. .PP \fBXmPrintPopupPDM\fP sends a selection request to either the print display of the print shell, or the video display of the transient_for video widget (depending on the environment variable \fBXPDMDISPLAY\fP, which can only takes the value "print" or "video"), asking for the PDM windows to be popped up on behalf of the app\&. .PP Return right away with status of \fBXmPDM_NOTIFY_FAIL\fP (e\&.g\&. if the function couldn\&'t malloc memory for the selection value, or if \fBXPDMDISPLAY\fP is not "print" or "video") or with \fBXmPDM_NOTIFY_SUCCESS\fP , which only means a "message" was sent out to the PDM specified by \fBXPDMSELECTION\fP , not that it\&'s already up on the screen yet\&. .PP In order to know if the PDM is up, or not running, the application must register a \fBXmNpdmNotificationCallback\fP with the Print Shell\&. .PP \fBXmPrintPopupPDM\fP puts up an \fBInputOnly\fP window on top of the dialog, so that the end user doesn\&'t use the print setup dialog while the PDM is trying to come up\&. This window is automatically removed when the shell is about to call the callback for the first time\&. .IP "\fIprint_shell\fP" 10 The Print Shell used for this print job and context\&. .IP "\fIvideo_transient_for\fP" 10 The video widget dealing with application print setup\&. .SH "RETURN VALUE" .PP Returns \fBXmPDM_NOTIFY_SUCCESS\fP if the function was able to send the notification out to the PDM process, \fBXmPDM_NOTIFY_FAIL\fP otherwise\&. .SH "ERRORS/WARNINGS" .PP Not applicable\&. .SH "EXAMPLES" .PP Example of callback from a Print set up dialog box "Setup\&.\&.\&." button: .PP .nf \f(CWPrintSetupCallback(print_dialog\&.\&.\&.) /*-------------*/ { if (XmPrintPopupPDM (pshell, XtParent(print_dialog)) != XmPDM_NOTIFY_SUCCESS) { /* some error dialog */ } }\fR .fi .PP .PP Example of \fBXmNpdmNotificationCallback\fP from a Print Shell: .PP .nf \f(CWpdmNotifyCB(print_shell\&.\&.\&.) { XmPrintShellCallBackStruct * pr_cb = \&.\&.\&. switch (pr_cb->reason) { case XmCR_PDM_NONE: /* no PDM available */ PostErrorDialog(\&.\&.\&.); break; case XmCR_PDM_VXAUTH: /* PDM is not authorized \&.\&.\&. */ PostErrorDialog(\&.\&.\&.); break; case XmCR_PDM_UP: the PDM is up and running /* everything is fine */ break; default: /* other cases */ } }\fR .fi .PP .SH "SEE ALSO" .PP \fBXmPrintSetup\fP(3), \fBXmPrintShell\fP(3), \fBXmRedisplayWidget\fP(3), \fBXmPrintToFile\fP(3) .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:27