jaepark | 611adb8 | 2016-08-17 11:34:36 -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_XFAWIDGET_H_ |
| 8 | #define FPDFSDK_CPDFSDK_XFAWIDGET_H_ |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 9 | |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 10 | #include "core/fxcrt/fx_coordinates.h" |
| 11 | #include "core/fxcrt/fx_string.h" |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 12 | #include "core/fxcrt/unowned_ptr.h" |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 13 | #include "fpdfsdk/cpdfsdk_annot.h" |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 14 | |
| 15 | class CPDFSDK_InterForm; |
| 16 | class CPDFSDK_PageView; |
| 17 | class CXFA_FFWidget; |
| 18 | |
| 19 | class CPDFSDK_XFAWidget : public CPDFSDK_Annot { |
| 20 | public: |
| 21 | CPDFSDK_XFAWidget(CXFA_FFWidget* pAnnot, |
| 22 | CPDFSDK_PageView* pPageView, |
| 23 | CPDFSDK_InterForm* pInterForm); |
Tom Sepez | d0409af | 2017-05-25 15:53:57 -0700 | [diff] [blame] | 24 | ~CPDFSDK_XFAWidget() override; |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 25 | |
Tom Sepez | d0409af | 2017-05-25 15:53:57 -0700 | [diff] [blame] | 26 | // CPDFSDK_Annot: |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 27 | bool IsXFAField() override; |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 28 | CXFA_FFWidget* GetXFAWidget() const override; |
jaepark | 956553e | 2016-08-31 06:49:27 -0700 | [diff] [blame] | 29 | CPDF_Annot::Subtype GetAnnotSubtype() const override; |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 30 | CFX_FloatRect GetRect() const override; |
| 31 | |
Tom Sepez | d0409af | 2017-05-25 15:53:57 -0700 | [diff] [blame] | 32 | CPDFSDK_InterForm* GetInterForm() const { return m_pInterForm.Get(); } |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 33 | |
| 34 | private: |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 35 | UnownedPtr<CPDFSDK_InterForm> m_pInterForm; |
| 36 | UnownedPtr<CXFA_FFWidget> m_hXFAWidget; |
jaepark | 611adb8 | 2016-08-17 11:34:36 -0700 | [diff] [blame] | 37 | }; |
| 38 | |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 39 | #endif // FPDFSDK_CPDFSDK_XFAWIDGET_H_ |