DbFormattedTableData.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. // Name: DbFormattedTableData.h
  13. //
  14. // Description: Contains the following classes:
  15. // AcDbFormattedTableData
  16. //////////////////////////////////////////////////////////////////////////////
  17. #pragma once
  18. #include "DbLinkedTableData.h"
  19. #include "DbTableIterator.h"
  20. //*************************************************************************
  21. // AcGridProperty
  22. //*************************************************************************
  23. struct AcGridProperty
  24. {
  25. AcDb::GridProperty mnPropMask;
  26. AcDb::GridLineStyle mnLineStyle;
  27. AcDb::LineWeight mnLineWeight;
  28. AcDbHardPointerId mLinetype;
  29. AcCmColor mColor;
  30. AcDb::Visibility mnVisibility;
  31. double mfDoubleLineSpacing;
  32. };
  33. //*************************************************************************
  34. // AcDbFormattedTableData
  35. //*************************************************************************
  36. class AcDbFormattedTableData : public AcDbLinkedTableData
  37. {
  38. public:
  39. ACDB_DECLARE_MEMBERS(AcDbFormattedTableData);
  40. ACDB_PORT AcDbFormattedTableData(void);
  41. ACDB_PORT ~AcDbFormattedTableData(void);
  42. ACDB_PORT virtual int insertRowAndInherit(int nIndex,
  43. int nInheritFrom,
  44. int nNumRows);
  45. ACDB_PORT virtual int insertColumnAndInherit(int nIndex,
  46. int nInheritFrom,
  47. int nNumCols);
  48. ACDB_PORT virtual Acad::ErrorStatus setFieldId(int nRow,
  49. int nCol,
  50. const AcDbObjectId& idField,
  51. AcDb::CellOption nFlag);
  52. ACDB_PORT virtual Acad::ErrorStatus setFieldId(int nRow,
  53. int nCol,
  54. int nIndex,
  55. const AcDbObjectId& idField,
  56. AcDb::CellOption nFlag);
  57. ACDB_PORT virtual Acad::ErrorStatus merge(const AcCellRange& range);
  58. ACDB_PORT virtual Acad::ErrorStatus unmerge(const AcCellRange& range);
  59. ACDB_PORT virtual bool isMerged (int nRow,
  60. int nCol) const;
  61. ACDB_PORT virtual AcCellRange getMergeRange(int nRow,
  62. int nCol) const;
  63. ACDB_PORT virtual bool isFormatEditable (int nRow,
  64. int nCol) const;
  65. ACDB_PORT virtual double rotation (int nRow,
  66. int nCol) const;
  67. ACDB_PORT virtual double rotation (int nRow,
  68. int nCol,
  69. int nIndex) const;
  70. ACDB_PORT virtual Acad::ErrorStatus setRotation(int nRow,
  71. int nCol,
  72. double fRotation);
  73. ACDB_PORT virtual Acad::ErrorStatus setRotation(int nRow,
  74. int nCol,
  75. int nContent,
  76. double fRotation);
  77. ACDB_PORT virtual double scale (int nRow,
  78. int nCol) const;
  79. ACDB_PORT virtual double scale (int nRow,
  80. int nCol,
  81. int nContent) const;
  82. ACDB_PORT virtual Acad::ErrorStatus setScale(int nRow,
  83. int nCol,
  84. double fScale);
  85. ACDB_PORT virtual Acad::ErrorStatus setScale(int nRow,
  86. int nCol,
  87. int nIndex,
  88. double fScale);
  89. ACDB_PORT virtual bool isAutoScale (int nRow,
  90. int nCol) const;
  91. ACDB_PORT virtual bool isAutoScale (int nRow,
  92. int nCol,
  93. int nContent) const;
  94. ACDB_PORT virtual Acad::ErrorStatus setAutoScale(int nRow,
  95. int nCol,
  96. bool bAutoScale);
  97. ACDB_PORT virtual Acad::ErrorStatus setAutoScale(int nRow,
  98. int nCol,
  99. int nContent,
  100. bool bAutoScale);
  101. ACDB_PORT virtual AcDb::CellAlignment alignment(int nRow,
  102. int nCol) const;
  103. ACDB_PORT virtual Acad::ErrorStatus setAlignment(int nRow,
  104. int nCol,
  105. AcDb::CellAlignment nAlignment);
  106. ACDB_PORT virtual AcCmColor contentColor(int nRow,
  107. int nCol) const;
  108. ACDB_PORT virtual AcCmColor contentColor(int nRow,
  109. int nCol,
  110. int nContent) const;
  111. ACDB_PORT virtual Acad::ErrorStatus setContentColor(int nRow,
  112. int nCol,
  113. const AcCmColor& color);
  114. ACDB_PORT virtual Acad::ErrorStatus setContentColor(int nRow,
  115. int nCol,
  116. int nContent,
  117. const AcCmColor& color);
  118. ACDB_PORT virtual AcDbObjectId textStyle(int nRow,
  119. int nCol) const;
  120. ACDB_PORT virtual AcDbObjectId textStyle(int nRow,
  121. int nCol,
  122. int nContent) const;
  123. ACDB_PORT virtual Acad::ErrorStatus setTextStyle(int nRow,
  124. int nCol,
  125. const AcDbObjectId& idTextStyle);
  126. ACDB_PORT virtual Acad::ErrorStatus setTextStyle(int nRow,
  127. int nCol,
  128. int nContent,
  129. const AcDbObjectId& idTextStyle);
  130. ACDB_PORT virtual double textHeight (int nRow,
  131. int nCol) const;
  132. ACDB_PORT virtual double textHeight (int nRow,
  133. int nCol,
  134. int nContent) const;
  135. ACDB_PORT virtual Acad::ErrorStatus setTextHeight(int nRow,
  136. int nCol,
  137. double fTextHeight);
  138. ACDB_PORT virtual Acad::ErrorStatus setTextHeight(int nRow,
  139. int nCol,
  140. int nContent,
  141. double fTextHeight);
  142. ACDB_PORT virtual AcCmColor backgroundColor(int nRow,
  143. int nCol) const;
  144. ACDB_PORT virtual Acad::ErrorStatus setBackgroundColor(int nRow,
  145. int nCol,
  146. const AcCmColor& color);
  147. ACDB_PORT virtual AcDb::CellContentLayout contentLayout(int nRow,
  148. int nCol) const;
  149. ACDB_PORT virtual Acad::ErrorStatus setContentLayout(int nRow,
  150. int nCol,
  151. AcDb::CellContentLayout nLayout);
  152. ACDB_PORT virtual AcDb::FlowDirection flowDirection(void) const;
  153. ACDB_PORT virtual Acad::ErrorStatus setFlowDirection(AcDb::FlowDirection nDir);
  154. ACDB_PORT virtual double margin (int nRow,
  155. int nCol,
  156. AcDb::CellMargin nMargin) const;
  157. ACDB_PORT virtual Acad::ErrorStatus setMargin(int nRow,
  158. int nCol,
  159. AcDb::CellMargin nMargins,
  160. double fMargin);
  161. ACDB_PORT virtual bool isMergeAllEnabled(int nRow,
  162. int nCol) const;
  163. ACDB_PORT virtual Acad::ErrorStatus enableMergeAll(int nRow,
  164. int nCol,
  165. bool bEnable);
  166. ACDB_PORT virtual AcDb::GridLineStyle gridLineStyle(int nRow,
  167. int nCol,
  168. AcDb::GridLineType nGridLineType) const;
  169. ACDB_PORT virtual Acad::ErrorStatus setGridLineStyle(int nRow,
  170. int nCol,
  171. AcDb::GridLineType nGridLineTypes,
  172. AcDb::GridLineStyle nLineStyle);
  173. ACDB_PORT virtual AcDb::LineWeight gridLineWeight(int nRow,
  174. int nCol,
  175. AcDb::GridLineType nGridLineType) const;
  176. ACDB_PORT virtual Acad::ErrorStatus setGridLineWeight(int nRow,
  177. int nCol,
  178. AcDb::GridLineType nGridLineTypes,
  179. AcDb::LineWeight nLineWeight);
  180. ACDB_PORT virtual AcDbObjectId gridLinetype(int nRow,
  181. int nCol,
  182. AcDb::GridLineType nGridLineType) const;
  183. ACDB_PORT virtual Acad::ErrorStatus setGridLinetype(int nRow,
  184. int nCol,
  185. AcDb::GridLineType nGridLineTypes,
  186. const AcDbObjectId& idLinetype);
  187. ACDB_PORT virtual AcCmColor gridColor (int nRow,
  188. int nCol,
  189. AcDb::GridLineType nGridLineType) const;
  190. ACDB_PORT virtual Acad::ErrorStatus setGridColor(int nRow,
  191. int nCol,
  192. AcDb::GridLineType nGridLineTypes,
  193. const AcCmColor& color);
  194. ACDB_PORT virtual AcDb::Visibility gridVisibility(int nRow,
  195. int nCol,
  196. AcDb::GridLineType nGridLineType) const;
  197. ACDB_PORT virtual Acad::ErrorStatus setGridVisibility(int nRow,
  198. int nCol,
  199. AcDb::GridLineType nGridLineTypes,
  200. AcDb::Visibility nVisibility);
  201. ACDB_PORT virtual double gridDoubleLineSpacing(int nRow,
  202. int nCol,
  203. AcDb::GridLineType nGridLineType) const;
  204. ACDB_PORT virtual Acad::ErrorStatus setGridDoubleLineSpacing(int nRow,
  205. int nCol,
  206. AcDb::GridLineType nGridLineTypes,
  207. double fSpacing);
  208. ACDB_PORT virtual Acad::ErrorStatus getGridProperty(int nRow,
  209. int nCol,
  210. AcDb::GridLineType nGridLineType,
  211. AcGridProperty& gridProp) const;
  212. ACDB_PORT virtual Acad::ErrorStatus setGridProperty(int nRow,
  213. int nCol,
  214. AcDb::GridLineType nGridLineTypes,
  215. const AcGridProperty& gridProp);
  216. ACDB_PORT virtual Acad::ErrorStatus setGridProperty(const AcCellRange& range,
  217. AcDb::GridLineType nGridLineTypes,
  218. const AcGridProperty& gridProp);
  219. ACDB_PORT virtual AcDb::CellProperty getOverride(int nRow,
  220. int nCol,
  221. int nContent) const;
  222. ACDB_PORT virtual AcDb::GridProperty getOverride(int nRow,
  223. int nCol,
  224. AcDb::GridLineType nGridLineType) const;
  225. ACDB_PORT virtual Acad::ErrorStatus setOverride(int nRow,
  226. int nCol,
  227. int nContent,
  228. AcDb::CellProperty nOverride);
  229. ACDB_PORT virtual Acad::ErrorStatus setOverride(int nRow,
  230. int nCol,
  231. AcDb::GridLineType nGridLineType,
  232. AcDb::GridProperty nOverride);
  233. ACDB_PORT virtual Acad::ErrorStatus removeAllOverrides(int nRow,
  234. int nCol);
  235. ACDB_PORT virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
  236. ACDB_PORT virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
  237. ACDB_PORT virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* pFiler);
  238. ACDB_PORT virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
  239. };