| 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 "xfa/fxfa/app/xfa_ffcheckbutton.h" | 7 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/cfwl_message.h" | 9 #include "xfa/fwl/core/cfwl_message.h" |
| 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 if (!m_pNormalWidget || !IsButtonDown()) | 241 if (!m_pNormalWidget || !IsButtonDown()) |
| 242 return FALSE; | 242 return FALSE; |
| 243 | 243 |
| 244 SetButtonDown(FALSE); | 244 SetButtonDown(FALSE); |
| 245 CFWL_MsgMouse ms; | 245 CFWL_MsgMouse ms; |
| 246 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; | 246 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
| 247 ms.m_dwFlags = dwFlags; | 247 ms.m_dwFlags = dwFlags; |
| 248 ms.m_fx = fx; | 248 ms.m_fx = fx; |
| 249 ms.m_fy = fy; | 249 ms.m_fy = fy; |
| 250 FWLToClient(ms.m_fx, ms.m_fy); | 250 FWLToClient(ms.m_fx, ms.m_fy); |
| 251 ms.m_pDstTarget = m_pNormalWidget->m_pIface; | 251 ms.m_pDstTarget = m_pNormalWidget->GetWidget(); |
| 252 TranslateFWLMessage(&ms); | 252 TranslateFWLMessage(&ms); |
| 253 return TRUE; | 253 return TRUE; |
| 254 } | 254 } |
| 255 | 255 |
| 256 XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() { | 256 XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() { |
| 257 uint32_t dwState = m_pNormalWidget->GetStates(); | 257 uint32_t dwState = m_pNormalWidget->GetStates(); |
| 258 if (dwState & FWL_STATE_CKB_Checked) | 258 if (dwState & FWL_STATE_CKB_Checked) |
| 259 return XFA_CHECKSTATE_On; | 259 return XFA_CHECKSTATE_On; |
| 260 if (dwState & FWL_STATE_CKB_Neutral) | 260 if (dwState & FWL_STATE_CKB_Neutral) |
| 261 return XFA_CHECKSTATE_Neutral; | 261 return XFA_CHECKSTATE_Neutral; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 default: | 325 default: |
| 326 break; | 326 break; |
| 327 } | 327 } |
| 328 m_pOldDelegate->OnProcessEvent(pEvent); | 328 m_pOldDelegate->OnProcessEvent(pEvent); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, | 331 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, |
| 332 const CFX_Matrix* pMatrix) { | 332 const CFX_Matrix* pMatrix) { |
| 333 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 333 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 334 } | 334 } |
| OLD | NEW |