InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranFxUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
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 //===========================
25 // Interface includes:
26 //===========================
27 
28 #include "IXPManager.h"
29 
30 // Project includes:
31 // None
32 
33 // Forward declarations
34 class PMReal;
35 class UIDList;
36 
68 {
69 public:
73 
76  virtual ~TranFxUtils() {}
77 
78 public:
83  typedef enum
84  {
85  eNoValue, eCommonValue, eMixedValue
86  } AttrState;
87 
88 public:
93  AttrState HasAdornment(const UIDList& itemList);
94 
100  AttrState HasXOffset(const UIDList& itemList, PMReal& value);
101 
107  AttrState HasYOffset(const UIDList& itemList, PMReal& value);
108 
114  AttrState HasUseBlackAsOpaque(const UIDList& itemList, bool16& value);
115 
121  AttrState HasUseAlpha(const UIDList& itemList, bool16& value);
122 
128  AttrState HasUseBlur(const UIDList& itemList, bool16& value);
129 
134  bool16 CanApplyAdornment(const UIDList& itemList) const;
135 
140  bool16 CanApplyXOffset(const UIDList& itemList) const;
141 
146  bool16 CanApplyYOffset(const UIDList& itemList) const;
147 
152  bool16 CanApplyUseBlackAsOpaque(const UIDList& itemList) const;
153 
158  bool16 CanApplyUseAlpha(const UIDList& itemList) const;
159 
164  bool16 CanApplyUseBlur(const UIDList& itemList) const;
165 
171  ErrorCode ApplyAdornment(const UIDList& itemList, const bool16 isAdd);
172 
180  ErrorCode ApplyXOffset(const UIDList& itemList, const PMReal& value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
181 
189  ErrorCode ApplyYOffset(const UIDList& itemList, const PMReal& value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
190 
198  ErrorCode ApplyUseBlackAsOpaque(const UIDList& itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
199 
207  ErrorCode ApplyUseAlpha(const UIDList& itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
208 
216  ErrorCode ApplyUseBlur(const UIDList& itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
217 
218 private:
223  ErrorCode AddAdornment(const UIDList& itemList);
224 
229  ErrorCode RemoveAdornment(const UIDList& itemList);
230 
242  //ErrorCode UndoAdornment(const UIDList& itemList);
243 
255  void Inval(const UIDList& itemList, bool16 isPre, bool32 invalidateOnDo = kTrue, IXPManager::XPChangeType changeTypeOnDo = IXPManager::kXPC_NoChange, bool32 invalidateOnUndo = kTrue, IXPManager::XPChangeType changeTypeOnUndo = IXPManager::kXPC_NoChange);
256 
263  AttrState HasInt32Attribute(const UIDList& itemList, const ClassID& attrClassID, int32& value);
264 
271  AttrState HasBooleanAttribute(const UIDList& itemList, const ClassID& attrClassID, bool16& value);
272 
279  AttrState HasPMRealAttribute(const UIDList& itemList, const ClassID& attrClassID, PMReal& value);
280 
289  ErrorCode ApplyInt32Attribute(const UIDList& itemList, const ClassID& attrClassID, const int32 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
290 
299  ErrorCode ApplyBooleanAttribute(const UIDList& itemList, const ClassID& attrClassID, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
300 
309  ErrorCode ApplyPMRealAttribute(const UIDList& itemList, const ClassID& attrClassID, const PMReal& value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse);
310 
316  bool16 CanApplyEffect(const UIDList& itemList) const;
317 };
318 
319 // End, TranFxUtils.h