![]() | InDesign SDK 20.5 |
#include <SelectionObserver.h>

Public Member Functions | |
| ActiveSelectionObserver (IPMUnknown *boss, PMIID observerIID=IID_IOBSERVER) | |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
| virtual void | Update (const ClassID &c, ISubject *, const PMIID &p, void *v) |
Public Member Functions inherited from CObserver | |
| CObserver (IPMUnknown *boss, PMIID interfaceID=IID_IOBSERVER) | |
| IChangeManager * | GetChangeManager () const |
| virtual void | SetAttachIID (PMIID iid) |
| virtual PMIID | GetAttachIID () const |
| virtual void | SetEnabled (bool16 state) |
| virtual bool16 | IsEnabled () const |
| virtual void | LazyUpdate (ISubject *theSubject, const PMIID &protocol, const LazyNotificationData *data) |
Protected Member Functions | |
| virtual void | HandleSelectionChanged (const ISelectionMessage *) |
| virtual void | HandleFrequentSelectionChanged () |
| virtual void | HandleSelectionAttributeChanged (const ISelectionMessage *) |
| virtual void | AttachToSelectionSubject (ISubject *selectionSubject) |
| virtual void | DetachFromSelectionSubject (ISubject *selectionSubject) |
| virtual void | HandleActiveSelectionChanged () |
| virtual void | HandleSelectionUpdate (const ClassID &c, ISubject *s, const PMIID &p, void *v) |
| virtual IPMUnknown * | QueryAbstractSelection (const PMIID &p) |
| virtual void | AttachToActiveSelection () |
| virtual void | DetachFromActiveSelection () |
Protected Attributes | |
| PMIID | fObserverIID |
| ISelectionManager * | fCurrentSelection |
Protected Attributes inherited from CObserver | |
| bool16 | fDetachSubjectsOnDelete |
| PMIID | fAttachIID |
| const UIDRef | fThisRef |
| bool16 | fEnabled |
Additional Inherited Members | |
Public Types inherited from IObserver | |
| enum | { kDefaultIID = IID_IOBSERVER } |
Active Selection Observer observes the active context so that it is always observing the active selection (ASB) via the IID_SELECTION_MESSAGE protocol.
| protectedvirtual |
DESCR: Attach this observer to the active selection. Obtains the ISubject of the active selection and passes it to AttachToSelectionSubject() which is overridden by subclasses.
| protectedvirtual |
DESCR: Attach this observer to the active selection using protocol IID_SELECTION_MESSAGE.
| selectionSubject | the Subject |
| virtual |
Called when this observer should attach to the subject(s) that it observes (Active Context and Active Abstract Selection).
NOTE: Subclasses should override AttachToSelectionSubject() to attach to the the active selection using their own protocol(s). Subclasses which override this method should call the inherited method prior to attaching to their own specific protocols.
Reimplemented from CObserver.
Reimplemented in StrMutSelectionObserver, IDHAObserver, CustSEObserver, and GraphicStateDefnObserver.
| virtual |
DESCR: Called when this observer should automatically detach from the subject(s) that it observes.
NOTE: Subclasses should override DetachFromSelectionSubject() to detach from the the active selection using their own protocol(s). Subclasses which override this method should call the inherited method after detaching from their own specific protocols.
Reimplemented from CObserver.
Reimplemented in StrMutSelectionObserver, IDHAObserver, CustSEObserver, and GraphicStateDefnObserver.
| protectedvirtual |
DESCR: Detach this observer from the current selection. Obtains the ISubject of the active selection and passes it to DetachFromSelectionSubject() which is overridden by subclasses.
| protectedvirtual |
DESCR: Detach this observer from the active selection using protocol IID_SELECTION_MESSAGE.
| selectionSubject | the Subject |
| protectedvirtual |
DESCR: The active selection has changed. Calls HandleSelectionChanged() which is overridden by subclasses.
| inlineprotectedvirtual |
DESCR: This is a frequent update of the selection. Currently only used by text to catch every cursor move.
| inlineprotectedvirtual |
DESCR: Some aspect of one or more items in the selection has changed. Only those clients whose observed suiteIID was affected by the selection message should update. The suite may have also sent some suite specific broadcast data.
| m | the selection message |
Reimplemented in StrMutSelectionObserver, PstLstUISelectionObserver, BPISelectionObserver, HidTxtEdSelectionObserver, GraphicStateDefnObserver, and TblAttSelectionObserver.
| inlineprotectedvirtual |
DESCR: Everything relating to the selection should update.
Either (a) there is a new active selection or (b) the items in the selection has changed
If ISelectionMessage* is nil, everything should update.
| m | the selection message |
Reimplemented in StrMutSelectionObserver, PstLstUISelectionObserver, BPISelectionObserver, SnipRunGoSelectionObserver, CdlChtUISelectionObserver, HidTxtEdSelectionObserver, GraphicStateDefnObserver, and TblAttSelectionObserver.
| protectedvirtual |
DESCR: Called when the observer receives a broadcast other than those from the active context. i.e. a message from the active selection boss itself, which a subclass attached to using a protocol of its choice. All of the broadcast information is passed through.
Processes IID_SELECTION_MESSAGE messages, calling HandleSelectionChanged(),
HandleFrequentSelectionChanged() or HandleSelectionAttributeChanged() as appropriate.
NOTE: Subclasses should override this member function only if they attach to additional protocols. If overridden, the subclass should call the inherited method prior to handling the message. Do NOT override Update w/o a very good reason.
| c | the Class |
| s | the Subject |
| p | PMIID |
| v | void star |
Reimplemented in StrMutSelectionObserver, IDHAObserver, and CustSEObserver.
| protectedvirtual |
DESCR: Query the abstract selection that this observer is attached to for an interface (or suite).
NOTE: The caller is responsible for calling Release() on the returned interface.
| p | PMIID |
| virtual |
DESCR: Handle updates to the observer. When the active abstract selection boss changes, detach from the old and attach to the new. Other broadcasts (i.e. those from the selection boss) are passed to HandleSelectionUpdate().
NOTE: Subclasses should override HandleSelectionUpdate() rather than this method.
| c | ClassID |
| p | PMIID |
| v | void star |
Implements IObserver.
Reimplemented in IDHAObserver, and CustSEObserver.