InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CWaxCollectionShape.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Ric Kamicar
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 // Base class for IWaxRunShape on collections.
24 //
25 //========================================================================================
26 
27 #ifndef __CWaxCollectionShape__
28 #define __CWaxCollectionShape__
29 
30 #include "K2Vector.h"
31 #include "PMMatrix.h"
32 #include "PMPolygon4.h"
33 #include "CWaxRunShape.h"
34 
35 
45 {
46 public:
49  { }
50 
54  virtual void GetInkBounds(PMRect* pInkBounds, Text::DrawPassInfoList* passList) const;
55 
59  virtual void GetWaxBounds(int32 offset, int32 length, K2Vector<PMPolygon4> *pSetOfBounds) const;
63  virtual bool16 GetHighlightBounds(int32 offset, int32 length, K2Vector<PMPolygon4> *pSetOfBounds, PMRect& highlightAdjust, const PMLineSeg& maxTopBottom) const;
64 
68  virtual bool16 GetSelectionLine(PMLineSeg* pSelectionLine) const;
72  virtual bool16 GetHighlightLine(PMLineSeg* pHighlightLine, const PMLineSeg& maxTopBottom) const;
73 
77  virtual void GetCaretLineAt(int32 offset, PMLineSeg* pCaretLine, const PMLineSeg& maxTopBottom) const;
78 
79 protected:
83  virtual bool16 CalculateSimpleSpanWidth(int32 offset, int32 length, PMLineSeg* pSpanWidth) const;
84 
88  virtual bool16 GetBounds(bool16 whichBounds, int32 offset, int32 length, K2Vector<PMPolygon4> *pSetOfBounds, PMRect& highlightAdjust, const PMLineSeg& maxTopBottom) const;
89 
93  virtual void GetTextInkBounds(PMRect *pInkBounds) const;
94 
97  virtual void HandleStackedXORIssues(K2Vector<PMPolygon4> *pSetOfBounds, int32 prevLineStart, int32 currLineStart, const PMReal& newTop, PMRect& highlightAdjust) const;
100  virtual void HandleAdjacentXORIssues(K2Vector<PMPolygon4> *pSetOfBounds, int32 offsetIntoSet, PMRect& highlightAdjust) const;
101 
106  virtual PMLineSeg AdjustMaxTopBottom(const PMLineSeg& maxTopBottom) const = 0;
107 };
108 
109 
110 #endif