InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGeometryFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Martz
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 // Note:
24 //
25 //========================================================================================
26 
27 #ifndef _IGeometry_Facade_
28 #define _IGeometry_Facade_
29 
30 #include "GenericID.h"
31 #include "Utils.h"
32 #include "IReferencePointData.h"
33 #include "TransformTypes.h"
34 
35 class AutomationContext;
36 class AutomationTargetingData;
37 class IScriptRequestData;
38 
39 namespace Facade
40  {
41  class IGeometryFacade : public IPMUnknown
42  {
43  public:
44  enum { kDefaultIID = IID_IGEOMETRYFACADE };
45 
46  virtual int32 GetGeometryItemsCount( const UIDList& items) const = 0;
47 
51  virtual bool16 CanChangeItemsHeight( const UIDList& items, const Transform::CoordinateSpace& boundsSpace) const = 0;
52 
56  virtual bool16 CanChangeItemsWidth( const UIDList& items, const Transform::CoordinateSpace& boundsSpace) const = 0;
57 
61  virtual bool16 CanChangeItemsLength( const UIDList& items, const Transform::CoordinateSpace& boundsSpace) const = 0;
62 
63 
67  virtual bool16 ItemsHaveHeight( const UIDList& items, const Transform::CoordinateSpace& boundsSpace) const = 0;
68 
72  virtual bool16 ItemsHaveWidth( const UIDList& items, const Transform::CoordinateSpace& boundsSpace) const = 0;
73 
74 
79  virtual void GetItemsHeight( const UIDList& items,
80  const Transform::CoordinateSpace& boundsSpace,
81  Geometry::BoundsKind boundsKind,
82  const Transform::CoordinateSpace& measurementSpace,
83  K2Vector<PMReal>& results) const = 0;
84 
89  virtual void GetItemsWidth( const UIDList& items,
90  const Transform::CoordinateSpace& boundsSpace,
91  Geometry::BoundsKind boundsKind,
92  const Transform::CoordinateSpace& measurementSpace,
93  K2Vector<PMReal>& results) const = 0;
94 
99  virtual void GetItemsSize( const UIDList& items,
100  const Transform::CoordinateSpace& boundsSpace,
101  Geometry::BoundsKind boundsKind,
102  const Transform::CoordinateSpace& measurementSpace,
103  K2Vector<PMPoint>& results) const = 0;
104 
109  virtual void GetItemsLength( const UIDList& items,
110  const Transform::CoordinateSpace& boundsSpace,
111  Geometry::BoundsKind boundsKind,
112  const Transform::CoordinateSpace& measurementSpace,
113  K2Vector<PMReal>& results) const = 0;
114 
115 
127  virtual void GetItemsDimensions ( const UIDList& items,
128  const Transform::CoordinateSpace& boundsSpace,
129  Geometry::BoundsKind boundsKind,
130  const Transform::CoordinateSpace& measurementSpace,
131  K2Vector<PMReal>* widths,
132  K2Vector<PMReal>* heights,
133  bool32 *itemsHaveWidth,
134  bool32 *itemsHaveHeight ) const = 0;
135 
170  virtual ErrorCode ResizeItems(
171  const UIDList& items,
172  const Transform::CoordinateSpace& boundsSpace,
173  Geometry::BoundsKind boundsKind,
174  const Transform::TransformOrigin& referencePoint,
175  const Geometry::ResizeValue& newSize) = 0;
176 
198  virtual ErrorCode SetItemsBounds(
199  const UIDList& items,
200  const Transform::CoordinateSpace& coordinateSpace,
201  Geometry::BoundsKind boundsKind,
202  PMRectCollection& newFrames
203  ) = 0;
204 
205 
211  virtual PMRect GetItemBounds( const UIDRef& itemRef, const Transform::CoordinateSpace& coordinateSpace, Geometry::BoundsKind kind) const = 0;
212 
218  virtual PMRect GetItemsBounds( const UIDList& items, const Transform::CoordinateSpace& coordinateSpace, Geometry::BoundsKind kind) const = 0;
219 
220 
229  virtual ErrorCode ConstructResizeScriptMethod(
230  IScriptRequestData* scriptRequestData,
231  const Transform::CoordinateSpace& boundsSpace,
232  Geometry::BoundsKind boundsKind,
233  const Transform::TransformOrigin& referencePoint,
234  const Geometry::ResizeValue& newSize
235  ) = 0;
236 
237 #ifdef ID_DEPRECATED
238 
246  virtual ErrorCode RecordResize(
247  AutomationContext* pAutomationContext,
248  const Transform::CoordinateSpace& boundsSpace,
249  Geometry::BoundsKind boundsKind,
250  const Transform::TransformOrigin& referencePoint,
251  const Geometry::ResizeValue& newSize,
252  Transform::Target target = Transform::OriginalItems()
253  ) = 0;
254 
255 
264  virtual ErrorCode AddResizeActionAtom(
265  AutomationContext* pAutomationContext,
266  const Transform::CoordinateSpace& boundsSpace,
267  Geometry::BoundsKind boundsKind,
268  const Transform::TransformOrigin& referencePoint,
269  const Geometry::ResizeValue& newSize,
270  AutomationTargetingData* pAtomTargetData = nil
271  ) = 0;
272 #endif
273  };
274 }
275 #endif // _IGeometry_Facade_