InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TextStoryThreadHelper.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: dwaterfa
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 __TextStoryThreadHelper__
25 #define __TextStoryThreadHelper__
26 
27 
28 #include "ITextModel.h"
29 #include "ITextStoryThreadDict.h"
30 
31 
40 {
41  public:
42 
43  TextStoryThreadHelper(const ITextModel* textModel);
44 
51  bool16 IsComposable(TextIndex at)
52  {
53  UpdateST(at);
54  return fCurrentSTComposable;
55  }
56 
76  TextIndex GetComposedEndTextIndex(const RangeData& range,
77  UIDRef* pFrameRefToWaitOn);
78 
85  bool16 IsInOverset(TextIndex at)
86  {
87  UpdateST(at);
88  return (fCurrentSTComposable && (at >= fCurrentSTOversetStart));
89  }
90 
98  bool16 IsInUIViewableOverset(TextIndex at)
99  {
100  UpdateST(at);
101  return (fCurrentSTComposable && (at >= fCurrentSTUIViewableOversetStart));
102  }
103 
104  private:
105  void UpdateST(TextIndex at);
106 
107  //
108  // Members
109  //
110  IDataBase* fDB;
111  UID fStoryUID;
113 
114  TextIndex fCurrentSTStart;
115  TextIndex fCurrentSTEnd;
116  TextIndex fCurrentSTUnComposedStart;
117  TextIndex fCurrentSTOversetStart;
118  bool16 fCurrentSTComposable;
119 
120  UID fCurrentSTDictUID;
122  TextIndex fCurrentSTDictAnchorIndex;
123  int32 fCurrentSTDictParcelCount;
124  int32 fCurrentSTDictComposedParcelCount;
125  int32 fCurrentSTDictNonOversetParcelCount;
126  bool16 fCurrentSTDictComposable;
127  TextIndex fCurrentSTUIViewableOversetStart;
128 };
129 
130 
131 #endif