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

Public Member Functions | |
| SwatchesObserver (IPMUnknown *boss) | |
| virtual void | Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
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 bool16 | UpdateSwatchesUIDData (IGraphicStateRenderObjects *iGfxStateRenderObjects, const ClassID &theChange) |
| virtual bool16 | UpdateRenderObject (IGraphicStateRenderObjects *iGfxStateRenderObjects, ClassID targetRenderObjectClassID, UID targetRenderingUID, UID prevRenderingUID) |
| virtual bool16 | ApplyRenderObjectAttributes (IDataBase *iDataBase, UID targetRenderingUID, UID prevRenderingUID, bool16 swatchIsUniqueSelection=kFalse) |
| virtual bool16 | ProcessGraphicStateChanges (IGraphicStateRenderObjects *iGfxStateRenderObjects, UIDRef swatchRef, const ClassID &theChange) |
Protected Attributes | |
| PMIID | fAttachAsIID |
| PMIID | fAttachToIID |
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 } |
An observer class responds to changes in the swatch list widget selection. As a result of updating the widget selection, it may also interact with the graphic state object. This observer lives on the swatch list widget.
| protectedvirtual |
Apply relevant render object attributes to the graphic state based on the new rendering object.
| iDataBase | is the database of the new rendering object UID. |
| targetRenderingUID | is the new rendering object UID. |
| prevRenderingUID | is the previous rendering object UID of the same rendering class. |
| swatchIsUniqueSelection | is true if this rendering UID is the unique selection and not part of the multiple selection. |
| virtual |
Called when this observer should attach to the subject(s) that it observes.
Reimplemented from CObserver.
| virtual |
Called when this observer should automatically detach from the subject(s) that it observes.
Reimplemented from CObserver.
| protectedvirtual |
Update the graphic state based on the changes.
| iGfxStateRenderObjects | is usually the active graphic state objects. |
| swatchRef | is the new rendering object UIDRef of the swatch selection is updating to. |
| theChange | is the type of change. |
| virtual |
Responds to interested change messages.
| theChange | is the change message. |
| theSubject | is the subject broadcasting the change. |
| protocol | is the change message protocol. |
| changedBy | is any additional data passed along by the change subject. |
Implements IObserver.
| protectedvirtual |
Change graphic state render data to update the render object. Additionaly it may also create and process a attribute command that is related to the rendering object being udpated.
| iGfxStateRenderObjects | is usually the active graphic state objects. |
| targetRenderObjectClassID | is the new rendering class ID the swatch selection is updating to. |
| targetRenderingUID | is the corresponding rendering object UID. |
| prevRenderingUID | is the previous rendering object UID of the same rendering class. |
| protectedvirtual |
Update the swatch list widget's swatches UID list to reflect the current selections in the swatches list widget. The implementation assumes we have an IListControlDataOf interface and swatch list widget has access to a IColorViewData interface. It also sorts the selection list so that the order of UIDList reflects the order the swatches in the swatch list widget. If your panel does not conform to this assumption, then it must be overwritten by the subclasses.
| iGfxStateRenderObjects | is usually the active graphic state objects. |
| theChange | is the type of change. |
| protected |
fAttachAsIID is the attached IID of the observer.
| protected |
fAttachToIID is the interested procotol IID being observered.