![]() | InDesign SDK 20.5 |

Public Member Functions | |
| CustSEObserver (IPMUnknown *boss) | |
| virtual void | Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
| virtual void | HandleSelectionUpdate (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
| virtual void | LazyUpdate (ISubject *theSubject, const PMIID &protocol, const LazyNotificationData *data) |
Public Member Functions inherited from ActiveSelectionObserver | |
| ActiveSelectionObserver (IPMUnknown *boss, PMIID observerIID=IID_IOBSERVER) | |
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 |
Additional Inherited Members | |
Public Types inherited from IObserver | |
| enum | { kDefaultIID = IID_IOBSERVER } |
Protected Member Functions inherited from ActiveSelectionObserver | |
| 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 IPMUnknown * | QueryAbstractSelection (const PMIID &p) |
| virtual void | AttachToActiveSelection () |
| virtual void | DetachFromActiveSelection () |
Protected Attributes inherited from ActiveSelectionObserver | |
| PMIID | fObserverIID |
| ISelectionManager * | fCurrentSelection |
CustSEObserver demonstrates how to dipatch custom script events from an observer.
The code observes changes to the active character and paragraph style lists and dispatches an "afterParagraphStyleListChanged" or "afterParagraphStyleListChanged" event when one of the style list change.
| 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 ActiveSelectionObserver.
| 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 ActiveSelectionObserver.
| virtual |
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 from ActiveSelectionObserver.
| virtual |
Lazy notification of a change in an observed subject; this method is called after the transaction in which the change was performed completes and after undo or redo.
| theSubject | is the subject that changed |
| protocol | is the interface of the subject's boss that changed |
| data | lazy notification data or nil. Observers must be able to handle a call that has nil data. In certain low memory conditions the lazy notification data passed to ISubject::ModelChange may not be passed on to observers. The observer must be able to work without data in which case the observer would usually refresh its entire state by re-examining all objects of interest. See LazyNotificationData for documentation. |
Reimplemented from CObserver.
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 |
Reimplemented from ActiveSelectionObserver.