Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: xfa/fxfa/app/xfa_ffcheckbutton.cpp

Issue 2209153002: Use virtual function to retrieve interface pointer (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.cpp ('k') | xfa/fxfa/app/xfa_fffield.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.cpp ('k') | xfa/fxfa/app/xfa_fffield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698