InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAttributeStrand.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: EricM
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 __IAttributeStrand__
25 #define __IAttributeStrand__
26 
27 
28 #include "IPMUnknown.h"
29 #include "TextID.h"
30 #include "DataWrapper.h"
31 
32 class AttributeBossList;
33 class ITextModel;
34 
40 {
41  public:
42  enum { kDefaultIID = IID_IATTRIBUTESTRAND };
43 
58  virtual void DoApplyTextStyle(const ITextModel* model, ClassID which, TextIndex *pstartpos,
59  int32 *pnumchars, UID styleref, bool16 removeAll, bool16 keepOldStyleAsOverrides = kTrue) = 0;
60 
73  virtual void DoApplyOverrides(const ITextModel* model, ClassID whichStrand,
74  TextIndex *startpos, int32 *numchars, const AttributeBossList* over) = 0;
75 
88  virtual void DoClearOverrides(const ITextModel* model, ClassID whichStrand,
89  TextIndex *startpos, int32 *numchars, const AttributeBossList* over) = 0;
90 
100  virtual void UnhookParagraphStyle(const ITextModel* model, TextIndex start, int32 len,
101  UID rootStyle, UID oldParagraphStyle, UID storyThreadStyle) = 0;
102 
109  virtual UID GetStyleUID(TextIndex position, int32 *count, TextIndex *runBegin = nil) const = 0;
110 
117  virtual DataWrapper<AttributeBossList> GetLocalOverrides(TextIndex position, int32 *count, TextIndex *runBegin = nil) const = 0;
118 
120  virtual void ResetWithNoUndo(const ITextModel* model, TextIndex start, int32 length, UID toStyle) = 0;
121 
123  virtual void StoryThreadStyleDiffs_ApplyAtPaste(TextIndex start, int32 length,
124  const UID &charRootStyle, const UID &paraRootStyle,
125  const AttributeBossList *diffAttrs,
126  const AttributeBossList * dest_SrcStoryThreadStyleDiffs,
127  const ITextModel* model) = 0;
128 
130  virtual void ParaRootStyleDiffs_ApplyAtPaste(TextIndex start, int32 length,
131  const UID &charRootStyle, const UID &paraRootStyle,
132  const AttributeBossList *diffAttrs,
133  const AttributeBossList * paraDest_SrcRootStyleDiffs,
134  const ITextModel* model) = 0;
135 
137  virtual void CharRootStyleDiffs_ApplyAtPaste(TextIndex start, int32 length,
138  const UID &charRootStyle,
139  const UID &paraRootStyle,
140  const AttributeBossList *diffAttrs,
141  const AttributeBossList * charDest_SrcRootStyleDiffs,
142  const ITextModel* model) = 0;
143 
150  virtual void RemoveRedundantOverrides(const ITextModel* model, TextIndex start, int32 len) = 0;
151 };
152 
153 #endif // __IAttributeStrand__