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

#include <IBPISuite.h>

Inheritance diagram for IBPISuite:
IPMUnknownCPMUnknown< IBPISuite >BPISuiteASBBPISuiteCSBBPISuiteDefaultCSBBPISuiteLayoutCSBBPISuiteTextCSB

Public Types

enum  { kDefaultIID = IID_IBPISUITE }
 

Public Member Functions

virtual bool16 CanApplyBPIData (void)=0
 
virtual ErrorCode ApplyBPIData (const WideString &value)=0
 
virtual bool16 CanGetBPIData (void)=0
 
virtual void GetBPIData (K2Vector< WideString > &values)=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

From SDK sample; new abstract suite interface that extends the capability of the selection so that it can manipulate the value of IBPIData associated with the objects that are currently selected.

Four implementations are provided in this plug-in, BPISuiteASB, BPISuiteLayoutCSB, BPISuiteTextCSB and BPISuiteDefaultCSB.

Note: This suite API doesn't contain model data that is specific to a selection format (UIDList, text model/range, etc) so that the client code is completely decoupled from the underlying concrete selection.

For more documentation on suites please read the Selection fundamentals chapter in Programming Guide.

See Also
Selection fundamentals chapter in Programming Guide

Member Function Documentation

virtual ErrorCode IBPISuite::ApplyBPIData (const WideStringvalue)
pure virtual

Apply the given value for IBPIData to the objects that are currently selected.

Precondition
IBPISuite::CanApplyBPIData returns kTrue
Parameters
valueIN the string value to be set in the IBPIData of the selected objects.
Returns
kSuccess if the value was applied successfully, kFailure otherwise.

Implemented in BPISuiteCSB, and BPISuiteASB.

virtual bool16 IBPISuite::CanApplyBPIData (void )
pure virtual
Returns
kTrue if the caller can apply IBPIData to the objects that are currently selected, kFalse otherwise.

Implemented in BPISuiteCSB, and BPISuiteASB.

virtual bool16 IBPISuite::CanGetBPIData (void )
pure virtual
Returns
kTrue if there is any IBPIData associated with objects that are currently selected, kFalse otherwise

Implemented in BPISuiteASB, and BPISuiteCSB.

virtual void IBPISuite::GetBPIData (K2Vector< WideString > & values)
pure virtual

Retrieve the IBPIData associated with the objects that are currently selected. Note that since more than one object can be selected and each one can have distinct IBPIData value a vector is used to get the data.

Precondition
IBPISuite::CanGetBPIData returns kTrue
Parameters
valuesOUT vector of the IBPIData(a WideString) values of the current selected items. Note only unique string values are returned. If several objects have the same IBPIData value e.g. the string "hello" only one "hello" string is returned.

Implemented in BPISuiteASB, and BPISuiteCSB.