1 // Copyright 2014 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_FORMFILLER_CFFL_LISTBOX_H_ 8 #define FPDFSDK_FORMFILLER_CFFL_LISTBOX_H_ 9 10 #include <memory> 11 #include <set> 12 #include <vector> 13 14 #include "fpdfsdk/formfiller/cffl_formfiller.h" 15 16 class CBA_FontMap; 17 18 class CFFL_ListBox : public CFFL_FormFiller { 19 public: 20 CFFL_ListBox(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Annot* pWidget); 21 ~CFFL_ListBox() override; 22 23 // CFFL_FormFiller 24 PWL_CREATEPARAM GetCreateParam() override; 25 CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, 26 CPDFSDK_PageView* pPageView) override; 27 bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override; 28 bool IsDataChanged(CPDFSDK_PageView* pPageView) override; 29 void SaveData(CPDFSDK_PageView* pPageView) override; 30 void GetActionData(CPDFSDK_PageView* pPageView, 31 CPDF_AAction::AActionType type, 32 PDFSDK_FieldAction& fa) override; 33 void SaveState(CPDFSDK_PageView* pPageView) override; 34 void RestoreState(CPDFSDK_PageView* pPageView) override; 35 CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, 36 bool bRestoreValue) override; 37 38 private: 39 std::unique_ptr<CBA_FontMap> m_pFontMap; 40 std::set<int> m_OriginSelections; 41 std::vector<int> m_State; 42 }; 43 44 #endif // FPDFSDK_FORMFILLER_CFFL_LISTBOX_H_ 45