jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 1 | // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 7 | #ifndef FPDFSDK_CPDFSDK_ANNOT_H_ |
| 8 | #define FPDFSDK_CPDFSDK_ANNOT_H_ |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 9 | |
dsinclair | 1727aee | 2016-09-29 13:12:56 -0700 | [diff] [blame] | 10 | #include "core/fpdfdoc/cpdf_aaction.h" |
| 11 | #include "core/fpdfdoc/cpdf_annot.h" |
| 12 | #include "core/fpdfdoc/cpdf_defaultappearance.h" |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 13 | #include "core/fxcrt/cfx_observable.h" |
Tom Sepez | d0409af | 2017-05-25 15:53:57 -0700 | [diff] [blame] | 14 | #include "core/fxcrt/cfx_unowned_ptr.h" |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 15 | #include "core/fxcrt/fx_basic.h" |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 16 | #include "fpdfsdk/cfx_systemhandler.h" |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 17 | #include "fpdfsdk/fsdk_common.h" |
| 18 | #include "fpdfsdk/fsdk_define.h" |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 19 | |
| 20 | class CFX_Matrix; |
| 21 | class CFX_RenderDevice; |
| 22 | class CPDF_Page; |
| 23 | class CPDF_RenderOptions; |
| 24 | class CPDFSDK_PageView; |
| 25 | |
tsepez | 7b68f61 | 2016-09-07 14:11:27 -0700 | [diff] [blame] | 26 | class CPDFSDK_Annot : public CFX_Observable<CPDFSDK_Annot> { |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 27 | public: |
| 28 | explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); |
| 29 | virtual ~CPDFSDK_Annot(); |
| 30 | |
| 31 | #ifdef PDF_ENABLE_XFA |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 32 | virtual bool IsXFAField(); |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 33 | virtual CXFA_FFWidget* GetXFAWidget() const; |
| 34 | #endif // PDF_ENABLE_XFA |
| 35 | |
Dan Sinclair | 05df075 | 2017-03-14 14:43:42 -0400 | [diff] [blame] | 36 | virtual float GetMinWidth() const; |
| 37 | virtual float GetMinHeight() const; |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 38 | virtual int GetLayoutOrder() const; |
| 39 | virtual CPDF_Annot* GetPDFAnnot() const; |
jaepark | 956553e | 2016-08-31 06:49:27 -0700 | [diff] [blame] | 40 | virtual CPDF_Annot::Subtype GetAnnotSubtype() const; |
jaepark | 9ed9137 | 2016-08-26 16:16:10 -0700 | [diff] [blame] | 41 | virtual bool IsSignatureWidget() const; |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 42 | virtual CFX_FloatRect GetRect() const; |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 43 | virtual void SetRect(const CFX_FloatRect& rect); |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 44 | |
| 45 | UnderlyingPageType* GetUnderlyingPage(); |
| 46 | CPDF_Page* GetPDFPage(); |
| 47 | #ifdef PDF_ENABLE_XFA |
| 48 | CPDFXFA_Page* GetPDFXFAPage(); |
| 49 | #endif // PDF_ENABLE_XFA |
| 50 | |
Tom Sepez | d0409af | 2017-05-25 15:53:57 -0700 | [diff] [blame] | 51 | CPDFSDK_PageView* GetPageView() const { return m_pPageView.Get(); } |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 52 | |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 53 | protected: |
Lei Zhang | 3db8759 | 2017-06-02 12:48:22 -0700 | [diff] [blame] | 54 | CFX_UnownedPtr<CPDFSDK_PageView> const m_pPageView; |
jaepark | 2736276 | 2016-08-11 13:10:39 -0700 | [diff] [blame] | 55 | }; |
| 56 | |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 57 | #endif // FPDFSDK_CPDFSDK_ANNOT_H_ |