| 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/fwl/cfwl_scrollbar.h" | 7 #include "xfa/fwl/cfwl_scrollbar.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics, | 74 void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics, |
| 75 const CFX_Matrix* pMatrix) { | 75 const CFX_Matrix* pMatrix) { |
| 76 if (!pGraphics) | 76 if (!pGraphics) |
| 77 return; | 77 return; |
| 78 if (!m_pProperties->m_pThemeProvider) | 78 if (!m_pProperties->m_pThemeProvider) |
| 79 return; | 79 return; |
| 80 | 80 |
| 81 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; | 81 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; |
| 82 if (HasBorder()) | 82 if (HasBorder()) |
| 83 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); | 83 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); |
| 84 if (HasEdge()) | |
| 85 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); | |
| 86 DrawTrack(pGraphics, pTheme, true, pMatrix); | 84 DrawTrack(pGraphics, pTheme, true, pMatrix); |
| 87 DrawTrack(pGraphics, pTheme, false, pMatrix); | 85 DrawTrack(pGraphics, pTheme, false, pMatrix); |
| 88 DrawArrowBtn(pGraphics, pTheme, true, pMatrix); | 86 DrawArrowBtn(pGraphics, pTheme, true, pMatrix); |
| 89 DrawArrowBtn(pGraphics, pTheme, false, pMatrix); | 87 DrawArrowBtn(pGraphics, pTheme, false, pMatrix); |
| 90 DrawThumb(pGraphics, pTheme, pMatrix); | 88 DrawThumb(pGraphics, pTheme, pMatrix); |
| 91 } | 89 } |
| 92 | 90 |
| 93 void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { | 91 void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { |
| 94 m_fTrackPos = fTrackPos; | 92 m_fTrackPos = fTrackPos; |
| 95 CalcThumbButtonRect(m_rtThumb); | 93 CalcThumbButtonRect(m_rtThumb); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 493 |
| 496 void CFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { | 494 void CFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { |
| 497 CFWL_ScrollBar* pButton = static_cast<CFWL_ScrollBar*>(m_pWidget); | 495 CFWL_ScrollBar* pButton = static_cast<CFWL_ScrollBar*>(m_pWidget); |
| 498 | 496 |
| 499 if (pButton->m_pTimerInfo) | 497 if (pButton->m_pTimerInfo) |
| 500 pButton->m_pTimerInfo->StopTimer(); | 498 pButton->m_pTimerInfo->StopTimer(); |
| 501 | 499 |
| 502 if (!pButton->SendEvent()) | 500 if (!pButton->SendEvent()) |
| 503 pButton->m_pTimerInfo = StartTimer(0, true); | 501 pButton->m_pTimerInfo = StartTimer(0, true); |
| 504 } | 502 } |
| OLD | NEW |