| 1 | /* |
| 2 | * |
| 3 | * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * Further, this software is distributed without any warranty that it is |
| 16 | * free of the rightful claim of any third person regarding infringement |
| 17 | * or the like. Any license provided herein, whether implied or |
| 18 | * otherwise, applies only to this software file. Patent licenses, if |
| 19 | * any, provided herein do not apply to combinations of this program with |
| 20 | * other software, or any other product whatsoever. |
| 21 | * |
| 22 | * You should have received a copy of the GNU Lesser General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 | * |
| 26 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, |
| 27 | * Mountain View, CA 94043, or: |
| 28 | * |
| 29 | * http://www.sgi.com |
| 30 | * |
| 31 | * For further information regarding this notice, see: |
| 32 | * |
| 33 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | /* |
| 38 | * Copyright (C) 1990,91 Silicon Graphics, Inc. |
| 39 | * |
| 40 | _______________________________________________________________________ |
| 41 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 42 | | |
| 43 | | $Revision: 1.4 $ |
| 44 | | |
| 45 | | Classes: |
| 46 | | SoXtPrintDialog |
| 47 | | |
| 48 | | Author(s): Dave Immel |
| 49 | | |
| 50 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 51 | _______________________________________________________________________ |
| 52 | */ |
| 53 | |
| 54 | #include <Inventor/SbPList.h>cxx . . $ `<file>/lib/database/include/Inventor/SbPList.h`/ |
| 55 | #include <Inventor/SoOffscreenRenderer.h>cxx . . $ `<file>/lib/database/include/Inventor/SoOffscreenRenderer.h`/ |
| 56 | #include <Inventor/SoOutput.h>cxx . . $ `<file>/lib/database/include/Inventor/SoOutput.h`/ |
| 57 | #include <Inventor/SoPath.h>cxx . . $ `<file>/lib/database/include/Inventor/SoPath.h`/ |
| 58 | #include <Inventor/Xt/SoXt.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXt.h`/ |
| 59 | #include <Inventor/Xt/SoXtPrintDialog.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtPrintDialog.h`/ |
| 60 | #include <Inventor/errors/SoDebugError.h>cxx . . $ `<file>/lib/database/include/Inventor/errors/SoDebugError.h`/ |
| 61 | #include <Inventor/nodes/SoNode.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoNode.h`/ |
| 62 | #include <Inventor/actions/SoGLRenderAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGLRenderAction.h`/ |
| 63 | #include <Inventor/actions/SoWriteAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoWriteAction.h`/ |
| 64 | #include <Inventor/Xt/SoXtResource.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtResource.h`/ |
| 65 | |
| 66 | #include <assert.h> |
| 67 | #include <fcntl.h> |
| 68 | #include <signal.h> |
| 69 | #include <errno.h> |
| 70 | #include <cstdio> |
| 71 | #include <cstring> |
| 72 | #include <sys/types.h> |
| 73 | #include <sys/wait.h> |
| 74 | #include <unistd.h> |
| 75 | #include <cstdlib> |
| 76 | |
| 77 | #include <X11/StringDefs.h> |
| 78 | #include <Xm/BulletinB.h> |
| 79 | #include <Xm/Form.h> |
| 80 | #include <Xm/Label.h> |
| 81 | #include <Xm/LabelG.h> |
| 82 | #include <Xm/List.h> |
| 83 | #include <Xm/PushB.h> |
| 84 | #include <Xm/PushBG.h> |
| 85 | #include <Xm/RowColumn.h> |
| 86 | #include <Xm/SeparatoG.h> |
| 87 | #include <Xm/Text.h> |
| 88 | #include <Xm/ToggleB.h> |
| 89 | #include <GL/gl.h> |
| 90 | |
| 91 | |
| 92 | // Definitions for PostScript Output |
| 93 | #define INITIALXREScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:93:9`! 288 |
| 94 | #define INITIALYREScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:94:9`! 378 |
| 95 | #define FULLPAGEXSIZEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:95:9`! (8.5) |
| 96 | #define FULLPAGEYSIZEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:96:9`! (11.0) |
| 97 | #define PNTScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:97:9`! (72.27) |
| 98 | #define PAGEXSIZEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:98:9`! (8.0) |
| 99 | #define PAGEYSIZEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:99:9`! (10.5) |
| 100 | #define PAGEMARGINcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:100:9`! (0.25) |
| 101 | #define SO_PRINTER_STRLENcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:101:9`! 32 |
| 102 | #define INCHES_PER_MMcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:102:9`! 3.937008e-02 |
| 103 | #define POINTS_PER_INCHcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:103:9`! 72.27 |
| 104 | |
| 105 | |
| 106 | #define PRINTER_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:106:9`! 330 |
| 107 | #define RGB_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:107:9`! 220 |
| 108 | #define POSTSCRIPT_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:108:9`! 275 |
| 109 | |
| 110 | #define PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(INDEX) ((char *) ((*printers)[INDEX])) |
| 111 | #if 0 |
| 112 | #define ADD_STYLE_BUTTON(KONST) \ |
| 113 | sButtons[KONST] = XmCreatePushButtonGadget (stylePopup, \ |
| 114 | styleLabels[KONST], wargs, 1); \ |
| 115 | XtAddCallback (sButtons[KONST], XmNactivateCallback, \ |
| 116 | (XtCallbackProc) SoXtPrintDialog::stylePopupCB, \ |
| 117 | (XtPointer)(KONST)); |
| 118 | #endif |
| 119 | |
| 120 | |
| 121 | // Resources for labels. +++ |
| 122 | typedef structcxx . . $ $anonymous_type_d40a2cbe261999e2_0# { |
| 123 | char *pageOutputcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageOutput.; |
| 124 | char *toPrintercxx . . $ $anonymous_type_d40a2cbe261999e2_0#toPrinter.; |
| 125 | char *toFilecxx . . $ $anonymous_type_d40a2cbe261999e2_0#toFile.; |
| 126 | char *fileFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileFormat.; |
| 127 | char *postScriptcxx . . $ $anonymous_type_d40a2cbe261999e2_0#postScript.; |
| 128 | char *rgbcxx . . $ $anonymous_type_d40a2cbe261999e2_0#rgb.; |
| 129 | char *resolutioncxx . . $ $anonymous_type_d40a2cbe261999e2_0#resolution.; |
| 130 | char *fileNamecxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileName.; |
| 131 | char *printQualitycxx . . $ $anonymous_type_d40a2cbe261999e2_0#printQuality.; |
| 132 | char *highcxx . . $ $anonymous_type_d40a2cbe261999e2_0#high.; |
| 133 | char *draftcxx . . $ $anonymous_type_d40a2cbe261999e2_0#draft.; |
| 134 | char *pageFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageFormat.; |
| 135 | char *portraitcxx . . $ $anonymous_type_d40a2cbe261999e2_0#portrait.; |
| 136 | char *landscapecxx . . $ $anonymous_type_d40a2cbe261999e2_0#landscape.; |
| 137 | char *printSizecxx . . $ $anonymous_type_d40a2cbe261999e2_0#printSize.; |
| 138 | char *printercxx . . $ $anonymous_type_d40a2cbe261999e2_0#printer.; |
| 139 | char *dpicxx . . $ $anonymous_type_d40a2cbe261999e2_0#dpi.; |
| 140 | char *messagecxx . . $ $anonymous_type_d40a2cbe261999e2_0#message.; |
| 141 | char *quitBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#quitB.; |
| 142 | char *printBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#printB.; |
| 143 | char *holzn1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn1.; |
| 144 | char *holzn2cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn2.; |
| 145 | char *vertc1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#vertc1.; |
| 146 | char *bycxx . . $ $anonymous_type_d40a2cbe261999e2_0#by.; |
| 147 | } RES_LABELScxx . . $ RES_LABELS#; |
| 148 | static RES_LABELScxx . . $ RES_LABELS# rlcxx . . $ rl.; |
| 149 | static char *defaultscxx . . $ defaults.[]={ |
| 150 | "Page Output:", |
| 151 | "To Printer", |
| 152 | "To File", |
| 153 | "File Format:", |
| 154 | "PostScript", |
| 155 | "RGB", |
| 156 | "Resolution:", |
| 157 | "File Name:", |
| 158 | "Print Quality:", |
| 159 | "High", |
| 160 | "Draft", |
| 161 | "Page Format:", |
| 162 | "Portrait", |
| 163 | "Landscape", |
| 164 | "Print Size (inches):", |
| 165 | "Printer:", |
| 166 | "DPI:", |
| 167 | "Message:", |
| 168 | "Quit", |
| 169 | "Print", |
| 170 | "7", |
| 171 | "5", |
| 172 | "7", |
| 173 | "by" |
| 174 | }; |
| 175 | |
| 176 | |
| 177 | // ??? COMPAT 2.0 |
| 178 | // |
| 179 | // This addition is being made to enable the programmer to pass in an |
| 180 | // SoGLRenderAction to be used when rendering. To insure binary |
| 181 | // compatibility, a static list of structures will be kept to record |
| 182 | // the instances of this class with the print dialogs that are |
| 183 | // set with them. |
| 184 | // |
| 185 | |
| 186 | class _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# { |
| 187 | public: |
| 188 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem#_SoPrintDialogItem(9f1b71f0eda7690d).(SoGLRenderActioncxx . . $ SoGLRenderAction# *glAct, SoXtPrintDialogcxx . . $ SoXtPrintDialog# *p) |
| 189 | { actcxx . . $ _SoPrintDialogItem#act. = glAct; printDialogcxx . . $ _SoPrintDialogItem#printDialog. = p;} |
| 190 | SoGLRenderActioncxx . . $ SoGLRenderAction# *actcxx . . $ _SoPrintDialogItem#act.; // The render action used with this instance |
| 191 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *printDialogcxx . . $ _SoPrintDialogItem#printDialog.;// The instance of the print dialog |
| 192 | }; |
| 193 | |
| 194 | // The list of print dialogs and their render actions |
| 195 | static SbPListcxx . . $ SbPList# *printDialogListcxx . . $ printDialogList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 196 | |
| 197 | //////////////////////////////////////////////////////////////////////// |
| 198 | // |
| 199 | // Description: |
| 200 | // ??? COMPAT 2.0 |
| 201 | // Find the instance of the _SoPrintDialogItem class that corresponds |
| 202 | // to this instance of the SoXtPrintDialog class. |
| 203 | // |
| 204 | // Use: internal |
| 205 | |
| 206 | static _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *_SoFindPrintDialogcxx . . $ _SoFindPrintDialog(2c84009c75388772).(const SoXtPrintDialogcxx . . $ SoXtPrintDialog# *dialog) |
| 207 | |
| 208 | // |
| 209 | //////////////////////////////////////////////////////////////////////// |
| 210 | { |
| 211 | // If no class instances have been stored, return NULL |
| 212 | if (printDialogListcxx . . $ printDialogList. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 213 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 214 | |
| 215 | for (int i=0; i<printDialogListcxx . . $ printDialogList.->getLengthcxx . . $ SbPList#getLength(455f465bc33b4cdf).(); i++) { |
| 216 | |
| 217 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *item = (_SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *)(*printDialogListcxx . . $ printDialogList.)[cxx . . $ SbPList#`operator[]`(5f9a4f363ac2f591).i]; |
| 218 | if (item->printDialogcxx . . $ _SoPrintDialogItem#printDialog. == dialog) |
| 219 | return item; |
| 220 | } |
| 221 | |
| 222 | // A render action has not been set with this instance. Return NULL. |
| 223 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 224 | } |
| 225 | |
| 226 | //////////////////////////////////////////////////////////////////////// |
| 227 | // |
| 228 | // Public constructor - build the widget right now |
| 229 | // |
| 230 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::SoXtPrintDialogcxx . . $ SoXtPrintDialog#SoXtPrintDialog(13a1a66a4f5d094a).( |
| 231 | Widgetcxx . . $ Widget# parent, |
| 232 | const char *name, |
| 233 | SbBoolcxx . . $ SbBool# buildInsideParent) |
| 234 | : SoXtComponentcxx . . $ SoXtComponent#SoXtComponent(13a1a66a4f5d094a).( |
| 235 | parent, |
| 236 | name, |
| 237 | buildInsideParent) |
| 238 | // |
| 239 | //////////////////////////////////////////////////////////////////////// |
| 240 | { |
| 241 | // In this case, print dialog is what the app wants, so buildNow = TRUE |
| 242 | constructorCommoncxx . . $ SoXtPrintDialog#constructorCommon(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 243 | } |
| 244 | |
| 245 | //////////////////////////////////////////////////////////////////////// |
| 246 | // |
| 247 | // SoEXTENDER constructor - the subclass tells us whether to build or not |
| 248 | // |
| 249 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::SoXtPrintDialogcxx . . $ SoXtPrintDialog#SoXtPrintDialog(d778020db9c00467).( |
| 250 | Widgetcxx . . $ Widget# parent, |
| 251 | const char *name, |
| 252 | SbBoolcxx . . $ SbBool# buildInsideParent, |
| 253 | SbBoolcxx . . $ SbBool# buildNow) |
| 254 | : SoXtComponentcxx . . $ SoXtComponent#SoXtComponent(13a1a66a4f5d094a).( |
| 255 | parent, |
| 256 | name, |
| 257 | buildInsideParent) |
| 258 | // |
| 259 | //////////////////////////////////////////////////////////////////////// |
| 260 | { |
| 261 | // In this case, print dialog may be what the app wants, |
| 262 | // or it may want a subclass of print dialog. Pass along buildNow |
| 263 | // as it was passed to us. |
| 264 | constructorCommoncxx . . $ SoXtPrintDialog#constructorCommon(d4f767463ce0a6b3).(buildNow); |
| 265 | } |
| 266 | |
| 267 | //////////////////////////////////////////////////////////////////////// |
| 268 | // |
| 269 | // Called by the constructors |
| 270 | // |
| 271 | // private |
| 272 | // |
| 273 | void |
| 274 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::constructorCommoncxx . . $ SoXtPrintDialog#constructorCommon(d4f767463ce0a6b3).(SbBoolcxx . . $ SbBool# buildNow) |
| 275 | // |
| 276 | ////////////////////////////////////////////////////////////////////// |
| 277 | { |
| 278 | printDonecxx . . $ SoXtPrintDialog#printDone. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 279 | highQualitycxx . . $ SoXtPrintDialog#highQuality. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 280 | portraitFormatcxx . . $ SoXtPrintDialog#portraitFormat. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 281 | printerOutputcxx . . $ SoXtPrintDialog#printerOutput. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 282 | postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 283 | nodeMostRecentcxx . . $ SoXtPrintDialog#nodeMostRecent. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 284 | rootNodecxx . . $ SoXtPrintDialog#rootNode. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 285 | rootPathcxx . . $ SoXtPrintDialog#rootPath. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 286 | defaultPrintercxx . . $ SoXtPrintDialog#defaultPrinter. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 287 | printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 288 | printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 289 | postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 290 | postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 291 | rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 292 | rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 293 | alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 294 | printerscxx . . $ SoXtPrintDialog#printers. = new SbPListcxx . . $ SbPList#; |
| 295 | printRescxx . . $ SoXtPrintDialog#printRes..setValuecxx . . $ SbVec2s#setValue(1b1c29394cccbfa1).(INITIALXREScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:93:9`!, INITIALYREScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:94:9`!); |
| 296 | printSizecxx . . $ SoXtPrintDialog#printSize..setValuecxx . . $ SbVec2f#setValue(c49b0fdbc63185b4).(printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0]/SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).(), |
| 297 | printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1]/SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).()); |
| 298 | |
| 299 | // |
| 300 | // Create the list of available printers. |
| 301 | // |
| 302 | getPrinterListcxx . . $ SoXtPrintDialog#getPrinterList(49f6e7a06ebc5aa8).(); |
| 303 | |
| 304 | // Build the widget tree, and let SoXtComponent know about our base widget. |
| 305 | if (buildNow) { |
| 306 | Widgetcxx . . $ Widget# w = buildWidgetcxx . . $ SoXtPrintDialog#buildWidget(a686be44a4028679).(getParentWidgetcxx . . $ SoXtComponent#getParentWidget(24ba213de9f943e3).()); |
| 307 | setBaseWidgetcxx . . $ SoXtComponent#setBaseWidget(cfa999c5a14729dd).(w); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | /////////////////////////////////////////////////////////////////////// |
| 312 | // |
| 313 | // Description: |
| 314 | // Destructor. |
| 315 | // |
| 316 | // Use: public |
| 317 | |
| 318 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::~cxx . . $ SoXtPrintDialog#`~SoXtPrintDialog`(49f6e7a06ebc5aa8).SoXtPrintDialogcxx . . $ SoXtPrintDialog#() |
| 319 | |
| 320 | // |
| 321 | ////////////////////////////////////////////////////////////////////// |
| 322 | { |
| 323 | // ??? COMPAT 2.0 |
| 324 | // |
| 325 | // Get the print dialog item from the list and delete the render action. |
| 326 | // Then, remove the item from the list and delete it. |
| 327 | // |
| 328 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *item = _SoFindPrintDialogcxx . . $ _SoFindPrintDialog(2c84009c75388772).(this); |
| 329 | if (item != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 330 | delete item->actcxx . . $ _SoPrintDialogItem#act.; |
| 331 | printDialogListcxx . . $ printDialogList.->removecxx . . $ SbPList#remove(d4f767463ce0a6b3).(printDialogListcxx . . $ printDialogList.->findcxx . . $ SbPList#find(bca04c809f7da908).(item)); |
| 332 | delete item; |
| 333 | } |
| 334 | |
| 335 | for (int i = 0; i < printerscxx . . $ SoXtPrintDialog#printers.->getLengthcxx . . $ SbPList#getLength(455f465bc33b4cdf).(); i++) { |
| 336 | if (PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(i) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) free(PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(i)); |
| 337 | } |
| 338 | delete printerscxx . . $ SoXtPrintDialog#printers.; |
| 339 | if (defaultPrintercxx . . $ SoXtPrintDialog#defaultPrinter. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) free(defaultPrintercxx . . $ SoXtPrintDialog#defaultPrinter.); |
| 340 | |
| 341 | if (rootNodecxx . . $ SoXtPrintDialog#rootNode. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 342 | rootNodecxx . . $ SoXtPrintDialog#rootNode.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 343 | } |
| 344 | |
| 345 | //////////////////////////////////////////////////////////////////////// |
| 346 | // |
| 347 | // Description: |
| 348 | // Get the render action. |
| 349 | // |
| 350 | // Use: public |
| 351 | |
| 352 | SoGLRenderActioncxx . . $ SoGLRenderAction# * |
| 353 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::getGLRenderActioncxx . . $ SoXtPrintDialog#getGLRenderAction(855c4554605d6817).() |
| 354 | |
| 355 | |
| 356 | // |
| 357 | //////////////////////////////////////////////////////////////////////// |
| 358 | { |
| 359 | // ??? COMPAT 2.0 |
| 360 | // |
| 361 | // Find the list item and return the action associated with it. |
| 362 | // If there is none, allocate one and put it on the list. Return |
| 363 | // the new action. |
| 364 | // |
| 365 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *printItem = _SoFindPrintDialogcxx . . $ _SoFindPrintDialog(2c84009c75388772).(this); |
| 366 | if (printItem == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 367 | SbViewportRegioncxx . . $ SbViewportRegion# tmpRegioncxx . . $ SbViewportRegion#SbViewportRegion(af780a7c10c7990f).(100, 100); |
| 368 | SoGLRenderActioncxx . . $ SoGLRenderAction# *tmpAct = new SoGLRenderActioncxx . . $ SoGLRenderAction#SoGLRenderAction(6b06d788389016cd).(tmpRegion); |
| 369 | printItem = new _SoPrintDialogItemcxx . . $ _SoPrintDialogItem#(tmpAct, this); |
| 370 | |
| 371 | // If the printDialogList is NULL, allocate one and add the new |
| 372 | // item to it. |
| 373 | if (printDialogListcxx . . $ printDialogList. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 374 | printDialogListcxx . . $ printDialogList. = new SbPListcxx . . $ SbPList#(4); |
| 375 | } |
| 376 | printDialogListcxx . . $ printDialogList.->appendcxx . . $ SbPList#append(5d22bdacc48458e8).(printItem); |
| 377 | } |
| 378 | |
| 379 | return (printItem->actcxx . . $ _SoPrintDialogItem#act.); |
| 380 | } |
| 381 | |
| 382 | //////////////////////////////////////////////////////////////////////// |
| 383 | // |
| 384 | // Description: |
| 385 | // Set the render action. |
| 386 | // |
| 387 | // Use: public |
| 388 | |
| 389 | void |
| 390 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::setGLRenderActioncxx . . $ SoXtPrintDialog#setGLRenderAction(18bc029bfdc8896e).( |
| 391 | const SoGLRenderActioncxx . . $ SoGLRenderAction# *act ) |
| 392 | |
| 393 | |
| 394 | // |
| 395 | //////////////////////////////////////////////////////////////////////// |
| 396 | { |
| 397 | // ??? COMPAT 2.0 |
| 398 | // |
| 399 | // Find the list item and load the new render action into it. |
| 400 | // If there is currently no render action associated with this |
| 401 | // instance, create one. Store the new action in the item. |
| 402 | // |
| 403 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *item = _SoFindPrintDialogcxx . . $ _SoFindPrintDialog(2c84009c75388772).(this); |
| 404 | |
| 405 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 406 | item = new _SoPrintDialogItemcxx . . $ _SoPrintDialogItem#((SoGLRenderActioncxx . . $ SoGLRenderAction# *)act, this); |
| 407 | |
| 408 | // If the printDialogList is NULL, allocate one and add the new |
| 409 | // item to it. |
| 410 | if (printDialogListcxx . . $ printDialogList. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 411 | printDialogListcxx . . $ printDialogList. = new SbPListcxx . . $ SbPList#(4); |
| 412 | } |
| 413 | printDialogListcxx . . $ printDialogList.->appendcxx . . $ SbPList#append(5d22bdacc48458e8).(item); |
| 414 | } |
| 415 | |
| 416 | item->actcxx . . $ _SoPrintDialogItem#act. = (SoGLRenderActioncxx . . $ SoGLRenderAction# *)act; |
| 417 | } |
| 418 | |
| 419 | /////////////////////////////////////////////////////////////////////// |
| 420 | // |
| 421 | // Description: |
| 422 | // Set the root of the scene graph to print. |
| 423 | // |
| 424 | // Use: public |
| 425 | // |
| 426 | void |
| 427 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::setSceneGraphcxx . . $ SoXtPrintDialog#setSceneGraph(da6c7544ccee32bd).( SoNodecxx . . $ SoNode# *root ) |
| 428 | // |
| 429 | ////////////////////////////////////////////////////////////////////// |
| 430 | { |
| 431 | if ( root != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) |
| 432 | root->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 433 | |
| 434 | if (rootNodecxx . . $ SoXtPrintDialog#rootNode. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 435 | rootNodecxx . . $ SoXtPrintDialog#rootNode.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 436 | |
| 437 | rootNodecxx . . $ SoXtPrintDialog#rootNode. = root; |
| 438 | |
| 439 | if (rootNodecxx . . $ SoXtPrintDialog#rootNode. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 440 | nodeMostRecentcxx . . $ SoXtPrintDialog#nodeMostRecent. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 441 | } |
| 442 | |
| 443 | /////////////////////////////////////////////////////////////////////// |
| 444 | // |
| 445 | // Description: |
| 446 | // Set the root path of the scene graph to print. |
| 447 | // |
| 448 | // Use: public |
| 449 | // |
| 450 | void |
| 451 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::setSceneGraphcxx . . $ SoXtPrintDialog#setSceneGraph(eed4dbbaf0eca0f1).( SoPathcxx . . $ SoPath# *root ) |
| 452 | // |
| 453 | ////////////////////////////////////////////////////////////////////// |
| 454 | { |
| 455 | if ( root != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) |
| 456 | root->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 457 | |
| 458 | if (rootPathcxx . . $ SoXtPrintDialog#rootPath. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 459 | rootPathcxx . . $ SoXtPrintDialog#rootPath.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 460 | |
| 461 | rootPathcxx . . $ SoXtPrintDialog#rootPath. = root; |
| 462 | |
| 463 | if (rootPathcxx . . $ SoXtPrintDialog#rootPath. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 464 | nodeMostRecentcxx . . $ SoXtPrintDialog#nodeMostRecent. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 465 | } |
| 466 | |
| 467 | /////////////////////////////////////////////////////////////////////// |
| 468 | // |
| 469 | // Description: |
| 470 | // Set the size of the print |
| 471 | // |
| 472 | // Use: public |
| 473 | // |
| 474 | void |
| 475 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).( const SbVec2fcxx . . $ SbVec2f# &psize ) |
| 476 | // |
| 477 | ////////////////////////////////////////////////////////////////////// |
| 478 | { |
| 479 | printSizecxx . . $ SoXtPrintDialog#printSize. =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). psize; |
| 480 | printRescxx . . $ SoXtPrintDialog#printRes..setValuecxx . . $ SbVec2s#setValue(1b1c29394cccbfa1).( |
| 481 | (short)(printSizecxx . . $ SoXtPrintDialog#printSize.[cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).0]*SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).()), |
| 482 | (short)(printSizecxx . . $ SoXtPrintDialog#printSize.[cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).1]*SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).())); |
| 483 | |
| 484 | updateTextportscxx . . $ SoXtPrintDialog#updateTextports(49f6e7a06ebc5aa8).(); |
| 485 | } |
| 486 | |
| 487 | /////////////////////////////////////////////////////////////////////// |
| 488 | // |
| 489 | // Description: |
| 490 | // Set the size of the print in pixels |
| 491 | // |
| 492 | // Use: public |
| 493 | // |
| 494 | void |
| 495 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(8bc400dc8eb33072).( const SbVec2scxx . . $ SbVec2s# &psize ) |
| 496 | // |
| 497 | ////////////////////////////////////////////////////////////////////// |
| 498 | { |
| 499 | printRescxx . . $ SoXtPrintDialog#printRes. =cxx . . $ SbVec2s#`operator=`(1ecf307161264657). psize; |
| 500 | printSizecxx . . $ SoXtPrintDialog#printSize..setValuecxx . . $ SbVec2f#setValue(c49b0fdbc63185b4).( |
| 501 | printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0]/SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).(), |
| 502 | printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1]/SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).()); |
| 503 | |
| 504 | updateTextportscxx . . $ SoXtPrintDialog#updateTextports(49f6e7a06ebc5aa8).(); |
| 505 | } |
| 506 | |
| 507 | /////////////////////////////////////////////////////////////////////// |
| 508 | // |
| 509 | // Description: |
| 510 | // This builds the widget. |
| 511 | // |
| 512 | // Use: public |
| 513 | |
| 514 | Widgetcxx . . $ Widget# |
| 515 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildWidgetcxx . . $ SoXtPrintDialog#buildWidget(a686be44a4028679).(Widgetcxx . . $ Widget# parent) |
| 516 | |
| 517 | // |
| 518 | ////////////////////////////////////////////////////////////////////// |
| 519 | { |
| 520 | XmString printMsg; |
| 521 | Argcxx . . $ Arg# wargs[16]; |
| 522 | int n; |
| 523 | |
| 524 | // |
| 525 | // "widget" is the main widget for the print widget. labels and their |
| 526 | // associated radio buttons, a label and scrollList widget for selecting |
| 527 | // a printer, a label and text widget for typing a filename, quit and |
| 528 | // print buttons, and a message text widget. |
| 529 | // |
| 530 | n = 0; |
| 531 | Widgetcxx . . $ Widget# widget = XtCreateWidget(getWidgetNamecxx . . $ SoXtComponent#getWidgetName(a9f41ea0e82d88cf).(), xmBulletinBoardWidgetClass, |
| 532 | parent, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 533 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginWidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2982:9`!, 10 ); n++; |
| 534 | XtSetValues( widget, wargs, n ); |
| 535 | |
| 536 | |
| 537 | // get resources... |
| 538 | SoXtResourcecxx . . $ SoXtResource# xrcxx . . $ SoXtResource#SoXtResource(cfa999c5a14729dd).(widget); |
| 539 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "pageOutput", "PageOutput", rlcxx . . $ rl..pageOutputcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageOutput. )) |
| 540 | rlcxx . . $ rl..pageOutputcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageOutput. = defaultscxx . . $ defaults.[0]; |
| 541 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "toPrinter", "ToPrinter", rlcxx . . $ rl..toPrintercxx . . $ $anonymous_type_d40a2cbe261999e2_0#toPrinter. )) |
| 542 | rlcxx . . $ rl..toPrintercxx . . $ $anonymous_type_d40a2cbe261999e2_0#toPrinter. = defaultscxx . . $ defaults.[1]; |
| 543 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "toFile", "ToFile", rlcxx . . $ rl..toFilecxx . . $ $anonymous_type_d40a2cbe261999e2_0#toFile. )) |
| 544 | rlcxx . . $ rl..toFilecxx . . $ $anonymous_type_d40a2cbe261999e2_0#toFile. = defaultscxx . . $ defaults.[2]; |
| 545 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "fileFormat", "FileFormat", rlcxx . . $ rl..fileFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileFormat. )) |
| 546 | rlcxx . . $ rl..fileFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileFormat. = defaultscxx . . $ defaults.[3]; |
| 547 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "postScript", "PostScript", rlcxx . . $ rl..postScriptcxx . . $ $anonymous_type_d40a2cbe261999e2_0#postScript. )) |
| 548 | rlcxx . . $ rl..postScriptcxx . . $ $anonymous_type_d40a2cbe261999e2_0#postScript. = defaultscxx . . $ defaults.[4]; |
| 549 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "rgb", "RGB", rlcxx . . $ rl..rgbcxx . . $ $anonymous_type_d40a2cbe261999e2_0#rgb. )) |
| 550 | rlcxx . . $ rl..rgbcxx . . $ $anonymous_type_d40a2cbe261999e2_0#rgb. = defaultscxx . . $ defaults.[5]; |
| 551 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "resolution", "Resolution", rlcxx . . $ rl..resolutioncxx . . $ $anonymous_type_d40a2cbe261999e2_0#resolution. )) |
| 552 | rlcxx . . $ rl..resolutioncxx . . $ $anonymous_type_d40a2cbe261999e2_0#resolution. = defaultscxx . . $ defaults.[6]; |
| 553 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "fileName", "FileName", rlcxx . . $ rl..fileNamecxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileName. )) |
| 554 | rlcxx . . $ rl..fileNamecxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileName. = defaultscxx . . $ defaults.[7]; |
| 555 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "printQuality", "PrintQuality", rlcxx . . $ rl..printQualitycxx . . $ $anonymous_type_d40a2cbe261999e2_0#printQuality. )) |
| 556 | rlcxx . . $ rl..printQualitycxx . . $ $anonymous_type_d40a2cbe261999e2_0#printQuality. = defaultscxx . . $ defaults.[8]; |
| 557 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "high", "High", rlcxx . . $ rl..highcxx . . $ $anonymous_type_d40a2cbe261999e2_0#high. )) |
| 558 | rlcxx . . $ rl..highcxx . . $ $anonymous_type_d40a2cbe261999e2_0#high. = defaultscxx . . $ defaults.[9]; |
| 559 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "draft", "Draft", rlcxx . . $ rl..draftcxx . . $ $anonymous_type_d40a2cbe261999e2_0#draft. )) |
| 560 | rlcxx . . $ rl..draftcxx . . $ $anonymous_type_d40a2cbe261999e2_0#draft. = defaultscxx . . $ defaults.[10]; |
| 561 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "pageFormat", "PageFormat", rlcxx . . $ rl..pageFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageFormat. )) |
| 562 | rlcxx . . $ rl..pageFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageFormat. = defaultscxx . . $ defaults.[11]; |
| 563 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "portrait", "Portrait", rlcxx . . $ rl..portraitcxx . . $ $anonymous_type_d40a2cbe261999e2_0#portrait. )) |
| 564 | rlcxx . . $ rl..portraitcxx . . $ $anonymous_type_d40a2cbe261999e2_0#portrait. = defaultscxx . . $ defaults.[12]; |
| 565 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "landscape", "Landscape", rlcxx . . $ rl..landscapecxx . . $ $anonymous_type_d40a2cbe261999e2_0#landscape. )) |
| 566 | rlcxx . . $ rl..landscapecxx . . $ $anonymous_type_d40a2cbe261999e2_0#landscape. = defaultscxx . . $ defaults.[13]; |
| 567 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "printSize", "PrintSize", rlcxx . . $ rl..printSizecxx . . $ $anonymous_type_d40a2cbe261999e2_0#printSize. )) |
| 568 | rlcxx . . $ rl..printSizecxx . . $ $anonymous_type_d40a2cbe261999e2_0#printSize. = defaultscxx . . $ defaults.[14]; |
| 569 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "printer", "Printer", rlcxx . . $ rl..printercxx . . $ $anonymous_type_d40a2cbe261999e2_0#printer. )) |
| 570 | rlcxx . . $ rl..printercxx . . $ $anonymous_type_d40a2cbe261999e2_0#printer. = defaultscxx . . $ defaults.[15]; |
| 571 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "dpi", "DPI", rlcxx . . $ rl..dpicxx . . $ $anonymous_type_d40a2cbe261999e2_0#dpi. )) |
| 572 | rlcxx . . $ rl..dpicxx . . $ $anonymous_type_d40a2cbe261999e2_0#dpi. = defaultscxx . . $ defaults.[16]; |
| 573 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "message", "Message", rlcxx . . $ rl..messagecxx . . $ $anonymous_type_d40a2cbe261999e2_0#message. )) |
| 574 | rlcxx . . $ rl..messagecxx . . $ $anonymous_type_d40a2cbe261999e2_0#message. = defaultscxx . . $ defaults.[17]; |
| 575 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "quitB", "QuitB", rlcxx . . $ rl..quitBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#quitB. )) |
| 576 | rlcxx . . $ rl..quitBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#quitB. = defaultscxx . . $ defaults.[18]; |
| 577 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "printB", "PrintB", rlcxx . . $ rl..printBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#printB. )) |
| 578 | rlcxx . . $ rl..printBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#printB. = defaultscxx . . $ defaults.[19]; |
| 579 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "holznColumn1", "HolznColumn1", rlcxx . . $ rl..holzn1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn1. )) |
| 580 | rlcxx . . $ rl..holzn1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn1. = defaultscxx . . $ defaults.[20]; |
| 581 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "holznColumn2", "HolznColumn2", rlcxx . . $ rl..holzn2cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn2. )) |
| 582 | rlcxx . . $ rl..holzn2cxx . . $ $anonymous_type_d40a2cbe261999e2_0#holzn2. = defaultscxx . . $ defaults.[21]; |
| 583 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "vertcColumn1", "VertcColumn1", rlcxx . . $ rl..vertc1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#vertc1. )) |
| 584 | rlcxx . . $ rl..vertc1cxx . . $ $anonymous_type_d40a2cbe261999e2_0#vertc1. = defaultscxx . . $ defaults.[22]; |
| 585 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "byLabel", "ByLabel", rlcxx . . $ rl..bycxx . . $ $anonymous_type_d40a2cbe261999e2_0#by. )) |
| 586 | rlcxx . . $ rl..bycxx . . $ $anonymous_type_d40a2cbe261999e2_0#by. = defaultscxx . . $ defaults.[23]; |
| 587 | |
| 588 | |
| 589 | |
| 590 | // Build the radio button for the Page Output. |
| 591 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..pageOutputcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageOutput., rlcxx . . $ rl..toPrintercxx . . $ $anonymous_type_d40a2cbe261999e2_0#toPrinter., rlcxx . . $ rl..toFilecxx . . $ $anonymous_type_d40a2cbe261999e2_0#toFile., 120, 5, |
| 592 | widget, (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::outputCBcxx . . $ SoXtPrintDialog#outputCB(dc1d2edc24b8e412).); |
| 593 | |
| 594 | // |
| 595 | // Create the Quit and Print buttons, and the message textport. These |
| 596 | // will change position as the menu changes. |
| 597 | // |
| 598 | n = 0; |
| 599 | printMsg = XmStringCreate ( rlcxx . . $ rl..quitBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#quitB., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 600 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 180 ); n++; |
| 601 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 170 ); n++; |
| 602 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 70 ); n++; |
| 603 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNheightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6054:9`!, 30 ); n++; |
| 604 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 605 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, printMsg ); n++; |
| 606 | quitButtoncxx . . $ SoXtPrintDialog#quitButton. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmPushButtonWidgetClass, |
| 607 | widget, wargs, n); |
| 608 | XtAddCallback (quitButtoncxx . . $ SoXtPrintDialog#quitButton., XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!, |
| 609 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::quitCBcxx . . $ SoXtPrintDialog#quitCB(dc1d2edc24b8e412)., (XtPointercxx . . $ XtPointer#)(this)); |
| 610 | XmStringFree(printMsg); |
| 611 | |
| 612 | n = 0; |
| 613 | printMsg = XmStringCreate (rlcxx . . $ rl..printBcxx . . $ $anonymous_type_d40a2cbe261999e2_0#printB., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 614 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 270 ); n++; |
| 615 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 170 ); n++; |
| 616 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 70 ); n++; |
| 617 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNheightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6054:9`!, 30 ); n++; |
| 618 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 619 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, printMsg ); n++; |
| 620 | printButtoncxx . . $ SoXtPrintDialog#printButton. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmPushButtonWidgetClass, |
| 621 | widget, wargs, n); |
| 622 | XtAddCallback (printButtoncxx . . $ SoXtPrintDialog#printButton., XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!, |
| 623 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printCBcxx . . $ SoXtPrintDialog#printCB(dc1d2edc24b8e412)., (XtPointercxx . . $ XtPointer#)(this)); |
| 624 | XmStringFree(printMsg); |
| 625 | |
| 626 | n = 0; |
| 627 | printMsg = XmStringCreate( rlcxx . . $ rl..messagecxx . . $ $anonymous_type_d40a2cbe261999e2_0#message., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 628 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 180 ); n++; |
| 629 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, printMsg ); n++; |
| 630 | messageLabelWidgetcxx . . $ SoXtPrintDialog#messageLabelWidget. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 631 | widget, wargs, n); |
| 632 | n = 0; |
| 633 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 210 ); n++; |
| 634 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 330 ); n++; |
| 635 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 636 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNeditablecxx . . $ `<external>/427401153941432933/XmStrDefs.h:2706:9`!, FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); n++; |
| 637 | messageWidgetcxx . . $ SoXtPrintDialog#messageWidget. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmTextWidgetClass, |
| 638 | widget, wargs, n); |
| 639 | XmStringFree(printMsg); |
| 640 | |
| 641 | // Create the widget storing the file format radio buttons |
| 642 | n = 0; |
| 643 | fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget. = XtCreateWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmBulletinBoardWidgetClass, |
| 644 | widget, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 645 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginHeightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2970:9`!, 0 ); n++; |
| 646 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginWidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2982:9`!, 0 ); n++; |
| 647 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 0 ); n++; |
| 648 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 40 ); n++; |
| 649 | XtSetValues( fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget., wargs, n ); |
| 650 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..fileFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileFormat., rlcxx . . $ rl..postScriptcxx . . $ $anonymous_type_d40a2cbe261999e2_0#postScript., rlcxx . . $ rl..rgbcxx . . $ $anonymous_type_d40a2cbe261999e2_0#rgb., |
| 651 | 110, 0, fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget., |
| 652 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::fileFormatCBcxx . . $ SoXtPrintDialog#fileFormatCB(dc1d2edc24b8e412).); |
| 653 | |
| 654 | // |
| 655 | // Three subwidgets will contain file specific and printer specific UI. |
| 656 | // Each will be managed and unmanaged depending on the printerMenu flag. |
| 657 | // |
| 658 | buildToPrinterWidgetcxx . . $ SoXtPrintDialog#buildToPrinterWidget(cfa999c5a14729dd).( widget ); |
| 659 | buildToPostScriptFileWidgetcxx . . $ SoXtPrintDialog#buildToPostScriptFileWidget(cfa999c5a14729dd).( widget ); |
| 660 | buildToRGBFileWidgetcxx . . $ SoXtPrintDialog#buildToRGBFileWidget(cfa999c5a14729dd).( widget ); |
| 661 | setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(printSizecxx . . $ SoXtPrintDialog#printSize.); |
| 662 | setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(8bc400dc8eb33072).(printRescxx . . $ SoXtPrintDialog#printRes.); |
| 663 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 0 ); |
| 664 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[1], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 40 ); |
| 665 | XtSetValues( toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., wargs, 2 ); |
| 666 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 0 ); |
| 667 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[1], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 40 ); |
| 668 | XtSetValues( toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., wargs, 2 ); |
| 669 | XtSetValues( toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., wargs, 2 ); |
| 670 | if (printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) |
| 671 | XtManageChild( toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget. ); |
| 672 | else if (postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 673 | XtManageChild( toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. ); |
| 674 | else |
| 675 | XtManageChild( toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. ); |
| 676 | |
| 677 | // |
| 678 | // Place the quit, print, and message textports |
| 679 | // |
| 680 | placeBottomOfDialogcxx . . $ SoXtPrintDialog#placeBottomOfDialog(373c3a798c3f52ad).( this ); |
| 681 | |
| 682 | return widget; |
| 683 | } |
| 684 | |
| 685 | |
| 686 | |
| 687 | /////////////////////////////////////////////////////////////////////// |
| 688 | // |
| 689 | // Description: |
| 690 | // This builds the toPrinterWidget widget. |
| 691 | // |
| 692 | // Use: protected |
| 693 | |
| 694 | void |
| 695 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildToPrinterWidgetcxx . . $ SoXtPrintDialog#buildToPrinterWidget(cfa999c5a14729dd).( Widgetcxx . . $ Widget# parent ) |
| 696 | |
| 697 | // |
| 698 | ////////////////////////////////////////////////////////////////////// |
| 699 | { |
| 700 | XmString labelMsg; |
| 701 | Widgetcxx . . $ Widget# list, label; |
| 702 | Argcxx . . $ Arg# wargs[16]; |
| 703 | int i, n; |
| 704 | |
| 705 | toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget. = XtCreateManagedWidget (getWidgetNamecxx . . $ SoXtComponent#getWidgetName(a9f41ea0e82d88cf).(), |
| 706 | xmBulletinBoardWidgetClass, parent, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 707 | n = 0; |
| 708 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginHeightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2970:9`!, 0 ); n++; |
| 709 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginWidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2982:9`!, 0 ); n++; |
| 710 | XtSetValues( toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., wargs, n ); |
| 711 | |
| 712 | // Build radio buttons for the Print Quality and Page Format |
| 713 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..printQualitycxx . . $ $anonymous_type_d40a2cbe261999e2_0#printQuality., rlcxx . . $ rl..highcxx . . $ $anonymous_type_d40a2cbe261999e2_0#high., rlcxx . . $ rl..draftcxx . . $ $anonymous_type_d40a2cbe261999e2_0#draft., 110, 0, |
| 714 | toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::qualityCBcxx . . $ SoXtPrintDialog#qualityCB(dc1d2edc24b8e412).); |
| 715 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..pageFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#pageFormat., rlcxx . . $ rl..portraitcxx . . $ $anonymous_type_d40a2cbe261999e2_0#portrait., rlcxx . . $ rl..landscapecxx . . $ $anonymous_type_d40a2cbe261999e2_0#landscape., 110, 30, |
| 716 | toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::pageFormatCBcxx . . $ SoXtPrintDialog#pageFormatCB(dc1d2edc24b8e412).); |
| 717 | |
| 718 | // Build the fields for entering the Print Size |
| 719 | buildSizeFieldscxx . . $ SoXtPrintDialog#buildSizeFields(5d50f529e698ea79).( rlcxx . . $ rl..printSizecxx . . $ $anonymous_type_d40a2cbe261999e2_0#printSize., 60, toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., |
| 720 | printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize., printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize., |
| 721 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerHorizSizeCBcxx . . $ SoXtPrintDialog#printerHorizSizeCB(dc1d2edc24b8e412)., |
| 722 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerVertSizeCBcxx . . $ SoXtPrintDialog#printerVertSizeCB(dc1d2edc24b8e412). ); |
| 723 | |
| 724 | // |
| 725 | // Create the list of printer names |
| 726 | // |
| 727 | n = 0; |
| 728 | labelMsg = XmStringCreate ( rlcxx . . $ rl..printercxx . . $ $anonymous_type_d40a2cbe261999e2_0#printer., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 729 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 90 ); n++; |
| 730 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 731 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 732 | toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., wargs, n); |
| 733 | XmStringFree(labelMsg); |
| 734 | |
| 735 | n = 0; |
| 736 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 110 ); n++; |
| 737 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 90 ); n++; |
| 738 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 220 ); n++; |
| 739 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNheightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6054:9`!, 100 ); n++; |
| 740 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 741 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNselectionPolicycxx . . $ `<external>/427401153941432933/XmStrDefs.h:3324:9`!, XmSINGLE_SELECT); n++; |
| 742 | list = XmCreateScrolledList(toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., "printerList", wargs, n); |
| 743 | XtAddCallback(list, |
| 744 | XmNsingleSelectionCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3363:9`!, |
| 745 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::listPickcxx . . $ SoXtPrintDialog#listPick(dc1d2edc24b8e412)., |
| 746 | (XtPointercxx . . $ XtPointer#) this); |
| 747 | XtManageChild (list); |
| 748 | |
| 749 | // fill the list with printer names |
| 750 | whichPrintercxx . . $ SoXtPrintDialog#whichPrinter. = -1; |
| 751 | for (i = 0; i < printerscxx . . $ SoXtPrintDialog#printers.->getLengthcxx . . $ SbPList#getLength(455f465bc33b4cdf).(); i++) |
| 752 | { |
| 753 | XmString listItem = XmStringCreate (PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(i), |
| 754 | XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 755 | XmListAddItemUnselected (list, listItem, 0); |
| 756 | XmStringFree(listItem); // XmList made a copy |
| 757 | |
| 758 | // if this is the default, then select it. (list count starts at 1) |
| 759 | if (strcmp(PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(i), defaultPrintercxx . . $ SoXtPrintDialog#defaultPrinter.) == 0) { |
| 760 | XmListSelectPos (list, i+1, FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!); |
| 761 | whichPrintercxx . . $ SoXtPrintDialog#whichPrinter. = i; |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | // Build the field for entering the DPI |
| 766 | buildDPIFieldcxx . . $ SoXtPrintDialog#buildDPIField(886a1c21440cd238).( 120, toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget., printerDPIFieldcxx . . $ SoXtPrintDialog#printerDPIField., |
| 767 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerDPICBcxx . . $ SoXtPrintDialog#printerDPICB(dc1d2edc24b8e412). ); |
| 768 | } |
| 769 | |
| 770 | |
| 771 | |
| 772 | /////////////////////////////////////////////////////////////////////// |
| 773 | // |
| 774 | // Description: |
| 775 | // This builds the toPostScriptFileWidget widget. |
| 776 | // |
| 777 | // Use: protected |
| 778 | |
| 779 | void |
| 780 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildToPostScriptFileWidgetcxx . . $ SoXtPrintDialog#buildToPostScriptFileWidget(cfa999c5a14729dd).( Widgetcxx . . $ Widget# parent ) |
| 781 | |
| 782 | // |
| 783 | ////////////////////////////////////////////////////////////////////// |
| 784 | { |
| 785 | XmString labelMsg; |
| 786 | Widgetcxx . . $ Widget# label; |
| 787 | Argcxx . . $ Arg# wargs[4]; |
| 788 | int n; |
| 789 | |
| 790 | n = 0; |
| 791 | toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. = XtCreateWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmBulletinBoardWidgetClass, |
| 792 | parent, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 793 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginHeightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2970:9`!, 0 ); n++; |
| 794 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginWidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2982:9`!, 0 ); n++; |
| 795 | XtSetValues( toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., wargs, n ); |
| 796 | |
| 797 | // Build radio buttons for the Print Quality |
| 798 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..printQualitycxx . . $ $anonymous_type_d40a2cbe261999e2_0#printQuality., rlcxx . . $ rl..highcxx . . $ $anonymous_type_d40a2cbe261999e2_0#high., rlcxx . . $ rl..draftcxx . . $ $anonymous_type_d40a2cbe261999e2_0#draft., 110, 30, |
| 799 | toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., |
| 800 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::qualityCBcxx . . $ SoXtPrintDialog#qualityCB(dc1d2edc24b8e412).); |
| 801 | |
| 802 | // Build the fields for entering the Print Size |
| 803 | buildSizeFieldscxx . . $ SoXtPrintDialog#buildSizeFields(5d50f529e698ea79).( rlcxx . . $ rl..printSizecxx . . $ $anonymous_type_d40a2cbe261999e2_0#printSize., 60, toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., |
| 804 | postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize., postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize., |
| 805 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptHorizSizeCBcxx . . $ SoXtPrintDialog#postScriptHorizSizeCB(dc1d2edc24b8e412)., |
| 806 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptVertSizeCBcxx . . $ SoXtPrintDialog#postScriptVertSizeCB(dc1d2edc24b8e412). ); |
| 807 | |
| 808 | // |
| 809 | // Create the FileName label and textport. |
| 810 | // |
| 811 | n = 0; |
| 812 | labelMsg = XmStringCreate (rlcxx . . $ rl..fileNamecxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileName., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 813 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 90 ); n++; |
| 814 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 815 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 816 | toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., wargs, n); |
| 817 | XmStringFree(labelMsg); |
| 818 | |
| 819 | n = 0; |
| 820 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 100 ); n++; |
| 821 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 90 ); n++; |
| 822 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 230 ); n++; |
| 823 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 824 | postScriptFilenameWidgetcxx . . $ SoXtPrintDialog#postScriptFilenameWidget. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmTextWidgetClass, |
| 825 | toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., wargs, n); |
| 826 | // Build the field for entering the DPI |
| 827 | buildDPIFieldcxx . . $ SoXtPrintDialog#buildDPIField(886a1c21440cd238).( 130, toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget., postScriptDPIFieldcxx . . $ SoXtPrintDialog#postScriptDPIField., |
| 828 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptDPICBcxx . . $ SoXtPrintDialog#postScriptDPICB(dc1d2edc24b8e412). ); |
| 829 | } |
| 830 | |
| 831 | |
| 832 | |
| 833 | /////////////////////////////////////////////////////////////////////// |
| 834 | // |
| 835 | // Description: |
| 836 | // This builds the toRGBFileWidget widget. |
| 837 | // |
| 838 | // Use: protected |
| 839 | |
| 840 | void |
| 841 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildToRGBFileWidgetcxx . . $ SoXtPrintDialog#buildToRGBFileWidget(cfa999c5a14729dd).( Widgetcxx . . $ Widget# parent ) |
| 842 | |
| 843 | // |
| 844 | ////////////////////////////////////////////////////////////////////// |
| 845 | { |
| 846 | XmString labelMsg; |
| 847 | Widgetcxx . . $ Widget# label; |
| 848 | Argcxx . . $ Arg# wargs[4]; |
| 849 | int n; |
| 850 | |
| 851 | n = 0; |
| 852 | toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. = XtCreateWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmBulletinBoardWidgetClass, |
| 853 | parent, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 854 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginHeightcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2970:9`!, 0 ); n++; |
| 855 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNmarginWidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2982:9`!, 0 ); n++; |
| 856 | XtSetValues( toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., wargs, n ); |
| 857 | |
| 858 | // Build radio buttons for the Print Quality |
| 859 | buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( rlcxx . . $ rl..fileFormatcxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileFormat., rlcxx . . $ rl..postScriptcxx . . $ $anonymous_type_d40a2cbe261999e2_0#postScript., rlcxx . . $ rl..rgbcxx . . $ $anonymous_type_d40a2cbe261999e2_0#rgb., 110, 0, |
| 860 | toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., |
| 861 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::fileFormatCBcxx . . $ SoXtPrintDialog#fileFormatCB(dc1d2edc24b8e412).); |
| 862 | |
| 863 | // Build the fields for entering the Print Size |
| 864 | buildSizeFieldscxx . . $ SoXtPrintDialog#buildSizeFields(5d50f529e698ea79).( rlcxx . . $ rl..resolutioncxx . . $ $anonymous_type_d40a2cbe261999e2_0#resolution., 30, toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., |
| 865 | rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize., rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize., |
| 866 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::rgbHorizSizeCBcxx . . $ SoXtPrintDialog#rgbHorizSizeCB(dc1d2edc24b8e412)., |
| 867 | (XtCallbackProccxx . . $ XtCallbackProc#) SoXtPrintDialogcxx . . $ SoXtPrintDialog#::rgbVertSizeCBcxx . . $ SoXtPrintDialog#rgbVertSizeCB(dc1d2edc24b8e412). ); |
| 868 | |
| 869 | // Initialize the horizontal and vertical size textports |
| 870 | char tc[8]; |
| 871 | sprintf(tc, "%d", printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0]); |
| 872 | XmTextSetString (rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize., tc); |
| 873 | sprintf(tc, "%d", printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1]); |
| 874 | XmTextSetString (rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize., tc); |
| 875 | |
| 876 | // Create the FileName label and textport. |
| 877 | n = 0; |
| 878 | labelMsg = XmStringCreate (rlcxx . . $ rl..fileNamecxx . . $ $anonymous_type_d40a2cbe261999e2_0#fileName., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 879 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 60 ); n++; |
| 880 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 881 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 882 | toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., wargs, n); |
| 883 | XmStringFree(labelMsg); |
| 884 | |
| 885 | n = 0; |
| 886 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 100 ); n++; |
| 887 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 60 ); n++; |
| 888 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNwidthcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6374:9`!, 230 ); n++; |
| 889 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 890 | rgbFilenameWidgetcxx . . $ SoXtPrintDialog#rgbFilenameWidget. = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmTextWidgetClass, |
| 891 | toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget., wargs, n); |
| 892 | } |
| 893 | |
| 894 | /////////////////////////////////////////////////////////////////////// |
| 895 | // |
| 896 | // Description: |
| 897 | // This builds a Radio Button. |
| 898 | // |
| 899 | // Use: protected |
| 900 | |
| 901 | void |
| 902 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildRadioButtoncxx . . $ SoXtPrintDialog#buildRadioButton(d288260ffa394fd5).( |
| 903 | char *title, |
| 904 | char *label1, |
| 905 | char *label2, |
| 906 | int horizontalPlacement, |
| 907 | int verticalPlacement, |
| 908 | Widgetcxx . . $ Widget# parent, |
| 909 | XtCallbackProccxx . . $ XtCallbackProc# cb ) |
| 910 | |
| 911 | // |
| 912 | ////////////////////////////////////////////////////////////////////// |
| 913 | { |
| 914 | XmString labelMsg; |
| 915 | Widgetcxx . . $ Widget# buttons, b, label; |
| 916 | Argcxx . . $ Arg# wargs[4]; |
| 917 | int n; |
| 918 | |
| 919 | // |
| 920 | // Create the Radio Button. It is a horizontal RowColumn widget |
| 921 | // composed of a label widget and a RadioBox widget. |
| 922 | // |
| 923 | n = 0; |
| 924 | labelMsg = XmStringCreate( title, XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 925 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 0 ); n++; |
| 926 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement ); n++; |
| 927 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 928 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 929 | parent, wargs, n); |
| 930 | XmStringFree(labelMsg); |
| 931 | |
| 932 | n = 0; |
| 933 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, horizontalPlacement ); n++; |
| 934 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement ); n++; |
| 935 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNorientationcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6206:9`!, XmHORIZONTAL ); n++; |
| 936 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNpackingcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3138:9`!, XmPACK_NONE ); n++; |
| 937 | buttons = XmCreateRadioBox(parent, "radioToggles", wargs, n); |
| 938 | XtManageChild (buttons); |
| 939 | |
| 940 | n = 0; |
| 941 | labelMsg = XmStringCreate (label1, XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 942 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNsetcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3333:9`!, TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! ); n++; |
| 943 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 10 ); n++; |
| 944 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 945 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 946 | b = XtCreateManagedWidget("radioButton1", xmToggleButtonWidgetClass, |
| 947 | buttons, wargs, n); |
| 948 | XtAddCallback (b, XmNvalueChangedCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3531:9`!, cb, (XtPointercxx . . $ XtPointer#)(this)); |
| 949 | XmStringFree(labelMsg); |
| 950 | |
| 951 | n = 0; |
| 952 | labelMsg = XmStringCreate (label2, XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 953 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 100 ); n++; |
| 954 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 955 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 0 ); n++; |
| 956 | b = XtCreateManagedWidget("radioButton2", xmToggleButtonWidgetClass, |
| 957 | buttons, wargs, n); |
| 958 | XmStringFree(labelMsg); |
| 959 | } |
| 960 | |
| 961 | /////////////////////////////////////////////////////////////////////// |
| 962 | // |
| 963 | // Description: |
| 964 | // This builds a set of two text fields for entering horizontal |
| 965 | // and vertical sizes. |
| 966 | // |
| 967 | // Use: protected |
| 968 | |
| 969 | void |
| 970 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildSizeFieldscxx . . $ SoXtPrintDialog#buildSizeFields(5d50f529e698ea79).( |
| 971 | char *title, |
| 972 | int verticalPlacement, |
| 973 | Widgetcxx . . $ Widget# parent, |
| 974 | Widgetcxx . . $ Widget# &horizField, |
| 975 | Widgetcxx . . $ Widget# &vertField, |
| 976 | XtCallbackProccxx . . $ XtCallbackProc# cb1, |
| 977 | XtCallbackProccxx . . $ XtCallbackProc# cb2 ) |
| 978 | |
| 979 | // |
| 980 | ////////////////////////////////////////////////////////////////////// |
| 981 | { |
| 982 | XmString labelMsg; |
| 983 | Widgetcxx . . $ Widget# label; |
| 984 | Argcxx . . $ Arg# wargs[4]; |
| 985 | int n; |
| 986 | |
| 987 | // |
| 988 | // Create the Print Size row. It is a label with two text widgets |
| 989 | // for the horizontal and vertical sizes of the print. |
| 990 | // |
| 991 | n = 0; |
| 992 | labelMsg = XmStringCreate (title, XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 993 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement ); n++; |
| 994 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 995 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 996 | parent, wargs, n); |
| 997 | XmStringFree(labelMsg); |
| 998 | |
| 999 | n = 0; |
| 1000 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 150 ); n++; |
| 1001 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement-3 ); n++; |
| 1002 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 1); n++; |
| 1003 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNcolumnscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2511:9`!, atoi(rl.holzn1)); n++; |
| 1004 | horizField = XtCreateManagedWidget("horizontalSize", xmTextWidgetClass, |
| 1005 | parent, wargs, n); |
| 1006 | if (cb1 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 1007 | XtAddCallback(horizField, XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!, cb1, (XtPointercxx . . $ XtPointer#) this); |
| 1008 | |
| 1009 | n = 0; |
| 1010 | labelMsg = XmStringCreate (rlcxx . . $ rl..bycxx . . $ $anonymous_type_d40a2cbe261999e2_0#by., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 1011 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 226 ); n++; |
| 1012 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement ); n++; |
| 1013 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 1014 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 1015 | parent, wargs, n); |
| 1016 | XmStringFree(labelMsg); |
| 1017 | |
| 1018 | n = 0; |
| 1019 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 258 ); n++; |
| 1020 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement-3 ); n++; |
| 1021 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 1); n++; |
| 1022 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNcolumnscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2511:9`!, atoi(rl.vertc1)); n++; |
| 1023 | vertField = XtCreateManagedWidget("verticalSize", xmTextWidgetClass, |
| 1024 | parent, wargs, n); |
| 1025 | if (cb2 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 1026 | XtAddCallback(vertField, XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!, cb2, (XtPointercxx . . $ XtPointer#) this); |
| 1027 | } |
| 1028 | |
| 1029 | /////////////////////////////////////////////////////////////////////// |
| 1030 | // |
| 1031 | // Description: |
| 1032 | // This builds a field containing the DPI of the desired print. |
| 1033 | // |
| 1034 | // Use: protected |
| 1035 | |
| 1036 | void |
| 1037 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::buildDPIFieldcxx . . $ SoXtPrintDialog#buildDPIField(886a1c21440cd238).( |
| 1038 | int verticalPlacement, |
| 1039 | Widgetcxx . . $ Widget# parent, |
| 1040 | Widgetcxx . . $ Widget# &dpiField, |
| 1041 | XtCallbackProccxx . . $ XtCallbackProc# cb ) |
| 1042 | |
| 1043 | // |
| 1044 | /////////////////////////////////////////////////////////////////////// |
| 1045 | { |
| 1046 | XmString labelMsg; |
| 1047 | Widgetcxx . . $ Widget# label; |
| 1048 | Argcxx . . $ Arg# wargs[4]; |
| 1049 | int n; |
| 1050 | |
| 1051 | n = 0; |
| 1052 | labelMsg = XmStringCreate ( rlcxx . . $ rl..dpicxx . . $ $anonymous_type_d40a2cbe261999e2_0#dpi., XmSTRING_DEFAULT_CHARSETcxx . . $ `<external>/427401153941432933/XmStrDefs.h:5447:9`!); |
| 1053 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement ); n++; |
| 1054 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNlabelStringcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2892:9`!, labelMsg ); n++; |
| 1055 | label = XtCreateManagedWidget (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, xmLabelWidgetClass, |
| 1056 | parent, wargs, n); |
| 1057 | XmStringFree(labelMsg); |
| 1058 | |
| 1059 | n = 0; |
| 1060 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNxcxx . . $ `<external>/427401153941432933/XmStrDefs.h:6398:9`!, 40 ); n++; |
| 1061 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, verticalPlacement-3 ); n++; |
| 1062 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNhighlightThicknesscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2796:9`!, 1); n++; |
| 1063 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[n], XmNcolumnscxx . . $ `<external>/427401153941432933/XmStrDefs.h:2511:9`!, atoi(rl.holzn2)); n++; |
| 1064 | dpiField = XtCreateManagedWidget("horizontalSize", xmTextWidgetClass, |
| 1065 | parent, wargs, n); |
| 1066 | XtAddCallback(dpiField, XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!, cb, (XtPointercxx . . $ XtPointer#) this); |
| 1067 | XmTextSetString (dpiField, "100"); |
| 1068 | } |
| 1069 | |
| 1070 | /////////////////////////////////////////////////////////////////////// |
| 1071 | // |
| 1072 | // Description: |
| 1073 | // This places the quit and text buttons and the message textport |
| 1074 | // depending on whether the toFileWidget or toPrinterWidget is |
| 1075 | // currently being displayed. |
| 1076 | // |
| 1077 | // Use: protected |
| 1078 | |
| 1079 | void |
| 1080 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::placeBottomOfDialogcxx . . $ SoXtPrintDialog#placeBottomOfDialog(373c3a798c3f52ad).( |
| 1081 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr ) |
| 1082 | |
| 1083 | // |
| 1084 | ////////////////////////////////////////////////////////////////////// |
| 1085 | { |
| 1086 | Argcxx . . $ Arg# wargs[1]; |
| 1087 | |
| 1088 | if (ptr->printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) |
| 1089 | { |
| 1090 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 240 ); |
| 1091 | XtSetValues( ptr->quitButtoncxx . . $ SoXtPrintDialog#quitButton., wargs, 1 ); |
| 1092 | XtSetValues( ptr->printButtoncxx . . $ SoXtPrintDialog#printButton., wargs, 1 ); |
| 1093 | |
| 1094 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 260 ); |
| 1095 | XtSetValues( ptr->messageLabelWidgetcxx . . $ SoXtPrintDialog#messageLabelWidget., wargs, 1 ); |
| 1096 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 280 ); |
| 1097 | XtSetValues( ptr->messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., wargs, 1 ); |
| 1098 | } |
| 1099 | else if (ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 1100 | { |
| 1101 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 205 ); |
| 1102 | XtSetValues( ptr->messageLabelWidgetcxx . . $ SoXtPrintDialog#messageLabelWidget., wargs, 1 ); |
| 1103 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 225 ); |
| 1104 | XtSetValues( ptr->messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., wargs, 1 ); |
| 1105 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 175 ); |
| 1106 | XtSetValues( ptr->quitButtoncxx . . $ SoXtPrintDialog#quitButton., wargs, 1 ); |
| 1107 | XtSetValues( ptr->printButtoncxx . . $ SoXtPrintDialog#printButton., wargs, 1 ); |
| 1108 | } |
| 1109 | else |
| 1110 | { |
| 1111 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 150 ); |
| 1112 | XtSetValues( ptr->messageLabelWidgetcxx . . $ SoXtPrintDialog#messageLabelWidget., wargs, 1 ); |
| 1113 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 170 ); |
| 1114 | XtSetValues( ptr->messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., wargs, 1 ); |
| 1115 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!( wargs[0], XmNycxx . . $ `<external>/427401153941432933/XmStrDefs.h:6402:9`!, 135 ); |
| 1116 | XtSetValues( ptr->quitButtoncxx . . $ SoXtPrintDialog#quitButton., wargs, 1 ); |
| 1117 | XtSetValues( ptr->printButtoncxx . . $ SoXtPrintDialog#printButton., wargs, 1 ); |
| 1118 | } |
| 1119 | } |
| 1120 | |
| 1121 | /////////////////////////////////////////////////////////////////////// |
| 1122 | // |
| 1123 | // Description: |
| 1124 | // This routine is called when a Print Quality radio button is pressed. |
| 1125 | // |
| 1126 | // Use: private |
| 1127 | |
| 1128 | void |
| 1129 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::qualityCBcxx . . $ SoXtPrintDialog#qualityCB(dc1d2edc24b8e412).( |
| 1130 | Widgetcxx . . $ Widget#, |
| 1131 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1132 | XmAnyCallbackStruct *) |
| 1133 | // |
| 1134 | ////////////////////////////////////////////////////////////////////// |
| 1135 | { |
| 1136 | ptr->highQualitycxx . . $ SoXtPrintDialog#highQuality. = (ptr->highQualitycxx . . $ SoXtPrintDialog#highQuality.) ? FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! : TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1137 | } |
| 1138 | |
| 1139 | /////////////////////////////////////////////////////////////////////// |
| 1140 | // |
| 1141 | // Description: |
| 1142 | // This routine is called when a Page Format radio button is pressed. |
| 1143 | // |
| 1144 | // Use: private |
| 1145 | |
| 1146 | void |
| 1147 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::pageFormatCBcxx . . $ SoXtPrintDialog#pageFormatCB(dc1d2edc24b8e412).( |
| 1148 | Widgetcxx . . $ Widget#, |
| 1149 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1150 | XmAnyCallbackStruct *) |
| 1151 | // |
| 1152 | ////////////////////////////////////////////////////////////////////// |
| 1153 | { |
| 1154 | ptr->portraitFormatcxx . . $ SoXtPrintDialog#portraitFormat. = (ptr->portraitFormatcxx . . $ SoXtPrintDialog#portraitFormat.) ? FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! : TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1155 | } |
| 1156 | |
| 1157 | /////////////////////////////////////////////////////////////////////// |
| 1158 | // |
| 1159 | // Description: |
| 1160 | // This routine is called when the rgb horizontal size field |
| 1161 | // is modified. |
| 1162 | // |
| 1163 | // Use: private |
| 1164 | |
| 1165 | void |
| 1166 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::rgbHorizSizeCBcxx . . $ SoXtPrintDialog#rgbHorizSizeCB(dc1d2edc24b8e412).( |
| 1167 | Widgetcxx . . $ Widget#, |
| 1168 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1169 | XmAnyCallbackStruct *) |
| 1170 | // |
| 1171 | ////////////////////////////////////////////////////////////////////// |
| 1172 | { |
| 1173 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1174 | return; |
| 1175 | |
| 1176 | char *text = XmTextGetString (ptr->rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize.); |
| 1177 | short x = (short)atoi(text); |
| 1178 | XtFree(text); |
| 1179 | text = XmTextGetString (ptr->rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize.); |
| 1180 | short y = (short)atoi(text); |
| 1181 | XtFree(text); |
| 1182 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(8bc400dc8eb33072).(SbVec2scxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).(x, y)); |
| 1183 | |
| 1184 | // make the text field loose the focus |
| 1185 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1186 | XmTRAVERSE_CURRENT); |
| 1187 | } |
| 1188 | |
| 1189 | /////////////////////////////////////////////////////////////////////// |
| 1190 | // |
| 1191 | // Description: |
| 1192 | // This routine is called when the printer vertical size field |
| 1193 | // is modified. |
| 1194 | // |
| 1195 | // Use: private |
| 1196 | |
| 1197 | void |
| 1198 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::rgbVertSizeCBcxx . . $ SoXtPrintDialog#rgbVertSizeCB(dc1d2edc24b8e412).( |
| 1199 | Widgetcxx . . $ Widget#, |
| 1200 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1201 | XmAnyCallbackStruct *) |
| 1202 | // |
| 1203 | ////////////////////////////////////////////////////////////////////// |
| 1204 | { |
| 1205 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1206 | return; |
| 1207 | |
| 1208 | char *text = XmTextGetString (ptr->rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize.); |
| 1209 | short x = (short)atoi(text); |
| 1210 | XtFree(text); |
| 1211 | text = XmTextGetString (ptr->rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize.); |
| 1212 | short y = (short)atoi(text); |
| 1213 | XtFree(text); |
| 1214 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(8bc400dc8eb33072).(SbVec2scxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).(x, y)); |
| 1215 | |
| 1216 | // make the text field loose the focus |
| 1217 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1218 | XmTRAVERSE_CURRENT); |
| 1219 | } |
| 1220 | |
| 1221 | /////////////////////////////////////////////////////////////////////// |
| 1222 | // |
| 1223 | // Description: |
| 1224 | // This routine is called when the printer horizontal size field |
| 1225 | // is modified. |
| 1226 | // |
| 1227 | // Use: private |
| 1228 | |
| 1229 | void |
| 1230 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerHorizSizeCBcxx . . $ SoXtPrintDialog#printerHorizSizeCB(dc1d2edc24b8e412).( |
| 1231 | Widgetcxx . . $ Widget#, |
| 1232 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1233 | XmAnyCallbackStruct *) |
| 1234 | // |
| 1235 | ////////////////////////////////////////////////////////////////////// |
| 1236 | { |
| 1237 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1238 | return; |
| 1239 | |
| 1240 | char *text = XmTextGetString (ptr->printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize.); |
| 1241 | float x = atof(text); |
| 1242 | XtFree(text); |
| 1243 | text = XmTextGetString (ptr->printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize.); |
| 1244 | float y = atof(text); |
| 1245 | XtFree(text); |
| 1246 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(x, y)); |
| 1247 | |
| 1248 | // make the text field loose the focus |
| 1249 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1250 | XmTRAVERSE_CURRENT); |
| 1251 | } |
| 1252 | |
| 1253 | /////////////////////////////////////////////////////////////////////// |
| 1254 | // |
| 1255 | // Description: |
| 1256 | // This routine is called when the printer vertical size field |
| 1257 | // is modified. |
| 1258 | // |
| 1259 | // Use: private |
| 1260 | |
| 1261 | void |
| 1262 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerVertSizeCBcxx . . $ SoXtPrintDialog#printerVertSizeCB(dc1d2edc24b8e412).( |
| 1263 | Widgetcxx . . $ Widget#, |
| 1264 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1265 | XmAnyCallbackStruct *) |
| 1266 | // |
| 1267 | ////////////////////////////////////////////////////////////////////// |
| 1268 | { |
| 1269 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1270 | return; |
| 1271 | |
| 1272 | char *text = XmTextGetString (ptr->printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize.); |
| 1273 | float x = atof(text); |
| 1274 | XtFree(text); |
| 1275 | text = XmTextGetString (ptr->printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize.); |
| 1276 | float y = atof(text); |
| 1277 | XtFree(text); |
| 1278 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(x, y)); |
| 1279 | |
| 1280 | // make the text field loose the focus |
| 1281 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1282 | XmTRAVERSE_CURRENT); |
| 1283 | } |
| 1284 | |
| 1285 | /////////////////////////////////////////////////////////////////////// |
| 1286 | // |
| 1287 | // Description: |
| 1288 | // This routine is called when the PostScript horizontal size field |
| 1289 | // is modified. |
| 1290 | // |
| 1291 | // Use: private |
| 1292 | |
| 1293 | void |
| 1294 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptHorizSizeCBcxx . . $ SoXtPrintDialog#postScriptHorizSizeCB(dc1d2edc24b8e412).( |
| 1295 | Widgetcxx . . $ Widget#, |
| 1296 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1297 | XmAnyCallbackStruct *) |
| 1298 | // |
| 1299 | ////////////////////////////////////////////////////////////////////// |
| 1300 | { |
| 1301 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1302 | return; |
| 1303 | |
| 1304 | char *text = XmTextGetString (ptr->postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize.); |
| 1305 | float x = atof(text); |
| 1306 | XtFree(text); |
| 1307 | text = XmTextGetString (ptr->postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize.); |
| 1308 | float y = atof(text); |
| 1309 | XtFree(text); |
| 1310 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(x, y)); |
| 1311 | |
| 1312 | // make the text field loose the focus |
| 1313 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1314 | XmTRAVERSE_CURRENT); |
| 1315 | } |
| 1316 | |
| 1317 | /////////////////////////////////////////////////////////////////////// |
| 1318 | // |
| 1319 | // Description: |
| 1320 | // This routine is called when the PostScript vertical size field |
| 1321 | // is modified. |
| 1322 | // |
| 1323 | // Use: private |
| 1324 | |
| 1325 | void |
| 1326 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptVertSizeCBcxx . . $ SoXtPrintDialog#postScriptVertSizeCB(dc1d2edc24b8e412).( |
| 1327 | Widgetcxx . . $ Widget#, |
| 1328 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1329 | XmAnyCallbackStruct *) |
| 1330 | // |
| 1331 | ////////////////////////////////////////////////////////////////////// |
| 1332 | { |
| 1333 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) |
| 1334 | return; |
| 1335 | |
| 1336 | char *text = XmTextGetString (ptr->postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize.); |
| 1337 | float x = atof(text); |
| 1338 | XtFree(text); |
| 1339 | text = XmTextGetString (ptr->postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize.); |
| 1340 | float y = atof(text); |
| 1341 | XtFree(text); |
| 1342 | ptr->setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(x, y)); |
| 1343 | |
| 1344 | // make the text field loose the focus |
| 1345 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1346 | XmTRAVERSE_CURRENT); |
| 1347 | } |
| 1348 | |
| 1349 | /////////////////////////////////////////////////////////////////////// |
| 1350 | // |
| 1351 | // Description: |
| 1352 | // This routine is called when the printer DPI field |
| 1353 | // is modified. |
| 1354 | // |
| 1355 | // Use: private |
| 1356 | |
| 1357 | void |
| 1358 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printerDPICBcxx . . $ SoXtPrintDialog#printerDPICB(dc1d2edc24b8e412).( |
| 1359 | Widgetcxx . . $ Widget#, |
| 1360 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1361 | XmAnyCallbackStruct *) |
| 1362 | // |
| 1363 | ////////////////////////////////////////////////////////////////////// |
| 1364 | { |
| 1365 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) { |
| 1366 | ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 1367 | return; |
| 1368 | } |
| 1369 | ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1370 | char *text = XmTextGetString (ptr->printerDPIFieldcxx . . $ SoXtPrintDialog#printerDPIField.); |
| 1371 | XmTextSetString (ptr->postScriptDPIFieldcxx . . $ SoXtPrintDialog#postScriptDPIField., text); |
| 1372 | XtFree(text); |
| 1373 | |
| 1374 | // make the text field loose the focus |
| 1375 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1376 | XmTRAVERSE_CURRENT); |
| 1377 | } |
| 1378 | |
| 1379 | /////////////////////////////////////////////////////////////////////// |
| 1380 | // |
| 1381 | // Description: |
| 1382 | // This routine is called when the PostScript DPI field |
| 1383 | // is modified. |
| 1384 | // |
| 1385 | // Use: private |
| 1386 | |
| 1387 | void |
| 1388 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::postScriptDPICBcxx . . $ SoXtPrintDialog#postScriptDPICB(dc1d2edc24b8e412).( |
| 1389 | Widgetcxx . . $ Widget#, |
| 1390 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1391 | XmAnyCallbackStruct *) |
| 1392 | // |
| 1393 | ////////////////////////////////////////////////////////////////////// |
| 1394 | { |
| 1395 | if (ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated.) { |
| 1396 | ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 1397 | return; |
| 1398 | } |
| 1399 | ptr->alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1400 | char *text = XmTextGetString (ptr->postScriptDPIFieldcxx . . $ SoXtPrintDialog#postScriptDPIField.); |
| 1401 | XmTextSetString (ptr->printerDPIFieldcxx . . $ SoXtPrintDialog#printerDPIField., text); |
| 1402 | XtFree(text); |
| 1403 | |
| 1404 | // make the text field loose the focus |
| 1405 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(ptr->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1406 | XmTRAVERSE_CURRENT); |
| 1407 | } |
| 1408 | |
| 1409 | /////////////////////////////////////////////////////////////////////// |
| 1410 | // |
| 1411 | // Description: |
| 1412 | // This routine is called when an Output radio button is pressed. |
| 1413 | // |
| 1414 | // Use: private |
| 1415 | |
| 1416 | void |
| 1417 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::outputCBcxx . . $ SoXtPrintDialog#outputCB(dc1d2edc24b8e412).( |
| 1418 | Widgetcxx . . $ Widget#, |
| 1419 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1420 | XmAnyCallbackStruct *) |
| 1421 | // |
| 1422 | ////////////////////////////////////////////////////////////////////// |
| 1423 | { |
| 1424 | short height; |
| 1425 | |
| 1426 | ptr->printerOutputcxx . . $ SoXtPrintDialog#printerOutput. = (ptr->printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) ? FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! : TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1427 | |
| 1428 | // |
| 1429 | // Display the correct portion of the dialog and adjust the bottom |
| 1430 | // of the dialog. |
| 1431 | // |
| 1432 | if (ptr->printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) |
| 1433 | { |
| 1434 | XtUnmanageChild( ptr->fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget. ); |
| 1435 | if (ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 1436 | XtUnmanageChild( ptr->toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. ); |
| 1437 | else |
| 1438 | XtUnmanageChild( ptr->toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. ); |
| 1439 | XtManageChild( ptr->toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget. ); |
| 1440 | height = PRINTER_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:106:9`!; |
| 1441 | } |
| 1442 | else if (ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 1443 | { |
| 1444 | XtUnmanageChild( ptr->toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget. ); |
| 1445 | XtManageChild( ptr->fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget. ); |
| 1446 | XtManageChild( ptr->toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. ); |
| 1447 | height = POSTSCRIPT_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:108:9`!; |
| 1448 | } |
| 1449 | else |
| 1450 | { |
| 1451 | XtUnmanageChild( ptr->toPrinterWidgetcxx . . $ SoXtPrintDialog#toPrinterWidget. ); |
| 1452 | XtManageChild( ptr->fileFormatWidgetcxx . . $ SoXtPrintDialog#fileFormatWidget. ); |
| 1453 | XtManageChild( ptr->toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. ); |
| 1454 | height = RGB_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:107:9`!; |
| 1455 | } |
| 1456 | |
| 1457 | // |
| 1458 | // check if window needs to be resized |
| 1459 | // |
| 1460 | if (ptr->isTopLevelShellcxx . . $ SoXtComponent#isTopLevelShell(455f465bc33b4cdf).()) { |
| 1461 | |
| 1462 | // get current window height and set the new height |
| 1463 | SbVec2scxx . . $ SbVec2s# size = ptr->getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).(); |
| 1464 | size[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1] = height; |
| 1465 | ptr->setSizecxx . . $ SoXtComponent#setSize(8bc400dc8eb33072).(size); |
| 1466 | } |
| 1467 | |
| 1468 | ptr->placeBottomOfDialogcxx . . $ SoXtPrintDialog#placeBottomOfDialog(373c3a798c3f52ad).( ptr ); |
| 1469 | } |
| 1470 | |
| 1471 | /////////////////////////////////////////////////////////////////////// |
| 1472 | // |
| 1473 | // Description: |
| 1474 | // This routine is called when an Output radio button is pressed. |
| 1475 | // |
| 1476 | // Use: private |
| 1477 | |
| 1478 | void |
| 1479 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::fileFormatCBcxx . . $ SoXtPrintDialog#fileFormatCB(dc1d2edc24b8e412).( |
| 1480 | Widgetcxx . . $ Widget#, |
| 1481 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1482 | XmAnyCallbackStruct *) |
| 1483 | // |
| 1484 | ////////////////////////////////////////////////////////////////////// |
| 1485 | { |
| 1486 | short height; |
| 1487 | |
| 1488 | ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput. = (ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) ? FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! : TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1489 | |
| 1490 | // |
| 1491 | // Display the correct portion of the dialog and adjust the bottom |
| 1492 | // of the dialog. |
| 1493 | // |
| 1494 | if (ptr->postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 1495 | { |
| 1496 | XtUnmanageChild( ptr->toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. ); |
| 1497 | XtManageChild( ptr->toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. ); |
| 1498 | height = POSTSCRIPT_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:108:9`!; |
| 1499 | } |
| 1500 | else |
| 1501 | { |
| 1502 | XtUnmanageChild( ptr->toPostScriptFileWidgetcxx . . $ SoXtPrintDialog#toPostScriptFileWidget. ); |
| 1503 | XtManageChild( ptr->toRGBFileWidgetcxx . . $ SoXtPrintDialog#toRGBFileWidget. ); |
| 1504 | height = RGB_FILE_MENU_HEIGHTcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:107:9`!; |
| 1505 | } |
| 1506 | |
| 1507 | // |
| 1508 | // check if window needs to be resized |
| 1509 | // |
| 1510 | if (ptr->isTopLevelShellcxx . . $ SoXtComponent#isTopLevelShell(455f465bc33b4cdf).()) { |
| 1511 | |
| 1512 | // get current window height and set the new height |
| 1513 | SbVec2scxx . . $ SbVec2s# size = ptr->getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).(); |
| 1514 | size[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1] = height; |
| 1515 | ptr->setSizecxx . . $ SoXtComponent#setSize(8bc400dc8eb33072).(size); |
| 1516 | } |
| 1517 | |
| 1518 | ptr->placeBottomOfDialogcxx . . $ SoXtPrintDialog#placeBottomOfDialog(373c3a798c3f52ad).( ptr ); |
| 1519 | } |
| 1520 | |
| 1521 | /////////////////////////////////////////////////////////////////////// |
| 1522 | // |
| 1523 | // Description: |
| 1524 | // This callback is invoked when the Quit button is pressed. |
| 1525 | // |
| 1526 | // Use: private |
| 1527 | |
| 1528 | void |
| 1529 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::quitCBcxx . . $ SoXtPrintDialog#quitCB(dc1d2edc24b8e412).( |
| 1530 | Widgetcxx . . $ Widget#, |
| 1531 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1532 | XmAnyCallbackStruct *) |
| 1533 | // |
| 1534 | ////////////////////////////////////////////////////////////////////// |
| 1535 | { |
| 1536 | ptr->hidecxx . . $ SoXtComponent#hide(49f6e7a06ebc5aa8).(); |
| 1537 | } |
| 1538 | |
| 1539 | //////////////////////////////////////////////////////////////////////// |
| 1540 | // |
| 1541 | // Called by Xt when a list item is picked. |
| 1542 | // |
| 1543 | // Use: static private |
| 1544 | // |
| 1545 | void |
| 1546 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::listPickcxx . . $ SoXtPrintDialog#listPick(dc1d2edc24b8e412).( |
| 1547 | Widgetcxx . . $ Widget#, |
| 1548 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1549 | XmAnyCallbackStruct *list) |
| 1550 | // |
| 1551 | //////////////////////////////////////////////////////////////////////// |
| 1552 | { |
| 1553 | // our array is indexed from 0, the list is indexed from 1 |
| 1554 | ptr->whichPrintercxx . . $ SoXtPrintDialog#whichPrinter. = ((XmListCallbackStruct *) list)->item_position - 1; |
| 1555 | } |
| 1556 | |
| 1557 | /////////////////////////////////////////////////////////////////////// |
| 1558 | // |
| 1559 | // Description: |
| 1560 | // This routine is called when the Print button of the SoXtPrintDialog |
| 1561 | // widget is pressed. It gets the current text string from the |
| 1562 | // textWidget and uses it as the filename into which to write |
| 1563 | // the PostScript output data. (This is called by the printCallback()) |
| 1564 | // |
| 1565 | // Use: private |
| 1566 | |
| 1567 | void |
| 1568 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printcxx . . $ SoXtPrintDialog#print(49f6e7a06ebc5aa8).() |
| 1569 | // |
| 1570 | ////////////////////////////////////////////////////////////////////// |
| 1571 | { |
| 1572 | SoOutputcxx . . $ SoOutput# outFilecxx . . $ SoOutput#SoOutput(49f6e7a06ebc5aa8).; |
| 1573 | FILE *fileP = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1574 | char *printerName; |
| 1575 | char tempPSFileName[64]; |
| 1576 | char *text; |
| 1577 | char *fileName = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1578 | SbColorcxx . . $ SbColor# bgColorcxx . . $ SbColor#SbColor(bd1040fe176e0786).(0.0, 0.0, 0.0); |
| 1579 | SoOffscreenRenderercxx . . $ SoOffscreenRenderer# *renderer; |
| 1580 | |
| 1581 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "Printing in progress..."); |
| 1582 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1583 | |
| 1584 | // |
| 1585 | // Invoke the beforeList callbacks |
| 1586 | // |
| 1587 | beforeListcxx . . $ SoXtPrintDialog#beforeList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1588 | |
| 1589 | // Get Xt Strings. Update the print size. |
| 1590 | char *dpiString = XmTextGetString(printerDPIFieldcxx . . $ SoXtPrintDialog#printerDPIField.); |
| 1591 | if (postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) { |
| 1592 | float fx, fy; |
| 1593 | if (printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) { |
| 1594 | text = XmTextGetString (printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize.); |
| 1595 | fx = atof(text); |
| 1596 | XtFree(text); |
| 1597 | text = XmTextGetString (printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize.); |
| 1598 | fy = atof(text); |
| 1599 | XtFree(text); |
| 1600 | setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(fx, fy)); |
| 1601 | } |
| 1602 | else { |
| 1603 | text = XmTextGetString (postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize.); |
| 1604 | fx = atof(text); |
| 1605 | XtFree(text); |
| 1606 | text = XmTextGetString (postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize.); |
| 1607 | fy = atof(text); |
| 1608 | XtFree(text); |
| 1609 | setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(fd202e5153a1464e).(SbVec2fcxx . . $ SbVec2f#SbVec2f(5102ef758adc0ae7).(fx, fy)); |
| 1610 | } |
| 1611 | } |
| 1612 | else { |
| 1613 | text = XmTextGetString (rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize.); |
| 1614 | short sx = (short)atoi(text); |
| 1615 | XtFree(text); |
| 1616 | text = XmTextGetString (rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize.); |
| 1617 | short sy = (short)atoi(text); |
| 1618 | XtFree(text); |
| 1619 | setPrintSizecxx . . $ SoXtPrintDialog#setPrintSize(8bc400dc8eb33072).(SbVec2scxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).(sx, sy)); |
| 1620 | } |
| 1621 | // make the text fields loose focus |
| 1622 | XmProcessTraversal(SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), |
| 1623 | XmTRAVERSE_CURRENT); |
| 1624 | |
| 1625 | if (rootNodecxx . . $ SoXtPrintDialog#rootNode. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 1626 | { |
| 1627 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Empty database."); |
| 1628 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1629 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1630 | return; |
| 1631 | } |
| 1632 | |
| 1633 | // If Draft Quality, halve the resolution |
| 1634 | SbVec2scxx . . $ SbVec2s# renderRes = printRescxx . . $ SoXtPrintDialog#printRes.; |
| 1635 | if (!highQualitycxx . . $ SoXtPrintDialog#highQuality.) |
| 1636 | renderRes /=cxx . . $ SbVec2s#`operator/=`(8ed34408fa3bb15d). 2; |
| 1637 | |
| 1638 | // If rendering to PostScript, adjust the rendering resolution to account |
| 1639 | // for the specified DPI. |
| 1640 | if (printerOutputcxx . . $ SoXtPrintDialog#printerOutput. || postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) { |
| 1641 | float renderDPI = atof(dpiString); |
| 1642 | renderRes *=cxx . . $ SbVec2s#`operator*=`(8ff27523e8bf430). |
| 1643 | (renderDPI / SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getScreenPixelsPerInchcxx . . $ SoOffscreenRenderer#getScreenPixelsPerInch(9b8c9e39889c762c).()); |
| 1644 | |
| 1645 | // For postScript Printing, set the backgroundColor to white. This |
| 1646 | // should probably be changed to get the color from a color editor. |
| 1647 | bgColor.setValuecxx . . $ SbVec3f#setValue(4e87f9d875f2d08d).(1.0, 1.0, 1.0); |
| 1648 | } |
| 1649 | |
| 1650 | // Check the viewport size to make sure the image can be rendered |
| 1651 | // on the current DISPLAY |
| 1652 | SbVec2scxx . . $ SbVec2s# maxRes = SoOffscreenRenderercxx . . $ SoOffscreenRenderer#::getMaximumResolutioncxx . . $ SoOffscreenRenderer#getMaximumResolution(2f646538a2980851).(); |
| 1653 | |
| 1654 | if ((renderRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0] > maxRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0]) || (renderRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1] > maxRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1])) { |
| 1655 | char tmpStr[64]; |
| 1656 | |
| 1657 | sprintf(tmpStr, "ERROR: Exceeds %d by %d.", |
| 1658 | maxRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0], maxRes[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1] ); |
| 1659 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., tmpStr); |
| 1660 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1661 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1662 | return; |
| 1663 | } |
| 1664 | |
| 1665 | SbViewportRegioncxx . . $ SbViewportRegion# vpRegioncxx . . $ SbViewportRegion#SbViewportRegion(edd509d4d7dd9f6).(renderRes); |
| 1666 | vpRegion.setPixelsPerInchcxx . . $ SbViewportRegion#setPixelsPerInch(9364e6e7bff7660).(atof(dpiString)); |
| 1667 | |
| 1668 | // ??? COMPAT 2.0 |
| 1669 | // |
| 1670 | // Create a render action and fill it in with the viewport region |
| 1671 | // defined by the dialog, and other attributes from the stored |
| 1672 | // render action. Use this new render action with the offscreen |
| 1673 | // renderer. |
| 1674 | SoGLRenderActioncxx . . $ SoGLRenderAction# actcxx . . $ SoGLRenderAction#SoGLRenderAction(6b06d788389016cd).(vpRegion); |
| 1675 | _SoPrintDialogItemcxx . . $ _SoPrintDialogItem# *item = _SoFindPrintDialogcxx . . $ _SoFindPrintDialog(2c84009c75388772).(this); |
| 1676 | |
| 1677 | if (item != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1678 | act.setTransparencyTypecxx . . $ SoGLRenderAction#setTransparencyType(8f19ff67a6c488dd).(item->actcxx . . $ _SoPrintDialogItem#act.->getTransparencyTypecxx . . $ SoGLRenderAction#getTransparencyType(813fd8548af75531).()); |
| 1679 | act.setSmoothingcxx . . $ SoGLRenderAction#setSmoothing(d4f767463ce0a6b3).(item->actcxx . . $ _SoPrintDialogItem#act.->isSmoothingcxx . . $ SoGLRenderAction#isSmoothing(455f465bc33b4cdf).()); |
| 1680 | act.setNumPassescxx . . $ SoGLRenderAction#setNumPasses(d4f767463ce0a6b3).(item->actcxx . . $ _SoPrintDialogItem#act.->getNumPassescxx . . $ SoGLRenderAction#getNumPasses(455f465bc33b4cdf).()); |
| 1681 | } |
| 1682 | |
| 1683 | renderer = new SoOffscreenRenderercxx . . $ SoOffscreenRenderer#(&act); |
| 1684 | renderer->setBackgroundColorcxx . . $ SoOffscreenRenderer#setBackgroundColor(fad0b7baf6bfdbd3).(bgColor); |
| 1685 | |
| 1686 | // |
| 1687 | // Render the database! |
| 1688 | // |
| 1689 | if (nodeMostRecentcxx . . $ SoXtPrintDialog#nodeMostRecent.) { |
| 1690 | if (!renderer->rendercxx . . $ SoOffscreenRenderer#render(17223a0c8fe933a2).(rootNodecxx . . $ SoXtPrintDialog#rootNode.)) { |
| 1691 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Could not execute print."); |
| 1692 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1693 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1694 | delete renderer; |
| 1695 | return; |
| 1696 | } |
| 1697 | } |
| 1698 | else |
| 1699 | { |
| 1700 | if (!renderer->rendercxx . . $ SoOffscreenRenderer#render(5891dcbbfb166ede).(rootPathcxx . . $ SoXtPrintDialog#rootPath.)) { |
| 1701 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Could not execute print."); |
| 1702 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1703 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1704 | delete renderer; |
| 1705 | return; |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | // |
| 1710 | // Are we printing to a printer or a file? |
| 1711 | // |
| 1712 | if (printerOutputcxx . . $ SoXtPrintDialog#printerOutput.) { |
| 1713 | if (whichPrintercxx . . $ SoXtPrintDialog#whichPrinter. < 0) |
| 1714 | { |
| 1715 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: No printer."); |
| 1716 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1717 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1718 | delete renderer; |
| 1719 | return; |
| 1720 | } |
| 1721 | |
| 1722 | printerName = PRINTER_NAMEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:110:9`!(whichPrinter); |
| 1723 | |
| 1724 | // |
| 1725 | // Open a temporary filename to write the data into. Look at the |
| 1726 | // environment variable TMPDIR and write the file there. |
| 1727 | // |
| 1728 | char *tmpdir = getenv("TMPDIR"); |
| 1729 | |
| 1730 | if (tmpdir == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 1731 | (void)sprintf (tempPSFileName, "/tmp/.sop%d.ps", getpid()); |
| 1732 | else |
| 1733 | (void)sprintf (tempPSFileName, "%s/.sop%d.ps", tmpdir, getpid()); |
| 1734 | if ((fileP = fopen (tempPSFileName, "w")) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 1735 | { |
| 1736 | char str[64]; |
| 1737 | sprintf(str, "ERROR: Couldn't open %s", tempPSFileName); |
| 1738 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., str); |
| 1739 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1740 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1741 | delete renderer; |
| 1742 | return; |
| 1743 | } |
| 1744 | |
| 1745 | // |
| 1746 | // If the print is to be landscape format, rotate the print |
| 1747 | // 90 degrees and translate it up by a margin. Write the appropriate |
| 1748 | // PostScript commands to the temporary PostScript file. |
| 1749 | // |
| 1750 | fprintf(fileP, "%%!PS-Adobe-2.0\n"); |
| 1751 | if (!portraitFormatcxx . . $ SoXtPrintDialog#portraitFormat.) |
| 1752 | { |
| 1753 | fprintf(fileP, "%f %f translate\n", |
| 1754 | PNTScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:97:9`!*(PAGEMARGINcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:100:9`!), |
| 1755 | PNTScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:97:9`!*(FULLPAGEYSIZEcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:96:9`!-PAGEMARGINcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:100:9`!)); |
| 1756 | fprintf(fileP,"-90.0 rotate\n"); |
| 1757 | } |
| 1758 | else |
| 1759 | { |
| 1760 | fprintf(fileP, "%f %f translate\n", |
| 1761 | PNTScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:97:9`!*(PAGEMARGINcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:100:9`!), |
| 1762 | PNTScxx . . $ `libSoXt/src/SoXtPrintDlog.c++:97:9`!*(PAGEMARGINcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:100:9`!)); |
| 1763 | } |
| 1764 | |
| 1765 | renderer->writeToPostScriptcxx . . $ SoOffscreenRenderer#writeToPostScript(61348c58ed7d0c38).( fileP, printSizecxx . . $ SoXtPrintDialog#printSize. ); |
| 1766 | fflush (fileP); |
| 1767 | fclose (fileP); |
| 1768 | |
| 1769 | // Send the file to the printer |
| 1770 | |
| 1771 | #ifdef __sgi |
| 1772 | union wait waitStatus; |
| 1773 | #else |
| 1774 | int waitStatus; |
| 1775 | typedef void (*SIG_PFcxx . . $ SoXtPrintDialog#print(49f6e7a06ebc5aa8).SIG_PF#)(int); |
| 1776 | #endif // __sgi |
| 1777 | SIG_PFcxx . . $ SoXtPrintDialog#print(49f6e7a06ebc5aa8).SIG_PF# childstat; |
| 1778 | pid_t wpid; |
| 1779 | |
| 1780 | // |
| 1781 | // Save old function and restore default behavior. |
| 1782 | // |
| 1783 | childstat = signal (SIGCHLDcxx . . $ `<external>/1457673850468744829/signum-arch.h:41:9`!, SIG_DFLcxx . . $ `<external>/11773118241360591791/signum-generic.h:29:9`!); |
| 1784 | if (!(wpid=fork())) { |
| 1785 | if (*printerName == 0) |
| 1786 | execlp("lp", "lp", "-c", "-s", tempPSFileName, (char*) 0); |
| 1787 | else { |
| 1788 | char popt[SO_PRINTER_STRLENcxx . . $ `libSoXt/src/SoXtPrintDlog.c++:101:9`!]; |
| 1789 | sprintf(popt, "-d%s", printerName); |
| 1790 | execlp("lp", "lp", "-c", popt, "-s", tempPSFileName, (char*) 0); |
| 1791 | } |
| 1792 | } |
| 1793 | (void)waitpid(wpid, (int *)(&waitStatus), 0); |
| 1794 | // |
| 1795 | // Restore catching dead babies. |
| 1796 | // |
| 1797 | (void) signal(SIGCHLDcxx . . $ `<external>/1457673850468744829/signum-arch.h:41:9`!, childstat); |
| 1798 | #ifdef __sgi |
| 1799 | if (!(WIFEXITED(waitStatus) && waitStatus.w_retcode == 0)) |
| 1800 | #else |
| 1801 | if (!(WIFEXITEDcxx . . $ `<external>/10696550936717951914/stdlib.h:47:10`!(waitStatus) && WEXITSTATUScxx . . $ `<external>/10696550936717951914/stdlib.h:44:10`!(waitStatus) == 0)) |
| 1802 | #endif // __sgi |
| 1803 | SoDebugErrorcxx . . $ SoDebugError#::postcxx . . $ SoDebugError#post(fb6d009da02ec724).("SoXtPrintDialog::print", |
| 1804 | "Print Error. Diagnose with Print Manager."); |
| 1805 | unlink(tempPSFileName); |
| 1806 | } |
| 1807 | else |
| 1808 | { |
| 1809 | // |
| 1810 | // Send to file. Get the file name from the textWidget and open |
| 1811 | // the file. |
| 1812 | // |
| 1813 | if (postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) |
| 1814 | fileName = XmTextGetString (postScriptFilenameWidgetcxx . . $ SoXtPrintDialog#postScriptFilenameWidget.); |
| 1815 | else |
| 1816 | fileName = XmTextGetString (rgbFilenameWidgetcxx . . $ SoXtPrintDialog#rgbFilenameWidget.); |
| 1817 | if (strlen(fileName) == 0) |
| 1818 | { |
| 1819 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: No file name."); |
| 1820 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1821 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1822 | XtFree (fileName); |
| 1823 | delete renderer; |
| 1824 | return; |
| 1825 | } |
| 1826 | |
| 1827 | if (!outFile.openFilecxx . . $ SoOutput#openFile(5c4306d8553b3696). (fileName)) |
| 1828 | { |
| 1829 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Could not open file."); |
| 1830 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1831 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1832 | XtFree (fileName); |
| 1833 | delete renderer; |
| 1834 | return; |
| 1835 | } |
| 1836 | if (postScriptOutputcxx . . $ SoXtPrintDialog#postScriptOutput.) { |
| 1837 | if (!renderer->writeToPostScriptcxx . . $ SoOffscreenRenderer#writeToPostScript(61348c58ed7d0c38).( outFile.getFilePointercxx . . $ SoOutput#getFilePointer(8d56ae6d738964d7).(), |
| 1838 | printSizecxx . . $ SoXtPrintDialog#printSize. )) |
| 1839 | { |
| 1840 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Could not get data."); |
| 1841 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1842 | outFile.closeFilecxx . . $ SoOutput#closeFile(49f6e7a06ebc5aa8).(); |
| 1843 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1844 | XtFree (fileName); |
| 1845 | delete renderer; |
| 1846 | return; |
| 1847 | } |
| 1848 | } |
| 1849 | else if (!renderer->writeToRGBcxx . . $ SoOffscreenRenderer#writeToRGB(d56f74f5d90fbf3b).( outFile.getFilePointercxx . . $ SoOutput#getFilePointer(8d56ae6d738964d7).() )) |
| 1850 | { |
| 1851 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "ERROR: Could not get data."); |
| 1852 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1853 | outFile.closeFilecxx . . $ SoOutput#closeFile(49f6e7a06ebc5aa8).(); |
| 1854 | XtFree (fileName); |
| 1855 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1856 | delete renderer; |
| 1857 | return; |
| 1858 | } |
| 1859 | |
| 1860 | outFile.closeFilecxx . . $ SoOutput#closeFile(49f6e7a06ebc5aa8).(); |
| 1861 | XtFree (fileName); |
| 1862 | } |
| 1863 | |
| 1864 | // |
| 1865 | // Invoke the afterList callbacks |
| 1866 | // |
| 1867 | afterListcxx . . $ SoXtPrintDialog#afterList..invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8). ((void *)this); |
| 1868 | |
| 1869 | XmTextSetString (messageWidgetcxx . . $ SoXtPrintDialog#messageWidget., "Printing completed."); |
| 1870 | XmUpdateDisplay(messageWidgetcxx . . $ SoXtPrintDialog#messageWidget.); |
| 1871 | delete renderer; |
| 1872 | XtFree (dpiString); |
| 1873 | } |
| 1874 | |
| 1875 | /////////////////////////////////////////////////////////////////////// |
| 1876 | // |
| 1877 | // Description: |
| 1878 | // This routine is called when the Print button of the SoXtPrintDialog |
| 1879 | // widget is pressed. It calls print(). |
| 1880 | // |
| 1881 | // Use: private |
| 1882 | |
| 1883 | void |
| 1884 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::printCBcxx . . $ SoXtPrintDialog#printCB(dc1d2edc24b8e412).( |
| 1885 | Widgetcxx . . $ Widget#, |
| 1886 | SoXtPrintDialogcxx . . $ SoXtPrintDialog# *ptr, |
| 1887 | XmAnyCallbackStruct *) |
| 1888 | // |
| 1889 | ////////////////////////////////////////////////////////////////////// |
| 1890 | { |
| 1891 | ptr->printcxx . . $ SoXtPrintDialog#print(49f6e7a06ebc5aa8).(); |
| 1892 | } |
| 1893 | |
| 1894 | /////////////////////////////////////////////////////////////////////// |
| 1895 | // |
| 1896 | // Description: |
| 1897 | // Update the textports with new sizes |
| 1898 | // |
| 1899 | // Use: protected |
| 1900 | // |
| 1901 | void |
| 1902 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::updateTextportscxx . . $ SoXtPrintDialog#updateTextports(49f6e7a06ebc5aa8).() |
| 1903 | // |
| 1904 | ////////////////////////////////////////////////////////////////////// |
| 1905 | { |
| 1906 | alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1907 | // Send the new size to the widgets |
| 1908 | char tc[12]; |
| 1909 | sprintf(tc, "%.3f", printSizecxx . . $ SoXtPrintDialog#printSize.[cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).0]); |
| 1910 | XmTextSetString (printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize., tc); |
| 1911 | XmTextSetString (postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize., tc); |
| 1912 | sprintf(tc, "%.3f", printSizecxx . . $ SoXtPrintDialog#printSize.[cxx . . $ SbVec2f#`operator[]`(5dbdaf238659ae67).1]); |
| 1913 | XmTextSetString (printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize., tc); |
| 1914 | XmTextSetString (postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize., tc); |
| 1915 | sprintf(tc, "%d", printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0]); |
| 1916 | XmTextSetString (rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize., tc); |
| 1917 | sprintf(tc, "%d", printRescxx . . $ SoXtPrintDialog#printRes.[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1]); |
| 1918 | XmTextSetString (rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize., tc); |
| 1919 | |
| 1920 | // If the textports are currently managed, update them |
| 1921 | if (XtIsManaged(printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize.)) { |
| 1922 | XmUpdateDisplay(printerHorizSizecxx . . $ SoXtPrintDialog#printerHorizSize.); |
| 1923 | XmUpdateDisplay(printerVertSizecxx . . $ SoXtPrintDialog#printerVertSize.); |
| 1924 | } |
| 1925 | else if (XtIsManaged(postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize.)) { |
| 1926 | XmUpdateDisplay(postScriptHorizSizecxx . . $ SoXtPrintDialog#postScriptHorizSize.); |
| 1927 | XmUpdateDisplay(postScriptVertSizecxx . . $ SoXtPrintDialog#postScriptVertSize.); |
| 1928 | } |
| 1929 | if (XtIsManaged(rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize.)) { |
| 1930 | XmUpdateDisplay(rgbHorizSizecxx . . $ SoXtPrintDialog#rgbHorizSize.); |
| 1931 | XmUpdateDisplay(rgbVertSizecxx . . $ SoXtPrintDialog#rgbVertSize.); |
| 1932 | } |
| 1933 | alreadyUpdatedcxx . . $ SoXtPrintDialog#alreadyUpdated. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 1934 | } |
| 1935 | |
| 1936 | |
| 1937 | /////////////////////////////////////////////////////////////////////// |
| 1938 | // |
| 1939 | // Description: |
| 1940 | // This routine gets the list of available printers for printing. |
| 1941 | // |
| 1942 | // Use: private |
| 1943 | |
| 1944 | void |
| 1945 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::getPrinterListcxx . . $ SoXtPrintDialog#getPrinterList(49f6e7a06ebc5aa8).() |
| 1946 | |
| 1947 | // |
| 1948 | ////////////////////////////////////////////////////////////////////// |
| 1949 | { |
| 1950 | FILE *fp; |
| 1951 | char line[80]; |
| 1952 | SbBoolcxx . . $ SbBool# firstTime = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 1953 | |
| 1954 | fp = popen("lpstat -d -a | awk '/accepting/ {if ($2 != \"not\") print $1}; /^system default destination:/ { print $4 }; /^no system default destination/ { print \"none\"} '", "r"); |
| 1955 | while (fgets(line, 80, fp) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1956 | line[strlen(line)-1] = 0; |
| 1957 | if (firstTime) { |
| 1958 | defaultPrintercxx . . $ SoXtPrintDialog#defaultPrinter. = strdup(line); |
| 1959 | firstTime = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!; |
| 1960 | } |
| 1961 | else printerscxx . . $ SoXtPrintDialog#printers.->appendcxx . . $ SbPList#append(5d22bdacc48458e8).(strdup(line)); |
| 1962 | } |
| 1963 | pclose(fp); |
| 1964 | } |
| 1965 | |
| 1966 | // |
| 1967 | // redefine those generic virtual functions |
| 1968 | // |
| 1969 | const char * |
| 1970 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::getDefaultWidgetNamecxx . . $ SoXtPrintDialog#getDefaultWidgetName(a9f41ea0e82d88cf).() const |
| 1971 | { return "SoXtPrintDialog"; } |
| 1972 | |
| 1973 | const char * |
| 1974 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::getDefaultTitlecxx . . $ SoXtPrintDialog#getDefaultTitle(a9f41ea0e82d88cf).() const |
| 1975 | { return "Print Dialog"; } |
| 1976 | |
| 1977 | const char * |
| 1978 | SoXtPrintDialogcxx . . $ SoXtPrintDialog#::getDefaultIconTitlecxx . . $ SoXtPrintDialog#getDefaultIconTitle(a9f41ea0e82d88cf).() const |
| 1979 | { return "Print Dialog"; } |
| 1980 |