InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FrmLblAdornment Class Reference
Inheritance diagram for FrmLblAdornment:
CPMUnknown< IAdornmentShape >IAdornmentShapeIPMUnknown

Public Member Functions

 FrmLblAdornment (IPMUnknown *boss)
 
 ~FrmLblAdornment ()
 
virtual AdornmentDrawOrder GetDrawOrderBits ()
 
virtual void DrawAdornment (IShape *iShape, AdornmentDrawOrder drawOrder, GraphicsData *gd, int32 flags)
 
virtual PMRect GetPaintedAdornmentBounds (IShape *iShape, AdornmentDrawOrder drawOrder, const PMRect &itemBounds, const PMMatrix &innertoview)
 
virtual PMRect GetPrintedAdornmentBounds (IShape *iShape, AdornmentDrawOrder drawOrder, const PMRect &itemBounds, const PMMatrix &innertoview)
 
virtual void Inval (IShape *iShape, AdornmentDrawOrder drawOrder, GraphicsData *gd, ClassID reasonForInval, int32 flags)
 
virtual PMReal GetPriority ()
 
virtual void AddToContentInkBounds (IShape *iShape, PMRect *inOutBounds)
 
virtual bool16 WillDraw (IShape *iShape, AdornmentDrawOrder drawOrder, GraphicsData *gd, int32 flags)
 
virtual bool16 WillPrint (void)
 
virtual bool16 HitTest (IShape *iShape, AdornmentDrawOrder adornmentDrawOrder, IControlView *layoutView, const PMRect &r)
 
- Public Member Functions inherited from CPMUnknown< IAdornmentShape >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Public Types inherited from IAdornmentShape
enum  { kDefaultIID = IID_IADORNMENTSHAPE }
 
enum  AdornmentDrawOrder {
  kNone = 0, kBeforeShape = 1, kAfterFill = 2, kBeforeTextBackground = 4,
  kBeforeText = 8, kBeforeTextForeground = 16, kAfterTextForeground = 32, kBeforeStroke = 64,
  kAfterStroke = 128, kAfterShape = 256, kBeforeFill = 512, kBeforeContent = 1024,
  kAfterContent = 2048, kAfterEndShape = 4096, kAfterSpread = 8192, kAllAdornmentFlags = 16383
}
 
enum  AdornmentDrawNumber { kNumberOfAdornments = 14 }
 
- Protected Member Functions inherited from CPMUnknown< IAdornmentShape >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< IAdornmentShape >
HelperInterface fHelperInterface
 

Detailed Description

Provides the adornment implementation to draw a text label on drawable page items; implements IAdornmentShape.

Constructor & Destructor Documentation

FrmLblAdornment::FrmLblAdornment (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.
FrmLblAdornment::~FrmLblAdornment ()

Destructor.

Member Function Documentation

virtual void FrmLblAdornment::AddToContentInkBounds (IShapeiShape,
PMRectinOutBounds 
)
inlinevirtual

Adornments can modify their inking bounds if they exceed the content bounds. For example, if content adds a drop shadow under some conditions, then the inking bounds would be different than the painted bbox calculated in this class. (Which is based on the adornment text and fonts, etc.) This class doesn't support any inking changes that would make the inking bounds different from the painted bbox, so we just have a do-nothing implementation.

Parameters
iShapeIN Points to interface on page item boss to which this adornment is applied.
inOutBoundsIN Points to rectangle describing the current ink bounds. Modify this PMRect to reflect accurate ink bounds.

Implements IAdornmentShape.

void FrmLblAdornment::DrawAdornment (IShapeiShape,
AdornmentDrawOrder drawOrder,
GraphicsDatagd,
int32 flags 
)
virtual

Draws the adornment in the inner coordinates of the page item to which this adornment is attached. Note that for the draw to work correctly, it must be within the bounds reported by GetPaintedBBox() below. It's confusing, because we draw in the page item's inner coordinates, but we report bounds in the view coordinates.

Parameters
iShapePtr to page item requesting this adornment to draw. Handy for getting information about the owning page item, such as its bounding box.
drawOrderTells the adornment when in the (AdornmentDrawOrder) sequence it's being asked to draw. Used when an adornment is registered for more than one point in the draw order.
gdGraphics data structure. Used to acquire the drawing port, view, draw manager, etc.
flagsIShape flags describing mode of draw: dynamic, printing, patient user, etc. Used for deciding when an adornment should not draw, or draw differently to a particular port. For example, draw to the screen but not to print.

Implements IAdornmentShape.

IAdornmentShape::AdornmentDrawOrder FrmLblAdornment::GetDrawOrderBits ()
virtual

Tells the draw manager when in the drawing sequence the adornment should be asked to draw.

Returns
Enum describing when this adornment should be drawn as part of the draw sequence. See IAdornmentShape.h.

Implements IAdornmentShape.

PMRect FrmLblAdornment::GetPaintedAdornmentBounds (IShapeiShape,
AdornmentDrawOrder drawOrder,
const PMRectitemBounds,
const PMMatrixinnertoview 
)
virtual

Reports the dimensions of the adornment in the coordinates of the view in which this adornment will draw. Note the bounds reported by this method must accurately reflect the bounds used by Draw(). It's confusing, because we draw in the page item's inner coordinates, but we report bounds in the view coordinates.

Parameters
iShapePtr to page item requesting this adornment to draw. Handy for getting information about the owning page item, such as its bounding box.
drawOrderTells the adornment when in the (AdornmentDrawOrder) sequence it's being asked to draw. Used when an adornment is registered for more than one point in the draw order.
itemBoundsThe painted bounds of the owing page item in the page item's inner coordinates.
innertoviewThe transformation from the inner bounds coordinates of the page item to which this adornment is attached, to the coordinate system of the view in which the adornment will appear.

Implements IAdornmentShape.

PMRect FrmLblAdornment::GetPrintedAdornmentBounds (IShapeiShape,
AdornmentDrawOrder drawOrder,
const PMRectitemBounds,
const PMMatrixinnertoview 
)
virtual

GetPrintedAdornmentBounds returns the printed bounds of the adorment.

Parameters
iShapeIN The shape that's being adorned.
drawOrderIN The current draw order bits.
itemBoundsIN The bounds of the adorned object.
innertoviewIN The inner to view matrix.

Implements IAdornmentShape.

virtual PMReal FrmLblAdornment::GetPriority ()
inlinevirtual

Adornments affect when they are called by the priority value they return via their GetPriority() method. Higher priorities (smaller numbers) are called before lower priorities (larger numbers).

Returns
Always returns the highest priority.

Implements IAdornmentShape.

virtual bool16 FrmLblAdornment::HitTest (IShapeiShape,
AdornmentDrawOrder adornmentDrawOrder,
IControlViewlayoutView,
const PMRectr 
)
inlinevirtual
void FrmLblAdornment::Inval (IShapeiShape,
AdornmentDrawOrder drawOrder,
GraphicsDatagd,
ClassID reasonForInval,
int32 flags 
)
virtual

Here for completeness. See IAdornmentShape for an explanation.

Implements IAdornmentShape.

virtual bool16 FrmLblAdornment::WillDraw (IShapeiShape,
AdornmentDrawOrder drawOrder,
GraphicsDatagd,
int32 flags 
)
inlinevirtual

Adornments can declare they want to draw in TextOffscreen mode. This will suspend drawing of offscreen drawing, so the default is to not draw during text offscreen mode. See the Draw() documentation for an explanation of parameters.

Implements IAdornmentShape.

virtual bool16 FrmLblAdornment::WillPrint (void )
inlinevirtual