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/FormFiller.h" | 7 #include "../../include/formfiller/FormFiller.h" |
8 #include "../../include/formfiller/FFL_FormFiller.h" | 8 #include "../../include/formfiller/FFL_FormFiller.h" |
9 #include "../../include/formfiller/FFL_ListBox.h" | 9 #include "../../include/formfiller/FFL_ListBox.h" |
10 //#include "../../include/formfiller/FFL_Module.h" | 10 //#include "../../include/formfiller/FFL_Module.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (bRestoreValue) { | 221 if (bRestoreValue) { |
222 RestoreState(pPageView); | 222 RestoreState(pPageView); |
223 pRet = GetPDFWindow(pPageView, FALSE); | 223 pRet = GetPDFWindow(pPageView, FALSE); |
224 } else | 224 } else |
225 pRet = GetPDFWindow(pPageView, TRUE); | 225 pRet = GetPDFWindow(pPageView, TRUE); |
226 | 226 |
227 m_pWidget->UpdateField(); | 227 m_pWidget->UpdateField(); |
228 | 228 |
229 return pRet; | 229 return pRet; |
230 } | 230 } |
231 | |
232 void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag) { | |
233 ASSERT(m_pWidget != NULL); | |
234 | |
235 int nFlags = m_pWidget->GetFieldFlags(); | |
236 | |
237 if (nFlags & FIELDFLAG_COMMITONSELCHANGE) { | |
238 if (m_bValid) { | |
239 CPDFSDK_PageView* pPageView = GetCurPageView(); | |
240 ASSERT(pPageView != NULL); | |
241 | |
242 if (CommitData(pPageView, nFlag)) { | |
243 DestroyPDFWindow(pPageView); | |
244 m_bValid = FALSE; | |
245 } | |
246 } | |
247 } | |
248 } | |
OLD | NEW |