| 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_checkbox.h" | 9 #include "xfa/fwl/cfwl_checkbox.h" |
| 10 #include "xfa/fwl/core/cfwl_msgmouse.h" | 10 #include "xfa/fwl/cfwl_messagemouse.h" |
| 11 #include "xfa/fwl/core/cfwl_notedriver.h" | 11 #include "xfa/fwl/cfwl_notedriver.h" |
| 12 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 12 #include "xfa/fwl/cfwl_widgetmgr.h" |
| 13 #include "xfa/fxfa/app/xfa_ffexclgroup.h" | 13 #include "xfa/fxfa/app/xfa_ffexclgroup.h" |
| 14 #include "xfa/fxfa/app/xfa_fffield.h" | 14 #include "xfa/fxfa/app/xfa_fffield.h" |
| 15 #include "xfa/fxfa/xfa_ffapp.h" | 15 #include "xfa/fxfa/xfa_ffapp.h" |
| 16 #include "xfa/fxfa/xfa_ffdoc.h" | 16 #include "xfa/fxfa/xfa_ffdoc.h" |
| 17 #include "xfa/fxfa/xfa_ffdocview.h" | 17 #include "xfa/fxfa/xfa_ffdocview.h" |
| 18 #include "xfa/fxfa/xfa_ffpageview.h" | 18 #include "xfa/fxfa/xfa_ffpageview.h" |
| 19 #include "xfa/fxfa/xfa_ffwidget.h" | 19 #include "xfa/fxfa/xfa_ffwidget.h" |
| 20 | 20 |
| 21 CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_FFPageView* pPageView, | 21 CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_FFPageView* pPageView, |
| 22 CXFA_WidgetAcc* pDataAcc) | 22 CXFA_WidgetAcc* pDataAcc) |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 mt.Concat(mtRotate); | 239 mt.Concat(mtRotate); |
| 240 GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt); | 240 GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt); |
| 241 } | 241 } |
| 242 bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, | 242 bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, |
| 243 FX_FLOAT fx, | 243 FX_FLOAT fx, |
| 244 FX_FLOAT fy) { | 244 FX_FLOAT fy) { |
| 245 if (!m_pNormalWidget || !IsButtonDown()) | 245 if (!m_pNormalWidget || !IsButtonDown()) |
| 246 return false; | 246 return false; |
| 247 | 247 |
| 248 SetButtonDown(false); | 248 SetButtonDown(false); |
| 249 CFWL_MsgMouse ms(nullptr, m_pNormalWidget); | 249 CFWL_MessageMouse ms(nullptr, m_pNormalWidget); |
| 250 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; | 250 ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
| 251 ms.m_dwFlags = dwFlags; | 251 ms.m_dwFlags = dwFlags; |
| 252 ms.m_fx = fx; | 252 ms.m_fx = fx; |
| 253 ms.m_fy = fy; | 253 ms.m_fy = fy; |
| 254 FWLToClient(ms.m_fx, ms.m_fy); | 254 FWLToClient(ms.m_fx, ms.m_fy); |
| 255 TranslateFWLMessage(&ms); | 255 TranslateFWLMessage(&ms); |
| 256 return true; | 256 return true; |
| 257 } | 257 } |
| 258 | 258 |
| 259 XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() { | 259 XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 default: | 330 default: |
| 331 break; | 331 break; |
| 332 } | 332 } |
| 333 m_pOldDelegate->OnProcessEvent(pEvent); | 333 m_pOldDelegate->OnProcessEvent(pEvent); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, | 336 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, |
| 337 const CFX_Matrix* pMatrix) { | 337 const CFX_Matrix* pMatrix) { |
| 338 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 338 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 339 } | 339 } |
| OLD | NEW |