InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextAttrUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
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 __ITextAttrUtils__
25 #define __ITextAttrUtils__
26 
27 #include "TextID.h"
28 #include "IPMUnknown.h"
29 #include "IRunInStylesUtils.h"
30 #include "Utils.h"
31 
32 #include "BaseType.h"
33 #include "K2SmartPtr.h"
34 
35 class IPMUnknown;
36 class ITextModel;
37 class ICommand;
38 class AttributeBossList;
39 class RangeData;
40 
41 
48 class ITextAttrUtils : public IPMUnknown
49 {
50 public:
51  enum { kDefaultIID = IID_ITEXTATTRUTILS };
52 
62  virtual ICommand* BuildApplyTextAttrCmd(ITextModel *model, TextIndex start, uint32 len, const IPMUnknown *attr, const ClassID& which) = 0;
63 
64 
73  virtual ICommand* BuildApplyTextAttrCmd(ITextModel *model, const RangeData& range, const IPMUnknown *attr, const ClassID& which) = 0;
74 
75 
85  virtual ICommand* BuildApplyTextAttrCmd(ITextModel *model, TextIndex start, uint32 len, const ClassID& which, const boost::shared_ptr<AttributeBossList>& attrList) = 0;
86 
87 
96  virtual ICommand* BuildApplyTextAttrCmd(ITextModel *mod, const RangeData& range, const ClassID& which, const boost::shared_ptr<AttributeBossList>& attrList) = 0;
97 
98 
109  virtual ICommand* BuildApplyUserTextAttrCmd(ITextModel *mod, TextIndex start, uint32 len, const IPMUnknown *attr, const ClassID& which) = 0;
110 
111 
121  virtual ICommand* BuildApplyUserTextAttrCmd(ITextModel *mod, const RangeData& range, const IPMUnknown *attr, const ClassID& which) = 0;
122 
123 
133  virtual ICommand* BuildClearTextAttrCmd(ITextModel *mod, TextIndex start, uint32 len, const ClassID& attrClass, const ClassID& which) = 0;
134 
135 
144  virtual ICommand* BuildClearTextAttrCmd(ITextModel *mod, const RangeData& range, const ClassID& attrClass, const ClassID& which) = 0;
145 
146 
147  // NOTE: It is the responsibility of the caller to ensure that all Text
148  // within the range is fully composed as possible BEFORE calling. In
149  // practice the top level container, usually the MultiColumnFrame should
150  // be the only one required to force composition.
162  virtual ErrorCode ProcessScaleTextMeasures( ITextModel *model, TextIndex start, TextIndex endPosition, PMReal xScale, PMReal yScale) = 0;
163 
164 
190  virtual void GetTotalAttributesAtIndex( ITextModel * model, TextIndex index, bool16 includeTextState, bool16 leanleft,
191  AttributeBossList & results, int32 * start = nil, int32 * end = nil,
192  UID * paraStyle = nil, int32 * plen = nil, bool16 * paraStyleOverridden = nil,
193  UID * charStyle = nil, int32 * clen = nil, bool16 * charStyleOverridden = nil,
194  RunInStyleResult::CharStyleList * nestedStyles = nil, int32 * nestedStyleLen = nil, bool16 * nestedStyleOverridden = nil
195  )= 0;
196 };
197 
198 
199 #endif // __ITextAttrUtils__