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 #include "../../include/formfiller/FFL_FormFiller.h" | 7 #include "../../include/formfiller/FFL_FormFiller.h" |
8 #include "../../include/formfiller/FFL_IFormFiller.h" | 8 #include "../../include/formfiller/FFL_IFormFiller.h" |
9 #include "../../include/formfiller/FFL_CheckBox.h" | 9 #include "../../include/formfiller/FFL_CheckBox.h" |
10 #include "../../include/formfiller/FFL_ComboBox.h" | 10 #include "../../include/formfiller/FFL_ComboBox.h" |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 } | 979 } |
980 | 980 |
981 FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, | 981 FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, |
982 CPDFSDK_Annot* pAnnot) { | 982 CPDFSDK_Annot* pAnnot) { |
983 if (pPageView) | 983 if (pPageView) |
984 return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot()); | 984 return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot()); |
985 | 985 |
986 return FALSE; | 986 return FALSE; |
987 } | 987 } |
988 | 988 |
989 void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, | 989 void CFFL_IFormFiller::OnBeforeKeyStroke(void* pPrivateData, |
990 void* pPrivateData, | |
991 int32_t nKeyCode, | |
992 CFX_WideString& strChange, | 990 CFX_WideString& strChange, |
993 const CFX_WideString& strChangeEx, | 991 const CFX_WideString& strChangeEx, |
994 int nSelStart, | 992 int nSelStart, |
995 int nSelEnd, | 993 int nSelEnd, |
996 FX_BOOL bKeyDown, | 994 FX_BOOL bKeyDown, |
997 FX_BOOL& bRC, | 995 FX_BOOL& bRC, |
998 FX_BOOL& bExit, | 996 FX_BOOL& bExit, |
999 FX_DWORD nFlag) { | 997 FX_DWORD nFlag) { |
1000 ASSERT(pPrivateData != NULL); | 998 ASSERT(pPrivateData != NULL); |
1001 CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; | 999 CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 bExit = TRUE; | 1069 bExit = TRUE; |
1072 m_bNotifying = FALSE; | 1070 m_bNotifying = FALSE; |
1073 return; | 1071 return; |
1074 } | 1072 } |
1075 } | 1073 } |
1076 | 1074 |
1077 m_bNotifying = FALSE; | 1075 m_bNotifying = FALSE; |
1078 } | 1076 } |
1079 } | 1077 } |
1080 } | 1078 } |
1081 | |
1082 void CFFL_IFormFiller::OnAfterKeyStroke(FX_BOOL bEditOrList, | |
1083 void* pPrivateData, | |
1084 FX_BOOL& bExit, | |
1085 FX_DWORD nFlag) { | |
1086 CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; | |
1087 ASSERT(pData->pWidget); | |
1088 | |
1089 CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE); | |
1090 | |
1091 if (!bEditOrList) | |
1092 pFormFiller->OnKeyStroke(bExit, nFlag); | |
1093 } | |
OLD | NEW |