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

#include <IImportDocOptions.h>

Inheritance diagram for IImportDocOptions:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IIMPORTDOCOPTIONS }
 
enum  CropOptions { kCropToPage = 0, kCropToBleed = 1, kCropToSlug = 2 }
 

Public Member Functions

virtual void Set (const UIDRef &pageItemUIDRef, CropOptions crop=IImportDocOptions::kCropToPage, int32 pageIndex=0, IDocument *doc=nil)=0
 
virtual void Copy (const IImportDocOptions *fromOptions)=0
 
virtual void SetCrop (CropOptions crop)=0
 
virtual void SetPage (int32 pageIndex)=0
 
virtual void SetPageItem (const UIDRef &pageItemUIDRef)=0
 
virtual void SetDocument (IDocument *doc)=0
 
virtual const UIDRefGetPageItem () const =0
 
virtual IDocumentGetDocument () const =0
 
virtual int32 GetPageIndex () const =0
 
virtual CropOptions GetCrop () const =0
 
virtual void SetPageRange (const K2Vector< uint32 > &list)=0
 
virtual void GetPageRange (K2Vector< uint32 > &list) const =0
 
virtual void SetAllPages (uint32 totalPages, bool16 allPages)=0
 
virtual bool16 GetAllPages (uint32 *totalPages=nil) const =0
 
virtual bool16 GetShowPreview () const =0
 
virtual void SetShowPreview (bool16 b)=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 set various import/draw options for Placed InDesign document page items.

Member Enumeration Documentation

enum of cropping options

Member Function Documentation

virtual void IImportDocOptions::Copy (const IImportDocOptionsfromOptions)
pure virtual

Copy the settings from one IImportDocOptions instance to this instance.

Parameters
fromOptions[IN]: The options to copy
virtual bool16 IImportDocOptions::GetAllPages (uint32 * totalPages = nil) const
pure virtual

Method to get the total pages of the INDD and whether all pages are being placed.

Parameters
totalPagesis returned. totalPages is optional, pass nil if you don't want it.
Returns
the allPages setting.
virtual CropOptions IImportDocOptions::GetCrop () const
pure virtual
Returns
Get the crop setting for the page.
virtual IDocument* IImportDocOptions::GetDocument () const
pure virtual
Returns
Gets a pointer to the IDocument passed into the Set method.
virtual int32 IImportDocOptions::GetPageIndex () const
pure virtual
Returns
Gets the page index
virtual const UIDRef& IImportDocOptions::GetPageItem () const
pure virtual

Get the UIDRef of the page item.

virtual void IImportDocOptions::GetPageRange (K2Vector< uint32 > & list) const
pure virtual

Method to get the stored page range.

Parameters
listis filled with the page numbers to place.
virtual bool16 IImportDocOptions::GetShowPreview () const
pure virtual

Determine wether we show a preview in the import options dialog.

virtual void IImportDocOptions::Set (const UIDRefpageItemUIDRef,
CropOptions crop = IImportDocOptions::kCropToPage,
int32 pageIndex = 0,
IDocumentdoc = nil 
)
pure virtual

Initialize this object manually.

Parameters
pageItemUIDRef[IN]: UIDRef of the page item. That is, the client is responsible for creating the page item before calling the kImportDocCmdBoss.
crop[IN]: How should the page be cropped.
pageIndex[IN]: zero-based page index
doc[IN]: a pointer to the opened document. Passing a non-nil pointer will cause an AddRef, which will be released in the destructor.
virtual void IImportDocOptions::SetAllPages (uint32 totalPages,
bool16 allPages 
)
pure virtual

Method to store the total pages when all pages are placed.

Parameters
totalPagesis the total number of pages in the INDD file. A value of 0xffffffff for totalPages, means the internal total page value is not changed. You can use this when you only want to set the allPages value.
allPagesis true to place all the pages. When it is false the page range is used. We place the current page (GetPage value). The subsequent pages placed are sequential until the total is reached. To place all pages, set the current page to 1 using SetPage(1).
virtual void IImportDocOptions::SetCrop (CropOptions crop)
pure virtual

Set the crop option

Parameters
crop[IN]: How should the page be cropped.
virtual void IImportDocOptions::SetDocument (IDocumentdoc)
pure virtual

AddRef and store a pointer to the document to avoid having to re-open multiple times.

Parameters
doc[IN]: a pointer to the opened document. Passing a non-nil pointer will cause an AddRef, which will be released in the destructor.
virtual void IImportDocOptions::SetPage (int32 pageIndex)
pure virtual

Set the index of the page to import/draw

Parameters
pageIndex[IN]: zero-based page index
virtual void IImportDocOptions::SetPageItem (const UIDRefpageItemUIDRef)
pure virtual

Set the UIDRef of the page item that represents the imported page of the INDD document.

Parameters
pageItemUIDRef[IN]: UIDRef of the page item. That is, the client is responsible for creating the page item before calling the kImportDocCmdBoss.
virtual void IImportDocOptions::SetPageRange (const K2Vector< uint32 > & list)
pure virtual

Method to store the page range to place.

Parameters
listcontains the page numbers to place (page numbers start at 0). We place the current page (GetPage value). The subsequent pages placed come from this list. We linear search the list for the first instance of the current page then place all the remaining items in the list. If the list does not contain the current page, no items from the list are placed.