InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableAttrAccessor.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: ???
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ITableAttrAccessor__
25 #define __ITableAttrAccessor__
26 
27 #include "IPMUnknown.h"
28 #include "TablesID.h"
29 #include "TableTypes.h"
30 #include "ITableLineType.h"
31 #include "PMRect.h"
32 #include "DataWrapper.h"
33 #include "ICellStrokeAttrData.h"
34 #include <map>
35 
36 //----- Forward declarations
37 class AttributeBossList;
39 class ITableAttributes;
40 
41 
42 typedef std::pair<PMReal, ITableLineType::SType> TableAttrStrokeWeightAndType;
43 DECLARE_BASE_TYPE(TableAttrStrokeWeightAndType);
45 
46 //===================================================================================
51 //===================================================================================
53 {
54 public:
56  enum { kDefaultIID = IID_ITABLEATTRACCESSOR };
57 
58  //-------------------------------------------------------------------------------
60 
61 
81  virtual const AttributeBossList* GetAttributesFromCellStyle(const GridAddress& element, GridArea* runArea = nil) const = 0;
82 
104  virtual const AttributeBossList* GetAttributesFromRegionalCellStyle(const GridAddress& element, GridArea* runArea = nil) const = 0;
105 
120  virtual UID GetCellStyle(const GridAddress& element, int32* priority = nil, GridArea* runArea = nil) const = 0;
121 
129  virtual UID GetRegionalCellStyle(const GridAddress& element, GridArea* runArea = nil) const = 0;
130 
143  virtual const IPMUnknown* QueryCellStyleForAttr(const GridAddress& element, const ClassID& whichAttr, const PMIID& iid, GridArea* surroundingRun = nil) const = 0;
145 
146  //-------------------------------------------------------------------------------
148 
149 
158  virtual const IPMUnknown* QueryRowAttribute(int32 row, ClassID whichAttr, PMIID iid) const = 0;
159 
168  virtual const IPMUnknown* QueryRowOverride(int32 row, ClassID whichAttr, PMIID id) const = 0;
169 
177  virtual DataWrapper<AttributeBossList> QueryRowOverrides(int32 row, int32* runLength = nil) const = 0;
179 
180  //-------------------------------------------------------------------------------
182 
183 
193  virtual const IPMUnknown* QueryColAttribute(int32 col, ClassID whichAttr, PMIID id) const = 0;
194 
203  virtual const IPMUnknown* QueryColOverride(int32 col, ClassID whichAttr, PMIID id) const = 0;
204 
213  virtual DataWrapper<AttributeBossList> QueryColOverrides(int32 col, int32* runLength = nil) const = 0;
215 
216  //-------------------------------------------------------------------------------
218 
219 
233  virtual const IPMUnknown* QueryCellAttribute(const GridAddress& element, ClassID whichAttr, PMIID iid , GridArea* surroundingRun = nil, bool16 isPreserveOverride = kTrue) const = 0;
234 
246  virtual const IPMUnknown* QueryCellOverride(const GridAddress& element, ClassID whichAttr, PMIID iid, GridArea* surroundingRun = nil) const = 0;
247 
255  virtual DataWrapper<AttributeBossList> QueryCellOverrides(const GridAddress& element, GridArea* surroundingRun = nil) const = 0;
256 
260  {
261  public:
269  virtual bool16 VisitRun(const GridArea& runArea, const AttributeBossList* overrides) = 0;
270  };
271 
278  virtual void IterateCellOverrides(CellOverridesCallback& callBack) const = 0;
279 
283  {
284  public:
292  virtual bool16 VisitRun(const GridArea& runArea, const ICellStrokeAttrData::Data& overrides) = 0;
293  };
294 
302  virtual void IterateCellStrokeOverrides(Tables::ERowColumn patternType, CellStrokeOverridesCallback& callBack) const = 0;
303 
305 
306  //-------------------------------------------------------------------------------
308 
309 
310  virtual UID GetTableStyle(void) const = 0;
311 
321  virtual const IPMUnknown* QueryTableAttribute(ClassID whichAttr, PMIID iid) const = 0;
322 
328  virtual const AttributeBossList* GetTableAttributesResolved(void) const = 0;
329 
333  virtual const ITableAttributes* QueryTableOverrides(void) const = 0;
335 
336  //-------------------------------------------------------------------------------
338 
339 
345  virtual PMReal GetElementStrokeWeight(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
346 
354  virtual ITableLineType::SType GetElementStrokeType(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
355 
362  virtual UID GetElementStrokeColor(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
363 
372  virtual PMReal GetElementStrokeTint(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
373 
382  virtual bool16 GetElementStrokeOverprint(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
383 
390  virtual UID GetElementStrokeGapColor(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
391 
400  virtual PMReal GetElementStrokeGapTint(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
401 
410  virtual bool16 GetElementStrokeGapOverprint(const GridAddress& element, Tables::ECellEdge edge, bool16 *isOverride = nil, GridArea *runArea = nil) const = 0;
411 
412  enum { kLowestPriority = 0 };
417  virtual int32 GetElementStrokePriority(const GridAddress& element, Tables::ECellEdge edge) const = 0;
418 
427  virtual PMReal GetCellMaxStrokeWeight(const GridAddress& anchor, Tables::ECellEdge edge) const = 0;
428 
438  virtual void GetCellStrokeWeightAndType(const GridAddress& anchor, Tables::ECellEdge edge, TableAttrStrokeWeightAndTypeList* swtList) const = 0;
439 
445  virtual PMReal GetFirstColMaxLeftStrokeWeight() const = 0;
446 
452  virtual PMReal GetLastColMaxRightStrokeWeight() const = 0;
453 
460  virtual UID GetFillColor(const GridAddress& anchor) const = 0;
461 
466  virtual PMReal GetFillTint(const GridAddress& anchor) const = 0;
467 
473  virtual bool16 GetFillOverprint(const GridAddress& anchor) const = 0;
475 
476  //-------------------------------------------------------------------------------
478 
479 
484  virtual CellType GetCellType(const GridAddress& anchor) const = 0;
485 
489  virtual CellType GetDefaultCellType(void) const = 0;
491 
492  //-------------------------------------------------------------------------------
494 
495 
498  virtual void ClearCaches(void) = 0;
499 
500 
503  virtual void FirstColLeftStrokeChanged() = 0;
504  virtual void LastColRightStrokeChanged() = 0;
506 
507 };
508 
509 #endif // __ITableAttrAccessor__
510