InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TextWrapRef.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: dwaterfa
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 __TextWrapRef__
25 #define __TextWrapRef__
26 
27 #include "IPMUnknown.h"
28 #include "K2Vector.h"
29 
30 
41 {
42  TextWrapRef() { }
43 
44  TextWrapRef(const TextWrapRef& other) :
45  fSODUID(other.fSODUID),
46  fSpreadUID(other.fSpreadUID),
47  fTransform(other.fTransform)
48  { }
49 
50  TextWrapRef(UID sodUID,
51  UID spreadUID,
52  const PMMatrix& transform) :
53  fSODUID(sodUID),
54  fSpreadUID(spreadUID),
55  fTransform(transform)
56  { }
57 
58  // vvv Compiler issue, wants to be const IStandOffData
59  TextWrapRef(const IPMUnknown* sod) :
60  fSODUID(::GetUID(sod)),
61  fSpreadUID(kInvalidUID) // NATIVE
62  { }
63 
64  typedef object_type data_type;
65 
66  UID fSODUID;
67  UID fSpreadUID;
68  PMMatrix fTransform;
69 
70  inline bool16 operator==(const TextWrapRef& other) const
71  {
72  return ((fSODUID == other.fSODUID) && (fSpreadUID == other.fSpreadUID) && (fTransform == other.fTransform));
73  }
74 
75  inline bool16 operator!=(const TextWrapRef& other) const
76  {
77  return !(*this == other);
78  }
79 
80  inline bool16 GetIsNative() const
81  { return (fSpreadUID == kInvalidUID); }
82 
83 };
84 
86 
87 
88 #endif // __TextWrapRef__
89