![]() | InDesign SDK 20.5 |

Public Member Functions | |
| StrMutSelectionObserver (IPMUnknown *boss) | |
| virtual | ~StrMutSelectionObserver () |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
Public Member Functions inherited from ActiveSelectionObserver | |
| ActiveSelectionObserver (IPMUnknown *boss, PMIID observerIID=IID_IOBSERVER) | |
| 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 | HandleSelectionUpdate (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
| virtual void | HandleSelectionChanged (const ISelectionMessage *selectionMessage) |
| virtual void | HandleSelectionAttributeChanged (const ISelectionMessage *selectionMessage) |
Protected Member Functions inherited from ActiveSelectionObserver | |
| virtual void | HandleFrequentSelectionChanged () |
| 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 () |
Additional Inherited Members | |
Public Types inherited from IObserver | |
| enum | { kDefaultIID = IID_IOBSERVER } |
Protected Attributes inherited from ActiveSelectionObserver | |
| PMIID | fObserverIID |
| ISelectionManager * | fCurrentSelection |
Implements an observer, IObserver based on ActiveSelectionObserver, that updates the stroke weight displayed in the panel's widget when the stroke weight of the selected objects change, and updates the stroke weight of the selected objects when the user changes the value of the panel's stroke weight widget.
The panel's stroke weight widget is maintained in a way that mimics the value displayed in the Stroke Weight panel.
The implementation shows how to specialise ActiveSelectionObserver so that widgets can be observed in addition to the selection within within a single observer implementation.
IStrokeAttributeSuite is used to get and change the stroke weight which is maintained by a widget on the panel. IGraphicAttributeSuite is used to determine if the stroke is being actively drawn or not.
| StrMutSelectionObserver::StrMutSelectionObserver | ( | IPMUnknown * | boss | ) |
Constructor.
| boss | interface ptr from boss object on which this interface is aggregated. |
| virtual |
Destructor.
| virtual |
Attaches observer to the panel's widget and calls parent class to attach to the active selection.
Reimplemented from ActiveSelectionObserver.
| virtual |
Detaches observer from the panel's widget and calls parent class to detach from the active selection.
Reimplemented from ActiveSelectionObserver.
| protectedvirtual |
Called when a property of the selection changes, stroke weight or color for example. Note: It is important that client code examine the message parameter and only update when data that the client needs has changed. The client can be called when data that it is not interested in changes and it is important for performance reasons that these calls are filtered so that unnecessary updates don't take place.
| selectionMessage | client code must examine the message and only update when a message is received from the suite that manages the properties that are being displayed. |
Reimplemented from ActiveSelectionObserver.
| protectedvirtual |
Called when there is a new active selection or when objects are added or removed from the selection.
| selectionMessage | IN message from the selection about the change, if the pointer is nil then widgets must be updated to synchronise with the new selection, otherwise the client can examine the message to see if the change that has taken place requires them to update. |
Reimplemented from ActiveSelectionObserver.
| protectedvirtual |
Called when the observed subjects change, in this case when the panel's widget is changed or when the active selection changes. Events resulting from widget clicks are handled here, selection events are passed to the parent class.
| theChange | specifies the class ID of the change to the subject. Frequently this is a command ID. |
| theSubject | points to the ISubject interface for the subject that has changed. |
| protocol | specifies the ID of the changed interface on the subject boss. |
| changedBy | points to additional data about the change. Often this pointer indicates the class ID of the command that has caused the change. |
Reimplemented from ActiveSelectionObserver.