InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IBoundsData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Richard Rodseth
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: This interface is attached to commands which alter the dimensions of page items. It
24 // is used to determine the size of the area (usually the pasteboard) which contains the
25 // affected page items, and whether the items should be completely contained within the
26 // area, or simply intersect it.
27 //
28 // IBoundsData
29 //
30 //========================================================================================
31 
32 #ifndef __IBOUNDSDATA__
33 #define __IBOUNDSDATA__
34 
35 #include "IPMUnknown.h"
36 
37 #include "LayoutUIID.h"
38 #include "LayoutID.h"
39 #include "PMRect.h"
40 #include "TransformTypes.h"
41 
42 class ITransform;
43 
44 class IBoundsData : public IPMUnknown
45 {
46 public:
47  enum { kDefaultIID = IID_IBOUNDSDATA };
48 
49  enum ContainmentType
50  {
51  kNoBoundsChecking = 0,
52  kNoItemsCompletelyOutside = 1,
53  kAllItemsCompletelyInside = 2,
54  kUseDefaultBoundsChecking = 3,
55  };
56 
57 
66  virtual void SetBoundsChecking( ContainmentType containmentType, const PMRect* bounds, const Transform::CoordinateSpace &coordinateSpace) = 0;
67 
72  inline void SetDefaultBoundsChecking(){ SetBoundsChecking( kUseDefaultBoundsChecking, nil, Transform::SpreadCoordinates());}
73 
76  inline void SetNoBoundsChecking(){ SetBoundsChecking( kNoBoundsChecking, nil, Transform::SpreadCoordinates());}
77 
83  virtual ContainmentType GetBoundsChecking( PMRect* bounds, Transform::CoordinateSpace* coordinateSpace) const = 0;
84 
90  virtual ContainmentType CalculateBoundsChecking( const UIDRef& item, PMRect* rect, UIDRef* rectParent) = 0;
91 
92 };
93 
94 #endif // __IBOUNDSDATA__