InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGraphicStateIsApplicable.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: This interface is intended to be used on page items so that the page
24 // item (or its type) can determine which attribute types can be applied to
25 // it. For example, an image page item can only have a fill color and
26 // overprint fill attribute.
27 //
28 //========================================================================================
29 
30 #ifndef _IGraphicStateIsApplicable_
31 #define _IGraphicStateIsApplicable_
32 //________________________________________________________________________________________
33 // INCLUDES
34 //________________________________________________________________________________________
35  #include "IPMUnknown.h"
36  #include "GraphicStylesID.h"
37 //========================================================================================
38 //________________________________________________________________________________________
39 // CLASS DECLARATION
40 //________________________________________________________________________________________
41 
46  {
47  //____________________________________________________________________________________
48  // Data Types
49  //____________________________________________________________________________________
50  public:
51  enum { kDefaultIID = IID_IGRAPHICSTYLE_IS_APPLICABLE };
52 
53  //____________________________________________________________________________________
54  // Member functions
55  //____________________________________________________________________________________
56  public:
57  //................................................................................
58  // Prevent an internal attribute/rendering type from being applied to the page item
59  //................................................................................
60 
64  virtual void PreventAttributeApplication (const ClassID& attrClassID) = 0;
69  virtual void PreventFillRenderingApplication (const ClassID& newClassID) = 0;
74  virtual void PreventStrokeRenderingApplication (const ClassID& newClassID) = 0;
75 
76  //................................................................................
77  // Allow an internal attribute/rendering type to be applied to the page item.
78  // Returns whether or not the attribute/rendering type class was removed from
79  // the list.
80  //................................................................................
81 
86  virtual bool16 AllowAttributeApplication (const ClassID& attrClassID) = 0;
92  virtual bool16 AllowFillRenderingApplication (const ClassID& newClassID) = 0;
98  virtual bool16 AllowStrokeRenderingApplication (const ClassID& newClassID) = 0;
99 
102  virtual void ClearAttributeList (void) = 0;
105  virtual void ClearFillRenderingList (void) = 0;
108  virtual void ClearStrokeRenderingList (void) = 0;
109 
110  //................................................................................
111  // Can the attribute/rendering type be applied to the page item?
112  //................................................................................
113 
118  virtual bool16 IsAttributeApplicable (const ClassID& attrClassID) const = 0;
124  virtual bool16 IsFillRenderingTypeApplicable (const ClassID& classID) const = 0;
130  virtual bool16 IsStrokeRenderingTypeApplicable (const ClassID& classID) const = 0;
131 
132  //................................................................................
133  // How many attribute/rendering type are prevented on the page item?
134  //................................................................................
135 
138  virtual uint32 AttributeClassCount (void) const = 0;
141  virtual uint32 FillRenderingTypeClassCount (void) const = 0;
144  virtual uint32 StrokeRenderingTypeClassCount (void) const = 0;
145 
146  //................................................................................
147  // Return the classID of the Nth item in the list.
148  //................................................................................
149 
154  virtual ClassID GetAttributeClassID (uint32 index) const = 0;
159  virtual ClassID GetFillRenderingTypeClassID (uint32 index) const = 0;
164  virtual ClassID GetStrokeRenderingTypeClassID (uint32 index) const = 0;
165  };
166 
167 #endif // _IGraphicStateIsApplicable_