InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IWaxGlyphIterator Class Referenceabstract

#include <IWaxGlyphIterator.h>

Public Member Functions

virtual void Reset ()=0
 
virtual IWaxGlyphsAdvance ()=0
 
virtual IWaxGlyphsRecede ()=0
 
virtual bool16 AdvanceToContainer (const IWaxGlyphs *waxGlyphs)=0
 
virtual IWaxGlyphsGetWaxGlyphsContainer ()=0
 
virtual IWaxRunGetWaxRun ()=0
 
virtual void GetGlyphMatrix (PMMatrix *matrix, PMPoint *penCorrection)=0
 
virtual void GetRunMatrix (PMMatrix *matrix)=0
 
virtual Text::GlyphID GetGlyphID () const =0
 
virtual uint32 GetGlyphOffset () const =0
 
virtual TextIndex GetGlyphTextIndex () const =0
 
virtual void SetPerGlyphMatrix (PMMatrix mat, PMPoint penCorrection)=0
 

Detailed Description

Interface for iterating through glyphs - returned via IWaxLine - this object must be delete'd when finished.

This is not derived from IPMUnknown. It is allocated on the heap so the caller is responsible for deleting the object once it is no longer required.

An IWaxGlyphIterator is returned from IWaxLine::QueryWaxGlyphIterator(). The returned object must be delete'd. Typical usage is:


K2::scoped_ptr<IWaxGlyphIterator> iter(waxLine->QueryWaxGlyphIterator());

Note
This iterator cannot be used to navigate the wax, you have no idea where in the wax hierarchy this glyph or set of glyphs is. It should only be used to visit each glyph. Note also that there may be no glyphs for a given text index (e.g. ILG) or there may be several (e.g. the hypen at end of line).
See Also
IWaxRun
IWaxGlyphs

Member Function Documentation

virtual IWaxGlyphs* IWaxGlyphIterator::Advance ()
pure virtual

Advance to the next glyph

Note
The IWaxGlyphs interfaces returned by these methods are only valid until the next Advance* method call, Recede* method call or the destruction of the IWaxGlyphIterator, whichever comes first.
IN OTHER WORDS, the returned interface is not reference counted.
Returns
the container (IWaxGlyphs object) for this glyph position, nil if at end of glyphs.
virtual bool16 IWaxGlyphIterator::AdvanceToContainer (const IWaxGlyphswaxGlyphs)
pure virtual

Advance to the given container.

Returns
kTrue if successful
kFalse probably means waxGlyphs isn't in this waxLine.
virtual void IWaxGlyphIterator::GetGlyphMatrix (PMMatrixmatrix,
PMPointpenCorrection 
)
pure virtual

Return the given matrix to represent the current glyph in this run relative to the waxLine. This matrix incorporates the EachGlyphMatrix and the position of the glyph in the run.

For instance, the XPosition value of the matrix represents the x-offset of this glyph from the start of the line.

virtual uint32 IWaxGlyphIterator::GetGlyphOffset () const
pure virtual
Returns
The offset within the WaxGlyphs container of the current position.
virtual TextIndex IWaxGlyphIterator::GetGlyphTextIndex () const
pure virtual
Returns
The TextIndex associated with the current glyph position. Note that due to glyph mapping the order of the TextIndexes returned may not be the monotonically increasing nor will they necessarily change for every call to Advance().
virtual void IWaxGlyphIterator::GetRunMatrix (PMMatrixmatrix)
pure virtual

Return the given matrix to represent the transformation of this run relative to the line.

For instance, the XPosition value of the matrix represents the x-offset of this run from the start of the line.

virtual IWaxGlyphs* IWaxGlyphIterator::GetWaxGlyphsContainer ()
pure virtual

Return the (un-reference counted) container for this glyph position.

Note
The IWaxGlyphs interfaces returned by these methods are only valid until the next Advance* method call or the destruction of the IWaxGlyphIterator, whichever comes first.
IN OTHER WORDS, the returned interface is not reference counted.
Returns
the container, or nil if at end of glyphs.
virtual IWaxRun* IWaxGlyphIterator::GetWaxRun ()
pure virtual

Return the (un-reference counted) wax run associated with this glyph position.

Note
The IWaxRun interfaces returned by these methods are only valid until the next Advance* method call or the destruction of the IWaxRunIterator, whichever comes first.
IN OTHER WORDS, the returned interface is not reference counted.
Returns
the object, or nil if at end of glyphs.
virtual IWaxGlyphs* IWaxGlyphIterator::Recede ()
pure virtual

Recede to the previous glyph

Note
The IWaxGlyphs interfaces returned by these methods are only valid until the next Advance* method call, Recede* method call or the destruction of the IWaxGlyphIterator, whichever comes first.
IN OTHER WORDS, the returned interface is not reference counted.
Returns
the container (IWaxGlyphs object) for this glyph position, nil if at end of glyphs.
virtual void IWaxGlyphIterator::Reset ()
pure virtual

Reset to the first glyph.

virtual void IWaxGlyphIterator::SetPerGlyphMatrix (PMMatrix mat,
PMPoint penCorrection 
)
pure virtual

Update the per-glyph's matrix to this - it is an independent modification of the AllGlyphsMatrix. Matrix must be line relative (e.g. GetGlyphMatrix's includeLine parameter was kFalse).