InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GTTxtEdtNewDeleteStoryObserver Class Reference
Inheritance diagram for GTTxtEdtNewDeleteStoryObserver:
CObserverIObserverIPMUnknown

Public Member Functions

 GTTxtEdtNewDeleteStoryObserver (IPMUnknown *boss)
 
virtual ~GTTxtEdtNewDeleteStoryObserver ()
 
virtual void AutoAttach ()
 
virtual void AutoDetach ()
 
virtual void Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy)
 
- 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)
 

Additional Inherited Members

- Public Types inherited from IObserver
enum  { kDefaultIID = IID_IOBSERVER }
 
- Protected Attributes inherited from CObserver
bool16 fDetachSubjectsOnDelete
 
PMIID fAttachIID
 
const UIDRef fThisRef
 
bool16 fEnabled
 

Detailed Description

An observer watching for stories being created and deleted. This observer gets attached on document

creation/open by the GTTxtEdtResponder. While the responder also receives new/delete story events, this observer allows us to manage the invalhandler appropriately (we require an inval handler per document). If this was managed within the responder, we would require to manintain the list of invalidation handlers per document.

The invalidation hander is created on attach (which relates to a document create/open event), and destroyed on detach (document close). If we receive a story create/delete signal, we indicate that the event if of interest by calling the inval handler.

See Also
GTTxtEdtInvalHandler

Constructor & Destructor Documentation

GTTxtEdtNewDeleteStoryObserver::GTTxtEdtNewDeleteStoryObserver (IPMUnknownboss)

Constructor

GTTxtEdtNewDeleteStoryObserver::~GTTxtEdtNewDeleteStoryObserver ()
virtual

Destructor

Member Function Documentation

void GTTxtEdtNewDeleteStoryObserver::AutoAttach (void )
virtual

Attach this observer to the document.

Reimplemented from CObserver.

void GTTxtEdtNewDeleteStoryObserver::AutoDetach (void )
virtual

Detach this observer from the document

Reimplemented from CObserver.

void GTTxtEdtNewDeleteStoryObserver::Update (const ClassIDtheChange,
ISubjecttheSubject,
const PMIIDprotocol,
void * changedBy 
)
virtual

Signal the observer that a change has occurred (used to determine whether we want to record this event through our invalidation handler).

Implements IObserver.