InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LineDescription.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner:
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 // ADOBE CONFIDENTIAL
24 //
25 //========================================================================================
26 
27 #ifndef __LineDescription__
28 #define __LineDescription__
29 
30 #include "IInterfaceColors.h"
31 #include "ITextUtils.h"
32 
33 
34 #ifdef PUBLIC_BUILD
35 #endif
36 class CDynamicSpellCheckCache;
37 class RealAGMColor;
38 class StoryDescription;
39 class PMRealGlyphPoint;
40 
41 
46 {
47 public:
48  typedef object_type data_type;
49 
52  enum AddInType
53  {
56 
59 
62  };
63 
66 
68  int32 glyphIndex;
69 };
70 
71 class LineDescriptionME;
72 
77 {
78 public:
79  typedef object_type data_type;
80 
84  {
86  kNormal = 0x00,
87 
89  kBold = 0x02,
90 
92  kItalic = 0x04,
93 
95  kAllCaps = 0x08,
96 
98  kSmallCaps = 0x10
99  };
100 
103 
106 
108  uint16 fLength;
109 };
110 
111 
116 {
117 public:
120 
125  StoryRunGlyphs();
126 
131  virtual ~StoryRunGlyphs();
132 
134  void ReadWrite(IPMStream* s, StoryDescription *storyDesc);
135 
138 
141 
144 };
145 
152 {
153  public:
156 
157 
162  RunDescription();
163 
169  RunDescription(const RunDescription& src);
170 
175  virtual ~RunDescription();
176 
183 
185  void ReadWrite(IPMStream* s, StoryDescription *storyDesc);
186 
187 
190  enum RunType
191  {
194 
197 
200 
201  baselessBeginTag,
202  baselessEndTag,
203 
207 
210 
213 
216 
219 
222 
225 
228 
231 
234 
237 
238  xmlRTLBeginTag,
239  xmlRTLEndTag,
240  footnoteRTLBeginTag,
241 
244  };
245 
246  // 2008/01/28 MH: WARNING!!! DON'T FORGET TO UPDATE THIS MACRO IN CASE OF ADDING OR REMOVING a RunType
247 #define STORYEDITOR_CONTEXTUALIZED_RUN(runType)\
248  ((runType == RunDescription::regularText)\
249  || (runType == RunDescription::addedText)\
250  || (runType == RunDescription::movedText)\
251  || (runType == RunDescription::deletedText)\
252  || (runType == RunDescription::inlineNoteText)\
253  || (runType == RunDescription::footnoteText)\
254  || (runType == RunDescription::tableText))
255 
257  TextIndex startModelOffset;
258 
261 
263  int32 length;
264 
266  TextIndex anchorPoint;
267 
270 
273 
276 
279 
282 
285 
288 
290  CDynamicSpellCheckCache* fDynamicSpellCheckCache;
291 
294 
297 
300 
301  int32 level; // direction level of the run
302  int32 glyphIndex; // index of the first glyph in LineDescriptionME::fStrikes
303  int32 glyphLength; // number of glyphs for this run in LineDescriptionME::fStrikes
304  int32 complementaryFontIndex;
305 };
306 
309 #define NoPsuedoComposeID 0
310 
318 {
319  public:
322 
323  virtual ~LineDescription();
324 
327  enum LineType
328  {
331 
334 
337 
340 
343 
346 
349 
352 
355 
358  };
359  static const int32 kMaxViewSpace;
360 
364  {
365  none = 0x0,
366  oversetSplitLineStart = 0x1,
367  oversetSplitLineEnd = 0x2
368  };
369  LineDescription();
373  LineDescription(const LineDescription& other);
374 
376  void ReadWrite(IPMStream *s, StoryDescription *storyDesc);
377 
381  TextIndex lineStartOffset;
382 
385  TextIndex lineEndOffset;
386 
391 
395 
400 
404  TextIndex displayEndOffset;
405 
409 
412 
414  int32 lineID;
415 
417  int32 lineNumber;
418 
421 
423  bool16 hyphenAtEnd;
424 
427 
430 
433 
435  uint32 attributes;
436 
439  LineDescriptionME* fMEData;
440 };
441 
446 {
447  public:
454  void ReadWrite(IPMStream* s);
455 
457  int32 fID;
458 
461 };
462 
468 {
469  public:
472 
479  {
482 
485 
488  };
493 
494  virtual ~StoryDescription();
495 
497  void ReadWrite(IPMStream *s);
498 
501 
504 
507 
511 
513  bool16 fCollapsed;
514 
518 
521 
522  bool operator < (const StoryDescription& other) const
523  {return fStoryRef.GetUID() < other.fStoryRef.GetUID();}
524 
525  bool operator == (const StoryDescription& other) const
526  {return &other == this;}
527 
530 
533 };
534 
535 #ifdef PUBLIC_BUILD
536 #endif
537 
538 #endif // __LineDescription__