diff options
Diffstat (limited to 'fpdfsdk/include/cpdfsdk_annot.h')
-rw-r--r-- | fpdfsdk/include/cpdfsdk_annot.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/include/cpdfsdk_annot.h b/fpdfsdk/include/cpdfsdk_annot.h index 967226e9db..a43b8775db 100644 --- a/fpdfsdk/include/cpdfsdk_annot.h +++ b/fpdfsdk/include/cpdfsdk_annot.h @@ -23,9 +23,22 @@ class CPDFSDK_PageView; class CPDFSDK_Annot { public: + class Observer { + public: + explicit Observer(CPDFSDK_Annot** pWatchedPtr); + ~Observer(); + void OnAnnotDestroyed(); + + private: + CPDFSDK_Annot** m_pWatchedPtr; + }; + explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); virtual ~CPDFSDK_Annot(); + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + #ifdef PDF_ENABLE_XFA virtual FX_BOOL IsXFAField(); virtual CXFA_FFWidget* GetXFAWidget() const; @@ -57,6 +70,7 @@ class CPDFSDK_Annot { void SetSelected(FX_BOOL bSelected); protected: + std::set<Observer*> m_Observers; CPDFSDK_PageView* m_pPageView; FX_BOOL m_bSelected; }; |