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

#include <IWaxRun.h>

Inheritance diagram for IWaxRun:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IWAXRUN }
 
enum  RunCharacteristics {
  kRunKinsoku_PushIn = 0x01, kRunKinsoku_PushOut = 0x02, kRunKinsoku_Any = 0x03, kTOPRun = 0x20,
  kEndsInHyphen = 0x40, kVerticalWritingMode = 0x80
}
 

Public Member Functions

virtual int32 GetCharCount () const =0
 
virtual int32 GetWaxSpan () const =0
 
virtual TextIndex TextOrigin () const =0
 
virtual PMReal GetWidth (bool16 ignoreAllTrailing=kFalse) const =0
 
virtual PMReal GetHeight () const =0
 
virtual PMReal GetXPosition () const =0
 
virtual void SetXPosition (const PMReal &xPos)=0
 
virtual PMReal GetYPosition () const =0
 
virtual void SetYPosition (const PMReal &yPos)=0
 
virtual PMMatrix GetTransform () const =0
 
virtual void SetTransform (const PMMatrix &xForm)=0
 
virtual PMMatrix GetToParcelContentMatrix () const =0
 
virtual PMMatrix GetToParcelMatrix () const =0
 
virtual PMMatrix GetToFrameMatrix () const =0
 
virtual PMMatrix GetToSpreadMatrix () const =0
 
virtual PMMatrix GetToPasteboardMatrix () const =0
 
virtual IWaxCollectionGetOwner () const =0
 
virtual void SetOwner (IWaxCollection *owner)=0
 
virtual const IWaxLineGetWaxLine () const =0
 
virtual IDataBaseGetDataBase () const =0
 
virtual bool16 IsVerticalWritingMode () const =0
 
virtual void SetVerticalWritingMode (bool16 mode)=0
 
virtual bool16 IsTOPRun () const =0
 
virtual void SetTOPRun (bool16 is)=0
 
virtual RunCharacteristics GetRunCharacteristics () const =0
 
virtual void SetRunCharacteristics (RunCharacteristics bits)=0
 
virtual bool16 SplitAt (int32 offsetInRun)=0
 
virtual void GetAdornments (int32 *num, const ClassID **iDs, const Text::DrawPriority **priority, const ITextAdornmentData ***data) const =0
 
virtual void SetAdornments (int32 num, ClassID *iDs, Text::DrawPriority *priority, ITextAdornmentData **data)=0
 
virtual bool16 FindAdornment (ClassID id, Text::DrawPriority *priority, ITextAdornmentData **data) const =0
 
virtual void AddAdornment (ClassID id, Text::DrawPriority priority, ITextAdornmentData *data)=0
 
virtual void RemoveAdornment (ClassID id)=0
 
virtual void ConstructionComplete ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface manages the wax that makes up a wax line. The attributes of the run are relative to the position of the parent wax line.

The waxRun is really a generic wax object. It can either be another collection (the waxLine has a collection, as do some J features) or be actual wax. Most roman text will not have collections of wax, just simple wax runs.

The run can hold glyphs or not, it can have rendering data or not. It all depends on the type of run and the type of glyphs within the run. See the Programming Guide for more information on the wax.

Note
All of the "set" methods are used only by wax-building code (i.e. a composer). Most use is accessing the static data set up by such code. It's extremely rare that any "set" methods will be used by external code.

Member Enumeration Documentation

The characteristics of a run. These provide easy access to some common attributes of the run.

Member Function Documentation

virtual void IWaxRun::AddAdornment (ClassID id,
Text::DrawPriority priority,
ITextAdornmentDatadata 
)
pure virtual

Add the given adornment and associated information to this run.

Parameters
idThe classID of the adorment itself.
priorityThe drawing priority of the adornment (when it will draw).
dataThe private data associated with the adornment.
See Also
ITextAdornment, ITextAdornmentData, and, although not wax-related, IGlobalTextAdornment
virtual void IWaxRun::ConstructionComplete ()
pure virtual

Automatically called when the building of this collection is finished. This is an internal API for the wax code - DO NOT USE!

virtual bool16 IWaxRun::FindAdornment (ClassID id,
Text::DrawPrioritypriority,
ITextAdornmentData ** data 
) const
pure virtual

Find the adornment, if any, matching the given id.

Parameters
idIN The adorment to look for
priorityOUT The priority of the adornment
dataOUT The data associated with the adornment.
See Also
ITextAdornment, ITextAdornmentData, and, although not wax-related, IGlobalTextAdornment
virtual void IWaxRun::GetAdornments (int32 * num,
const ClassID ** iDs,
const Text::DrawPriority ** priority,
const ITextAdornmentData *** data 
) const
pure virtual

Get the list of adornments attached to this run.

See Also
ITextAdornment, ITextAdornmentData, and, although not wax-related, IGlobalTextAdornment
virtual int32 IWaxRun::GetCharCount () const
pure virtual

Return the number of chars represented by this wax.

Note
this is not necessarily the number of glyphs.
virtual IDataBase* IWaxRun::GetDataBase () const
pure virtual

Returns the database containing this wax.

virtual PMReal IWaxRun::GetHeight () const
pure virtual

Return the (EmBox) height of the entire run. The returned height is relative to the waxRun (i.e. GetYPosition() is the origin)

Note
if you have an IWaxGlyphs interface, you can use that too.
virtual IWaxCollection* IWaxRun::GetOwner () const
pure virtual

GetOwner returns an IWaxCollection relating this run to its position in the wax, or nil for such "runs" as ruby and kenten, which are not part of the formal hierarchy. (Those "runs" look like wax objects, because they are compatible with the drawing code, but they are not within the wax hierarchy - they are adornments).

Note
For roman and most J text, this will return the waxLine's collection. For some J features, it'll return an intermediate collection.
virtual RunCharacteristics IWaxRun::GetRunCharacteristics () const
pure virtual

Get the set of characteristics for this run.

Note
Please note that in some cases (i.e. group runs) the above flags could ALL be set and include standard roman text (bits == 0). Thus, these only make sense on a leaf waxRun basis (in other words, only use this at draw time when given a run).
virtual PMMatrix IWaxRun::GetToFrameMatrix () const
pure virtual

Convenience methods for transforming outside the wax. Namely, to the position-of-the-frame coordinate space (e.g. where on the page it is).

virtual PMMatrix IWaxRun::GetToParcelContentMatrix () const
pure virtual

Convenience methods for transforming outside the wax. Namely, to the contents-of-the-parcel coordinate space (e.g. where in the parcel (column/cell) it is).

virtual PMMatrix IWaxRun::GetToParcelMatrix () const
pure virtual

Convenience methods for transforming outside the wax. Namely, to the position-of-the-parcel (column/cell) coordinate space (e.g. where in the table it is).

virtual PMMatrix IWaxRun::GetToPasteboardMatrix () const
pure virtual

Convenience methods for transforming outside the wax. Namely, to the pasteboard coordinate space (the global namespace).

virtual PMMatrix IWaxRun::GetToSpreadMatrix () const
pure virtual

Convenience methods for transforming outside the wax. Namely, to the spread coordinate space.

virtual PMMatrix IWaxRun::GetTransform () const
pure virtual

Return the transform matrix for this run. Each run in the collection is relative to its owner. This matrix can be used to translate the run (contents) out of its owner.

Note
This is just a convenience method for obtaining a matrix from the X and Y positions. The wax run does not support anything but x and y translation (no rotation, etc.) Thus, excluding those, the matrix should satisfy IsIdentity().
These work with the [GS]et[XY]Position methods and those can be used instead.
virtual const IWaxLine* IWaxRun::GetWaxLine () const
pure virtual

Returns the containing waxline for this run.

virtual int32 IWaxRun::GetWaxSpan () const
pure virtual

Return either the number of chars or glyph represented by this wax. If using World Ready composer the span is number of glyphs. Otherwise it is the number of characters.

virtual PMReal IWaxRun::GetWidth (bool16 ignoreAllTrailing = kFalse) const
pure virtual

Return the width of the entire run. The returned width is relative to the waxRun (i.e. GetXPosition() is the origin)

Note
if you have an IWaxGlyphs interface, you can use that too.
virtual PMReal IWaxRun::GetXPosition () const
pure virtual

Return the XPosition of the run. The glyphs will be drawn starting at this position. The returned position is relative to the waxLine

virtual PMReal IWaxRun::GetYPosition () const
pure virtual

Return the YPosition of the run. The glyphs will be drawn starting at this position. The returned position is relative to the waxLine

virtual bool16 IWaxRun::IsTOPRun () const
pure virtual

Return whether or not this run is on a path

See Also
Text-on-a-Path
virtual bool16 IWaxRun::IsVerticalWritingMode () const
pure virtual

Return whether or not this run will be drawn using vertical writing mode (CJK upright glyphs, vertical rotated Roman)

Note
Roman text drawn in a vertical line is horizontal writing mode
TCY text is horizontal writing mode
virtual void IWaxRun::RemoveAdornment (ClassID id)
pure virtual

Remove the adornment, if any, matching the given id.

Parameters
idIN The adorment to look for
See Also
ITextAdornment, ITextAdornmentData, and, although not wax-related, IGlobalTextAdornment
virtual void IWaxRun::SetAdornments (int32 num,
ClassIDiDs,
Text::DrawPrioritypriority,
ITextAdornmentData ** data 
)
pure virtual

Set the list of adornments attached to this run.

See Also
ITextAdornment, ITextAdornmentData, and, although not wax-related, IGlobalTextAdornment
virtual void IWaxRun::SetOwner (IWaxCollectionowner)
pure virtual

Specify the owner of this run.

virtual void IWaxRun::SetRunCharacteristics (RunCharacteristics bits)
pure virtual

Set (overwrite) the characteristics for this run.

Note
Please note that in some cases (i.e. group runs) the above flags could ALL be set and include standard roman text (bits == 0). Thus, these only make sense on a leaf waxRun basis (in other words, only use this at draw time when given a run).
virtual void IWaxRun::SetTOPRun (bool16 is)
pure virtual

Specify whether or not this run is on a path.

Note
This should only be used by code that builds up the wax (i.e. a composer).
See Also
Text-on-a-Path
virtual void IWaxRun::SetTransform (const PMMatrixxForm)
pure virtual

Specify the transform matrix for this run. It should only contain translations for the overall X and Y run offsets.

Note
This is just a convenience method for using a matrix containing the x and y translations. The wax run does not support anything but x and y translation (no rotation, etc.) Thus, excluding those, the matrix should satisfy IsIdentity().
These work with the [GS]et[XY]Position methods and those can be used instead.
virtual void IWaxRun::SetVerticalWritingMode (bool16 mode)
pure virtual

Specify vertical writing for this run.

virtual void IWaxRun::SetXPosition (const PMRealxPos)
pure virtual

Specify the XPosition of the run. It must be relative to the waxLine.

virtual void IWaxRun::SetYPosition (const PMRealyPos)
pure virtual

Specify the YPosition of the run. It must be relative to the waxLine

virtual bool16 IWaxRun::SplitAt (int32 offsetInRun)
pure virtual

Split this run at the specified offset.

Returns
Whether or not the split was successful
virtual TextIndex IWaxRun::TextOrigin () const
pure virtual

Return the text index of this run.

Note
This is just a convenience method that asks the waxLine itself.