AcDbLMgr.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. // AcDbLMgr.h - Exported Interface class for Database specific
  13. // routines that manipulate and access AcDbLayout
  14. // objects.
  15. //
  16. #ifndef _ACDBLMGR_H
  17. #define _ACDBLMGR_H
  18. #include "adesk.h"
  19. #include "dbid.h"
  20. #include "dblayout.h"
  21. #include "dblaymgrrctr.h"
  22. #pragma pack (push, 8)
  23. // The maximum number of layouts in a single drawing.
  24. #define MAX_PSPACE_LAYOUTS 256
  25. class AcDbObjectId;
  26. class AcDbLayoutManager: public AcRxObject {
  27. public:
  28. virtual Acad::ErrorStatus
  29. setCurrentLayout (const ACHAR * newname,
  30. AcDbDatabase* pDb = NULL) = 0;
  31. virtual Acad::ErrorStatus
  32. setCurrentLayoutId (AcDbObjectId layoutId) = 0;
  33. virtual const ACHAR *
  34. findActiveLayout (bool allowModel,
  35. const AcDbDatabase* pDb = NULL) = 0;
  36. virtual AcDbObjectId
  37. getActiveLayoutBTRId (const AcDbDatabase* pDb = NULL) = 0;
  38. virtual AcDbLayout *
  39. findLayoutNamed (const ACHAR * name,
  40. bool leaveRecordOpen = false,
  41. const AcDbDatabase* pDb = NULL) = 0;
  42. virtual Acad::ErrorStatus
  43. copyLayout (const ACHAR * copyname,
  44. const ACHAR * newname,
  45. AcDbDatabase* pDb = NULL) = 0;
  46. virtual Acad::ErrorStatus
  47. deleteLayout (const ACHAR * delname,
  48. AcDbDatabase* pDb = NULL) = 0;
  49. virtual Acad::ErrorStatus
  50. createLayout (const ACHAR *newname,
  51. AcDbObjectId& layoutId,
  52. AcDbObjectId& blockTableRecId,
  53. AcDbDatabase* pDb = NULL) = 0;
  54. virtual Acad::ErrorStatus
  55. renameLayout (const ACHAR * oldname,
  56. const ACHAR * newname,
  57. AcDbDatabase* pDb = NULL) = 0;
  58. virtual Acad::ErrorStatus
  59. cloneLayout (AcDbLayout* pLBTR,
  60. const ACHAR * newname,
  61. int newTabOrder = 0,
  62. AcDbDatabase* pDb = NULL) = 0;
  63. virtual AcDbObjectId
  64. getNonRectVPIdFromClipId (AcDbObjectId clipId) = 0;
  65. virtual bool
  66. isVpnumClipped (int index, const AcDbDatabase* pDb = NULL) = 0;
  67. virtual int
  68. countLayouts (AcDbDatabase *pDb = NULL) = 0;
  69. virtual void
  70. addReactor (AcDbLayoutManagerReactor * newObj) = 0;
  71. virtual void
  72. removeReactor (AcDbLayoutManagerReactor * delObj) = 0;
  73. };
  74. Acad::ErrorStatus acdbDoSetupForLayouts(AcDbDatabase* pDatabase,
  75. Adesk::ULongPtr& contextHandle);
  76. Acad::ErrorStatus acdbClearSetupForLayouts(Adesk::ULongPtr contextHandle);
  77. #pragma pack (pop)
  78. #endif // _ACDBLMGR_H