![]() | InDesign SDK 20.5 |
#include <IWaxHitTest.h>

Public Types | |
| enum | { kDefaultIID = IID_IWAXHITTEST } |
| enum | HitTestPosition { kHitBefore = -1, kHitToTheRight = 0x7FFFFFFE, kHitBelow = 0x7FFFFFFF } |
Public Member Functions | |
| virtual PMReal | HitTestWax (PMPoint pt, PMLineSeg selection, int32 *charCount=nil) const =0 |
| virtual bool16 | GetLocationOf (int32 offset, PMPoint *pt, int32 innerPos, PMMatrix *pWaxToGlyphMatrix=nil) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Class providing translation from a text index relative to the waxLine to a point within the waxLine coordinate space or vice versa.
This enum provides exceptional return values for the translation of points to text indices.
| pure virtual |
Translate a text index relative to this object to a point in this object.
| offset | IN A valid offset in to the wax, or alternatively a value equal to the wax length. |
| pt | OUT If a valid offset, then pt is always adjusted to reflect the Wax X and Y Position, not necessarily where and how the glyph is actually drawn in the case of complex transformations (shears, TOP, etc). |
If offset is within the wax then pt is adjusted to reflect the left edge of the appropriate char. If offset is equal to the wax length AND this object was hit, then pt is adjusted to reflect the right edge of the last char.
| innerPos | IN Affects the "lean" of the index. For instance, if offset is equal to the wax length, then if this is non-zero this wax will not be considered to be hit (the next one will). If innerPos is 0, then this object will be hit and the last char will be used to determine the results. |
| pWaxToGlyphMatrix | OUT An optional return parameter which can be used to transform things (such as lines) to the actual glyph location. |
Implemented in CWaxCollectionHitTest.
| pure virtual |
Translate a point in this object waxLine to a text index relative to this object.
| pt | IN A point in Wax coordinate system. |
| selection | OUT A line designating the height of the selection. |
| charCount | OUT An optional return parameter returning the number of chars in this object. |
Additional information on return values: WaxRuns: If pt is above or to the left then the call returns kHitBefore. If pt is to the right then the call returns kHitToTheRight. If pt is below then the call returns kHitBelow. Otherwise the run is hit and the call returns the offset of the first glyph that is at or to the right of pt and pt is adjusted as follows: (the left of the glyph, selection bottom).
WaxLines: If pt is above or to the left then the call returns zero (0) and pt is adjusted to point to the first glyph on the line. If pt is below then the call returns kHitBelow as an indication to try the next line. If pt is within the bounds of the line, this call returns the offset of the closest glyph within the line and adjusts pt to point to the start of that glyph at the YPosition of the waxLine. If pt is within the bounds o the line, but to the right of the last glyph then this call returns the equivalent offset for the first glyph on the NEXT waxLine (if this would not be past the story thread boundry), adjusts pt to point to the end of the last glyph on the waxLine, and sets the endOfLine flag to kTrue.
Implemented in CWaxCollectionHitTest.