| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ | 7 #ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ |
| 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ | 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ |
| 9 | 9 |
| 10 #include "../../../core/include/fxcrt/fx_string.h" | 10 #include "../../../core/include/fxcrt/fx_string.h" |
| 11 #include "FFL_FormFiller.h" | 11 #include "FFL_FormFiller.h" |
| 12 | 12 |
| 13 class CBA_FontMap; | 13 class CBA_FontMap; |
| 14 class CPDFSDK_Document; | 14 class CPDFSDK_Document; |
| 15 | 15 |
| 16 struct FFL_ComboBoxState | 16 struct FFL_ComboBoxState { |
| 17 { | 17 int nIndex; |
| 18 » int nIndex; | 18 int nStart; |
| 19 » int nStart; | 19 int nEnd; |
| 20 » int nEnd; | 20 CFX_WideString sValue; |
| 21 » CFX_WideString sValue; | |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 class CFFL_ComboBox : public CFFL_FormFiller, public IPWL_FocusHandler, public I
PWL_Edit_Notify | 23 class CFFL_ComboBox : public CFFL_FormFiller, |
| 25 { | 24 public IPWL_FocusHandler, |
| 26 public: | 25 public IPWL_Edit_Notify { |
| 27 » CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget); | 26 public: |
| 28 » virtual ~CFFL_ComboBox(); | 27 CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget); |
| 28 virtual ~CFFL_ComboBox(); |
| 29 | 29 |
| 30 » virtual»PWL_CREATEPARAM»» GetCreateParam(); | 30 virtual PWL_CREATEPARAM GetCreateParam(); |
| 31 » virtual CPWL_Wnd*» » » NewPDFWindow(const PWL_CREATEPAR
AM& cp, CPDFSDK_PageView* pPageView); | 31 virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, |
| 32 CPDFSDK_PageView* pPageView); |
| 32 | 33 |
| 34 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); |
| 33 | 35 |
| 34 » virtual FX_BOOL»» » » OnChar(CPDFSDK_Annot* pAnnot, FX
_UINT nChar, FX_UINT nFlags); | 36 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView); |
| 37 virtual void SaveData(CPDFSDK_PageView* pPageView); |
| 35 | 38 |
| 36 » virtual FX_BOOL»» » » IsDataChanged(CPDFSDK_PageView*
pPageView); | 39 virtual void GetActionData(CPDFSDK_PageView* pPageView, |
| 37 » virtual void» » » » SaveData(CPDFSDK_PageView* pPage
View); | 40 CPDF_AAction::AActionType type, |
| 41 PDFSDK_FieldAction& fa); |
| 42 virtual void SetActionData(CPDFSDK_PageView* pPageView, |
| 43 CPDF_AAction::AActionType type, |
| 44 const PDFSDK_FieldAction& fa); |
| 45 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, |
| 46 const PDFSDK_FieldAction& faOld, |
| 47 const PDFSDK_FieldAction& faNew); |
| 48 virtual void SaveState(CPDFSDK_PageView* pPageView); |
| 49 virtual void RestoreState(CPDFSDK_PageView* pPageView); |
| 38 | 50 |
| 39 » virtual void» » » » GetActionData(CPDFSDK_PageView*
pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa); | 51 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, |
| 40 » virtual void» » » » SetActionData(CPDFSDK_PageView*
pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa); | 52 FX_BOOL bRestoreValue); |
| 41 » virtual FX_BOOL»» » » IsActionDataChanged(CPDF_AAction
::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& f
aNew); | 53 virtual void OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag); |
| 42 » virtual void» » » » SaveState(CPDFSDK_PageView* pPag
eView); | |
| 43 » virtual void» » » » RestoreState(CPDFSDK_PageView* p
PageView); | |
| 44 | 54 |
| 45 » virtual CPWL_Wnd*» » » ResetPDFWindow(CPDFSDK_PageView*
pPageView, FX_BOOL bRestoreValue); | 55 public: |
| 46 » virtual void» » » » OnKeyStroke(FX_BOOL bKeyDown, FX
_UINT nFlag); | 56 virtual void OnSetFocus(CPWL_Wnd* pWnd); |
| 57 virtual void OnKillFocus(CPWL_Wnd* pWnd); |
| 47 | 58 |
| 48 public: | 59 public: |
| 49 » virtual void» » » » OnSetFocus(CPWL_Wnd* pWnd); | 60 virtual void OnAddUndo(CPWL_Edit* pEdit); |
| 50 » virtual void» » » » OnKillFocus(CPWL_Wnd* pWnd); | |
| 51 | 61 |
| 52 public: | 62 public: |
| 53 » virtual void» » » » OnAddUndo(CPWL_Edit* pEdit); | 63 virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); |
| 64 virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); |
| 65 virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); |
| 54 | 66 |
| 55 public: | 67 private: |
| 56 » virtual FX_BOOL»» » » CanCopy(CPDFSDK_Document* pDocum
ent); | 68 CFX_WideString GetSelectExportText(); |
| 57 » virtual FX_BOOL»» » » CanCut(CPDFSDK_Document* pDocume
nt); | |
| 58 » virtual FX_BOOL»» » » CanPaste(CPDFSDK_Document* pDocu
ment); | |
| 59 | 69 |
| 60 private: | 70 private: |
| 61 » CFX_WideString» » » » GetSelectExportText(); | 71 CBA_FontMap* m_pFontMap; |
| 62 | 72 FFL_ComboBoxState m_State; |
| 63 private: | |
| 64 » CBA_FontMap*» » » » m_pFontMap; | |
| 65 » FFL_ComboBoxState» » » » m_State; | |
| 66 }; | 73 }; |
| 67 | 74 |
| 68 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ | 75 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ |
| OLD | NEW |