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

#include <IWaxCollection.h>

Inheritance diagram for IWaxCollection:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IWAXCOLLECTION }
 
enum  WaxCollectionOrientation { kWCOAdjacent, kWCOStacked }
 

Public Member Functions

virtual int32 Count () const =0
 
virtual IWaxRunQueryRun (int32 index) const =0
 
virtual int32 GetRunIndex (const IWaxRun *run) const =0
 
virtual TextIndex TextOrigin () const =0
 
virtual void GetHeight (PMLineSeg *pHeight) const =0
 
virtual IDataBaseGetDataBase () const =0
 
virtual const IWaxLineGetWaxLine () const =0
 
virtual void SetWaxLine (const IWaxLine *waxLine)=0
 
virtual void AddRun (IWaxRun *run)=0
 
virtual void AddRunAt (IWaxRun *run, int32 at)=0
 
virtual void RemoveAllRuns ()=0
 
virtual IWaxRunQueryPreviousNeighbor (const IWaxRun *waxRun) const =0
 
virtual IWaxRunQueryNextNeighbor (const IWaxRun *waxRun) const =0
 
virtual enum
WaxCollectionOrientation 
GetOrientation () const =0
 
virtual void SetOrientation (enum IWaxCollection::WaxCollectionOrientation orientation)=0
 
virtual IWaxGlyphIteratorQueryWaxGlyphIterator (bool16 includeCollection=kFalse) const =0
 
virtual IWaxRunIteratorQueryWaxRunIterator (bool16 includeCollection=kFalse) const =0
 
virtual PMMatrix GetTransform () const =0
 
virtual PMMatrix GetToParcelMatrix () const =0
 
virtual PMMatrix GetToFrameMatrix () const =0
 
virtual PMMatrix GetToSpreadMatrix () const =0
 
virtual PMMatrix GetToPasteboardMatrix () const =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

Data repository for the various groups of runs (WaxLine, Warichu, TCY).

A collection is a set of wax objects.
A wax object is a waxRun or a waxCollection, both of which implement the IWaxRun interface.

Collections orientate their objects either horizontally (adjacent) or vertically (stacked).
Stacked objects typically have the same x origin, and adjacent objects typically start their x-offset at the end of the previous object.

Member Enumeration Documentation

The orientation specifies how neighbors are related. Currently neighbors are stacked on top of each other, or placed next to each other.

Member Function Documentation

virtual void IWaxCollection::AddRun (IWaxRunrun)
pure virtual

Add the given wax object to the collection.

Note
The run should be fully initialized before adding to the collection.
These methods also set the owner and waxLine references. (Thus, SetWaxLine() must already have been called).
These methods may also query the run or any other interfaces for information (e.g. positioning, xForms, etc.)
virtual void IWaxCollection::AddRunAt (IWaxRunrun,
int32 at 
)
pure virtual

Add the given wax object to the collection at the specified location (this object becomes that index).

Note
The run should be fully initialized before adding to the collection.
These methods also set the owner and waxLine references. (Thus, SetWaxLine() must already have been called).
These methods may also query the run or any other interfaces for information (e.g. positioning, xForms, etc.)
virtual void IWaxCollection::ConstructionComplete ()
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. Construction of this object is done. Performs any post processing necessary (including notifying other objects).

Call when the building of this collection is finished. Some collections would like to use a cache for heights and other things. This tells them when they can build it.

Note
this is NOT optional - you must call this after the last object has been added to the collection.
virtual int32 IWaxCollection::Count () const
pure virtual

Return the number of wax objects in this collection.

virtual IDataBase* IWaxCollection::GetDataBase () const
pure virtual

Return the database associated with the objects in the collection.

virtual void IWaxCollection::GetHeight (PMLineSegpHeight) const
pure virtual

Return the overall collection's height. - relative to the baseline

virtual enum WaxCollectionOrientation IWaxCollection::GetOrientation () const
pure virtual

Return the orientation of this collection.

virtual int32 IWaxCollection::GetRunIndex (const IWaxRunrun) const
pure virtual

Return the index for the given object in the collection (object to index conversion)

virtual PMMatrix IWaxCollection::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 IWaxCollection::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 IWaxCollection::GetToPasteboardMatrix () const
pure virtual

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

virtual PMMatrix IWaxCollection::GetToSpreadMatrix () const
pure virtual

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

virtual PMMatrix IWaxCollection::GetTransform () const
pure virtual

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

virtual const IWaxLine* IWaxCollection::GetWaxLine () const
pure virtual

Return the (unreference-counted) IWaxLine in which this collection resides.

virtual IWaxRun* IWaxCollection::QueryNextNeighbor (const IWaxRunwaxRun) const
pure virtual

Return the (reference-counted) neighbor that resides (logically) after to this object. Return nil if at end of collection.

virtual IWaxRun* IWaxCollection::QueryPreviousNeighbor (const IWaxRunwaxRun) const
pure virtual

Return the (reference-counted) neighbor that resides (logically) prior to this object. Return nil if at beginning of collection.

virtual IWaxRun* IWaxCollection::QueryRun (int32 index) const
pure virtual

Return the (reference-counted) IWaxRun representing the object at the given index (index to object conversion)

virtual IWaxGlyphIterator* IWaxCollection::QueryWaxGlyphIterator (bool16 includeCollection = kFalse) const
pure virtual

QueryWaxGlyphIterator provides iteration through all the glyphs in this collection. It may not visit every run, since not all runs contain glyphs. if includeCollection is true, then the Matrix will include the collection's transform (thereby converting to parcel coordinates if this collection was a WaxLine)

virtual IWaxRunIterator* IWaxCollection::QueryWaxRunIterator (bool16 includeCollection = kFalse) const
pure virtual

QueryWaxRunIterator only iterates the leaf waxRuns - basically it just hides the wax hierarchy, providing access to the glyphs (or other "drawn" data). if includeCollection is true, then the Matrix will include the collection's transform (thereby converting to parcel coordinates if this collection was a WaxLine)

virtual void IWaxCollection::RemoveAllRuns ()
pure virtual

Remove all wax objects from this collection.

virtual void IWaxCollection::SetOrientation (enum IWaxCollection::WaxCollectionOrientation orientation)
pure virtual

Set the orientation of this collection.

virtual void IWaxCollection::SetWaxLine (const IWaxLinewaxLine)
pure virtual

Set the IWaxLine in which this collection resides.

The line is NOT reference counted.

virtual TextIndex IWaxCollection::TextOrigin () const
pure virtual

Return the TextIndex for the start of this collection.