InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpManipulatePrintStyles Class Reference

Classes

struct  PrintDataStruct
 
struct  PrintDeviceInfoStruct
 

Public Member Functions

ErrorCode InspectPrintStyle (const UIDRef &printStyle)
 
ErrorCode AddPrintStyle (IPrStStyleListMgr *printStyleListMgr, const PMString &newPrintStyleName, UIDRef &newPrintStyle)
 
ErrorCode ModifyPrintStyleName (IPrStStyleListMgr *printStyleListMgr, const int32 printStyleIndex, const PMString &newPrintStyleName)
 
ErrorCode ModifyPrintStyle (IPrStStyleListMgr *printStyleListMgr, const int32 printStyleIndex, UIDRef &modifiedPrintStyle)
 
ErrorCode DeletePrintStyle (IPrStStyleListMgr *printStyleListMgr, const int32 printStyleIndex)
 
PrintDataStruct GetPrintData (IPrintData *printData)
 
PrintDeviceInfoStruct GetPrintDeviceInfo (const IPrintDeviceInfo *printDeviceInfo)
 

Detailed Description

  • A code snippet that shows how to manipulate print preset styles in a document.

,

Author
Ken Sadahiro

Member Function Documentation

ErrorCode SnpManipulatePrintStyles::AddPrintStyle (IPrStStyleListMgrprintStyleListMgr,
const PMStringnewPrintStyleName,
UIDRefnewPrintStyle 
)

Add a new print preset style with the given name.

Parameters
printStyleListMgrIN The IPrStStyleListMgr to which you want to add.
newPrintStyleNameIN The name of the print preset style to add.
newPrintStyleOUT The UIDRef of the new print preset style.
Returns
Status code. kSuccess if success.
See Also
IPrStStyleListMgr::AddStyle
ErrorCode SnpManipulatePrintStyles::DeletePrintStyle (IPrStStyleListMgrprintStyleListMgr,
const int32 printStyleIndex 
)

Delete an existing print preset style.

Parameters
printStyleListMgrIN The IPrStStyleListMgr from which you want to delete the print style.
printStyleIndexIN The index of the print preset style to delete.
Returns
Status code. kSuccess if success.
See Also
IPrStStyleListMgr::DeleteNthStyle
SnpManipulatePrintStyles::PrintDataStruct SnpManipulatePrintStyles::GetPrintData (IPrintDataprintData)

Utility method: Turn IPrintData into a PrintDataStruct.

Parameters
printDataIN The IPrintData to examine.
Returns
PrintDataStruct all filled out, unless printData is nil.
SnpManipulatePrintStyles::PrintDeviceInfoStruct SnpManipulatePrintStyles::GetPrintDeviceInfo (const IPrintDeviceInfoprintDeviceInfo)

Utility method: Turn IPrintDeviceInfo into a PrintDeviceInfoStruct.

Parameters
printDeviceInfoIN The IPrintDeviceInfo to examine.
Returns
PrintDeviceInfoStruct all filled out, unless printDeviceInfo is nil.
ErrorCode SnpManipulatePrintStyles::InspectPrintStyle (const UIDRefprintStyle)

Inspects a print preset style, and displays some of the settings to SNIPLOG.

Parameters
printStyleIN The print style (kPrStStyleBoss) to examine.
See Also
kPrStStyleBoss
IPrintData
IGenStyleLockInfo
IStringData
IPersistUIDData
IPrintDeviceInfo
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulatePrintStyles::ModifyPrintStyle (IPrStStyleListMgrprintStyleListMgr,
const int32 printStyleIndex,
UIDRefmodifiedPrintStyle 
)

Modify the settings of an existing print preset style.

NOTE: IPrStStyleListMgr inherits from IGenEdtStlListMgr, unlike ITrapStyleListMgr, so the EditNthStyle method behaves a bit differently between the two interfaces. For instance, the parameters and the return type are all different between IPrStStyleListMgr::EditNthStyle and ITrapStyleListMgr::EditNthStyle. And while the IPrStStyleListMgr::EditNthStyle implementation does open a dialog box, ITrapStyleListMgr::EditNthStyle does not.

Parameters
printStyleListMgrIN The IPrStStyleListMgr that contains the print preset style to modify.
printStyleIndexIN The index of the print preset style to modify.
modifiedPrintStyleOUT The UIDRef of the modified print style. This will be the UIDRef of the modified style if a change was made. If no change was made, this will be UIDRef::gNull.
Returns
Status code. kSuccess if success.
See Also
IPrStStyleListMgr::EditNthStyle
ErrorCode SnpManipulatePrintStyles::ModifyPrintStyleName (IPrStStyleListMgrprintStyleListMgr,
const int32 printStyleIndex,
const PMStringnewPrintStyleName 
)

Modify the name of an existing print preset style.

Parameters
printStyleListMgrIN The IPrStStyleListMgr that contains the print preset style to modify.
printStyleIndexIN The index of the print preset style to modify.
newPrintStyleNameIN The new name of the print preset style.
Returns
Status code. kSuccess if success.
See Also
IPrStStyleListMgr::SetNthStyleName