Chromium Code Reviews

Side by Side Diff: xfa/fwl/basewidget/fwl_spinbuttonimp.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « xfa/fwl/basewidget/fwl_spinbuttonimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('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/fwl/basewidget/fwl_spinbuttonimp.h" 7 #include "xfa/fwl/basewidget/fwl_spinbuttonimp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_spinbutton.h" 9 #include "xfa/fwl/basewidget/ifwl_spinbutton.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 115 matching lines...)
126 return FWL_WidgetHit::UpButton; 126 return FWL_WidgetHit::UpButton;
127 if (m_rtDnButton.Contains(fx, fy)) 127 if (m_rtDnButton.Contains(fx, fy))
128 return FWL_WidgetHit::DownButton; 128 return FWL_WidgetHit::DownButton;
129 return FWL_WidgetHit::Unknown; 129 return FWL_WidgetHit::Unknown;
130 } 130 }
131 FWL_Error CFWL_SpinButtonImp::DrawWidget(CFX_Graphics* pGraphics, 131 FWL_Error CFWL_SpinButtonImp::DrawWidget(CFX_Graphics* pGraphics,
132 const CFX_Matrix* pMatrix) { 132 const CFX_Matrix* pMatrix) {
133 if (!pGraphics) 133 if (!pGraphics)
134 return FWL_Error::Indefinite; 134 return FWL_Error::Indefinite;
135 CFX_RectF rtClip(m_rtClient); 135 CFX_RectF rtClip(m_rtClient);
136 if (pMatrix) { 136 if (pMatrix)
137 pMatrix->TransformRect(rtClip); 137 pMatrix->TransformRect(rtClip);
138 }
139 IFWL_ThemeProvider* pTheme = GetAvailableTheme(); 138 IFWL_ThemeProvider* pTheme = GetAvailableTheme();
140 if (HasBorder()) { 139 if (HasBorder()) {
141 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 140 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
142 } 141 }
143 if (HasEdge()) { 142 if (HasEdge()) {
144 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); 143 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
145 } 144 }
146 DrawUpButton(pGraphics, pTheme, pMatrix); 145 DrawUpButton(pGraphics, pTheme, pMatrix);
147 DrawDownButton(pGraphics, pTheme, pMatrix); 146 DrawDownButton(pGraphics, pTheme, pMatrix);
148 return FWL_Error::Succeeded; 147 return FWL_Error::Succeeded;
(...skipping 286 matching lines...)
435 if (!bUpEnable && !bDownEnable) { 434 if (!bUpEnable && !bDownEnable) {
436 return; 435 return;
437 } 436 }
438 CFWL_EvtSpbClick wmPosChanged; 437 CFWL_EvtSpbClick wmPosChanged;
439 wmPosChanged.m_pSrcTarget = m_pOwner->m_pInterface; 438 wmPosChanged.m_pSrcTarget = m_pOwner->m_pInterface;
440 wmPosChanged.m_bUp = bUpEnable; 439 wmPosChanged.m_bUp = bUpEnable;
441 m_pOwner->DispatchEvent(&wmPosChanged); 440 m_pOwner->DispatchEvent(&wmPosChanged);
442 m_pOwner->Repaint(bUpEnable ? &m_pOwner->m_rtUpButton 441 m_pOwner->Repaint(bUpEnable ? &m_pOwner->m_rtUpButton
443 : &m_pOwner->m_rtDnButton); 442 : &m_pOwner->m_rtDnButton);
444 } 443 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_spinbuttonimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('j') | no next file with comments »

Powered by Google App Engine