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 7 #ifndef FPDFSDK_CPDFSDK_XFAWIDGET_H_ 8 #define FPDFSDK_CPDFSDK_XFAWIDGET_H_ 9 10 #include "core/fxcrt/fx_coordinates.h" 11 #include "core/fxcrt/fx_string.h" 12 #include "core/fxcrt/unowned_ptr.h" 13 #include "fpdfsdk/cpdfsdk_annot.h" 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); 24 ~CPDFSDK_XFAWidget() override; 25 26 // CPDFSDK_Annot: 27 bool IsXFAField() override; 28 CXFA_FFWidget* GetXFAWidget() const override; 29 CPDF_Annot::Subtype GetAnnotSubtype() const override; 30 CFX_FloatRect GetRect() const override; 31 GetInterForm()32 CPDFSDK_InterForm* GetInterForm() const { return m_pInterForm.Get(); } 33 34 private: 35 UnownedPtr<CPDFSDK_InterForm> m_pInterForm; 36 UnownedPtr<CXFA_FFWidget> m_hXFAWidget; 37 }; 38 39 #endif // FPDFSDK_CPDFSDK_XFAWIDGET_H_ 40