• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <set>
11 #include <vector>
12 
13 #include "fpdfsdk/formfiller/cffl_textobject.h"
14 
15 class CBA_FontMap;
16 
17 class CFFL_ListBox : public CFFL_TextObject {
18  public:
19   CFFL_ListBox(CPDFSDK_FormFillEnvironment* pApp, CPDFSDK_Widget* pWidget);
20   ~CFFL_ListBox() override;
21 
22   // CFFL_TextObject:
23   CPWL_Wnd::CreateParams GetCreateParam() override;
24   CPWL_Wnd* NewPDFWindow(const CPWL_Wnd::CreateParams& cp) override;
25   bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override;
26   bool IsDataChanged(CPDFSDK_PageView* pPageView) override;
27   void SaveData(CPDFSDK_PageView* pPageView) override;
28   void GetActionData(CPDFSDK_PageView* pPageView,
29                      CPDF_AAction::AActionType type,
30                      PDFSDK_FieldAction& fa) override;
31   void SaveState(CPDFSDK_PageView* pPageView) override;
32   void RestoreState(CPDFSDK_PageView* pPageView) override;
33 
34  private:
35   std::set<int> m_OriginSelections;
36   std::vector<int> m_State;
37 };
38 
39 #endif  // FPDFSDK_FORMFILLER_CFFL_LISTBOX_H_
40