InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICellContent.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Jesse Jones (jejones)
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 // Purpose: Provides access to cell content in an opaque wrapper.
24 //
25 //========================================================================================
26 
27 #ifndef __ICellContent__
28 #define __ICellContent__
29 
30 #include "IPMUnknown.h"
31 #include "TablesID.h"
32 #include "TableTypes.h"
33 #include "PMPoint.h"
34 #include "PMRect.h"
35 #include "ParcelKey.h"
36 #include "OwnedItemDataList.h"
37 
38 
39 //-----------------------------------
40 // Forward References
41 //
42 class TableMementoPiece;
43 class PMMatrix;
44 class TableLayout;
45 
46 
47 // ===================================================================================
48 // class ICellContent
49 // ===================================================================================
50 class ICellContent : public IPMUnknown {
51 
52 //-----------------------------------
53 // API
54 //
55 public:
56  // ----- Constants -----
57  enum {kDefaultIID = IID_ICELLCONTENT};
58  enum GrowableDirection { kNone = 0, kLeft = 0x01, kTop = 0x02,
59  kRight = 0x04, kBottom = 0x08 };
60 
61  // ----- API -----
62  virtual void SetTableModel(const UIDRef& tableModelRef) = 0;
63  virtual UIDRef GetTableModel() const = 0;
64  virtual void SetGridID(const GridID& gridID) = 0;
65  virtual GridID GetGridID() const = 0;
66  virtual void SetGridAddress(const GridAddress& gridAddress) = 0;
67  virtual GridAddress GetGridAddress() const = 0;
68 
72  virtual PMRect GetCellPathBounds(ParcelKey key) const = 0;
73  virtual UID GetParcelFrameUID(ParcelKey key) const = 0;
74  virtual PMMatrix GetParcelToFrameMatrix(ParcelKey key) const = 0;
75  virtual bool16 GetParcelAcceptingInvals(ParcelKey key) const = 0;
76  virtual void AddParcelPendingInval(ParcelKey key,
77  const PMRect& invalRect) = 0;
82  bool16 isDamaged) = 0;
83 
89 
94  virtual void NotifyLayoutParcelInkBoundsChanged(ParcelKey key) = 0;
95 
102  virtual CellType GetCellType() const = 0;
103 
125  virtual void NotifyRowTypeChanging(bool16 repeat,
126  int32 lRowCount) = 0;
127 
128  virtual void InvalCellContent(ParcelKey key) = 0;
129 
137  virtual void ResetCompositionState() = 0;
138 
141  virtual int32 GetParcelCount() const = 0;
142 
145  virtual int32 GetParcelIndex(ParcelKey key) const = 0;
146 
149  virtual ParcelKey GetNthParcelKey(int32 n) const = 0;
150 
154  virtual ParcelKey CreateParcelAt(int32 index) = 0;
155 
159  virtual void RemoveParcel(int32 index) = 0;
160 
176  virtual void SetParcelGeometry(ParcelKey key,
177  const PMRect& cellPathBounds,
178  const PMRect& parcelBounds,
179  const PMRect& maxGrowBounds,
180  GrowableDirection growDir,
181  bool16 contentAttributeChanged) = 0;
182 
184  virtual void SetParcelGrowDir(ParcelKey key,
185  GrowableDirection growDir) = 0;
186 
189  virtual void SetParcelHeight(ParcelKey key, PMReal height) = 0;
190 
199  virtual void NotifyContentAttributeChanged(ParcelKey key) = 0;
200 
206  virtual void NotifyParcelMoved(ParcelKey key) = 0;
207 
212  virtual bool16 GetParcelNeedsComposition(ParcelKey key) const = 0;
213 
216  virtual void RecomposeThruParcel(ParcelKey key) = 0;
217 
220  virtual PMRect GetParcelContentInkBounds(ParcelKey key) const = 0;
221 
230  virtual bool16 GetParcelHasPositionDependentContent(ParcelKey key) const = 0;
231 
256  virtual PMReal GetParcelTopHungComposedBottom(ParcelKey key) const = 0;
257  virtual PMReal GetParcelBottomHungComposedTop(ParcelKey key) const = 0;
258  virtual PMReal GetParcelComposedGrowableHeight(ParcelKey parcelKey) const = 0;
259 
269  virtual void CollectParcelOwnedItems(ParcelKey key,
270  OwnedItemDataList* rList) const = 0;
271 
275  virtual void ConvertFromAnna(TableLayout* layout) = 0;
276 
280  virtual bool16 IsEmpty() const = 0;
281 
286  virtual PMRect GetParcelPaintedBBox(ParcelKey key) const = 0;
287 
288 };
289 
290 #endif // __ICellContent__
291