| 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_radiobutton.h" | 7 #include "fpdfsdk/formfiller/cffl_radiobutton.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 28 matching lines...) Expand all Loading... |
| 39 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); | 39 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, | 43 FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, |
| 44 uint32_t nChar, | 44 uint32_t nChar, |
| 45 uint32_t nFlags) { | 45 uint32_t nFlags) { |
| 46 switch (nChar) { | 46 switch (nChar) { |
| 47 case FWL_VKEY_Return: | 47 case FWL_VKEY_Return: |
| 48 case FWL_VKEY_Space: { | 48 case FWL_VKEY_Space: { |
| 49 CFFL_IFormFiller* pIFormFiller = m_pEnv->GetIFormFiller(); | 49 CFFL_InteractiveFormFiller* pInteractiveFormFiller = |
| 50 m_pEnv->GetInteractiveFormFiller(); |
| 50 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); | 51 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); |
| 51 ASSERT(pPageView); | 52 ASSERT(pPageView); |
| 52 | 53 |
| 53 FX_BOOL bReset = FALSE; | 54 FX_BOOL bReset = FALSE; |
| 54 FX_BOOL bExit = FALSE; | 55 FX_BOOL bExit = FALSE; |
| 55 | 56 |
| 56 pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, nFlags); | 57 pInteractiveFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, |
| 58 nFlags); |
| 57 | 59 |
| 58 if (bReset) | 60 if (bReset) |
| 59 return TRUE; | 61 return TRUE; |
| 60 if (bExit) | 62 if (bExit) |
| 61 return TRUE; | 63 return TRUE; |
| 62 | 64 |
| 63 CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); | 65 CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); |
| 64 | 66 |
| 65 if (CPWL_RadioButton* pWnd = | 67 if (CPWL_RadioButton* pWnd = |
| 66 (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE)) | 68 (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE)) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 116 } |
| 115 } | 117 } |
| 116 } | 118 } |
| 117 } | 119 } |
| 118 | 120 |
| 119 m_pWidget->SetCheck(bNewChecked, false); | 121 m_pWidget->SetCheck(bNewChecked, false); |
| 120 m_pWidget->UpdateField(); | 122 m_pWidget->UpdateField(); |
| 121 SetChangeMark(); | 123 SetChangeMark(); |
| 122 } | 124 } |
| 123 } | 125 } |
| OLD | NEW |