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

#include <IAssignmentMgr.h>

Inheritance diagram for IAssignmentMgr:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IASSIGNMENTMGR }
 
enum  FrameStatus { kNotExported, kAssigned, kUnassigned, kUnknown }
 

Public Member Functions

virtual bool16 IsAssigned (const UIDRef &object) const =0
 
virtual ErrorCode SaveAssignments (IDocument *document, UIFlags uiFlags=kFullUI, bool16 forceSave=kFalse)=0
 
virtual ErrorCode SaveAssignment (IAssignment *assignment, UIFlags uiFlags=kFullUI)=0
 
virtual ErrorCode OpenAssignmentWithProxy (const PMString &assignFile, InterfacePtr< IAssignment > &assignment, UIFlags uiFlags=kFullUI)=0
 
virtual ErrorCode ImportAssignment (IPMStream *stream, IINXImportPolicy *policy=nil, UIFlags uiFlags=kFullUI)=0
 
virtual ErrorCode ExportAssignment (const IAssignment *assignment, IPMStream *stream, UIFlags uiFlags=kFullUI)=0
 
virtual IAssignmentCreateAssignmentCmd (IAssignedDocument *doc, const PMString &assignFile, bool16 saveAssignment=kFalse, UIDList *objects=nil)=0
 
virtual IAssignedStoryCreateAssignedStory (const UIDRef &story)=0
 
virtual IAssignmentQueryAssignment (IAssignedDocument *doc, const PMString &assignFile) const =0
 
virtual bool16 IsTextStory (IAssignedDocument *docInfo, const PMString &assignPath, const PMString &storyPath) const =0
 
virtual bool16 IsTextStory (const UIDRef &itemRef) const =0
 
virtual IAssignedDocumentGetAssignedDocument (IDataBase *db) const =0
 
virtual IAssignedDocumentGetAssignedDocument (const PMString &docPath) const =0
 
virtual void QueryAssignmentAndAssignedStory (const UIDRef &storyref, InterfacePtr< IAssignment > &iAssignmentRef, InterfacePtr< IAssignedStory > &iAssignedStoryRef) const =0
 
virtual void GetStoryListOnDoc (IAssignedDocument *docInfo, UIDList &storyList) const =0
 
virtual void GetStoryListOnAssignment (IAssignment *assignment, UIDList &storyList) const =0
 
virtual ErrorCode AddToAssignmentCmd (IAssignment *assignment, UIDList &objects, IAssignedStory *beforeStory=nil, bool16 notifyPanel=kTrue)=0
 
virtual ErrorCode DirtySpreadCmd (UIDRef spreadRef)=0
 
virtual ErrorCode AddToAssignmentCmd (IAssignedDocument *docInfo, const PMString &assignPath, UIDList &objects, bool16 notifyPanel=kTrue)=0
 
virtual IAssignmentMgr::FrameStatus GetFrameStatus (const UIDRef &object) const =0
 
virtual bool16 UpdateAssignmentOptions (IAssignment *assignment, const PMString &assignName, const PMString &file, const PMString &assignWriter, const IAssignment::AssignmentExportOptions exportOption, const UID uiColor, const bool16 includeLinkFilesPackaging, UIFlags uiFlags=kFullUI)=0
 
virtual void NotifyPanel (ClassID theChange=kAssignmentMgrChangedNotifyMsg)=0
 
virtual ErrorCode PackageAssignment (IAssignment *assignment, const IDFile &packageFile, UIFlags uiFlags=kFullUI)=0
 
virtual bool16 IsAssignmentPackaged (IAssignment *assignment)=0
 
virtual bool16 IsAssignmentPackageUpToDate (IAssignment *assignment)=0
 
virtual ErrorCode ReturnPackageAssignment (IAssignment *assignment, const IDFile &packageFile, UIFlags uiFlags=kFullUI, bool16 includeAdded=kTrue)=0
 
virtual ErrorCode ExplodeInCopyPackageForOpen (const IDFile &packageFile, UIFlags uiFlags, IDFile &assignmentFileToOpen)=0
 
virtual IDFile GetAssignmentFileToOpenFromPackage (const IDFile &packageFile)=0
 
virtual ErrorCode ForwardPackageAssignment (IAssignment *assignment, const IDFile &packageFile, UIFlags uiFlags=kFullUI, bool16 includeAdded=kTrue)=0
 
virtual ErrorCode ExplodeInDesignPackageForOpen (const IDFile &packageFile, const UIDRef &assignmentRef, UIFlags uiFlags)=0
 
virtual ErrorCode ExplodeInDesignPackageToFolder (const IDFile &packageFile, const IDFile &targetFolder, UIFlags uiFlags)=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

This class is used to manage the modeling of assignments, containing one or more stories per document.

See Also
IAssignedDocument
IAssignment
IAssignedStory

Member Enumeration Documentation

The status of a frame, according to the Assignment Manager.
Enumerator
kNotExported 

The frame is not an InCopy story.

kAssigned 

The frame is an assigned InCopy story.

kUnassigned 

The frame is an unassigned InCopy story (in its unassignment).

kUnknown 

The frame is an InCopy story that is not contained in its assigned document.

Member Function Documentation

virtual ErrorCode IAssignmentMgr::AddToAssignmentCmd (IAssignmentassignment,
UIDListobjects,
IAssignedStorybeforeStory = nil,
bool16 notifyPanel = kTrue 
)
pure virtual

Add some page items to an assignment, removing them from their current assignment if necessary. This calls ProcessCommand to perform the operation.

Parameters
assignment- The assignment to add to. Use nil for the unassignment.
objects- A UIDList of page items
beforeStory- An assigned story to place this story in front of, defaults to nil, the end of the list
notifyPanel- kTrue to notify the assignment panel to update the assignment node
virtual ErrorCode IAssignmentMgr::AddToAssignmentCmd (IAssignedDocumentdocInfo,
const PMStringassignPath,
UIDListobjects,
bool16 notifyPanel = kTrue 
)
pure virtual

Add some page items to an assignment, removing them from their current assignment if necessary. This calls ProcessCommand to perform the operation.

Parameters
docInfo- The IAssignedDocument reference
assignPath- The file path of assignment to add to (empty for unassignments)
objects- A UIDList of page items
notifyPanel- kTrue to notify the assignment panel to update the assignment node
virtual IAssignedStory* IAssignmentMgr::CreateAssignedStory (const UIDRefstory)
pure virtual

Create an assigned story (must be called from a command)

Parameters
story- The uid of the story to assign
Returns
- A refcounted IAssignedStory pointer
virtual IAssignment* IAssignmentMgr::CreateAssignmentCmd (IAssignedDocumentdoc,
const PMStringassignFile,
bool16 saveAssignment = kFalse,
UIDListobjects = nil 
)
pure virtual

Create an assignment (by processing a command)

Parameters
doc- The assigned document to add this assignment to
assignFile- The file for the assignment, which is empty for the unassignment
saveAssignment- kTrue means to save the assignment, this value is ignored when creating unassigned assignment(not saved)
objects- A UIDList of page items to add to the created assignment, if nil then all unassigned InCopy stories are added
Returns
- A refcounted IAssignment pointer
virtual ErrorCode IAssignmentMgr::DirtySpreadCmd (UIDRef spreadRef)
pure virtual

This marks all assignments which display this spread as dirty (i.e. need update/export). This can call ProcessCommand.

Parameters
spreadRef- A UIDRef to the spread which has changed.
virtual ErrorCode IAssignmentMgr::ExplodeInCopyPackageForOpen (const IDFilepackageFile,
UIFlags uiFlags,
IDFileassignmentFileToOpen 
)
pure virtual

Extracts the contents of the package file. The assignment file to open are returned.

Parameters
packageFileIN the assignment package file to open
uiFlags- a flag indicating whether or not ui is permitted
assignmentFileToOpenOUT the assignment file to be opened
Returns
ErrorCode kSuccess if open succeeded, kFailure otherwse.
virtual ErrorCode IAssignmentMgr::ExplodeInDesignPackageForOpen (const IDFilepackageFile,
const UIDRefassignmentRef,
UIFlags uiFlags 
)
pure virtual

Extracts the contents of the package file.

Parameters
packageFileIN the assignment package file to open
assignmentRefIN the current assignment in the original indesign pub
uiFlags- a flag indicating whether or not ui is permitted
Returns
ErrorCode kSuccess if open succeeded, kFailure otherwse.
virtual ErrorCode IAssignmentMgr::ExplodeInDesignPackageToFolder (const IDFilepackageFile,
const IDFiletargetFolder,
UIFlags uiFlags 
)
pure virtual

Extracts the contents of the package file to the specified folder.

Parameters
packageFileIN the assignment package file to open
targetFolderIN the folder to extract the package to
uiFlags- a flag indicating whether or not ui is permitted
virtual ErrorCode IAssignmentMgr::ExportAssignment (const IAssignmentassignment,
IPMStreamstream,
UIFlags uiFlags = kFullUI 
)
pure virtual

Export an assignment.

Parameters
assignment- The assignment to export
stream- The stream to export into
uiFlags- A flag indicating whether or not ui is permitted
Returns
- An error code signifying success or failure
virtual ErrorCode IAssignmentMgr::ForwardPackageAssignment (IAssignmentassignment,
const IDFilepackageFile,
UIFlags uiFlags = kFullUI,
bool16 includeAdded = kTrue 
)
pure virtual

Forward an assignment package to another InCopy user. Creates a package for the assignment at the specified file location which includes the assigned stories and the original manifest file and package info file. Optionally, forwards linked files added by InCopy user.

Parameters
assignment- The assignment to forward
packageFile- The file to hold the forward package, an InCopy assignment package
uiFlags- a flag indicating whether or not ui is permitted
includeAdded- a flag indicating whether or not added links should be forwarded
Returns
- An error code signifying success or failure
virtual IAssignedDocument* IAssignmentMgr::GetAssignedDocument (IDataBasedb) const
pure virtual

Find the IAssignedDocument record based on a document's file path

Parameters
db- The document's database
Returns
- A pointer to the IAssignedDocument record, or nil if there is no info for that document.
virtual IAssignedDocument* IAssignmentMgr::GetAssignedDocument (const PMStringdocPath) const
pure virtual

Find the IAssignedDocument record based on a document's file path

Parameters
docPath- The document's file
Returns
- A pointer to the IAssignedDocument record, or nil if there is no info for that document.
virtual IDFile IAssignmentMgr::GetAssignmentFileToOpenFromPackage (const IDFilepackageFile)
pure virtual

Returns the assignment file to be opened from the specified package file.

Parameters
packageFilethe package file to examine
Returns
IDFile the file to be opened
virtual IAssignmentMgr::FrameStatus IAssignmentMgr::GetFrameStatus (const UIDRefobject) const
pure virtual

Return the current state of a particular page item

Parameters
object- A page item's UIDRef
Returns
- An enum describing the status of the page item
virtual void IAssignmentMgr::GetStoryListOnAssignment (IAssignmentassignment,
UIDListstoryList 
) const
pure virtual

Return a list of assigned stories in an assignment

Parameters
docInfo- The IAssignedDocument reference
storyPath- The path of the assignment's file
storyList- The returned list of stories
virtual void IAssignmentMgr::GetStoryListOnDoc (IAssignedDocumentdocInfo,
UIDListstoryList 
) const
pure virtual

Return a list of assigned stories in the document

Parameters
docInfo- The IAssignedDocument reference
storyList- The returned list of stories
virtual ErrorCode IAssignmentMgr::ImportAssignment (IPMStreamstream,
IINXImportPolicy * policy = nil,
UIFlags uiFlags = kFullUI 
)
pure virtual

Import an assignment.

Parameters
stream- The stream to import from
policy- The policy to use to import, if nil then will use kICAssignmentImportPolicyBoss
uiFlags- A flag indicating whether or not ui is permitted
Returns
- An error code signifying success or failure
virtual bool16 IAssignmentMgr::IsAssigned (const UIDRefobject) const
pure virtual

Get the assignment status of a UID.

Parameters
object- The UIDRef of the document, layer, story or article to assign.
Returns
- An boolean indicating whether the specified UID is assigned
virtual bool16 IAssignmentMgr::IsAssignmentPackaged (IAssignmentassignment)
pure virtual

Tests whether the specified assignment is packaged or not.

Parameters
assignmentIN the assignment to test
Returns
bool16 kTrue if assignment is packaged, kFalse otherwise
virtual bool16 IAssignmentMgr::IsAssignmentPackageUpToDate (IAssignmentassignment)
pure virtual

Tests whether the specified assignment's package is up to date or not; that is, did it contain the current assignment file.

Parameters
assignmentIN the assignment to test
Returns
bool16 kTrue if assignment package is up to date, kFalse otherwise
virtual bool16 IAssignmentMgr::IsTextStory (IAssignedDocumentdocInfo,
const PMStringassignPath,
const PMStringstoryPath 
) const
pure virtual

Whether a linked file is a text story (as opposed to an image)

Parameters
docInfo- The IAssignedDocument reference
assignPath- The assignment's file
storyPath- The linked story's path
Returns
- Whether or not the storyPath file is a linked story
virtual bool16 IAssignmentMgr::IsTextStory (const UIDRefitemRef) const
pure virtual

Whether a page item is a text story (as opposed to an image)

Parameters
itemRef- The page item's UIDRef
Returns
- Whether or not the itemRef is a linked story
virtual void IAssignmentMgr::NotifyPanel (ClassID theChange = kAssignmentMgrChangedNotifyMsg)
pure virtual

Notify the StoryListPanel that it needs to update.

Parameters
theChange= kAssignmentMgrChangedNotifyMsg will ask the assignment panel to rebuild, this was used when you change the structure of assignment nodes theChange = kAssignmentPanelInvalidateNotifyMsg will cause the assignment panel redraw, this was used when you only want to redraw the panel
virtual ErrorCode IAssignmentMgr::OpenAssignmentWithProxy (const PMStringassignFile,
InterfacePtr< IAssignment > & assignment,
UIFlags uiFlags = kFullUI 
)
pure virtual

Open an assignment from its file and create the document proxy. This should only be called from InCopy when opening an assignment file. document - The empty document which will become the proxy.

Parameters
assignFile- The assignment file path
assignment- An out parameter returning a pointer to the IAssignment (can be nil)
uiFlags- A flag indicating whether or not ui is permitted
Returns
- An error code signifying success or failure
virtual ErrorCode IAssignmentMgr::PackageAssignment (IAssignmentassignment,
const IDFilepackageFile,
UIFlags uiFlags = kFullUI 
)
pure virtual

Package an assignment into a job bag zip file.

Parameters
assignment- The assignment to package
packageFile- The file to hold the package, an InCopy assignment package
uiFlags- a flag indicating whether or not ui is permitted
Returns
- An error code signifying success or failure
virtual IAssignment* IAssignmentMgr::QueryAssignment (IAssignedDocumentdoc,
const PMStringassignFile 
) const
pure virtual

Get an existing assignment

Parameters
doc- The assigned document which contains the assignment
assignFile- The file for the assignment, which is empty for the unassignment
Returns
- A pointer to the resulting IAssignment record
virtual void IAssignmentMgr::QueryAssignmentAndAssignedStory (const UIDRefstoryref,
InterfacePtr< IAssignment > & iAssignmentRef,
InterfacePtr< IAssignedStory > & iAssignedStoryRef 
) const
pure virtual

This is used by the panel to get labels for display

Parameters
storyref- a UIDRef to the story
IAssignment- an out parameter that returns a pointer to the story's IAssignment
IAssignedStory- an out parameter that returns a pointer to the story's IAssignedStory
virtual ErrorCode IAssignmentMgr::ReturnPackageAssignment (IAssignmentassignment,
const IDFilepackageFile,
UIFlags uiFlags = kFullUI,
bool16 includeAdded = kTrue 
)
pure virtual

Return an assignment package to InDesign user. Creates a package for the assignment at the specified file location which includes the assigned stories and the original manifest file and package info file. Optionally, forwards linked files added by InCopy user.

Parameters
assignment- The assignment to return
packageFile- The file to hold the return package, an InDesign assignment package
uiFlags- a flag indicating whether or not ui is permitted
includeAdded- a flag indicating whether or not added links should be forwarded
Returns
- An error code signifying success or failure
virtual ErrorCode IAssignmentMgr::SaveAssignment (IAssignmentassignment,
UIFlags uiFlags = kFullUI 
)
pure virtual

Save an assignment to its file.

Parameters
assignment- The assignment to export
uiFlags- A flag indicating whether or not ui is permitted
Returns
- An error code signifying success or failure
virtual ErrorCode IAssignmentMgr::SaveAssignments (IDocumentdocument,
UIFlags uiFlags = kFullUI,
bool16 forceSave = kFalse 
)
pure virtual

Save all assignments associated with a specific document

Parameters
document- The document containing the assignments to be saved
uiFlags- A flag indicating whether or not ui is permitted
forceSave- A flag indicating whether or not up to date assignments should be saved. If false, only out of date assignments are saved.
Returns
- An error code signifying success or failure
virtual bool16 IAssignmentMgr::UpdateAssignmentOptions (IAssignmentassignment,
const PMStringassignName,
const PMStringfile,
const PMStringassignWriter,
const IAssignment::AssignmentExportOptions exportOption,
const UID uiColor,
const bool16 includeLinkFilesPackaging,
UIFlags uiFlags = kFullUI 
)
pure virtual

Update the Assignment options. Calls ProcessCommand.

Parameters
uiFlags- A flag indicating whether or not ui is permitted
Returns
- kTrue if this assignment is dirty