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

#include <IAnchoredObjectData.h>

Inheritance diagram for IAnchoredObjectData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IANCHOREDOBJECTDATA }
 
enum  AnchoredPosition { kStandardInline, kAnchoredObject, kAboveLine }
 
enum  AnchoredHorizontal { kRightSide, kCenter, kLeftSide, kTextAlignment }
 
enum  AnchoredVertical { kObjectTop, kObjectCenter, kObjectBottom }
 
enum  VerticalAnchorPointObject {
  kColumnRelativeV, kFrameRelativeV, kMarginRelativeV, kPageRelativeV,
  kLineBaseline, kLineXHeight, kLineCapheight, kLineAscent,
  kLineLeading, kEmBoxTop, kEmBoxMiddle, kEmBoxBottom
}
 
enum  HorizontalAnchorPointObject {
  kColumnRelativeH, kFrameRelativeH, kMarginRelativeH, kPageRelativeH,
  kAnchorRelativeH
}
 
enum  {
  kCmdSelector_Position = 0x0100, kCmdSelector_AnchorTypeH = 0x0200, kCmdSelector_ObjectH = 0x0400, kCmdSelector_RelativeH = 0x0800,
  kCmdSelector_AnchorTypeV = 0x01000, kCmdSelector_ObjectV = 0x02000, kCmdSelector_RelativeV = 0x04000, kCmdSelector_XOffset = 0x08000,
  kCmdSelector_YOffset = 0x010000, kCmdSelector_SpineRelative = 0x020000, kCmdSelector_YOffsetAbove = 0x040000, kCmdSelector_PinPosition = 0x080000,
  kCmdSelector_LockPosition = 0x0100000
}
 

Public Member Functions

virtual void SetPosition (IAnchoredObjectData::AnchoredPosition position)=0
 
virtual
IAnchoredObjectData::AnchoredPosition 
GetPosition () const =0
 
virtual void SetSpineRelative (bool16 spineRelative)=0
 
virtual bool16 GetSpineRelative () const =0
 
virtual void SetAnchorTypeHorizontal (IAnchoredObjectData::HorizontalAnchorPointObject location)=0
 
virtual
IAnchoredObjectData::HorizontalAnchorPointObject 
GetAnchorTypeHorizontal () const =0
 
virtual void SetObjectHorizontal (IAnchoredObjectData::AnchoredHorizontal align)=0
 
virtual
IAnchoredObjectData::AnchoredHorizontal 
GetObjectHorizontal () const =0
 
virtual void SetAnchorPtHorizontal (IAnchoredObjectData::AnchoredHorizontal align)=0
 
virtual
IAnchoredObjectData::AnchoredHorizontal 
GetAnchorPtHorizontal () const =0
 
virtual void SetAnchorTypeVertical (IAnchoredObjectData::VerticalAnchorPointObject location)=0
 
virtual
IAnchoredObjectData::VerticalAnchorPointObject 
GetAnchorTypeVertical () const =0
 
virtual void SetObjectVertical (IAnchoredObjectData::AnchoredVertical align)=0
 
virtual
IAnchoredObjectData::AnchoredVertical 
GetObjectVertical () const =0
 
virtual void SetAnchorPtVertical (IAnchoredObjectData::AnchoredVertical align)=0
 
virtual
IAnchoredObjectData::AnchoredVertical 
GetAnchorPtVertical () const =0
 
virtual void SetXOffset (PMReal xoffset)=0
 
virtual void SetYOffset (PMReal yoffset)=0
 
virtual PMPoint GetOffset () const =0
 
virtual void SetYOffsetAbove (PMReal yoffset)=0
 
virtual PMReal GetYOffsetAbove () const =0
 
virtual void SetPinPosition (bool16 pinPos)=0
 
virtual bool16 GetPinPosition () const =0
 
virtual void SetLockPosition (bool16 lockPos)=0
 
virtual bool16 GetLockPosition () const =0
 
virtual bool16 CalculateWaxLineImpact (PMReal lineHeight, PMReal &width, PMReal &height, PMReal &leftStrokeOffset) const =0
 
virtual bool16 RegisterInlineAt (const IWaxLine *waxLine, const IParcel *pParcel, PMMatrix &waxToILGMatrix) const =0
 
virtual bool16 AdjustInkBounds (PMRect &bounds) const =0
 
virtual bool16 AdjustLineBounds (PMLineSeg &line) const =0
 
virtual bool16 SpineRelativePositionFlipped () const =0
 
virtual void CopyData (IAnchoredObjectData *pCopyTo) const =0
 
virtual bool16 NeedsRecalculation () const =0
 
virtual void ForceRecalculation ()=0
 
virtual void CobaltFixupInlines ()=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

IAnchoredObjectData is the data interface on page items that are anchored at a text location. Originally, pageitems could only be "inline": graphics that flowed in the line of text. Now, the pageitems can be inline, or above the line, or anchored to a line, page or frame specific location. This interface specifies the layout rules to apply and has methods to calculate the position.

Member Enumeration Documentation

anonymous enum

used by the ChangeAnchoredObjectCmd's IIntData interface to control which fields to set

horizontal placement

what is the object positioned relative to the horizontal axis

what is the object positioned relative to the vertical axis

Member Function Documentation

virtual bool16 IAnchoredObjectData::AdjustInkBounds (PMRectbounds) const
pure virtual

Adjust the ink bounds of the inline graphic if it was re-positioned

Parameters
boundsin the bounding box of the inline graphic.
Returns
kTrue if the bounding box was changed.
virtual bool16 IAnchoredObjectData::AdjustLineBounds (PMLineSegline) const
pure virtual

Adjust the line bounds (selection, caret bounds) of the inline graphic if it was re-positioned

Parameters
boundsin the bounding box of the inline graphic.
Returns
kTrue if the bounding box was changed.
virtual bool16 IAnchoredObjectData::CalculateWaxLineImpact (PMReal lineHeight,
PMRealwidth,
PMRealheight,
PMRealleftStrokeOffset 
) const
pure virtual

For composition – returns data about the inline graphic for composition.

Parameters
lineHeightis the height of the line containing the inline.
inlineWidthis used to report back the width of the inline for composition. This width will include the effect of text wrap.
heightis used to report the height of the inline above the baseline.
leftStrokeOffsetis used to report the offset measured from the left side of the of the inlineWidth to the left side of the inline. The inline always adjusts itself so that its left bottom stroke corner is at 0.0. This will be the pen position for drawing the inline and may be negative.
Returns
kTrue is returned when the object has width or height. A true inline will have width and height, an above line anchored object will have only height and an true anchored object will have neither.
virtual void IAnchoredObjectData::CobaltFixupInlines ()
pure virtual

Adobe internal use only.

virtual void IAnchoredObjectData::CopyData (IAnchoredObjectDatapCopyTo) const
pure virtual

Copy these values TO the passed in interface.

Parameters
pCopyTois filled out with the current interface's values.
virtual void IAnchoredObjectData::ForceRecalculation ()
pure virtual

Force the position to be recalculated.

virtual IAnchoredObjectData::AnchoredHorizontal IAnchoredObjectData::GetAnchorPtHorizontal () const
pure virtual

Get which horizontal point OF THE REFERENCE to align to (AnchorTypeHorizontal).

Returns
specifies which horizontal point to use.
virtual IAnchoredObjectData::AnchoredVertical IAnchoredObjectData::GetAnchorPtVertical () const
pure virtual

Get which vertical point OF THE REFERENCE to align to (AnchorTypeVertical).

Returns
specifies which vertical point to use.
virtual IAnchoredObjectData::HorizontalAnchorPointObject IAnchoredObjectData::GetAnchorTypeHorizontal () const
pure virtual

Get which location the horizontal position is based upon.

Returns
which point the object's horizontal position is relative to.
virtual IAnchoredObjectData::VerticalAnchorPointObject IAnchoredObjectData::GetAnchorTypeVertical () const
pure virtual

Get which location the vertical position is based upon.

Returns
specifies which point the object's vertical position is relative to.
virtual bool16 IAnchoredObjectData::GetLockPosition () const
pure virtual

Get whether the anchored object's position should be locked. This is a shortcut to applying the "Lock Object" functionality and is identical.

Returns
whether to set locking for the anchored object.
virtual IAnchoredObjectData::AnchoredHorizontal IAnchoredObjectData::GetObjectHorizontal () const
pure virtual

Get which horizontal point OF THE OBJECT to align to.

Returns
which horizontal point to use.
virtual IAnchoredObjectData::AnchoredVertical IAnchoredObjectData::GetObjectVertical () const
pure virtual

Get which vertical point OF THE OBJECT to align to.

Returns
specifies which vertical point to use.
virtual PMPoint IAnchoredObjectData::GetOffset () const
pure virtual

Get the y-offset and x-offset of the anchored object from the point specified

Returns
the displacement vector.
virtual bool16 IAnchoredObjectData::GetPinPosition () const
pure virtual

Get whether the anchored object's position should be pinned within the text column boundaries.

Returns
whether to pin the anchored object.
virtual IAnchoredObjectData::AnchoredPosition IAnchoredObjectData::GetPosition () const
pure virtual

Get the positioning type of the anchored object.

Returns
the positioning type of the object style.
virtual bool16 IAnchoredObjectData::GetSpineRelative () const
pure virtual

Get spine relative positioning.

Returns
true if spine relative.
virtual PMReal IAnchoredObjectData::GetYOffsetAbove () const
pure virtual

Get the amount of space to add above the anchored item. Y Offset Above is only used by "above line" positioning

Returns
specifies extra space in points.
virtual bool16 IAnchoredObjectData::NeedsRecalculation () const
pure virtual

Have the positioning rules changed since the graphic was last positioned?

Returns
whether the interface changed since the last call to "RegisterInlineAt" ?
virtual bool16 IAnchoredObjectData::RegisterInlineAt (const IWaxLinewaxLine,
const IParcelpParcel,
PMMatrixwaxToILGMatrix 
) const
pure virtual

The register inline method will be called after composition to adjust the matrix from text parcel to inline graphic.

Parameters
waxLineis the line that this object is anchor within.
pParcelis the IParcel that the inline is relative to.
waxToILGMatrixis the mapping from parcel to inline graphic.
Returns
kTrue if the matrix was changed.
virtual void IAnchoredObjectData::SetAnchorPtHorizontal (IAnchoredObjectData::AnchoredHorizontal align)
pure virtual

Set which horizontal point OF THE REFERENCE to align to (AnchorTypeHorizontal).

Parameters
alignspecifies which horizontal point to use.
virtual void IAnchoredObjectData::SetAnchorPtVertical (IAnchoredObjectData::AnchoredVertical align)
pure virtual

Set which vertical point OF THE REFERENCE to align to (AnchorTypeVertical).

Parameters
alignspecifies which vertical point to use.
virtual void IAnchoredObjectData::SetAnchorTypeHorizontal (IAnchoredObjectData::HorizontalAnchorPointObject location)
pure virtual

Set which location the horizontal position is based upon.

Parameters
locationspecifies which point the object's horizontal position is relative to.
virtual void IAnchoredObjectData::SetAnchorTypeVertical (IAnchoredObjectData::VerticalAnchorPointObject location)
pure virtual

Set which location the vertical position is based upon.

Parameters
locationspecifies which point the object's vertical position is relative to.
virtual void IAnchoredObjectData::SetLockPosition (bool16 lockPos)
pure virtual

Set whether the anchored object's position should be locked. This is a shortcut to applying the "Lock Object" functionality and is identical.

Parameters
lockPosspecifies whether to set locking for the anchored object.
virtual void IAnchoredObjectData::SetObjectHorizontal (IAnchoredObjectData::AnchoredHorizontal align)
pure virtual

Set which horizontal point OF THE OBJECT to align to.

Parameters
alignspecifies which horizontal point to use.
virtual void IAnchoredObjectData::SetObjectVertical (IAnchoredObjectData::AnchoredVertical align)
pure virtual

Set which vertical point OF THE OBJECT to align to.

Parameters
alignspecifies which vertical point to use.
virtual void IAnchoredObjectData::SetPinPosition (bool16 pinPos)
pure virtual

Set whether the anchored object's position should be pinned within the text column boundaries.

Parameters
pinPosspecifies whether to pin the anchored object.
virtual void IAnchoredObjectData::SetPosition (IAnchoredObjectData::AnchoredPosition position)
pure virtual

Set the positioning type of the anchored object.

Parameters
positionis the positioning type to apply.
virtual void IAnchoredObjectData::SetSpineRelative (bool16 spineRelative)
pure virtual

Set whether the anchored object's positioning is relative to the spine.

Parameters
spineRelativetrue or false.
virtual void IAnchoredObjectData::SetXOffset (PMReal xoffset)
pure virtual

Set the x-offset of the anchored object from the point specified Due to the way spine-relative positioning can dynamically change the anchored object's position, positive x-offsets move the graphic AWAY from the anchor location, negative closer.

Parameters
xoffsetis the offset value in points.
virtual void IAnchoredObjectData::SetYOffset (PMReal yoffset)
pure virtual

Set the y-offset of the anchored object from the point specified

Parameters
yoffsetis the offset value in points.
virtual void IAnchoredObjectData::SetYOffsetAbove (PMReal yoffset)
pure virtual

Set the amount of space to add above the anchored item. Y Offset Above is only used by "above line" positioning

Parameters
yoffsetspecifies extra space in points.
virtual bool16 IAnchoredObjectData::SpineRelativePositionFlipped () const
pure virtual

This is a calculated value, based on the object's position & specified rules.

Returns
whether this particular object is anchored, spine relative, and on the opposite page so that the position and offsets are flipped.