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/include/formfiller/FFL_CheckBox.h" | 7 #include "fpdfsdk/include/formfiller/FFL_CheckBox.h" |
8 | 8 |
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" | 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" |
10 #include "fpdfsdk/include/fsdk_mgr.h" | 10 #include "fpdfsdk/include/fsdk_mgr.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return TRUE; | 66 return TRUE; |
67 } | 67 } |
68 default: | 68 default: |
69 return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); | 69 return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView, | 73 FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView, |
74 CPDFSDK_Annot* pAnnot, | 74 CPDFSDK_Annot* pAnnot, |
75 FX_UINT nFlags, | 75 FX_UINT nFlags, |
76 const CPDF_Point& point) { | 76 const CFX_FloatPoint& point) { |
77 CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point); | 77 CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point); |
78 | 78 |
79 if (IsValid()) { | 79 if (IsValid()) { |
80 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE)) { | 80 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE)) { |
81 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 81 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
82 pWnd->SetCheck(!pWidget->IsChecked()); | 82 pWnd->SetCheck(!pWidget->IsChecked()); |
83 } | 83 } |
84 | 84 |
85 if (!CommitData(pPageView, nFlags)) | 85 if (!CommitData(pPageView, nFlags)) |
86 return FALSE; | 86 return FALSE; |
(...skipping 20 matching lines...) Expand all Loading... |
107 } | 107 } |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 m_pWidget->SetCheck(bNewChecked, FALSE); | 112 m_pWidget->SetCheck(bNewChecked, FALSE); |
113 m_pWidget->UpdateField(); | 113 m_pWidget->UpdateField(); |
114 SetChangeMark(); | 114 SetChangeMark(); |
115 } | 115 } |
116 } | 116 } |
OLD | NEW |