InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISmartDimensions Class Referenceabstract
Inheritance diagram for ISmartDimensions:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISMARTDIMENSIONS }
 

Public Member Functions

virtual void Clear ()=0
 
virtual void SetDataBase (IDataBase *db)=0
 
virtual void AddInfo (const UID &pageItem, const PBPMRect &bbox, const PMMatrix &xform)=0
 
virtual int32 GetItemsMatchingWidth (const PMReal &targetWidth, UIDList &matchingItems) const =0
 
virtual int32 GetItemsMatchingHeight (const PMReal &targetHeight, UIDList &matchingItems) const =0
 
virtual int32 GetItemsMatchingRotation (const PMReal &targetRotation, UIDList &matchingItems) const =0
 
virtual PMReal GetClosestWidth (const PMReal &targetWidth, const UIDList &ignoreList) const =0
 
virtual PMReal GetClosestHeight (const PMReal &targetHeight, const UIDList &ignoreList) const =0
 
virtual PMReal GetClosestRotation (const PMReal &targetRotation, const UIDList &ignoreList) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual void ISmartDimensions::AddInfo (const UIDpageItem,
const PBPMRectbbox,
const PMMatrixxform 
)
pure virtual

Add bounding box and matrix info for a specific page item.

Parameters
pageItem[IN]: UID of the page item whose info we are recording.
bbox[IN]: stroke bounding box in pasteboard coordinates.
xform[IN]: Matrix used to transform the page item from inner to pasteboard coordinates.
virtual void ISmartDimensions::Clear ()
pure virtual

Clear all data.

virtual PMReal ISmartDimensions::GetClosestHeight (const PMRealtargetHeight,
const UIDListignoreList 
) const
pure virtual

Get the height of the closest matching page item in pasteboard coordinates. If no matching item is found, return 0.0.

Parameters
targetHeight[IN]: the target height
ignoreList[IN]: List of items to ignore. Usually the selection list.
Returns
height of the closest matching item or 0.0 if one is not found.
virtual PMReal ISmartDimensions::GetClosestRotation (const PMRealtargetRotation,
const UIDListignoreList 
) const
pure virtual

Get the height of the closest matching page item in pasteboard coordinates. If no matching item is found, return 0.0.

Parameters
targetHeight[IN]: the target height
ignoreList[IN]: List of items to ignore. Usually the selection list.
Returns
height of the closest matching item or 0.0 if one is not found.
virtual PMReal ISmartDimensions::GetClosestWidth (const PMRealtargetWidth,
const UIDListignoreList 
) const
pure virtual

Get the width of the closest matching page item in pasteboard coordinates. If no matching item is found, return 0.0.

Parameters
targetWidth[IN]: the target width
ignoreList[IN]: List of items to ignore. Usually the selection list.
Returns
width of the closest matching item or 0.0 if one is not found.
virtual int32 ISmartDimensions::GetItemsMatchingHeight (const PMRealtargetHeight,
UIDListmatchingItems 
) const
pure virtual

Get and append UID's of page items whose stroke bounding box in pasteboard coordinates has a height that exactly matches the provided target height.

Parameters
targetHeight[IN]: The target height.
matchingItems[OUT]: Any page items whose stroke bounding box in pasteboard coordinates matches the target height
Returns
the number of items appended (found).
virtual int32 ISmartDimensions::GetItemsMatchingRotation (const PMRealtargetRotation,
UIDListmatchingItems 
) const
pure virtual

Get and append UID's of page items whose rotation in pasteboard coordinates exactly matches the provided target rotation.

Parameters
targetRotation[IN]: The target rotation.
matchingItems[OUT]: Any page items whose rotation in pasteboard coordinates matches the target rotation
Returns
the number of items appended (found).
virtual int32 ISmartDimensions::GetItemsMatchingWidth (const PMRealtargetWidth,
UIDListmatchingItems 
) const
pure virtual

Add bounding box and matrix info from an existing ISmartDimensions interface to this interface.

Parameters
source[IN]: Pointer to the interface whose data we want to copyGet and append UID's of page items whose stroke bounding box in pasteboard coordinates has a width that exactly matches the provided target width.
targetWidth[IN]: The target width.
matchingItems[OUT]: Any page items whose stroke bounding box in pasteboard coordinates matches the target width
Returns
the number of items appended (found).
virtual void ISmartDimensions::SetDataBase (IDataBasedb)
pure virtual

Set the current database

Parameters
db[IN]: The current database that holds all UIDs passed into AddInfo.