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

#include <IPlaceBehavior.h>

Inheritance diagram for IPlaceBehavior:
IPMUnknownCPMUnknown< IPlaceBehavior >CGraphicPlaceBehavior

Public Types

enum  { kDefaultIID = IID_IPLACEBEHAVIOR }
 
enum  eAfterPlace { kOldBehavior, kLeaveAsIs, kClearPlaceGun, kAbortPlaceGun }
 
enum  ePlaceType { kPlaceSingle, kPlaceCascade, kPlaceMultiple }
 
enum  eFrameKind {
  kTextFrameKind, kGraphicFrameKind, kInteractiveFrameKind, kContainerFrameKind,
  kTextInsertionKind, kUnknownFrameKind
}
 

Public Member Functions

virtual UIDList ProcessPlace (IPlaceBehavior *targetItem, const UIDRef &parent, const PMPointList &points, ICursorMgr::eCursorModifierState finalModifiers, ICursorMgr::eCursorModifierState startingModifiers, const ISpread *spread, eAfterPlace *afterPlace=nil, IItemsToPlaceData::ePlaceFrom placeFrom=IItemsToPlaceData::kPlaceGun)=0
 
virtual void ProcessReplacePreserveState (IPlaceBehavior *newItem, IPlaceBehavior *target)=0
 
virtual void AppendScriptObjects (ScriptList &objectList)=0
 
virtual UID ProcessReplace (const UIDRef &placedItem, const UIDRef &oldItem, bool16 useClippingFrame, IPlaceBehavior::eAfterPlace *afterPlace=nil, IItemsToPlaceData::ePlaceFrom placeFrom=IItemsToPlaceData::kPlaceGun)=0
 
virtual bool16 CanPlaceInto (const IPlaceBehavior &sourceItem, const ISpread *spread) const =0
 
virtual bool16 CanPlaceInto (eFrameKind newPageItemKind) const =0
 
virtual bool16 CanReplace () const =0
 
virtual bool16 CanConvertTo (eFrameKind newPageItemKind) const =0
 
virtual ErrorCode ProcessConvertTo (eFrameKind newPageItemKind, IControlView *controlView)=0
 
virtual bool16 IsEmpty () const =0
 
virtual UID ProcessReplaceMe (const UIDRef &placedItem, const UIDRef &oldItem, bool16 usePlaceGunFrame, IPlaceBehavior::eAfterPlace *afterPlace, IItemsToPlaceData::ePlaceFrom placeFrom=IItemsToPlaceData::kPlaceGun)=0
 
virtual UID ProcessReplaceChildren (const UIDRef &placedItem, const UIDRef &oldItem, bool16 usePlaceGunFrame, IPlaceBehavior::eAfterPlace *afterPlace)=0
 
virtual eFrameKind GetFrameKind () const =0
 
virtual bool16 IsFromMaster (const IHierarchy *targetHier, const ISpread *targetSpread) 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

Interface used to determine how a place operation behaves over a particular target. Both the source (the content being placed) and the target (where the place occurs) can implement their own behaviors.

A base implementation is defined in CGraphicPlaceBehavior; most subclassers should start there.

See Also
IPlaceBehaviorUI, CGraphicPlaceBehavior

Member Enumeration Documentation

Optional actions to perform after the place completes.

Types of content involved in place operations
Enumerator
kTextInsertionKind 

Not really a Frame, per se, but a TextFocus into a story somewhere

Types of place given various UI gestures

Member Function Documentation

virtual void IPlaceBehavior::AppendScriptObjects (ScriptList & objectList)
pure virtual

Append a list of script objects corresponding to the source content. If this content can be loaded into the place gun, these script objects will be considered children of the place gun.

Parameters
thelist to which to append the script objects INOUT

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::CanConvertTo (eFrameKind newPageItemKind) const
pure virtual

Can the frame corresponding to "this" object be converted to a new type.

Parameters
newPageItemKindIN the new type
Returns
true if "this" item can be converted to the new type

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::CanPlaceInto (const IPlaceBehaviorsourceItem,
const ISpreadspread 
) const
pure virtual

Can the source item be placed into "this" object

Parameters
sourceItemIN the place behavior of the object being placed
spreadIN the destination spread (used for master spread relationship)
Returns
true if "this" could accept the place

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::CanPlaceInto (eFrameKind newPageItemKind) const
pure virtual

Can a source item of a given type be placed into "this" object

Parameters
newPageItemKindIN the type of the source item
Returns
true if "this" could accept the place

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::CanReplace () const
pure virtual

Can "this" item be replaced

Returns
true if "this" item can be replaced

Implemented in CGraphicPlaceBehavior.

virtual eFrameKind IPlaceBehavior::GetFrameKind () const
pure virtual

Get the frame kind of "this" content.

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::IsEmpty () const
pure virtual

Is the frame corresponding to "this" object empty?

Implemented in CGraphicPlaceBehavior.

virtual bool16 IPlaceBehavior::IsFromMaster (const IHierarchytargetHier,
const ISpreadtargetSpread 
) const
pure virtual

Is targetHier from a different spread (thus from a master spread)?

Parameters
targetHierIN the target item's hierarchy (might be a master page item)
targetSpreadIN target spread
Returns
true if from a master spread.

Implemented in CGraphicPlaceBehavior.

virtual ErrorCode IPlaceBehavior::ProcessConvertTo (eFrameKind newPageItemKind,
IControlViewcontrolView 
)
pure virtual

Perform a ConvertTo operation.

Parameters
newPageItemKindIN which frame kind should the object be converted to
controlViewIN controlView parameter can be used by implementation if selection changes need to be made.
Returns
result of the operation, kSuccess or an error code.

Implemented in CGraphicPlaceBehavior.

virtual UIDList IPlaceBehavior::ProcessPlace (IPlaceBehaviortargetItem,
const UIDRefparent,
const PMPointListpoints,
ICursorMgr::eCursorModifierState finalModifiers,
ICursorMgr::eCursorModifierState startingModifiers,
const ISpreadspread,
eAfterPlaceafterPlace = nil,
IItemsToPlaceData::ePlaceFrom placeFrom = IItemsToPlaceData::kPlaceGun 
)
pure virtual

Perform a Place operation

Parameters
targetItemIN target for the place
parentIN parent of the placed object(s)
pointsIN location of the place
finalModifiersIN modifier key state
startingModifiersIN modifier key state
spreadIN spread where place is to occur
afterPlaceINOUT what should happen after the place (optional)
Returns
UIDList of placed objects

Implemented in CGraphicPlaceBehavior.

virtual UID IPlaceBehavior::ProcessReplace (const UIDRefplacedItem,
const UIDRefoldItem,
bool16 useClippingFrame,
IPlaceBehavior::eAfterPlaceafterPlace = nil,
IItemsToPlaceData::ePlaceFrom placeFrom = IItemsToPlaceData::kPlaceGun 
)
pure virtual

Perform a Replace operation (new item replaces an existing one)

Parameters
placedItemIN new item
oldItemIN exiting item
useClippingFrameIN retain the clipping frame
afterPlaceINOUT what should happen after the replace
Returns
newly placed object

Implemented in CGraphicPlaceBehavior.

virtual UID IPlaceBehavior::ProcessReplaceChildren (const UIDRefplacedItem,
const UIDRefoldItem,
bool16 usePlaceGunFrame,
IPlaceBehavior::eAfterPlaceafterPlace 
)
pure virtual

Utility routine to replace the children of the target object (Me)

Parameters
placedItemIN item to be placed
oldItemIN item to replace
usePlaceGunFrameIN use or strip off the frame around the item from the place gun
afterPlaceINOUT what should happen after the replace
Returns
newly placed object

Implemented in CGraphicPlaceBehavior.

virtual UID IPlaceBehavior::ProcessReplaceMe (const UIDRefplacedItem,
const UIDRefoldItem,
bool16 usePlaceGunFrame,
IPlaceBehavior::eAfterPlaceafterPlace,
IItemsToPlaceData::ePlaceFrom placeFrom = IItemsToPlaceData::kPlaceGun 
)
pure virtual

Utility routine to replace the target object (Me)

Parameters
placedItemIN item to be placed
oldItemIN item to replace
usePlaceGunFrameIN use or strip off the frame around the item from the place gun
afterPlaceINOUT what should happen after the replace
Returns
newly placed object

Implemented in CGraphicPlaceBehavior.

virtual void IPlaceBehavior::ProcessReplacePreserveState (IPlaceBehaviornewItem,
IPlaceBehaviortarget 
)
pure virtual

ProcessReplacePreserveState gives this a chance to set itself and srcRoot to values from target. Note: newItem may or may not be the same item as "this" interface.

Parameters
newItemIN the source's place behavior
targetIN the target's place behavior

Implemented in CGraphicPlaceBehavior.