InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CWaxRunShape Class Reference

#include <CWaxRunShape.h>

Inheritance diagram for CWaxRunShape:
CPMUnknown< IWaxRunShape >IWaxRunShapeIPMUnknownCWaxCollectionShape

Public Member Functions

 CWaxRunShape (IPMUnknown *boss)
 
virtual void GetInkBounds (PMRect *pInkBounds, Text::DrawPassInfoList *passList) const
 
virtual void GetWaxBounds (int32 offset, int32 length, K2Vector< PMPolygon4 > *pSetOfBounds) const
 
virtual bool16 GetHighlightBounds (int32 offset, int32 length, K2Vector< PMPolygon4 > *pSetOfBounds, PMRect &highlightAdjust, const PMLineSeg &maxTopBottom) const
 
virtual bool16 GetHighlightBoundsME (int32 runGlyphStartIndex, int32 startGlyphIndex, int32 startGlyphInner, int32 endGlyphIndex, int32 endGlyphInner, K2Vector< PMPolygon4 > *pSetOfBounds, PMRect &highlightAdjust, const PMLineSeg &maxTopBottom) const
 
virtual bool16 GetSelectionLine (PMLineSeg *pSelectionLine) const
 
virtual bool16 GetHighlightLine (PMLineSeg *pHighlightLine, const PMLineSeg &maxTopBottom) const
 
virtual void GetCaretLineAt (int32 offset, PMLineSeg *pCaretLine, const PMLineSeg &maxTopBottom) const
 
virtual int32 GetSelectionMode () const
 
virtual void SetSelectionMode (int32 mode)
 
int32 GetFlags () const
 
void SetFlags (int32 flags)
 
virtual void GetBorderShadingHeight (int32 mode, PMLineSeg *pShadingHeight) const
 
- Public Member Functions inherited from CPMUnknown< IWaxRunShape >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Protected Member Functions

virtual bool16 CalculateSimpleSpanWidth (int32 offset, int32 length, PMLineSeg *pSpanWidth) const
 
virtual void GetTextInkBounds (PMRect *pInkBounds) const
 
PMReal GetWaxOutlineAdjustment () const
 
virtual void GetOwnerSelectionLine (PMLineSeg *pOwnerLine) const
 
bool16 DoPerGlyphBounds () const
 
void GetPerGlyphBounds (int32 offset, int32 length, PMLineSeg *pSpan, K2Vector< PMPolygon4 > *pSetOfBounds) const
 
PMMatrix GetGlyphTranslationMatrix (int32 glyphIndex) const
 
- Protected Member Functions inherited from CPMUnknown< IWaxRunShape >
 CPMUnknown (IPMUnknown *boss)
 

Protected Attributes

int32 fSelModeFlags
 
int32 fFlags
 
- Protected Attributes inherited from CPMUnknown< IWaxRunShape >
HelperInterface fHelperInterface
 

Additional Inherited Members

- Public Types inherited from IWaxRunShape
enum  { kDefaultIID = IID_IWAXRUNSHAPE }
 
enum  { kFlag_IsFirstStacked = 0x00000001, kFlag_IsLastStacked = 0x00000002, kFlag_ReservedForImplementors = 0xffff0000 }
 
- Public Attributes inherited from IWaxRunShape
enum IWaxRunShape:: { ... }  WaxRunFlags
 

Detailed Description

Base implementation of the IWaxRunShape interface.

See Also
IWaxRunShape, IWaxLineShape

Member Function Documentation

virtual bool16 CWaxRunShape::CalculateSimpleSpanWidth (int32 offset,
int32 length,
PMLineSegpSpanWidth 
) const
protectedvirtual
Return the width of the given "simple" wax span.  Simple means just look at the widths of the glyphs, without any special transformation, etc.

Parameters
offsetIN The desired start of the range
lengthIN The length of the range. If length == -1, the length is to the end of the run. If length == 0, then just return the line that falls just before offset (i.e. between the bounds of the previous glyph and this glyph), rather than the glyph bounds of the range.
Note
EXTREME CAUTION should be used when using this method as it assumes many xForms are identity (i.e. it ignores pretty much everything except glyph widths)
ALSO NOTE: the span must reside within an adjacent collection (a "line") of wax runs. It will NOT work on stacked collections.

Reimplemented in CWaxCollectionShape.

bool16 CWaxRunShape::DoPerGlyphBounds () const
protected

Returns whether or not GetPerGlyphBounds needs to be called or not.

virtual void CWaxRunShape::GetBorderShadingHeight (int32 mode,
PMLineSegpShadingHeight 
) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

virtual void CWaxRunShape::GetCaretLineAt (int32 offset,
PMLineSegpCaretLine,
const PMLineSegmaxTopBottom 
) const
virtual
Returns

Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

int32 CWaxRunShape::GetFlags () const
virtual
Return the flags set via SetFlags()

Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

PMMatrix CWaxRunShape::GetGlyphTranslationMatrix (int32 glyphIndex) const
protected
return the GlyphTranslationMatrix for the specified glyph.  Returns Identity if there is no matrix assigned.

Parameters
glyphIndexthe desired glyph within this run (relative to this run)
Returns
the matrix
virtual bool16 CWaxRunShape::GetHighlightBounds (int32 offset,
int32 length,
K2Vector< PMPolygon4 > * pSetOfBounds,
PMRecthighlightAdjust,
const PMLineSegmaxTopBottom 
) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

virtual bool16 CWaxRunShape::GetHighlightLine (PMLineSegpHighlightLine,
const PMLineSegmaxTopBottom 
) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

virtual void CWaxRunShape::GetInkBounds (PMRectpInkBounds,
Text::DrawPassInfoListpassList 
) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

virtual void CWaxRunShape::GetOwnerSelectionLine (PMLineSegpOwnerLine) const
inlineprotectedvirtual
Return the selection-height of the owner of this waxRun.

Parameters
pOwnerLineOUT The selection-height of the owner.
void CWaxRunShape::GetPerGlyphBounds (int32 offset,
int32 length,
PMLineSegpSpan,
K2Vector< PMPolygon4 > * pSetOfBounds 
) const
protected
For the given range of CHARACTERS within this run, return the set of bounds for each GLYPH in that range.

Use pSpan as a base for the height of each bounds and the actual glyph width for the width of the bounds.

Parameters
offsetIN The desired start of the range
lengthIN The length of the range
pSpanIN Specifies the base for the height of the returned bounds - this can be retrieved via the GetSelectionLine() method.
pSetOfBoundsOUT The set of bounds - 1 per glyph within the specified range.
Note
The input specifies the text index range (i.e. number of characters within the run), the output is the range of glyphs, which may or may not equal the number of characters. See IWaxGlyphs for more details.
Should only be called if DoPerGlyphBounds() returns kTrue
See Also
IWaxGlyphs
virtual bool16 CWaxRunShape::GetSelectionLine (PMLineSegpSelectionLine) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

virtual int32 CWaxRunShape::GetSelectionMode () const
virtual
Return the selection mode set via SetSelectionMode() restricted to IWaxLineShape::kFlag_SelectionMask.

Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

virtual void CWaxRunShape::GetTextInkBounds (PMRectpInkBounds) const
protectedvirtual
Retrieve the ink bounds of the text within this run.

Parameters
pInkBoundsOUT the bounds within which the ink will fall

Reimplemented in CWaxCollectionShape.

virtual void CWaxRunShape::GetWaxBounds (int32 offset,
int32 length,
K2Vector< PMPolygon4 > * pSetOfBounds 
) const
virtual
Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Reimplemented in CWaxCollectionShape.

PMReal CWaxRunShape::GetWaxOutlineAdjustment () const
protected
return the outline adjustment for this run, if any - it is used to calculate ink bounds, as the outline of the resulting glyphs needs to be taken into consideration.

Returns
the amount to be incorporated into the ink bounds.
Note
this is derived from the WaxRenderData associated with this run
void CWaxRunShape::SetFlags (int32 flags)
virtual
Just does a simple assignment, nothing special

Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

virtual void CWaxRunShape::SetSelectionMode (int32 mode)
virtual
Set the given mode restricted to IWaxLineShape::kFlag_SelectionMask.

Note
See IWaxRunShape for details on this method, its parameters and return values..

Implements IWaxRunShape.

Member Data Documentation

int32 CWaxRunShape::fFlags
protected

The IWaxRunShape::WaxRunFlags associated with this waxRun

int32 CWaxRunShape::fSelModeFlags
protected

The IWaxLineShape::SelectionFlags associated with this waxRun