OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ | 7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ |
8 #define FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ | 8 #define FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ |
9 | 9 |
10 #include "core/fpdfdoc/include/cpdf_aaction.h" | 10 #include "core/fpdfdoc/include/cpdf_aaction.h" |
11 #include "core/fpdfdoc/include/cpdf_action.h" | 11 #include "core/fpdfdoc/include/cpdf_action.h" |
12 #include "core/fpdfdoc/include/cpdf_annot.h" | 12 #include "core/fpdfdoc/include/cpdf_annot.h" |
13 #include "core/fpdfdoc/include/cpdf_defaultappearance.h" | 13 #include "core/fpdfdoc/include/cpdf_defaultappearance.h" |
14 #include "core/fxcrt/include/fx_coordinates.h" | 14 #include "core/fxcrt/include/fx_coordinates.h" |
15 #include "core/fxcrt/include/fx_string.h" | 15 #include "core/fxcrt/include/fx_string.h" |
16 #include "fpdfsdk/cfx_systemhandler.h" | 16 #include "fpdfsdk/cfx_systemhandler.h" |
17 #include "fpdfsdk/include/cpdfsdk_annot.h" | 17 #include "fpdfsdk/include/cpdfsdk_annot.h" |
18 | 18 |
19 class CFX_Matrix; | 19 class CFX_Matrix; |
20 class CFX_RenderDevice; | 20 class CFX_RenderDevice; |
21 class CPDF_Dictionary; | 21 class CPDF_Dictionary; |
22 class CPDF_RenderOptions; | 22 class CPDF_RenderOptions; |
23 class CPDFSDK_PageView; | 23 class CPDFSDK_PageView; |
24 | 24 |
25 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { | 25 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { |
26 public: | 26 public: |
| 27 class Observer : public CPDFSDK_Annot::Observer { |
| 28 public: |
| 29 explicit Observer(CPDFSDK_BAAnnot** pWatchedPtr); |
| 30 ~Observer() override; |
| 31 |
| 32 void OnAnnotDestroyed() override; |
| 33 |
| 34 private: |
| 35 CPDFSDK_BAAnnot** m_pWatchedPtr; |
| 36 }; |
| 37 |
27 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); | 38 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); |
28 ~CPDFSDK_BAAnnot() override; | 39 ~CPDFSDK_BAAnnot() override; |
29 | 40 |
30 // CPDFSDK_Annot | 41 // CPDFSDK_Annot |
31 CPDF_Annot::Subtype GetAnnotSubtype() const override; | 42 CPDF_Annot::Subtype GetAnnotSubtype() const override; |
32 void SetRect(const CFX_FloatRect& rect) override; | 43 void SetRect(const CFX_FloatRect& rect) override; |
33 CFX_FloatRect GetRect() const override; | 44 CFX_FloatRect GetRect() const override; |
34 CPDF_Annot* GetPDFAnnot() const override; | 45 CPDF_Annot* GetPDFAnnot() const override; |
35 void Annot_OnDraw(CFX_RenderDevice* pDevice, | 46 void Annot_OnDraw(CFX_RenderDevice* pDevice, |
36 CFX_Matrix* pUser2Device, | 47 CFX_Matrix* pUser2Device, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const CFX_ByteString& sContents, | 108 const CFX_ByteString& sContents, |
98 const CFX_ByteString& sAPState = ""); | 109 const CFX_ByteString& sAPState = ""); |
99 | 110 |
100 void SetOpenState(bool bState); | 111 void SetOpenState(bool bState); |
101 | 112 |
102 protected: | 113 protected: |
103 CPDF_Annot* m_pAnnot; | 114 CPDF_Annot* m_pAnnot; |
104 }; | 115 }; |
105 | 116 |
106 #endif // FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ | 117 #endif // FPDFSDK_INCLUDE_CPDFSDK_BAANNOT_H_ |
OLD | NEW |