InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMainItemTOPData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bertrand Lechevalier
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 __IMainItemTOPData__
25 #define __IMainItemTOPData__
26 
27 #include "TextOnPathID.h" // for IID_IMAINITEMTOPDATA
28 #include "PMPoint.h"
29 #include "IScaleObject.h"
30 #include "TOPOptionsType.h"
31 
32 class TOPDrawingData;
33 class TOPOptionsData;
34 class TOPPathGeometry;
35 class IWaxLine;
36 
37 class IGeometry;
38 class ITOPFrameData;
39 class ITOPSplineData;
40 class IRasterPort;
41 class IGraphicsPort;
43 
48 {
49 public:
50  enum { kDefaultIID = IID_IMAINITEMTOPDATA };
51 
52  virtual void ReadWrite(IPMStream *s, ImplementationID prop) = 0;
53 
54  virtual IGeometry* QueryTOPGeometry() = 0;
55  virtual ITOPFrameData* QueryTOPFrameData() = 0;
56  virtual ITOPSplineData* QueryTOPSplineData() = 0;
57 
58  virtual UID GetTOPSplineItemUID() const = 0 ;
59  virtual void SetTOPSplineItemUID( UID nNewUID) = 0;
60 
61  virtual UID GetTOPTextFrameColumnUID() const = 0;
62 
63  virtual UID GetTOPMCTextFrameUID() const = 0;
64  virtual IMultiColumnTextFrame* QueryTOPMCTextFrame() const = 0;
65 
66  virtual void GetTOPOptionsData( TOPOptionsData& options ) const = 0;
67  virtual const TOPOptionsData* GetTOPOptionsData() const = 0;
68 
69  virtual void GetTOPDrawingData( TOPDrawingData& drawingData ) const = 0;
70  virtual const TOPDrawingData* GetTOPDrawingData() const = 0;
71 
72  virtual void SetTextAlign( const TextAlignType textAlign ) = 0;
73  virtual void SetPathAlign( const PathAlignType pathAlign ) = 0;
74  virtual void InvertPathAlignment() = 0;
75  virtual void SetTypeEffect( const EffectType typeEffect ) = 0;
76  virtual void SetOverlapOffset( const int16 overlapOffset ) = 0;
77  virtual void SetFlip( const int16 flip ) = 0;
78  virtual void Scale(IScaleObject::ScaleContext& context) = 0;
79 
80  virtual void SetVertical( const bool16 isVertical ) = 0;
81  virtual void SetStartHeight( const int32 startHeight ) = 0;
82  virtual void SetEndHeight( const int32 endHeight ) = 0;
83  virtual void SetRightToLeft( const bool16 isRightToLeft ) = 0;
84 
85  virtual const TOPPathGeometry* GetCompositionPath() const = 0;
86  virtual PMReal GetCompositionLength() const = 0;
87 
88  // Compute all transforms about the glyphs on a curve
89 
90  virtual PMReal GetGlyphsVerticalOffset(const IWaxLine* waxLine) const = 0;
91  virtual void GetGlyphAllTransforms(
92  const PMMatrix initialGlyphPosition, // A translation matrix that provides us a translation from the beginning of the line
93  K2Vector<PMReal>& glyphWidths, // set of glyph widths-- we need a set in the case of ligatures
94  const PMReal& glyphXOffset, // difference between left edge of glyph's space and its actual draw location
95  const PMReal& glyphVerticalOffset, // vertical offset associated to the glyph
96  PMMatrix* glyphMatrix, // OUT: matrix associated to the glyphs
97  PMPointList& glyphPoints, // new point positions to draw the glyphs
98  PMPointList& selectionPoints // new point positions to hilite the glyphs
99  ) = 0;// kTrue on last glyph of last run of line if no ignore trailing
100 
101  typedef enum { kFromStart, kFromEnd} AbscissaAnchor;
102  virtual void GetTabRulerPoints( PMReal absciss, PMPointList& tabRulerPoints, AbscissaAnchor anchor) = 0;
103 
104  virtual PMMatrix GetCaretRotationMatrix( PMPoint pt ) = 0;
105  virtual PMReal GetPointOnPathToAbscissa(PMPoint pt, PMReal* angle=nil) = 0;
106  virtual bool16 PointIsInTOPTextArea(const PMPoint& innerPt, PMReal tolerance, PMReal* dist=nil ) = 0;
107 
108 
109  // called by FrameThreadDrawHandler::DrawThreads and TextOversetMarkerAdornment::Inval
110 
111  virtual void GetRectHandlePositions(IRasterPort* rPort, PMPoint* outPort, PMPointList* oversetPtList) = 0;
112  virtual void GetTextFrameHandlePositions(IRasterPort* rPort, PMPoint* inPort, PMPoint* outPort) = 0;
113  virtual void CreateAnchorPath(IGraphicsPort* gPort, IRasterPort* rPort,const bool16 startBracket, bool16 bApplyInnerToPasteboard = kTrue) = 0;
114  virtual void CreateTextLinkPath(IGraphicsPort* gPort, IRasterPort* rPort, const bool16 startBracket) = 0;
115 
116  // called by GraphicFrameEdgesAdornment::DrawOversetForTOP
117  virtual void CreateTextOversetPath(IGraphicsPort* gPort, IRasterPort* rPort) = 0;
118 
119  virtual void GetAbscissae( PMReal* textStart, PMReal* textEnd, PMReal* arcLength = 0) const = 0;
120  virtual void SetAbscissae( PMReal textStart, PMReal textEnd) = 0;
121  virtual void InvertAbscissae( ) = 0;
122 
123 } ;
124 
125 #endif //__IMainItemTOPData__