InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PstLstLayoutCSB Class Reference
Inheritance diagram for PstLstLayoutCSB:
CPMUnknown< IPstLstSuite >IPstLstSuiteIPMUnknown

Public Member Functions

 PstLstLayoutCSB (IPMUnknown *boss)
 
virtual ~PstLstLayoutCSB (void)
 
virtual void GetNumDrawablePageItemSelected (int32 &num) const
 
virtual void GetNthSelectedDrawablePageItem (int32 nth, UIDRef &item) const
 
virtual void Startup (void)
 
virtual void Shutdown (void)
 
virtual void SelectionChanged (SuiteBroadcastData *, const PMIID &, void *)
 
virtual void SelectionAttributeChanged (SuiteBroadcastData *, const PMIID &, void *)
 
virtual void HandleIntegratorSuiteMessage (void *, const ClassID &, ISubject *, const PMIID &, void *)
 
virtual ProtocolCollectionCreateObserverProtocolCollection (void)
 
- Public Member Functions inherited from CPMUnknown< IPstLstSuite >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Public Types inherited from IPstLstSuite
enum  { kDefaultIID = IID_IPSTLST_ISUITE }
 
typedef K2Vector
< PstLstDataDescription
PstLstDataVector
 
- Protected Member Functions inherited from CPMUnknown< IPstLstSuite >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< IPstLstSuite >
HelperInterface fHelperInterface
 

Detailed Description

Layout concrete selection boss (CSB) IPstLstSuite implementation. The suite implementations on the CSBs are responsible for doing all of the model specific work. The implementation of a CSB suite deals with the model format of its owning boss. The only information that the suite should need is from sibling interfaces on the CSB, primarily the target interface. This interface specifies which items to act upon. For the LayoutCSB, the target interface is ILayoutTarget which wraps a UIDList. So usually you see the methods in this CSB will first get an InterfacePtr to a ILayoutTarget, then it gets the UIDList of the selected items from the pointer.

Note that the client does not interact with the CSB (which has all the real implementation of the suite) directly, the client interacts with the ASB only. Also note that the Suite API shouldn't contain model data that is specific to a selection format (layout uidLists, text model/range, etc) so that the client code can be completely decoupled from the underlying CSB.

This suite is an advanced suite which uses selection extension. The selection extension is a bridge between a suite implementation with an unknown interface (IPstLstData) and the selection architecture. The main reason this extension is needed is so we can be notified of current selection's model change (thru SelectionAttributeChanged).

Constructor & Destructor Documentation

PstLstLayoutCSB::PstLstLayoutCSB (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.
PstLstLayoutCSB::~PstLstLayoutCSB (void )
virtual

Destructor.

Member Function Documentation

ProtocolCollection * PstLstLayoutCSB::CreateObserverProtocolCollection (void )
virtual

Each suite must define the protocols that contain the attributes that they care about. The Layout CSB's selection attribute observer asks each suite with a selection extension for a list of protocols to observer on the document. Thereby, allowing all suites to share a single observer. When a document broadcast occurs with the specified protocol, the suite must first determine if the command affects the selection by comparing the commands target to the LayoutTarget (This is necessary because all commands don't use the UIDList for page items.).

void PstLstLayoutCSB::GetNthSelectedDrawablePageItem (int32 nth,
UIDRefitem 
) const
virtual

Get the nth selected drawable page item with a valid IPstLstUIDList Interface.

Implements IPstLstSuite.

void PstLstLayoutCSB::GetNumDrawablePageItemSelected (int32 & num) const
virtual

Check the number of a drawable page item selected, a drawable page item will have a IPstLstUIDList interface when the plug-in is loaded. So we will check if we can get a valid IPstLstUIDList InterfacePtr thru the selected items as the test to see if it is a drawable page item.

Implements IPstLstSuite.

virtual void PstLstLayoutCSB::HandleIntegratorSuiteMessage (void * ,
const ClassID,
ISubject,
const PMIID,
void *  
)
inlinevirtual

This is only supported on the ASB and is rarely used.

void PstLstLayoutCSB::SelectionAttributeChanged (SuiteBroadcastDatabroadcastData,
const PMIIDmessageID,
void * message 
)
virtual

This function is called when an attribute of the selection has changed. It is only called on the CSB whose selection attribute has changed. For the layout CSB an ProtocolCollection must be supplied first.

virtual void PstLstLayoutCSB::SelectionChanged (SuiteBroadcastData,
const PMIID,
void *  
)
inlinevirtual

This function is called when an item is added to or removed from the selection. Suites on the changing CSB and the ASB are called.

virtual void PstLstLayoutCSB::Shutdown (void )
inlinevirtual

This function is called when the selection sub-system shuts down. Any suite termination code can be placed in this funciton. Called for suites on the ASB and CSBs.

virtual void PstLstLayoutCSB::Startup (void )
inlinevirtual

This function is called when the selection sub-system starts up. Any suite initialization code can be placed in this funciton. Called for suites on the ASB and CSBs.