InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGradientAttributeSuite.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: SusanCL
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 __IGradientAttributeSuite__
25 #define __IGradientAttributeSuite__
26 
27 #include "IPMUnknown.h"
28 #include "IGraphicAttrMessage.h"
29 
30 #include "GraphicTypes.h"
31 #include "PMPoint.h"
32 #include "K2Vector.h"
33 
34 #include "GradientFillID.h"
35 
36 const PMReal kDefaultGradientAngle = 0.0;
37 const PMReal kDefaultGradientLength = 0.0;
38 
39 const PMPoint kDefaultGradientCenter = PMPoint (0,0);
40 const PMReal kDefaultGradientRadius = 0.0;
41 const PMReal kDefaultGradientHiliteLength = 0.0;
42 const PMReal kDefaultGradientHiliteAngle = 0.0;
43 
44 const PMReal kInvalidRealNumberValue = -1.0;
45 
46 //________________________________________________________________________________________
47 // Class definition
48 //________________________________________________________________________________________
50 
51 
57 {
58 public:
59  enum { kDefaultIID = IID_IGRADIENTATTRIBUTESUITE };
60 
61  //________________________________________________________________________________________
62  // Data Types
63  //________________________________________________________________________________________
65  {
69 
70  // Fill attributes
71 
92 
93  // Stroke attributes
94 
115 
119  };
120 
121 public:
122  //________________________________________________________________________________
123  // Return the attribute count specified by the Attribute Class ID and the attribute type
124  //________________________________________________________________________________
125 
130  virtual uint16 GetAttributeCount (ClassID attributeClassID) = 0;
136  virtual uint16 GetAttributeValueCount (ClassID attributeClassID, uint32 index) = 0;
141  virtual uint16 GetAttributeCount (AttributeType attributeType) = 0;
142 
143  //________________________________________________________________________________
144  // Attribute value accessors
145  //________________________________________________________________________________
146 
154  virtual const IPMUnknown* QueryAttribute (uint32 index, ClassID attributeClass, const PMIID& interfaceIID = IID_IUNKNOWN) = 0;
155 
163  virtual IPMUnknown* CreateAttributeCopy (uint32 index, ClassID attributeClass, const PMIID& interfaceIID = IID_IUNKNOWN) = 0;
164 
170  virtual ErrorCode CopyIntoAttribute (uint32 index, IPMUnknown* iSourceAttribute) = 0;
171 
172  //________________________________________________________________________________
173  // Returns the nth specific attribute value
174  //________________________________________________________________________________
175 
181  virtual PMReal GetRealNumberAttributeValue (uint32 index, AttributeType attributeType) = 0;
187  virtual PMPoint GetPointAttributeValue (uint32 index, AttributeType attributeType) = 0;
188 
193  virtual bool16 IsAttributeUnique (ClassID attributeClass) = 0;
198  virtual bool16 IsAttributeUnique (AttributeType attributeType) = 0;
199 
208  virtual ErrorCode ApplyAttribute (ClassID attributeClass, const IPMUnknown* iAttribute) = 0;
209 
214  virtual ErrorCode ApplyAttributes (IGraphicStyleAttributeBossList* iAttributeList) = 0;
215 
224  virtual ErrorCode ApplyGradientVector (const PMPoint& startPoint, const PMPoint& endPoint) = 0;
225 
233  virtual ErrorCode ApplyDefaultAttributes (GradientType gradientType) = 0;
234 
235 };
236 
237 DECLARE_BASE_TYPE(IGradientAttributeSuite::AttributeType);
238 
239 #endif // __IGradientAttributeSuite__
240