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

#include <GraphicStateDefnObserver.h>

Inheritance diagram for GraphicStateDefnObserver:
ActiveSelectionObserverCObserverIObserverIPMUnknown

Public Member Functions

 GraphicStateDefnObserver (IPMUnknown *boss)
 
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)
 
IChangeManagerGetChangeManager () 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 *iSelectionMsg)
 
virtual void HandleSelectionAttributeChanged (const ISelectionMessage *iSelectionMsg)
 
virtual void HandleDefinitionChange (IGraphicAttributeSuite *iGraphicAttrSuite, IGraphicAttrMessage *iGraphicAttrMsg)
 
virtual void UpdateDefinition (IGraphicAttributeSuite *iGraphicAttrSuite, IGraphicAttrMessage *iGraphicAttrMsg)=0
 
virtual void UpdateFillRenderData (IGraphicAttributeSuite *iGraphicAttrSuite, UID renderUID, IGraphicAttrMessage *iGraphicAttrMsg)
 
virtual void UpdateStrokeRenderData (IGraphicAttributeSuite *iGraphicAttrSuite, UID renderUID, IGraphicAttrMessage *iGraphicAttrMsg)
 
virtual void UpdateSwapStrokeAndFill (IGraphicAttributeSuite *iGraphicAttrSuite, IGraphicAttrMessage *iGraphicAttrMsg)
 
virtual void EnableWidget (bool16 enableFlag)
 
- Protected Member Functions inherited from ActiveSelectionObserver
virtual void HandleFrequentSelectionChanged ()
 
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 IPMUnknownQueryAbstractSelection (const PMIID &p)
 
virtual void AttachToActiveSelection ()
 
virtual void DetachFromActiveSelection ()
 

Protected Attributes

bool16 fEnabledState
 
- Protected Attributes inherited from ActiveSelectionObserver
PMIID fObserverIID
 
ISelectionManagerfCurrentSelection
 
- 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 }
 

Detailed Description

A utility class for observing active selection related to graphic attributes. This class inherits from ActiveSelectionObserver.

See Also
also SelectionObserver.h

Member Function Documentation

virtual void GraphicStateDefnObserver::AutoAttach ()
virtual

Called when this observer should attach to the subject(s) that it observes (Active Context and Active Selection).

Reimplemented from ActiveSelectionObserver.

virtual void GraphicStateDefnObserver::AutoDetach ()
virtual

Called when this observer should automatically detach from the subject(s) that it observes.

Reimplemented from ActiveSelectionObserver.

virtual void GraphicStateDefnObserver::EnableWidget (bool16 enableFlag)
protectedvirtual

Called to Enable/Disable the associated widget(s).

Parameters
enableFlagis true if the associated widgets should be enabled.
virtual void GraphicStateDefnObserver::HandleDefinitionChange (IGraphicAttributeSuiteiGraphicAttrSuite,
IGraphicAttrMessageiGraphicAttrMsg 
)
protectedvirtual

Handles any graphic attribute related changes.

Parameters
iGraphicAttrSuiteis the graphic attribute suite affected by this change.
iGraphicAttrMsgis the graphic attribute message forward from the selection.
virtual void GraphicStateDefnObserver::HandleSelectionAttributeChanged (const ISelectionMessageiSelectionMsg)
protectedvirtual

Handles any selection attributes changed related messages. Only IID_IGRAPHICATTRIBUTESUITE messages are handled in this method.

Parameters
iSelectionMsgis the selection message. If iSelectionMsg is nil, everything should update.

Reimplemented from ActiveSelectionObserver.

virtual void GraphicStateDefnObserver::HandleSelectionChanged (const ISelectionMessageiSelectionMsg)
protectedvirtual

Handles any selection changed related messages.

Parameters
iSelectionMsgis the selection message. If iSelectionMsg is nil, everything should update.

Reimplemented from ActiveSelectionObserver.

virtual void GraphicStateDefnObserver::UpdateDefinition (IGraphicAttributeSuiteiGraphicAttrSuite,
IGraphicAttrMessageiGraphicAttrMsg 
)
protectedpure virtual

Override some or all of the following to respond to, according to the state of the definition. By default they do nothing.Update to reflect the current definition. This method is called whenever there's a change in that cannot be described by the other messages. It is usually called when something external changes the current selection. One or more objects could be selected. By default the method updates the active render data. The subclass must overwrite this and do the rest of the updates.

Parameters
iGraphicAttrSuiteis the graphic attribute suite affected by this change.
iGraphicAttrMsgis the graphic attribute message forward from the selection.
virtual void GraphicStateDefnObserver::UpdateFillRenderData (IGraphicAttributeSuiteiGraphicAttrSuite,
UID renderUID,
IGraphicAttrMessageiGraphicAttrMsg 
)
protectedvirtual

Called when the current target's fill rendering data has changed.

Parameters
iGraphicAttrSuiteis the graphic attribute suite affected by this change.
renderUIDis the new fill rendering UID.
iGraphicAttrMsgis the graphic attribute message forward from the selection.
virtual void GraphicStateDefnObserver::UpdateStrokeRenderData (IGraphicAttributeSuiteiGraphicAttrSuite,
UID renderUID,
IGraphicAttrMessageiGraphicAttrMsg 
)
protectedvirtual

Called when the current target's stroke rendering data has changed.

Parameters
iGraphicAttrSuiteis the graphic attribute suite affected by this change.
renderUIDis the new stroke rendering UID.
iGraphicAttrMsgis the graphic attribute message forward from the selection.
virtual void GraphicStateDefnObserver::UpdateSwapStrokeAndFill (IGraphicAttributeSuiteiGraphicAttrSuite,
IGraphicAttrMessageiGraphicAttrMsg 
)
protectedvirtual

Called when the current target's has its fill and stroke swapped.

Parameters
iGraphicAttrSuiteis the graphic attribute suite affected by this change.
iGraphicAttrMsgis the graphic attribute message forward from the selection.

Member Data Documentation

bool16 GraphicStateDefnObserver::fEnabledState
protected

fEnabledState keeps track of the widgets' enabling state.