summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/cpdfsdk_annot.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/fpdfsdk/include/cpdfsdk_annot.h b/fpdfsdk/include/cpdfsdk_annot.h
index a43b8775db..e7ae2e15a2 100644
--- a/fpdfsdk/include/cpdfsdk_annot.h
+++ b/fpdfsdk/include/cpdfsdk_annot.h
@@ -10,6 +10,7 @@
#include "core/fpdfdoc/include/cpdf_aaction.h"
#include "core/fpdfdoc/include/cpdf_annot.h"
#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
+#include "core/fxcrt/include/cfx_observable.h"
#include "core/fxcrt/include/fx_basic.h"
#include "fpdfsdk/cfx_systemhandler.h"
#include "fpdfsdk/include/fsdk_common.h"
@@ -21,24 +22,11 @@ class CPDF_Page;
class CPDF_RenderOptions;
class CPDFSDK_PageView;
-class CPDFSDK_Annot {
+class CPDFSDK_Annot : public CFX_Observable<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;
@@ -70,7 +58,6 @@ class CPDFSDK_Annot {
void SetSelected(FX_BOOL bSelected);
protected:
- std::set<Observer*> m_Observers;
CPDFSDK_PageView* m_pPageView;
FX_BOOL m_bSelected;
};