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

NAME

6       XmPrintSetup — setup and create a Print Shell widget
7

SYNOPSIS

9       #include <Xm/Print.h>
10       Widget XmPrintSetup(
11       Widget video_widget,
12       Screen *print_screen,
13       String print_shell_name,
14       ArgList args,
15       Cardinal num_args);
16

DESCRIPTION

18       A  function  that  does  the appropriate setting and creates a realized
19       XmPrintShell that it returns to the caller.  This  function  hides  the
20       details  of  the  Xt  to  set  up a valid print shell heirarchy for the
21       application. It is also meant  to  encourage  consistency  in  the  way
22       applications root their print widget hierarchy.
23
24       print_screen  must belong to a Display connection that has already been
25       initialized with Xt.
26
27       The video_widget is used to get at the application context, application
28       name and class, and argc/argv stored on the applicationShell that roots
29       this widget. If no applicationShell is found, NULL argv/argc are used.
30
31       XmPrintSetup then creates an unrealized ApplicationShell with the  same
32       name and class as the one given by the video display, on the print dis‐
33       play and on the print screen specified.
34
35       An XmPrintShell is then created as a  child  of  this  toplevel  shell,
36       using XtCreatePopupShell, with the name print_shell_name, and using the
37       args provided. It then realizes and maps the print shell, using XtPopup
38       with XtGrabNone.
39
40       This  way,  application resource files and users can specify print spe‐
41       cific attributes using the following  syntax  (if  print_shell_name  is
42       "Print"):
43
44       Dtpad.Print*textFontList: somefont
45       *Print*background:white
46       *Print*highlightThickness:0
47
48       video_widget
49                 A video widget to fetch app video data from.
50
51       print_screen
52                 A  print  screen  on the print display - specifies the screen
53                 onto which the new shell is created.
54
55       print_shell_name
56                 Specifies the name of the XmPrintShell created on the X Print
57                 server.
58
59       args      Specifies  the  argument list from which to get the resources
60                 for the XmPrintShell.
61
62       num_args  Specifies the number of arguments in the argument list.
63

RETURN VALUE

65       The id the XmPrintShell widget created on the X  Print  Server  connec‐
66       tion, or NULL if an error has occured.
67

ERRORS/WARNINGS

69       None.
70

EXAMPLES

72       From the OK callback and the SetUp callback of the primary print dialog
73       widget:
74
75       static void
76       printOKCB(Widget, XtPointer call_data, XtPointer client_data)
77       {
78         AppPrint *p = (AppPrint *) client_data;
79         DtPrintSetupCallbackStruct *pbs =
80                                (XmPrintCallbackStruct *) call_data;
81
82         /* connect if not already done.
83            the print dialog callback always provides valid
84                    printer name, print display and screen
85                    already initialized: XpInitContext called */
86        */
87         p->print_shell = XmPrintSetup (widget, pbs->print_screen,
88                                                     "Print", NULL, 0);
89
90         ...
91       }
92

SEE ALSO

94       XmPrintShell(3), XmRedisplayWidget(3), XmPrintToFile(3),  XmPrintPopup‐
95       PDM(3)
96
97
98
99                                                    XmPrintSetup(library call)
Impressum