InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GTTxtEdtInvalHandler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __GTTxtEdtInvalHandler_h__
25 #define __GTTxtEdtInvalHandler_h__
26 
27 #include "IInvalHandler.h"
28 #include <vector>
29 
30 class IDataBase;
31 
39 {
40 public:
44  GTTxtEdtInvalCookie(const UIDRef& storyUIDRef, bool16 storyCreated);
48  virtual ~GTTxtEdtInvalCookie();
52  void InvalBeforeUndo();
56  void InvalAfterUndo();
60  void InvalBeforeRedo();
64  void InvalAfterRedo();
74  void Merge(const IInvalCookie* other);
75 
81  void AddNewCookieCrumb(const UIDRef& storyUIDRef, bool16 storyCreated);
82 
85  bool16 IsUndoRequired();
86 
87 private:
88 
91  typedef std::pair<UID,bool16> GTTxtEdtCookieCrumb;
92 
95  typedef std::vector<GTTxtEdtCookieCrumb> GTTxtEdtCookieCrumbList;
96 
97  GTTxtEdtCookieCrumbList fCookieCrumbList;
98  IDataBase* fDataBase;
99 };
100 
101 
110 {
111 public:
112 
116  GTTxtEdtInvalHandler() : IInvalHandler(),fInvalCookie(nil),fCollectingInvals(kFalse){};
120  virtual ~GTTxtEdtInvalHandler() {};
121 
128  void AddStoryInvalInfo(const UIDRef& storyUIDRef, bool16 storyCreated);
129 
141  InvalHandlerID GetID() const;
146  void BeforeRevert_InvalAll() ;
151  void AfterRevert_InvalAll() ;
152 
153 private:
157  GTTxtEdtInvalCookie* fInvalCookie;
161  bool16 fCollectingInvals;
162 
163 };
164 
165 
166 #endif // __GTTxtEdtInvalHandler_h__
167 
168 // End, GTTxtEdtInvalHandler.h.
169 
170 
171 
172