dblayout.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. //
  12. // DESCRIPTION: Exported protocol for AutoCAD's built in symbol
  13. // tables, their table specific record types, and
  14. // their iterators.
  15. #ifndef AD_DBLAYOUT_H
  16. #define AD_DBLAYOUT_H
  17. #include "dbmain.h"
  18. #include "dbdict.h"
  19. #include "AdAChar.h"
  20. #include "dbplotsettings.h"
  21. namespace Atil
  22. {
  23. class Image; // for Atil::Image
  24. }
  25. #pragma pack(push, 8)
  26. // Class definition for paperspace layout object
  27. class AcDbLayout: public AcDbPlotSettings
  28. {
  29. public:
  30. ACDB_DECLARE_MEMBERS(AcDbLayout);
  31. AcDbLayout();
  32. virtual ~AcDbLayout ();
  33. AcDbObjectId
  34. getBlockTableRecordId () const;
  35. virtual Acad::ErrorStatus
  36. setBlockTableRecordId (AcDbObjectId BlockTableRecordId);
  37. virtual Acad::ErrorStatus
  38. addToLayoutDict (AcDbDatabase *towhichDb,
  39. AcDbObjectId BlockTableRecordId);
  40. Acad::ErrorStatus
  41. getLayoutName (const ACHAR*& layoutName) const;
  42. Acad::ErrorStatus
  43. getLayoutName (ACHAR*& layoutName) const;
  44. virtual Acad::ErrorStatus
  45. setLayoutName (const ACHAR* layoutName);
  46. int
  47. getTabOrder () const;
  48. virtual void
  49. setTabOrder (int newOrder);
  50. bool
  51. getTabSelected () const;
  52. virtual void
  53. setTabSelected (Adesk::Boolean tabSelected);
  54. AcDbObjectIdArray
  55. getViewportArray () const;
  56. #if defined(_WINDOWS_) || defined(_ADESK_MAC_)
  57. /// <summary>
  58. /// This function provides BITMAP thumbnail of layout as output
  59. /// </summary>
  60. /// <param name="thumbnail"> A reference to a pointer of Bitmap thumbnail, containing header and pixels </param>
  61. /// <returns> This will return Acad::eOk if thumbnail is successfully retrieved. It returns error status otherwise </returns>
  62. ///
  63. Acad::ErrorStatus getThumbnail (BITMAPINFO*& thumbnail) const;
  64. /// <summary>
  65. /// This function sets BITMAP thumbnail into layout
  66. /// </summary>
  67. /// <param name="thumbnail"> A pointer of Bitmap thumbnail to be set into layout </param>
  68. /// <returns> This will return Acad::eOk if thumbnail is successfully set. It returns error status otherwise </returns>
  69. ///
  70. Acad::ErrorStatus setThumbnail (const BITMAPINFO * thumbnail);
  71. /// <summary>
  72. /// This function provides Atil::Image thumbnail of layout as output
  73. /// </summary>
  74. /// <param name="pPreviewImage"> A reference to the pointer of Atil::Image thumbnail </param>
  75. /// <returns> This will return Acad::eOk if thumbnail is successfully retrieved. It returns error status otherwise </returns>
  76. /// <remarks> Internal use only </remarks>
  77. ///
  78. Acad::ErrorStatus getPreviewImage(Atil::Image*& pPreviewImage) const;
  79. /// <summary>
  80. /// This functions sets Atil::Image thumbnail into layout
  81. /// </summary>
  82. /// <param name="pPreviewImage"> A pointer of Atil::Image thumbnail to be set into layout </param>
  83. /// <returns> This will return Acad::eOk if thumbnail is successfully set. It returns error status otherwise </returns>
  84. /// <remarks> Internal use only </remarks>
  85. ///
  86. Acad::ErrorStatus setPreviewImage (const Atil::Image * pPreviewImage);
  87. #endif
  88. void
  89. getLimits (AcGePoint2d& limMin, AcGePoint2d& limMax) const;
  90. ACDB_PORT void
  91. getLimits (AcDbExtents2d& extent) const;
  92. void
  93. getExtents (AcGePoint3d& extMin, AcGePoint3d& extMax) const;
  94. ACDB_PORT void
  95. getExtents (AcDbExtents& extent) const;
  96. Acad::ErrorStatus
  97. initialize(AcDbObjectId* paperVportId = NULL);
  98. bool
  99. annoAllVisible() const;
  100. Acad::ErrorStatus
  101. setAnnoAllVisible(bool newVal);
  102. protected:
  103. virtual Acad::ErrorStatus
  104. subGetClassID (CLSID* pClsid) const;
  105. };
  106. #pragma pack(pop)
  107. #endif