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 "fpdfsdk/formfiller/cffl_checkbox.h" | 7 #include "fpdfsdk/formfiller/cffl_checkbox.h" |
8 | 8 |
9 #include "fpdfsdk/formfiller/cffl_formfiller.h" | 9 #include "fpdfsdk/formfiller/cffl_formfiller.h" |
10 #include "fpdfsdk/include/cpdfsdk_environment.h" | 10 #include "fpdfsdk/include/cpdfsdk_environment.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 default: | 35 default: |
36 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); | 36 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); |
37 } | 37 } |
38 } | 38 } |
39 FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, | 39 FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, |
40 uint32_t nChar, | 40 uint32_t nChar, |
41 uint32_t nFlags) { | 41 uint32_t nFlags) { |
42 switch (nChar) { | 42 switch (nChar) { |
43 case FWL_VKEY_Return: | 43 case FWL_VKEY_Return: |
44 case FWL_VKEY_Space: { | 44 case FWL_VKEY_Space: { |
45 CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller(); | 45 CFFL_IFormFiller* pIFormFiller = m_pEnv->GetIFormFiller(); |
46 ASSERT(pIFormFiller); | 46 ASSERT(pIFormFiller); |
47 | 47 |
48 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); | 48 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); |
49 ASSERT(pPageView); | 49 ASSERT(pPageView); |
50 | 50 |
51 FX_BOOL bReset = FALSE; | 51 FX_BOOL bReset = FALSE; |
52 FX_BOOL bExit = FALSE; | 52 FX_BOOL bExit = FALSE; |
53 | 53 |
54 pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, nFlags); | 54 pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, nFlags); |
55 | 55 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 m_pWidget->SetCheck(bNewChecked, false); | 113 m_pWidget->SetCheck(bNewChecked, false); |
114 m_pWidget->UpdateField(); | 114 m_pWidget->UpdateField(); |
115 SetChangeMark(); | 115 SetChangeMark(); |
116 } | 116 } |
117 } | 117 } |
OLD | NEW |