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

#include <IAssignment.h>

Inheritance diagram for IAssignment:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IASSIGNMENT }
 
enum  AssignmentExportOptions { kAssignmentExportFrames = 0, kAssignmentExportSpreads, kAssignmentExportAll }
 
enum  AssignmentCompatibility { kAssignmentCS3Compatibility = 0, kAssignmentCS4Compatibility, kUnassignedCompatibility }
 

Public Member Functions

virtual const PMStringGetName () const =0
 
virtual void SetName (const PMString &name)=0
 
virtual const PMStringGetFile ()=0
 
virtual void SetFile (const PMString &file)=0
 
virtual const URIGetURI ()=0
 
virtual void SetURI (const URI &uri)=0
 
virtual const PMStringGetUser () const =0
 
virtual void SetUser (const PMString &user)=0
 
virtual UID GetColor () const =0
 
virtual void SetColor (UID color)=0
 
virtual AssignmentExportOptions GetExportOption () const =0
 
virtual void SetExportOption (AssignmentExportOptions options)=0
 
virtual AssignmentCompatibility GetCompatibility () const =0
 
virtual bool16 GetDirty ()=0
 
virtual void SetDirty (bool16 dirty)=0
 
virtual UIDList GetStories () const =0
 
virtual void AddStory (IAssignedStory *story)=0
 
virtual void RemoveStory (IAssignedStory *story)=0
 
virtual void DeleteStory (IAssignedStory *story)=0
 
virtual void MoveStory (IAssignedStory *story, IAssignedStory *beforeStory)=0
 
virtual ErrorCode SetPropsCmd (const PMString *name, const PMString *file, const PMString *user, const UID *color, const AssignmentExportOptions *options, const bool16 *dirty, const bool16 *includeLinkFilesPackaging, const URI *uri=nil)=0
 
virtual ErrorCode RemoveStoryCmd (IAssignedStory *story)=0
 
virtual ErrorCode MoveStoryCmd (IAssignedStory *story, IAssignedStory *beforeStory)=0
 
virtual bool16 GetIncludeLinkedFilesWhenPackage () const =0
 
virtual void SetIncludeLinkedFilesWhenPackage (bool16 includeFlag)=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 model the assignment of stories and images.

See Also
IAssignedDocument
IAssignmentMgr

Member Enumeration Documentation

The assignment compatibility.
Enumerator
kAssignmentCS3Compatibility 

Compatible with CS3: Assignment file is INCA format and can only contain INCX and INCD stories.

kAssignmentCS4Compatibility 

Optimized for CS4: Assignment file is ICMA format and can only have ICML stories.

kUnassignedCompatibility 

Unassigned: Assignment does not export and can contain all assigned story formats.

The assignment preview export options.
Enumerator
kAssignmentExportFrames 

Export only wireframes for unassigned stories, no content or images

kAssignmentExportSpreads 

Export only the spreads which have assigned stories on them

kAssignmentExportAll 

Export the entire publication

Member Function Documentation

virtual void IAssignment::AddStory (IAssignedStorystory)
pure virtual

Adds a story to the assignment. This must be called from a command.

Parameters
story- The IAssignedStory to add.
virtual void IAssignment::DeleteStory (IAssignedStorystory)
pure virtual

Deletes an assigned story from the database. This must be called from a command.

Parameters
story- The assigned story to delete. Do not hold onto this story, as it will be deleted and uncallable after this completes.
virtual UID IAssignment::GetColor () const
pure virtual

The color to use when showing assigned frame edges.

Returns
- The UID of the color object, which should be an IInCopyUIColor object.
virtual AssignmentCompatibility IAssignment::GetCompatibility () const
pure virtual

Determines and returns the compatibility for this assignment. This is read-only and, except for Unassigned, is computed based on the assignment file type info ID where kAssignmentFileTypeInfoID is kAssignmentCS3Compatibility and kAssignmentMarkupFileTypeInfoID is kAssignmentCS4Compatibility.

Returns
- The compatibility enumeration.
virtual bool16 IAssignment::GetDirty ()
pure virtual

Whether the assignment needs to be written or not. Dirty assignments have changed since last updated.

Returns
- True if not saved.
virtual AssignmentExportOptions IAssignment::GetExportOption () const
pure virtual

The assignment preview export level for this assignment.

Returns
- The export level enumeration.
virtual const PMString& IAssignment::GetFile ()
pure virtual

Returns the path of the assignment file itself.

Returns
- A reference to the assignment's PMString file path.
virtual bool16 IAssignment::GetIncludeLinkedFilesWhenPackage () const
pure virtual

The assignment option for including linked files or not when packaging.

Returns
bool16 kTrue if should include, otherwise kFalse.
virtual const PMString& IAssignment::GetName () const
pure virtual

Returns the name of the assignment.

Returns
A reference to the assignment's PMString name
virtual UIDList IAssignment::GetStories () const
pure virtual

The list of stories in this assignment. You can ask this list for a const iterator.

Returns
- A const reference to the list, which can supply a const_iterator.
virtual const URI& IAssignment::GetURI ()
pure virtual

Returns the URI of the assignment itself.

Returns
- A reference to the assignment's URI.
virtual const PMString& IAssignment::GetUser () const
pure virtual

The name that this assignment is assigned to. Currently only displayed in the panel, not used.

Returns
- A reference to the assigned name.
virtual void IAssignment::MoveStory (IAssignedStorystory,
IAssignedStorybeforeStory 
)
pure virtual

Reorders the story list. This must be called from a command.

Parameters
story- The assigned story to move.
beforeStory- The assigned story to place this before. Pass nil for the end of the list.
virtual ErrorCode IAssignment::MoveStoryCmd (IAssignedStorystory,
IAssignedStorybeforeStory 
)
pure virtual

Process a command to move a story within the assigned story list.

Parameters
story- The story to move.
beforeStory- The story to move before, or nil for the end.
Returns
- Any errors that may have occurred.
virtual void IAssignment::RemoveStory (IAssignedStorystory)
pure virtual

Removes a story from the assignment and unregisters it from its page items. This will unreference the story, so keep a reference if you want to use it. This must be called from a command.

Parameters
story- The story to remove.
virtual ErrorCode IAssignment::RemoveStoryCmd (IAssignedStorystory)
pure virtual

Processes a command which removes an assigned story from the assignment.

Parameters
story- The assigned story to remove.
Returns
- Any errors that may have occurred.
virtual void IAssignment::SetColor (UID color)
pure virtual

Set the color for an assignment to use when showing assigned frame edges.

Parameters
color- The UID of the IInCopyUIColor object.
virtual void IAssignment::SetDirty (bool16 dirty)
pure virtual

Set whether or not this assignment should be saved.

Parameters
dirty- Pass true in to make sure this assignment requests to be saved, or false if you want to mark this assignment as up to date.
virtual void IAssignment::SetExportOption (AssignmentExportOptions options)
pure virtual

Set the assignment preview export level.

Parameters
options- The enumeration desired.
virtual void IAssignment::SetFile (const PMStringfile)
pure virtual

Changes the file the assignment writes to.

Parameters
file- A new file path in the current platform encoding.
virtual void IAssignment::SetIncludeLinkedFilesWhenPackage (bool16 includeFlag)
pure virtual

Set the assignment option for including linked files or not when packaging.

Parameters
includeFlagpass kTrue to include linked files, otherwise kFalse.
virtual void IAssignment::SetName (const PMStringname)
pure virtual

Sets the name of the assignment.

Parameters
name- A PMString containing the new name.
virtual ErrorCode IAssignment::SetPropsCmd (const PMStringname,
const PMStringfile,
const PMStringuser,
const UIDcolor,
const AssignmentExportOptionsoptions,
const bool16 * dirty,
const bool16 * includeLinkFilesPackaging,
const URIuri = nil 
)
pure virtual

Process a command to set the various properties of an assignment.

Parameters
name- A pointer to a new name, or nil to not change the name.
file- A pointer to a new file path, or nil to not change the file path.
user- A pointer to a new user name, or nil to not change the user name.
color- A pointer to the new color, or nil to not change the color.
options- A pointer to the new export options, or nil to not change the export options.
dirty- A pointer to the new dirty flag, or nil to not change the dirty state
includeLinkFilesPackaging- A pointer to the new option for including linked files when packaging.
uri- A pointer to the new uri, or nil to base the uri on the file if provided or to not change the uri. (typically allowing the other changes to dirty the assignment).
Returns
- Any errors that may have occured.
virtual void IAssignment::SetURI (const URIuri)
pure virtual

Changes the URI the assignment writes to.

Parameters
uri- A new URI.
virtual void IAssignment::SetUser (const PMStringuser)
pure virtual

Set the name of the assigned user for this assignment. Currently only displayed in the panel, not used.

Parameters
user- A PMString containing the new user name.