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

#include <IScrapImageList.h>

Inheritance diagram for IScrapImageList:
IPMUnknown

Public Member Functions

virtual int32 FindImage (UID lowResUID) const =0
 
virtual int32 FindImageActualUID (UID actualLowResUID, IDataBase *db) const =0
 
virtual int32 Length (void) const =0
 
virtual void Add (UID lowResUIDkey, UID actualUID, IDataBase *srcDB)=0
 
virtual void Remove (int32 at)=0
 
virtual void SetLastUIDConverted (int32 at, UID lastUID, IDataBase *lastDB)=0
 
virtual void GetLastUIDConverted (int32 at, UID *lastUID, IDataBase **lastDB)=0
 
virtual void SetActualUID (int32 at, UID newUID)=0
 
virtual UID GetActualUID (int32 at) const =0
 
virtual void SetDataBase (int32 at, IDataBase *newDB)=0
 
virtual UID GetUID (int32 at) const =0
 
virtual IDataBaseGetDataBase (int32 at) const =0
 
virtual void ReadWrite (IPMStream *iPMStream, ImplementationID prop)=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

The IScrapImageList is an interface, which should probably be private, which is used the LowResImageRefConverter when copying and pasting images. Its purpose is to make the copying and pasting of placed images as efficient as possible by reference counting the proxy images for these placed images instead of duplicating the pixel data. This reference counting strategy is performed using the ILowResImageList interface which is present for each document.

See Also
ILowResImageList

Member Function Documentation

virtual void IScrapImageList::Add (UID lowResUIDkey,
UID actualUID,
IDataBasesrcDB 
)
pure virtual

Add an entry to the list which is keyed by the UID of a proxy image. The actual UID should be that of the original image which was copied. The lowResUIDkey is a dummy "promise" proxy which is created on the scrap for the purpose of getting the LowResImageRefConverter to be called at paste time.

Parameters
lowResUIDkey- IN: dummy UID "promise" for the proxy valid only on the scrap.
actualUID- IN: UID of the original proxy image which was copied.
srcDB- IN: Pointer to the source database.
virtual int32 IScrapImageList::FindImage (UID lowResUID) const
pure virtual

Find the zero-based index of the entry in the ScrapImageList for the given proxy UID.

Parameters
lowResUID- IN: UID of the proxy image of the placed image.
Returns
Zero based index of the element in the list or -1 if it cannot be found.
virtual int32 IScrapImageList::FindImageActualUID (UID actualLowResUID,
IDataBasedb 
) const
pure virtual

This method is similar to FindImage except that there are actually two UIDs for each image maintained by this list. The 2 UIDs are necessary because the target document may be a different document from the source document. The actual UID should be that of the original image which was copied. The lowResUIDkey is a dummy "promise" proxy which is created on the scrap for the purpose of getting the LowResImageRefConverter to be called at paste time.

Parameters
actualLowResUID- IN: UID of the original proxy image that was copied.
Returns
Zero based index of the element in the list or -1 if it cannot be found.
virtual UID IScrapImageList::GetActualUID (int32 at) const
pure virtual

Retrieve the actual UID.

Parameters
at- IN: zero-based index of the image entry
Returns
UID of the actual image.
See Also
SetActualUID
virtual IDataBase* IScrapImageList::GetDataBase (int32 at) const
pure virtual

Get the source database.

Parameters
at- IN: zero-based index of the image entry
Returns
source database
virtual void IScrapImageList::GetLastUIDConverted (int32 at,
UIDlastUID,
IDataBase ** lastDB 
)
pure virtual

Retrieve the UID and IDataBase of the last converted image for the given image entry.

Parameters
at- IN: zero-based index of the image entry
lastUID- OUT: the UID of the converted image
lastDB- OUT: The database in which the lastUID refers.
virtual UID IScrapImageList::GetUID (int32 at) const
pure virtual

Get the UID stored at zero-based index 'at'. Keep in mind that the UID may be a dummy "promise" UID.

Parameters
at- IN: zero-based index of the image entry
Returns
promise UID
virtual int32 IScrapImageList::Length (void ) const
pure virtual
Returns
The number of proxy image entries in the list
virtual void IScrapImageList::ReadWrite (IPMStreamiPMStream,
ImplementationID prop 
)
pure virtual

Method to persist or read this interface.

Parameters
iPMStream- IN/OUT: if reading, then this is the input stream. If writing then this is the output stream.
prop- IN: Implementation ID
virtual void IScrapImageList::Remove (int32 at)
pure virtual

Remove the entry at position 'at'

Parameters
at- IN: zero based index of the image entry to remove
virtual void IScrapImageList::SetActualUID (int32 at,
UID newUID 
)
pure virtual

If the original image which was copied gets deleted, then an actual copy is added to the scrap and this method is called to update an entry which used to reference the original.

Parameters
at- IN: zero-based index of the image entry
newUID- IN: UID of the newly created proxy image.
virtual void IScrapImageList::SetDataBase (int32 at,
IDataBasenewDB 
)
pure virtual

Set the source database.

Parameters
at- IN: zero-based index of the image entry
newDB- IN: pointer to the new source database.
virtual void IScrapImageList::SetLastUIDConverted (int32 at,
UID lastUID,
IDataBaselastDB 
)
pure virtual

After a conversion is performed, store the UID of the converted image.

Parameters
at- IN: zero-based index of the image entry
lastUID- IN: the UID of the converted image
lastDB- IN: The database in which the lastUID refers.