InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GTTxtEdtInvalHandler Class Reference

#include <GTTxtEdtInvalHandler.h>

Inheritance diagram for GTTxtEdtInvalHandler:
IInvalHandler

Public Member Functions

 GTTxtEdtInvalHandler ()
 
virtual ~GTTxtEdtInvalHandler ()
 
void AddStoryInvalInfo (const UIDRef &storyUIDRef, bool16 storyCreated)
 
IInvalCookieEndCollectingInvals ()
 
InvalHandlerID GetID () const
 
void BeforeRevert_InvalAll ()
 
void AfterRevert_InvalAll ()
 
- Public Member Functions inherited from IInvalHandler
 IInvalHandler ()
 
virtual ~IInvalHandler ()
 

Additional Inherited Members

- Public Types inherited from IInvalHandler
enum  { kDefaultIID = IID_IINVALHANDLER }
 

Detailed Description

Called when a sequence completes for which this handler is recording invalidations. The inval handler will provide an instance of a cookie that is called on undo/redo.

See Also
GTTxtEdtInvalCookie

Constructor & Destructor Documentation

GTTxtEdtInvalHandler::GTTxtEdtInvalHandler ()
inline

Constructor

virtual GTTxtEdtInvalHandler::~GTTxtEdtInvalHandler ()
inlinevirtual

Destructor

Member Function Documentation

void GTTxtEdtInvalHandler::AddStoryInvalInfo (const UIDRefstoryUIDRef,
bool16 storyCreated 
)

If in "not collecting invals" state, call DBUtils::StartCollectingInvals to see if an undoable transaction is in progress, switch to "collecting invals" if so, then record the UIDRef of the story plus the action. Otherwise, in "collecting invals" record the UIDRef of the story, and the action.

Parameters
storyUIDRefIN the uidref of the story affected.
storyCreatedIN kTrue if the story was created, kFalse if it was deleted.
void GTTxtEdtInvalHandler::AfterRevert_InvalAll ()
virtual

Deals with the need to hard reset the cache (for example, if you only collect invals when a panel is showing, you need to use the reset mechanism if the user undos beyond the panel was shown).

Implements IInvalHandler.

void GTTxtEdtInvalHandler::BeforeRevert_InvalAll ()
virtual

Deals with the need to hard reset the cache (for example, if you only collect invals when a panel is showing, you need to use the reset mechanism if the user undos beyond the panel was shown).

Implements IInvalHandler.

IInvalCookie * GTTxtEdtInvalHandler::EndCollectingInvals ()
virtual

The core indicates that the sequence we have declared an interest in (see the StartCollectingInvals call in the GTTxtEdtNewDeleteStoryObserver) has completed, giving us the opportunity to creare a cookie encapsulating the state we require for handling the undo/redo behaviour.

Returns
a cookie.

Implements IInvalHandler.

InvalHandlerID GTTxtEdtInvalHandler::GetID () const
virtual

Return the inval handler ID for this invalidation handler.

Returns
the inval handler ID.

Implements IInvalHandler.