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

#include <IAnchoredObjectSuite.h>

Inheritance diagram for IAnchoredObjectSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IANCHOREDOBJECT_ISUITE }
 

Public Member Functions

virtual bool16 CanSetAnchoredObjectParams () const =0
 
virtual bool16 CanSetAnchoredObjectInsertParams () const =0
 
virtual bool16 CanInsertAnchoredObject () const =0
 
virtual ErrorCode InsertAnchoredObject (IAnchoredObjectInsertData *objectSpec, bool16 toggleSelection=kFalse)=0
 
virtual bool16 CanToggleBetweenAnchoredFrame () const =0
 
virtual ErrorCode ToggleBetweenAnchoredFrame (UIDRef &toggledFrame, TextIndex &location) const =0
 
virtual bool16 CanReleaseAnchoredObject () const =0
 
virtual ErrorCode ReleaseAnchoredObject ()=0
 
virtual bool16 CanSetAnchoredPosition () const =0
 
virtual ErrorCode SetPosition (IAnchoredObjectData::AnchoredPosition position)=0
 
virtual
IAnchoredObjectData::AnchoredPosition 
GetPosition (bool16 *mixed=nil) const =0
 
virtual bool16 CanGetSpineRelative () const =0
 
virtual ErrorCode SetSpineRelative (bool16 splineRelative)=0
 
virtual bool16 GetSpineRelative (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetAnchorTypeHorizontal (IAnchoredObjectData::HorizontalAnchorPointObject location)=0
 
virtual
IAnchoredObjectData::HorizontalAnchorPointObject 
GetAnchorTypeHorizontal (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetObjectHorizontal (IAnchoredObjectData::AnchoredHorizontal align)=0
 
virtual
IAnchoredObjectData::AnchoredHorizontal 
GetObjectHorizontal (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetAnchorPtHorizontal (IAnchoredObjectData::AnchoredHorizontal align)=0
 
virtual
IAnchoredObjectData::AnchoredHorizontal 
GetAnchorPtHorizontal (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetAnchorTypeVertical (IAnchoredObjectData::VerticalAnchorPointObject location)=0
 
virtual
IAnchoredObjectData::VerticalAnchorPointObject 
GetAnchorTypeVertical (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetObjectVertical (IAnchoredObjectData::AnchoredVertical align)=0
 
virtual
IAnchoredObjectData::AnchoredVertical 
GetObjectVertical (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetAnchorPtVertical (IAnchoredObjectData::AnchoredVertical align)=0
 
virtual
IAnchoredObjectData::AnchoredVertical 
GetAnchorPtVertical (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetXOffset (PMReal xoffset)=0
 
virtual ErrorCode SetYOffset (PMReal yoffset)=0
 
virtual PMPoint GetOffset (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetYOffsetAbove (PMReal yoffset)=0
 
virtual PMReal GetYOffsetAbove (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetPinPosition (bool16 pinPos)=0
 
virtual bool16 GetPinPosition (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetLockPosition (bool16 lock)=0
 
virtual bool16 GetLockPosition (bool16 *mixed=nil) const =0
 
virtual ErrorCode SetInitialContent (IAnchoredObjectInsertData::AnchoredContent content)=0
 
virtual
IAnchoredObjectInsertData::AnchoredContent 
GetInitialContent () const =0
 
virtual ErrorCode SetInitialObjectStyle (UID styleID)=0
 
virtual UID GetInitialObjectStyle () const =0
 
virtual ErrorCode SetInitialParagraphStyle (UID styleID)=0
 
virtual UID GetInitialParagraphStyle () const =0
 
virtual ErrorCode SetInitialWidth (PMReal w)=0
 
virtual PMReal GetInitialWidth () const =0
 
virtual ErrorCode SetInitialHeight (PMReal h)=0
 
virtual PMReal GetInitialHeight () const =0
 
virtual PMReal GetSmallestObjectHeight () const =0
 
virtual PMReal GetSmallestLineHeight () const =0
 
virtual bool16 ObjectInVerticalText () const =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

IAnchoredObjectSuite The suite methods of changing the anchored object data & preferences.

See Also
IAnchoredObjectData
IAnchoredObjectInsertData

Member Function Documentation

virtual bool16 IAnchoredObjectSuite::CanGetSpineRelative () const
pure virtual

Whether or not you can set the spline relative value (false when facing pages is off)

Returns
bool16 Whether or not you can set the spline relative value
virtual bool16 IAnchoredObjectSuite::CanInsertAnchoredObject () const
pure virtual

Does this suite target support inserting an anchored object?

Returns
kTrue for text targets
virtual bool16 IAnchoredObjectSuite::CanReleaseAnchoredObject () const
pure virtual

CanReleaseAnchoredObject Can the suite target be released onto the text frame's layer?

virtual bool16 IAnchoredObjectSuite::CanSetAnchoredObjectInsertParams () const
pure virtual

Does this suite target support setting the anchored object insert data fields?

Returns
kTrue for default targets
virtual bool16 IAnchoredObjectSuite::CanSetAnchoredObjectParams () const
pure virtual

Does this suite target support setting the anchored object data fields?

Returns
kTrue for anchored objects & default targets
virtual bool16 IAnchoredObjectSuite::CanSetAnchoredPosition () const
pure virtual

Does the selection support the "anchored" position? E.g., inlines in text on a path can't be anchored.

Returns
kFalse if the selection doesn't support the anchored position.
virtual bool16 IAnchoredObjectSuite::CanToggleBetweenAnchoredFrame () const
pure virtual

CanToggleBetweenAnchoredFrame is the toggling between text selections & anchored text frame allowed?

Returns
true if the selection supports toggling back and forth between anchored frames and main text frames.
virtual IAnchoredObjectData::AnchoredHorizontal IAnchoredObjectSuite::GetAnchorPtHorizontal (bool16 * mixed = nil) const
pure virtual

Get which horizontal point OF THE REFERENCE to align to (AnchorTypeHorizontal). will be set to kTrue if the target contains multiple values.

Returns
specifies which horizontal point to use.
virtual IAnchoredObjectData::AnchoredVertical IAnchoredObjectSuite::GetAnchorPtVertical (bool16 * mixed = nil) const
pure virtual

Get which vertical point OF THE REFERENCE to align to (AnchorTypeVertical). will be set to kTrue if the target contains multiple values.

Returns
specifies which vertical point to use.
virtual IAnchoredObjectData::HorizontalAnchorPointObject IAnchoredObjectSuite::GetAnchorTypeHorizontal (bool16 * mixed = nil) const
pure virtual

Get which location the horizontal position is based upon. will be set to kTrue if the target contains multiple values.

Returns
which point the object's horizontal position is relative to.
virtual IAnchoredObjectData::VerticalAnchorPointObject IAnchoredObjectSuite::GetAnchorTypeVertical (bool16 * mixed = nil) const
pure virtual

Get which location the vertical position is based upon. will be set to kTrue if the target contains multiple values.

Returns
specifies which point the object's vertical position is relative to.
virtual IAnchoredObjectInsertData::AnchoredContent IAnchoredObjectSuite::GetInitialContent () const
pure virtual

Get the type of content that will be inserted.

Returns
the content type.
virtual PMReal IAnchoredObjectSuite::GetInitialHeight () const
pure virtual

Get the height of the object to be inserted.

Returns
the initial height in points.
virtual UID IAnchoredObjectSuite::GetInitialObjectStyle () const
pure virtual

Get the object style that would be applied to the inserted object.

Returns
the UID of the object style.
virtual UID IAnchoredObjectSuite::GetInitialParagraphStyle () const
pure virtual

Get the paragraph style that would be applied to an inserted text frame.

Returns
the UID of the paragraph style.
virtual PMReal IAnchoredObjectSuite::GetInitialWidth () const
pure virtual

Get the initial width of the object that would be inserted.

Returns
the initial width.
virtual bool16 IAnchoredObjectSuite::GetLockPosition (bool16 * mixed = nil) 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. will be set to kTrue if the target contains multiple values.

Returns
whether to set locking for the first targetted anchored object.
virtual IAnchoredObjectData::AnchoredHorizontal IAnchoredObjectSuite::GetObjectHorizontal (bool16 * mixed = nil) const
pure virtual

Get which horizontal point OF THE OBJECT to align to. will be set to kTrue if the target contains multiple values.

Returns
which horizontal point to use.
virtual IAnchoredObjectData::AnchoredVertical IAnchoredObjectSuite::GetObjectVertical (bool16 * mixed = nil) const
pure virtual

Get which vertical point OF THE OBJECT to align to. will be set to kTrue if the target contains multiple values.

Returns
specifies which vertical point to use.
virtual PMPoint IAnchoredObjectSuite::GetOffset (bool16 * mixed = nil) const
pure virtual

Get the y-offset and x-offset of the anchored object from the point specified will be set to kTrue if the target contains multiple values.

Returns
the displacement vector of the first object.
virtual bool16 IAnchoredObjectSuite::GetPinPosition (bool16 * mixed = nil) const
pure virtual

Get whether the anchored object's position should be pinned within the text column boundaries. will be set to kTrue if the target contains multiple values.

Returns
whether to pin the first anchored object.
virtual IAnchoredObjectData::AnchoredPosition IAnchoredObjectSuite::GetPosition (bool16 * mixed = nil) const
pure virtual

Get the positioning type of the anchored object. will be set to kTrue if the target contains multiple values.

Returns
the positioning type of the object style.
virtual PMReal IAnchoredObjectSuite::GetSmallestLineHeight () const
pure virtual

GetSmallestLineHeight – used by some contraints.

Returns
the smallest height of the lines which contain all selected anchored objects
virtual PMReal IAnchoredObjectSuite::GetSmallestObjectHeight () const
pure virtual

GetSmallestObjectHeight – used by some contraints.

Returns
the smallest height of all selected anchored objects
virtual bool16 IAnchoredObjectSuite::GetSpineRelative (bool16 * mixed = nil) const
pure virtual

Get spine relative positioning. will be set to kTrue if the target contains multiple values.

Returns
true if spine relative.
virtual PMReal IAnchoredObjectSuite::GetYOffsetAbove (bool16 * mixed = nil) const
pure virtual

Get the amount of space to add above the anchored item. Y Offset Above is only used by "above line" positioning will be set to kTrue if the target contains multiple values.

Returns
specifies extra space in points of the first object.
virtual ErrorCode IAnchoredObjectSuite::InsertAnchoredObject (IAnchoredObjectInsertDataobjectSpec,
bool16 toggleSelection = kFalse 
)
pure virtual

Insert an anchored object using the specification provided by the interface passed it.

Parameters
objectSpecis an interface with the proper insert settings. It should also be able to provide the IAnchoredObjectData interface through a QueryInterface.
toggleSelectionspecifies whether the insert should select the new object.
Returns
kFailure if not legal to insert an anchored object
virtual bool16 IAnchoredObjectSuite::ObjectInVerticalText () const
pure virtual

Returns true if the anchored object is inside of vertical text

Returns
true if the anchored object is inside of vertical text
virtual ErrorCode IAnchoredObjectSuite::ReleaseAnchoredObject ()
pure virtual

ReleaseAnchoredObject Make the object be on the text frame's layer instead of anchored.

Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetAnchorPtHorizontal (IAnchoredObjectData::AnchoredHorizontal align)
pure virtual

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

Parameters
alignspecifies which horizontal point to use.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetAnchorPtVertical (IAnchoredObjectData::AnchoredVertical align)
pure virtual

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

Parameters
alignspecifies which vertical point to use.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::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.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetAnchorTypeVertical (IAnchoredObjectData::VerticalAnchorPointObject location)
pure virtual

Set which location the vertical position is based upon.

Parameters
locationwhich point the object's vertical position is relative to.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetInitialContent (IAnchoredObjectInsertData::AnchoredContent content)
pure virtual

When inserting an anchored object automatically, which type of object should be inserted?

Parameters
contentis the type of object to insert: text frame, graphic frame, unassigned frame.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetInitialHeight (PMReal h)
pure virtual

Set the height of the object to be inserted.

Parameters
his the height in points.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetInitialObjectStyle (UID styleID)
pure virtual

Set the object style to be applied to the inserted object.

Parameters
styleIDis the object style to apply.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetInitialParagraphStyle (UID styleID)
pure virtual

Set the paragraph style to be applied to the inserted object, IFF the object is a text frame.

Parameters
styleIDis the paragraph style to apply
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetInitialWidth (PMReal w)
pure virtual

Set the width of the object to be inserted.

Parameters
wis the width in points.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetLockPosition (bool16 lock)
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
lockspecifies whether to set locking for the anchored object.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetObjectHorizontal (IAnchoredObjectData::AnchoredHorizontal align)
pure virtual

Set which horizontal point OF THE OBJECT to align to.

Parameters
alignspecifies which horizontal point to use.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetObjectVertical (IAnchoredObjectData::AnchoredVertical align)
pure virtual

Set which vertical point OF THE OBJECT to align to.

Parameters
alignspecifies which vertical point to use.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::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.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetPosition (IAnchoredObjectData::AnchoredPosition position)
pure virtual

Set the positioning type of the anchored object.

Parameters
positionis the positioning type to apply.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetSpineRelative (bool16 splineRelative)
pure virtual

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

Parameters
spineRelativetrue or false.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::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.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::SetYOffset (PMReal yoffset)
pure virtual

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

Parameters
yoffsetis the offset value in points.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::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.
Returns
kFailure if not applied to anchored object or defaults.
virtual ErrorCode IAnchoredObjectSuite::ToggleBetweenAnchoredFrame (UIDReftoggledFrame,
TextIndex & location 
) const
pure virtual

ToggleBetweenAnchoredFrame toggle between text selections & anchored text frame

Parameters
toggledFrameand
locationwill be filled out according to these rules: if the selection spans or is adjacent to an existing anchored frame, then toggledFrame will contain the UIDRef of the existing frame and location will be set to the end of that frame's text. if the selection is within an already existing anchored frame, then the toggledFrame will be the story that contains the anchor, and location will be the anchor's location. if the selection is a caret that is not adjacent to an already existing anchored frame, it will create one and return that new spline item's UIDRef and a location of 0 (could create an Unassigned, Graphic or Text frame). if the selection doesn't support the operation, the toggledFrame may be <nil, kInvalidUID>.
Returns
kFailure if not applied to anchored object or defaults.