AcPlPlotInfo.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #ifndef _ACPLPLOTINFO_H
  12. #define _ACPLPLOTINFO_H
  13. #include "AcPlObject.h"
  14. class AcPlPlotConfig;
  15. class AcRxObject;
  16. class AcDbPlotSettings;
  17. class AcPlPlotInfo : public AcPlObject
  18. {
  19. public:
  20. ACPL_PORT AcPlPlotInfo();
  21. ACPL_PORT virtual ~AcPlPlotInfo();
  22. ACPL_DECLARE_MEMBERS(AcPlPlotInfo);
  23. public:
  24. enum MergeStatus {
  25. kNoChanges = 0x00000000,
  26. kPlotCfgName = 0x00000001,
  27. kPlotPaperMargins = 0x00000002,
  28. kPlotPaperSize = 0x00000004,
  29. kCanonicalMediaName = 0x00000008,
  30. kPlotOrigin = 0x00000010,
  31. kPlotPaperUnits = 0x00000020,
  32. kPlotViewportBorders = 0x00000040,
  33. kPlotPlotStyles = 0x00000080,
  34. kShowPlotStyles = 0x00000100,
  35. kPlotRotation = 0x00000200,
  36. kPlotCentered = 0x00000400,
  37. kPlotHidden = 0x00000800,
  38. kShadePlot = 0x00001000,
  39. kShadePlotResLevel = 0x00002000,
  40. kShadePlotCustomDPI = 0x00004000,
  41. kPlotType = 0x00008000,
  42. kPlotWindowArea = 0x00010000,
  43. kPlotViewName = 0x00020000,
  44. kScale = 0x00040000,
  45. kCurrentStlyeSheet = 0x00080000,
  46. kScaleLineWeights = 0x00100000,
  47. kPrintLineWeights = 0x00200000,
  48. kDrawViewportsFirst = 0x00400000,
  49. kPlotTransparency = 0x00800000
  50. };
  51. ACPL_PORT Acad::ErrorStatus copyFrom(const AcRxObject* pOther);
  52. // Layout to be plotted. Required.
  53. ACPL_PORT void setLayout(AcDbObjectId& layoutId);
  54. // Layout to be plotted.
  55. ACPL_PORT AcDbObjectId layout() const;
  56. // AcDbPlotSettings containing the settings to use for the plot.
  57. // Optional, passing NULL removes any existing overrides.
  58. // If not provided the object uses the layout settings.
  59. ACPL_PORT void setOverrideSettings(const AcDbPlotSettings* pOverrides);
  60. // The current AcDbPlotSettings containing the overrides.
  61. ACPL_PORT const AcDbPlotSettings* overrideSettings() const;
  62. // Provides an AcPlPlotConfig (or PC3/Device name) to use instead of the
  63. // config/device specified in the layout or override. Optional, passing
  64. // NULL removes any existing overrides.
  65. ACPL_PORT void setDeviceOverride(const AcPlPlotConfig* pconf);
  66. // The "merged" AcDbPlotSettings object, created by merging the source
  67. // layout with the overrides and device override.
  68. ACPL_PORT const AcDbPlotSettings* validatedSettings() const;
  69. // Sets the validated AcDbPlotSettings.
  70. ACPL_PORT Acad::ErrorStatus setValidatedSettings(const AcDbPlotSettings* pValidatedSettings);
  71. // The AcPlPlotConfig for the validated settings
  72. ACPL_PORT const AcPlPlotConfig* validatedConfig() const;
  73. // Sets the validated config
  74. ACPL_PORT void setValidatedConfig(const AcPlPlotConfig* pConfig);
  75. // The AcPlPlotConfig object (or PC3/Device name)
  76. // that will override the output device set in the layout.
  77. ACPL_PORT const AcPlPlotConfig* deviceOverride() const;
  78. // Returns a bool indicating whether the current overrides have been merged
  79. // with the layout settings.
  80. ACPL_PORT bool isValidated() const;
  81. // Gets the "changed" bits on the info object to indicate the what
  82. // properties of the source layout changed as a result of applying the plot
  83. // settings and device overrides.
  84. ACPL_PORT unsigned long mergeStatus() const;
  85. // Could this object be sufficiently similar to another plot info,
  86. // satisfying the requirements of multi-page documents
  87. // (Same device name, media size, orientation, etc.)
  88. ACPL_PORT bool isCompatibleDocument(const AcPlPlotInfo* pOtherInfo) const;
  89. };
  90. #endif // _ACPLPLOTINFO_H