43f5fce40b8e8604213d7c42a86c26f5a0f55402
[pdfium.git] / fpdfsdk / include / formfiller / FFL_ListBox.h
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 _FFL_LISTBOX_H_
8 #define _FFL_LISTBOX_H_
9
10 class  CBA_FontMap;
11 class CFFL_ListBox : public CFFL_FormFiller
12 {
13 public:
14         CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
15         virtual ~CFFL_ListBox();
16
17         virtual PWL_CREATEPARAM         GetCreateParam();
18         virtual CPWL_Wnd*                       NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
19
20         virtual FX_BOOL                         OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
21
22         virtual FX_BOOL                         IsDataChanged(CPDFSDK_PageView* pPageView);
23         virtual void                            SaveData(CPDFSDK_PageView* pPageView);
24
25         virtual void                            GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
26                                                                         PDFSDK_FieldAction& fa);
27         virtual void                            SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, 
28                                                                         const PDFSDK_FieldAction& fa);
29
30         virtual void                            SaveState(CPDFSDK_PageView* pPageView);
31         virtual void                            RestoreState(CPDFSDK_PageView* pPageView);
32
33         virtual CPWL_Wnd*                       ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
34         virtual void                            OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag);
35
36 private:
37         CBA_FontMap*                                    m_pFontMap;
38         CFX_MapPtrTemplate<int, void*>  m_OriginSelections;
39         CFX_ArrayTemplate<int>                  m_State;
40 };
41
42
43 #endif //_FFL_LISTBOX_H_
44