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

#include <ISelectionExtension.h>

Inheritance diagram for ISelectionExtension:
IPMUnknown

Public Member Functions

virtual void SelectionChanged (SuiteBroadcastData *x, const PMIID &messageID, void *y)=0
 
virtual void SelectionAttributeChanged (SuiteBroadcastData *x, const PMIID &messageID, void *y)=0
 
virtual void HandleIntegratorSuiteMessage (void *x, const ClassID &y, ISubject *z, const PMIID &i, void *j, ISelectionManager *k)=0
 
virtual ProtocolCollectionCreateObserverProtocolCollection (void)=0
 
virtual void Startup (void)=0
 
virtual void Shutdown (void)=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

ISelectionExtension extends a selection suite interface

Member Function Documentation

virtual ProtocolCollection* ISelectionExtension::CreateObserverProtocolCollection (void )
pure virtual

Return the IIDs that this suite is interested in observering. Somewhat CSB specific. For instance, in the Layout CSB, the protocol collection is used when attaching a document observer. Thereby allowing only one document observer to be shared by all suites.

Returns
ProtocolCollection the protocol collection
virtual void ISelectionExtension::HandleIntegratorSuiteMessage (void * x,
const ClassIDy,
ISubjectz,
const PMIIDi,
void * j,
ISelectionManagerk 
)
pure virtual

This member function is called when a suite on a CSB sends an integrator message. The ASB decodes the message and forwards it onto the integrator suite.

It is possible for a disabled integrator suite to receive a message.

Parameters
xvoid star y classID z ISubject i PMIID j void star k ISelectionManager
virtual void ISelectionExtension::SelectionAttributeChanged (SuiteBroadcastDatax,
const PMIIDmessageID,
void * y 
)
pure virtual

This member function is called whenever some attribute of the items that make up selection have changed. For instance if a page item is selected and a script changes its color, an observer will see the change and call this member function. If the change doesn't affect your data, then your clients do not need to be updated. If the attribute change applies to the selection AND the suite wants to broadcast something to it's clients. It first checks to see if it already has an entry in SuiteBroadcastData*. If it does, it modifies the entry. Otherwise, it appends new data to the list. The void* is CSB specific. It contains the details of the update message. For example, the LayoutCSB passes the parameters from Observer::Update to this routine in a struct, IDocumentBroadcastMsg. The TableCSB and TextCSB pass nil. The Graphic attribute caches on the CSBs also use this member function in a proprietary way, so the message ID should always be checked prior to downcasting the void*.

This is only called on suites that exist on CSBs. Integrator suites on the ASB do NOT use this member function.

Parameters
xSuiteBroadcastData
messageIDPMIID
yvoid star
virtual void ISelectionExtension::SelectionChanged (SuiteBroadcastDatax,
const PMIIDmessageID,
void * y 
)
pure virtual

When the selection changes (i.e. something was added to or removed from the selection), the CSB's corresponding selection suite will update the CSB's data interface and then call IConcreteSelection::SelectionChanged() which will notify each ISuite via this member function before broadcasting the change to the client code.

A subclass should use this member fucntion to set a flag that any caches it has may have become stale. The next access to the suite would then rebuild the cache. Do not rebuild the cache in response to this message there may not be any attached clients using your suite functionality.

This is called on all ISuites that exist on the CSB which is changing and on Integrator suites (on the ASB). On CSBs the void* is not used and is nil. The ASB will send a selection changed message when the enabled CSBs have changed. It passes information in the void* of type ISelectionChangedISuiteMessage. This does not pre-empt the normal selection change message that is always sent.

Parameters
xSuiteBroadcastData
messageIDPMIID
yvoid star
virtual void ISelectionExtension::Shutdown (void )
pure virtual

Called when the suite's owning boss is about to be released.

virtual void ISelectionExtension::Startup (void )
pure virtual

Called when the suite's owning boss is initialized.