AcTcUI.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: AcTcUi.h
  12. //
  13. // Description: Place for all the exported global functions
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #ifndef __ACTCUI_H__
  17. #define __ACTCUI_H__
  18. #include "adui.h"
  19. #include "AdAChar.h"
  20. #include <afxtempl.h>
  21. #ifdef _ACTCUI_BUILD
  22. # define ACTCUI_PORT __declspec(dllexport)
  23. #else
  24. # define ACTCUI_PORT
  25. #endif
  26. class CAcTcUiManager;
  27. class CAcTcUiToolPaletteSet;
  28. class CAcTcUiToolPalette;
  29. class CAcTcUiCatalogView;
  30. class AcTcCatalogItem;
  31. class AcTcCatalog;
  32. class AcTcStockTool;
  33. class AcTcTool;
  34. typedef CTypedPtrArray<CPtrArray, AcTcCatalogItem*> AcTcCatalogItemArray;
  35. typedef CTypedPtrArray<CPtrArray, AcTcStockTool*> AcTcStockToolArray;
  36. typedef CTypedPtrArray<CPtrArray, AcTcCatalog*> AcTcCatalogArray;
  37. typedef CTypedPtrArray<CPtrArray, CAcTcUiToolPaletteSet*> AcTcUiToolPaletteSetArray;
  38. typedef CTypedPtrArray<CPtrArray, CAcTcUiToolPalette*> AcTcUiToolPaletteArray;
  39. typedef CTypedPtrArray<CPtrArray, CAcTcUiCatalogView*> AcTcUiCatalogViewArray;
  40. // Drag and drop formats
  41. //
  42. #define ACTCUI_DRAGFORMAT_CUSTOM (0x1 << 0)
  43. #define ACTCUI_DRAGFORMAT_IDROP (0x1 << 1)
  44. #define ACTCUI_DRAGFORMAT_HDROP (0x1 << 2)
  45. // For creating a new default palette set
  46. //
  47. #define ACTCUI_CNPS_NOCREATEWINDOW (0x1 << 0)
  48. #define ACTCUI_CNPS_NOADD (0x1 << 1)
  49. #define ACTCUI_CNPS_CREATEHIDDEN (0x1 << 2)
  50. // Clipboard formats
  51. //
  52. #define CF_ACTC_CATALOG_ITEM_17_11 ACRX_T(/*MSGO*/"CF_ACTC_CATALOG_ITEM_17_11")
  53. #define CF_ACTCUI_CATALOG_ITEM_HEADER_17_11 ACRX_T(/*MSGO*/"CF_ACTCUI_CATALOG_ITEM_HEADER_17_11")
  54. #define CF_ACTC_CATALOG_ITEM_17_1 ACRX_T(/*MSGO*/"CF_ACTC_CATALOG_ITEM_17_1")
  55. #define CF_ACTCUI_CATALOG_ITEM_HEADER_17_1 ACRX_T(/*MSGO*/"CF_ACTCUI_CATALOG_ITEM_HEADER_17_1")
  56. #define CF_ACTC_CATALOG_ITEM_16_1 ACRX_T(/*MSGO*/"CF_ACTC_CATALOG_ITEM_16_1")
  57. #define CF_ACTCUI_CATALOG_ITEM_HEADER_16_1 ACRX_T(/*MSGO*/"CF_ACTCUI_CATALOG_ITEM_HEADER_16_1")
  58. #define CF_ACTCUI_CATALOG_ITEM ACRX_T(/*MSGO*/"CF_ACTC_CATALOG_ITEM")
  59. #define CF_ACTCUI_CATALOG_ITEM_HEADER ACRX_T(/*MSGO*/"CF_ACTCUI_CATALOG_ITEM_HEADER")
  60. #define CF_IDROP_ACTCUI_TOOL ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_TOOL")
  61. #define CF_IDROP_ACTCUI_PALETTE ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_PALETTE")
  62. #define CF_IDROP_ACTCUI_PACKAGE ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_PACKAGE")
  63. #define CF_IDROP_ACTCUI_CATEGORY ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_CATEGORY")
  64. #define CF_IDROP_ACTCUI_CATALOG ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_CATALOG")
  65. #define CF_IDROP_ACTCUI_STOCKTOOL ACRX_T(/*MSGO*/"CF_IDROP.XML_ACTCUI_STOCKTOOL")
  66. #define CF_ACTCUI_TOOLBAR_ITEM ACRX_T(/*MSGO*/"CF_ACTCUI_TOOLBAR_ITEM")
  67. // AcTcUiPasteItems flags
  68. //
  69. #define ACTCUI_PI_SHOW_PROGRESS (0x1 << 0)
  70. #define ACTCUI_PI_USE_NEW_IDS (0x1 << 1)
  71. #define ACTCUI_PI_BREAK_SOURCE_LINK (0x1 << 2) // For internal use
  72. #define ACTCUI_PI_NOTIFY_TOOLS (0x1 << 3) // For internal use
  73. // Structure for drag and drop header information
  74. //
  75. typedef struct ACTCUI_DRAG_HEADER
  76. {
  77. DWORD mdwDragFormat; // Dragged object: ACTCUIDRAGFORMATCUSTOM, etc.
  78. #ifdef _ADESK_WINDOWS_
  79. CLIPFORMAT mcfClipFormat; // Clipformat: CF_ACTC_CATALOG_ITEM, etc.
  80. #endif
  81. BOOL mbAutoCADSource; // TRUE if source is AutoCAD
  82. DWORD mdwSourceProcessId; // Source process ID
  83. GUID mRootId; // Root id of the catalog items being dragged
  84. GUID mParentId; // Parent id of the catalog items being dragged
  85. BOOL mbReadOnlySource; // True if source is read-only
  86. int mnCount; // Number of items being dragged
  87. int mnStockTools; // Number of stock tool items being dragged
  88. DWORD mdwItemTypes; // Item types being dragged
  89. } ACTCUI_DRAG_HEADER;
  90. ACTCUI_PORT CAcTcUiManager* AcTcUiGetManager(void);
  91. #ifdef _ADESK_WINDOWS_
  92. ACTCUI_PORT BOOL AcTcUiCopyItems (COleDataSource* pDataSource,
  93. const AcTcCatalogItemArray* pItems,
  94. BOOL bAutoCADSource);
  95. ACTCUI_PORT BOOL AcTcUiGetDragInfo (IDataObject* pDataObject,
  96. ACTCUI_DRAG_HEADER* pHeader);
  97. ACTCUI_PORT BOOL AcTcUiPasteItems (IDataObject* pDataObject,
  98. AcTcCatalogItemArray* pItems,
  99. AcTcCatalogItemArray* pStockTools,
  100. DWORD dwFlag = ACTCUI_PI_SHOW_PROGRESS);
  101. ACTCUI_PORT CAcTcUiToolPaletteSet* AcTcUiGetToolPaletteWindow(void);
  102. ACTCUI_PORT BOOL AcTcUiFilterShapesDialog(AcTcCatalogItem* pPackage,
  103. AcTcCatalogItemArray* pActiveShapes,
  104. AcTcTool*& pCurrentShape,
  105. CWnd* pParentWnd);
  106. #endif //_ADESK_WINDOWS_
  107. #endif //__ACTCUI_H__