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

#include <IPrintDataHelperStrategy.h>

Inheritance diagram for IPrintDataHelperStrategy:
IPMUnknownCPMUnknown< IPrintDataHelperStrategy >PrtMemPrintDataHelperStrategy

Public Types

enum  { kDefaultIID = IID_IPRINTDATAHELPERSTRATEGY }
 

Public Member Functions

virtual bool16 IsLocked (const IPrintData *printData, IPrintData::Id id) const =0
 
virtual bool16 IsRelevant (const IPrintData *printData, IPrintData::Id id) const =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 allowing the override of the current locked and relevant states of print data items.

Third parties can create a CServiceProvider interface which returns the ServiceID kPrintDataHelperStrategyService. If they put this service provider in a boss that also provides an implementation of this (IPrintDataHelperStrategy) interface, the IsLocked() and IsRelevant() methods will be called for the print dialog ids. NOTE: the most restrictive interface wins - once someone sets an id to be locked, it is locked, and other implementations will not be called. The same is true for being relevant. Once someone returns kFalse for IsRelevant(), the id is locked and disabled, and other implementations will not be called.

This interface allows the locking of items that otherwise would not be locked by the print data helper. Although an item's locked state can be partially controlled via this interface, print components are still free to change an item's value as necessary to maintain the print data in a consistent and valid context. This interface is ONLY a means of controlling the print dialog UI and print scripting.

This interface also allows the setting of items to a non-relevant state that otherwise would be set to a relevant state by the print data helper. Although an item's relevant state can be partially controlled via this interface, print components are still free to change an item's value as necessary to maintain the print data in a consistent and valid context.

See Also
IPrintData

Member Function Documentation

virtual bool16 IPrintDataHelperStrategy::IsLocked (const IPrintDataprintData,
IPrintData::Id id 
) const
pure virtual

Returns a boolean value denoting whether the print data item identified by the given identifier is in a locked state. Locked print data items cannot be changed by the user, but are visible to the user. The locked state is superseded by the relevant state - in other words, if the id is not relevant, it is automatically locked and disabled.

Parameters
printDataIN Pointer to print data containing the item
idIN Identifier of the print data item
Returns
kTrue if the item is always locked, else kFalse

Implemented in PrtMemPrintDataHelperStrategy.

virtual bool16 IPrintDataHelperStrategy::IsRelevant (const IPrintDataprintData,
IPrintData::Id id 
) const
pure virtual

Returns a boolean value denoting whether the print data item identified by the given identifier is in a relevant state. Print data items that are not relevant cannot be changed by the user, and are not visible to the user. The relevant state superseds the locked state - in other words, if the id is not relevant, it is automatically locked and disabled.

Parameters
printDataIN Pointer to print data containing the item
idIN Identifier of the print data item
Returns
kTrue if the item is relevant, else kFalse

Implemented in PrtMemPrintDataHelperStrategy.