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

Public Types | |
| enum | { kDefaultIID = IID_IGLOBALTEXTADORNMENT } |
Public Member Functions | |
| virtual Text::DrawPriority | GetDrawPriority ()=0 |
| virtual bool16 | GetCheckIsActive ()=0 |
| virtual bool16 | GetIsActive (const IParcelShape *parcelShape, const ITextOptions *textOptions, int32 iShapeFlags)=0 |
| virtual bool16 | GetCheckCouldDraw ()=0 |
| virtual bool16 | GetCouldDraw (const IWaxRun *waxRun, const IWaxRenderData *waxRenderData, const IWaxGlyphs *waxGlyphs)=0 |
| virtual bool16 | GetHasInkBounds ()=0 |
| virtual void | GetInkBounds (PMRect *inkBounds, const IWaxRun *waxRun, const IWaxRenderData *waxRenderData, const IWaxGlyphs *waxGlyphs)=0 |
| virtual void | Draw (GraphicsData *gd, int32 iShapeFlags, const IWaxRun *waxRun, const IWaxRenderData *waxRenderData, const IWaxGlyphs *waxGlyphs)=0 |
| virtual void | StartOfParcelDraw (GraphicsData *gd, int32 iShapeFlags, const IParcelShape *parcelShape)=0 |
| virtual void | EndOfParcelDraw (GraphicsData *gd, int32 iShapeFlags, const IParcelShape *parcelShape)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
GlobalTextAdornments are a special kind of TextAdornments in that they are treated as if they were attached to every WaxRun, with the exception that they never have run specific data adornment data.
The best example of the application of a GlobalTextAdornment is the ShowInvisibles function. This Adornment will draw special symbols to represent the hidden text characters (paragraph markers, spaces, etc) in a composed line. The drawing of these symbols is triggered by a menu pick and we of course cannot require recomposition in order to attach adornments to individual runs. Implemented as a global adornment, the adornment can have the behavior as if was attached to all the runs but only get called when it says so by having its GetIsActive() method query the state of the menu pick.
| pure virtual |
The adornment is allowed to draw.
| gd | Pointer to the GraphicsData. |
| iShapeFlags | The value of the flags parameter passed into IShape::Draw. |
| waxRun | : the run in question |
| waxRenderData | : drawing data for the run (font, color, etc.) can be nil (e.g. inline graphic) |
| waxGlyphs | : glyph interface for the run. can be nil (e.g. inline graphic) |
| pure virtual |
Notification that the Parcel has finished the pass.
| gd | Pointer to the GraphicsData. |
| iShapeFlags | The value of the flags parameter passed into IShape::Draw. |
| parcelShape | : Note that parcelShape MAY NOT be a UID based object. |
| pure virtual |
see GetCouldDraw
| pure virtual |
| pure virtual |
The Adornment is asked if it could like to draw on the particular run. This is NOT a question about whether the adornment is active or not, rather if an adornment didn't want to draw on any of the runs in a particular parcel then that adornment would never be called.
All non-global adornments by definition would like to draw because they are attached to the runs so they never need to be asked this question.
This method helps us optimize the calling of global adorments which are implemented as "triggers" to things in the Wax. Take, for example, the HnJViolations global adornment. It only wants to draw if the WaxLine has HnJViolations AND the appropriate menu pick has occured. So it wants to be able to avoid being called to draw when none of the WaxLines in the frame have any violations even through the menu pick may be active.
| waxRun | : the run in question |
| waxRenderData | : drawing data for the run (font, color, etc.) can be nil (e.g. inline graphic) |
| waxGlyphs | : glyph interface for the run. can be nil (e.g. inline graphic) |
| pure virtual |
Returns the Draw priority of the adornment which is used for z-ordering
| pure virtual |
| pure virtual |
The Adornment is asked if it has ink bounds. Again, this is NOT a question about whether the adornment is active or not, rather if an adornment didn't want to draw on any of the runs in a particular parcel then that adornment would never be called.
If the Adornment never creates ink that exceeds the standard ink bounds of the run (ie the selection bounds) then it does not have to provide ink bounds.
| inkBounds,: | rectange to set with ink bounds. NOTE: The inkBounds are passed in empty. If your adornment is guaranteed to draw within the Text bounds of the run and the vertical selection bounds of the line then you DO NOT have to return anything for the inkBounds, just leave them unchanged (empty). |
| waxRun | : the run in question |
| waxRenderData | : drawing data for the run (font, color, etc.) can be nil (e.g. inline graphic) |
| waxGlyphs | : glyph interface for the run. can be nil (e.g. inline graphic) |
| pure virtual |
The purpose of this method is to give the Parcel a chance to avoid passes and calling adornments that aren't needed. If, for example, a particular adornment was the only one needing to be called on a particular pass and the adornment wouldn't be drawing because of some global state, by returning kFalse the pass could be avoided.
Global adornments which indicate they are not active will NOT be called to Draw.
| parcelShape | : the parcel this text is in. It MAY NOT be a UID based object. |
| textOptions | : pointer to the document's text options |
| iShapeFlags | : Two important IShape flags must be observed: IShape::kPrinting If set, indicates that we are printing. IShape::kPreviewMode If set, indicates that we are previewing printing to the screen, global adornments that do not draw when printing should not draw for this either |
| pure virtual |
Notification that the Parcel has started the pass.
| gd | Pointer to the GraphicsData. |
| iShapeFlags | The value of the flags parameter passed into IShape::Draw. |
| parcelShape | : Note that parcelShape MAY NOT be a UID based object. |