1XmPrintPopupPDM(library call)                    XmPrintPopupPDM(library call)
2
3
4

NAME

6       XmPrintPopupPDM — Send a notification for the PDM to be popped up
7

SYNOPSIS

9       #include <Xm/Print.h>
10       XtEnum XmPrintPopupPDM(
11       Widgetprint_shell,
12       Widgetvideo_transient_for);
13

DESCRIPTION

15       A  convenience function that sends a notification to start a Print Dia‐
16       log Manager on behalf of the  application,  XmPrintPopupPDM  hides  the
17       details  of the X selection mechanism used to notify the PDM that a new
18       dialog must be popped up for this application.
19
20       XmPrintPopupPDM sends a selection request to either the  print  display
21       of  the  print  shell,  or the video display of the transient_for video
22       widget (depending on the environment variable  XPDMDISPLAY,  which  can
23       only takes the value "print" or "video"), asking for the PDM windows to
24       be popped up on behalf of the app.
25
26       Return right away with status of XmPDM_NOTIFY_FAIL (e.g. if  the  func‐
27       tion  couldn't malloc memory for the selection value, or if XPDMDISPLAY
28       is not "print" or "video") or with XmPDM_NOTIFY_SUCCESS  ,  which  only
29       means  a "message" was sent out to the PDM specified by XPDMSELECTION ,
30       not that it's already up on the screen yet.
31
32       In order to know if the PDM is up, or not running, the application must
33       register a XmNpdmNotificationCallback with the Print Shell.
34
35       XmPrintPopupPDM  puts  up  an InputOnly window on top of the dialog, so
36       that the end user doesn't use the print setup dialog while the  PDM  is
37       trying  to come up. This window is automatically removed when the shell
38       is about to call the callback for the first time.
39
40       print_shell
41                 The Print Shell used for this print job and context.
42
43       video_transient_for
44                 The video widget dealing with application print setup.
45

RETURN VALUE

47       Returns XmPDM_NOTIFY_SUCCESS if the function was able to send the noti‐
48       fication out to the PDM process, XmPDM_NOTIFY_FAIL otherwise.
49

ERRORS/WARNINGS

51       Not applicable.
52

EXAMPLES

54       Example of callback from a Print set up dialog box "Setup..." button:
55
56       PrintSetupCallback(print_dialog...)
57       /*-------------*/
58       {
59           if (XmPrintPopupPDM (pshell, XtParent(print_dialog)) !=
60                                           XmPDM_NOTIFY_SUCCESS) {
61               /* some error dialog */
62           }
63       }
64
65       Example of XmNpdmNotificationCallback from a Print Shell:
66
67       pdmNotifyCB(print_shell...)
68       {
69           XmPrintShellCallBackStruct * pr_cb = ...
70
71           switch (pr_cb->reason) {
72              case XmCR_PDM_NONE:
73                  /* no PDM available */
74                  PostErrorDialog(...);
75                  break;
76              case XmCR_PDM_VXAUTH:
77                  /* PDM is not authorized ... */
78                  PostErrorDialog(...);
79                  break;
80              case XmCR_PDM_UP: the PDM is up and running
81                  /* everything is fine */
82                  break;
83                      default: /* other cases */
84          }
85       }
86

SEE ALSO

88       XmPrintSetup(3),    XmPrintShell(3),   XmRedisplayWidget(3),   XmPrint‐
89       ToFile(3)
90
91
92
93                                                 XmPrintPopupPDM(library call)
Impressum