IPrintDescription.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Mstn\Plot\PlotApi.h>
11 
12 MSTNPLATFORM_PRINT_TYPEDEFS (PrintDescriptionRef);
13 
16 
44 enum class PlotColorMode
46  {
47  Undefined = -1,
48  Monochrome = 0,
49  Grayscale = 1,
50  TrueColor = 2,
51  };
52 
55  {
56  None = 0,
57  XAxis = 1,
58  YAxis = 2,
59  };
60 
62 enum class PropPubMethod
63  {
64  None = 0,
65  All = 1,
66  PropFilterFile = 2
67  };
68 
69 /*=================================================================================**/
73 struct PlotFlags
74  {
76  unsigned int plotFence:1;
77 
79  unsigned int plotBorder:1;
80 
82  unsigned int plotBrokenAssocSymb:1;
83 
85  unsigned int useViewBackgroundColorForRender:1;
86 
88  unsigned int applyColorModeToRaster:1;
89 
91  unsigned int printPoints:1;
92 
94  unsigned int reserved:26;
95  };
96 
97 /*=================================================================================**/
102  {
105  bool IsOn;
106  };
107 
108 typedef bvector<LevelOverrideInfo> LevelOverrideList;
109 
110 /*=================================================================================**/
115  {
117  bool IsOn;
118  };
119 
120 typedef bvector<ReferenceOverrideInfo> ReferenceOverrideList;
121 
123 
124 /*=================================================================================**/
129 {
134 virtual void SetPlotter (IPlotterP plotter, bool preserveLayout, bool identicalPlotters) = 0;
135 
137 virtual IPlotterP GetPlotter() = 0;
138 
140 virtual IPlotterCP GetPlotterCP() const = 0;
141 
143 virtual void GetPaperSource (WStringR value) const = 0;
144 
146 virtual StatusInt SetPaperSource (WCharCP value) = 0;
147 
149 virtual PlotPropertyMapCR CustomPropertiesCR() const = 0;
150 
152 virtual PlotPropertyMapR CustomProperties() = 0;
153 };
154 
155 /*=================================================================================**/
165 {
170 virtual StatusInt InitializeFromTCB (WCharCP pltcfgLfs) = 0;
171 
177 virtual StatusInt InitializeFromTCB (IPlotterP plotter) = 0;
178 
183 virtual StatusInt InitializeFromIniFile (WCharCP iniFileLfs) = 0;
184 
186 virtual StatusInt UpdateFromTCB() = 0;
187 
191 virtual void UpdateAfterPrinterChange (bool preserveRasterQuality) = 0;
192 
197 virtual void UpdateAfterDeviceInfoChange() = 0;
198 
201 virtual bool GetIsSilentMode() const = 0;
202 
205 virtual void SetIsSilentMode (bool value) = 0;
206 
208 virtual void GetSystemPrinterName (WStringR name) const = 0;
209 
211 virtual StatusInt SelectSystemPrinter (WCharCP printerName) = 0;
212 
214 virtual PlotDestination GetPlotDestination() const = 0;
215 
217 virtual void SetPlotDestination (PlotDestination destination) = 0;
218 
221 virtual int GetNumCopies() const = 0;
222 
225 virtual void SetNumCopies (int numCopies) = 0;
226 
228 virtual StatusInt Print() const = 0;
229 
232 virtual StatusInt Print (WCharCP outFile) const = 0;
233 
239 virtual StatusInt Print (WCharCP outFile, PlotPropertyMapCR printSetProps, PlotPropertyMapCR printDefProps) const = 0;
240 
242 virtual PlotAreaMode GetPlotArea() const = 0;
243 
245 virtual StatusInt SetPlotArea (PlotAreaMode plotArea) = 0;
246 
248 virtual int GetViewIndex() const = 0;
249 
252 virtual StatusInt SetViewIndex (int viewIndex) = 0;
253 
257 virtual StatusInt EvaluateFenceFromTCB (bool* plotPolyChangedP) const = 0;
258 
260 virtual StatusInt SetFenceFromTCB() = 0;
261 
265 virtual StatusInt SetFenceFromFitRange (bool fitAll) = 0;
266 
271 virtual void GetViewDependentFence (int* numPointsP, DPoint2dP pointsP) const = 0;
272 
276 virtual StatusInt SetViewDependentFence (int numPoints, DPoint2dCP points) = 0;
277 
284 virtual void GetViewIndependentFence (int* numPointsP, DPoint3dP pointsP) const = 0;
285 
289 virtual StatusInt SetViewIndependentFence (int numPoints, DPoint3dCP points) = 0;
290 
296 virtual void GetViewIndependentWorkingFence (int* numPointsP, DPoint3dP pointsP) const = 0;
297 
299 virtual bool IsFenceDefined() const = 0;
300 
302 virtual bool IsSheetDefined() const = 0;
303 
305 virtual PlotUnits GetUnits() const = 0;
306 
308 virtual void SetUnits (PlotUnits units) = 0;
309 
311 virtual IPlotterFormP GetForm() = 0;
312 
314 virtual IPlotterFormCP GetFormCP() const = 0;
315 
317 virtual StatusInt SetFormName (WCharCP value) = 0;
318 
323 virtual void SetFormSizeX (double x) = 0;
324 
329 virtual void SetFormSizeY (double y) = 0;
330 
335 virtual void GetPaperDimensions (DPoint2dP printableSize, DPoint2dP totalSize) const = 0;
336 
338 virtual PlotOrientation GetPaperOrientation() const = 0;
339 
341 virtual void SetPaperOrientation (PlotOrientation orientation) = 0;
342 
345 virtual void Maximize() = 0;
346 
348 virtual double GetScaleRatio() const = 0;
349 
351 virtual double GetScaleMU() const = 0;
352 
354 virtual double GetScalePU() const = 0;
355 
358 virtual void SetScaleRatio (double value) = 0;
359 
362 virtual void SetScale (double scaleMasterUnits, double scalePaperUnits) = 0;
363 
367 virtual double GetPlotSizeX() const = 0;
368 
372 virtual double GetPlotSizeY() const = 0;
373 
379 virtual void SetPlotSizeX (double x) = 0;
380 
386 virtual void SetPlotSizeY (double y) = 0;
387 
389 virtual double GetOriginX() const = 0;
390 
392 virtual double GetOriginY() const = 0;
393 
398 virtual void SetOriginX (double x) = 0;
399 
404 virtual void SetOriginY (double y) = 0;
405 
407 virtual bool GetMirrorAboutX() const = 0;
408 
410 virtual bool GetMirrorAboutY() const = 0;
411 
413 virtual void SetMirrorAboutX (bool isMirroredAboutX) = 0;
414 
416 virtual void SetMirrorAboutY (bool isMirroredAboutY) = 0;
417 
419 virtual double GetPlotRotation() const = 0;
420 
423 virtual void SetPlotRotation (double angleRads) = 0;
424 
428 virtual void RotateForBestFit (bool allowOrientationChange) = 0;
429 
431 virtual bool IsPlotRotationOrthogonal() const = 0;
432 
434 virtual bool IsPlotRotation90or270() const = 0;
435 
437 virtual DPoint2d GetPlotRescale() const = 0;
438 
440 virtual void SetPlotRescale (DPoint2d plotRescale) = 0;
441 
443 virtual bool GetAutoCenterMode() const = 0;
444 
446 virtual void SetAutoCenterMode (bool autoCenter) = 0;
447 
449 virtual PlotAutoAlignMode GetAutoFenceAlignMode() const = 0;
450 
452 virtual void SetAutoFenceAlignMode (PlotAutoAlignMode autoFenceAlignMode) = 0;
453 
455 virtual void GetBorderComment (WStringR comment) const = 0;
456 
458 virtual void SetBorderComment (WCharCP comment) = 0;
459 
461 virtual PlotFileSpecCR GetPenTableFspec() const = 0;
462 
464 virtual void SetPenTableFspec (PlotFileSpecCR value) = 0;
465 
467 virtual PlotFileSpecCR GetDesignScriptFspec() const = 0;
468 
470 virtual void SetDesignScriptFspec (PlotFileSpecCR value) = 0;
471 
473 virtual PlotFileSpecCR GetPropertyFilterFspec() const = 0;
474 
476 virtual void SetPropertyFilterFspec (PlotFileSpecCR value) = 0;
477 
479 virtual ViewFlagsCR GetViewFlags() const = 0;
480 
482 virtual void SetViewFlags (ViewFlagsCR viewFlags) = 0;
483 
485 virtual PlotFlagsCR GetPlotFlags() const = 0;
486 
488 virtual void SetPlotFlags (PlotFlagsCR plotFlags) = 0;
489 
491 virtual void GetMasterModelName (WStringR modelName) const = 0;
492 
494 virtual void GetViewGroupName (WStringR viewGroupName) const = 0;
495 
497 virtual PlotColorMode GetColorMode() const = 0;
498 
500 virtual void SetColorMode (PlotColorMode colorMode) = 0;
501 
503 virtual LevelOverrideList& LevelOverrides() = 0;
504 
506 virtual ReferenceOverrideList& ReferenceOverrides() = 0;
507 
509 virtual PropPubMethod GetPropPubMethod() const = 0;
510 
512 virtual void SetPropPubMethod (PropPubMethod value) = 0;
513 
515 virtual bool IsRasterized() const = 0;
516 
518 virtual void SetRasterized (bool isRasterized) = 0;
519 
521 virtual bool GetIsPrintTo3D() const = 0;
522 
524 virtual void SetIsPrintTo3D (bool isPrintTo3D) = 0;
525 
527 virtual bool GetIsFullSheet() const = 0;
528 
530 virtual void SetIsFullSheet (bool value) = 0;
531 
533 virtual PlotRasterOptionsCR GetRasterOptions() const = 0;
534 
536 virtual void SetRasterOptions (PlotRasterOptionsCR rasterOptions) = 0;
537 
540 virtual bool IsRendered() const = 0;
541 
545 virtual bool IsDefaultToRasterizedMode() const = 0;
546 
551 virtual bool IsRasterizedDisabled() const = 0;
552 
555 virtual bool IsColorModeDisabled() const = 0;
556 
560 virtual bool IsMirrorDisabled() const = 0;
561 
565 virtual bool IsNonOrthoPlotRotationDisabled() const = 0;
566 
570 virtual bool IsPrintFenceBoundaryDisabled() const = 0;
571 
575 virtual bool IsPrintTo3DDisabled() const = 0;
576 };
577 
580 
581 /*=================================================================================**/
612  {
613 private:
614  IPrintDescriptionP m_printDesc;
615 
616 public:
619 
620  IPrintDescriptionP GetP() { return m_printDesc; }
621  IPrintDescriptionCP GetCP() const { return m_printDesc; }
622 
623  operator IPrintDescriptionP() { return GetP(); }
624  operator IPrintDescriptionCP() const { return GetCP(); }
625 
629  DLLEXPORT static PrintDescriptionPtr Create();
630 
635  DLLEXPORT PrintDescriptionPtr Copy (bool copyPlotter);
636  };
637 
639 
642 
PlotAreaMode
Printing system area mode.
Definition: PlotApi.h:145
#define END_PRINT_NAMESPACE
Definition: MstnTypes.h:40
RefCountedPtr< PrintDescriptionRef > PrintDescriptionPtr
PrintDescriptionRef smart pointer.
Definition: IPrintDescription.h:579
IPrintDescriptionCP GetCP() const
Definition: IPrintDescription.h:621
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
bvector< ReferenceOverrideInfo > ReferenceOverrideList
Definition: IPrintDescription.h:120
Interface for native-code standalone single-page print configuration and submission of the active des...
Definition: IPrintDescription.h:164
struct DPoint3d const * DPoint3dCP
Definition: msgeomstructs_typedefs.h:79
bmap< WString, PlotPropValue > const & PlotPropertyMapCR
Definition: PlotApi.h:857
Base interface for all format-specific, native-code print definitions.
Definition: IPrintDescription.h:128
Definition: TextTableHandler.h:216
#define bsiInterface
Definition: basedefs.h:31
MSTNPLATFORM_PRINT_TYPEDEFS(PrintDescriptionRef)
Publish properties specified by filter file.
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
#define BEGIN_PRINT_NAMESPACE
Definition: MstnTypes.h:39
bool IsOn
True if level should print.
Definition: IPrintDescription.h:105
wchar_t const * WCharCP
Definition: Bentley.h:224
PlotDestination
Printing system destination.
Definition: PlotApi.h:153
PlotUnits
Printing system units.
Definition: PlotApi.h:130
bool IsOn
True if reference should print.
Definition: IPrintDescription.h:117
#define DLLEXPORT
Definition: basedefs.h:137
3d point coordinates.
Definition: dpoint3d.h:19
bvector< LevelOverrideInfo > LevelOverrideList
Definition: IPrintDescription.h:108
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
WString FileNameRegex
File name regular expression.
Definition: IPrintDescription.h:104
PlotColorMode
Color mode.
Definition: IPrintDescription.h:45
WString LevelNameRegex
Level name regular expression.
Definition: IPrintDescription.h:103
int StatusInt
Definition: Bentley.h:222
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
PlotAutoAlignMode
Auto alignment mode.
Definition: IPrintDescription.h:54
PlotOrientation
Printing system orientation.
Definition: PlotApi.h:163
Miscellaneous print flags.
Definition: IPrintDescription.h:73
WString FileNameRegex
File name regular expression.
Definition: IPrintDescription.h:116
Level overrides for printing.
Definition: IPrintDescription.h:101
Reference-counted container for IPrintDescription instance.
Definition: IPrintDescription.h:611
struct DPoint2d const * DPoint2dCP
Definition: msgeomstructs_typedefs.h:78
PropPubMethod
Property publishing method.
Definition: IPrintDescription.h:62
bmap< WString, PlotPropValue > & PlotPropertyMapR
Definition: PlotApi.h:856
struct DgnPlatform::ViewFlags const & ViewFlagsCR
Definition: DgnPlatform.h:471
IPrintDescriptionP GetP()
Definition: IPrintDescription.h:620
Reference overrides for printing.
Definition: IPrintDescription.h:114
2d point coordinates.
Definition: dpoint2d.h:23
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.