| 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/core/ifwl_scrollbar.h" | 7 #include "xfa/fwl/core/ifwl_scrollbar.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "third_party/base/ptr_util.h" | 13 #include "third_party/base/ptr_util.h" |
| 14 #include "xfa/fwl/core/cfwl_msgmouse.h" | 14 #include "xfa/fwl/core/cfwl_msgmouse.h" |
| 15 #include "xfa/fwl/core/cfwl_msgmousewheel.h" | 15 #include "xfa/fwl/core/cfwl_msgmousewheel.h" |
| 16 #include "xfa/fwl/core/cfwl_notedriver.h" | 16 #include "xfa/fwl/core/cfwl_notedriver.h" |
| 17 #include "xfa/fwl/core/cfwl_themebackground.h" | 17 #include "xfa/fwl/core/cfwl_themebackground.h" |
| 18 #include "xfa/fwl/core/cfwl_themepart.h" | 18 #include "xfa/fwl/core/cfwl_themepart.h" |
| 19 #include "xfa/fwl/core/cfwl_timerinfo.h" | 19 #include "xfa/fwl/core/cfwl_timerinfo.h" |
| 20 #include "xfa/fwl/core/ifwl_themeprovider.h" | 20 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 21 | 21 |
| 22 #define FWL_SCROLLBAR_Elapse 500 | 22 #define FWL_SCROLLBAR_Elapse 500 |
| 23 #define FWL_SCROLLBAR_MinThumb 5 | 23 #define FWL_SCROLLBAR_MinThumb 5 |
| 24 | 24 |
| 25 IFWL_ScrollBar::IFWL_ScrollBar( | 25 IFWL_ScrollBar::IFWL_ScrollBar( |
| 26 const IFWL_App* app, | 26 const CFWL_App* app, |
| 27 std::unique_ptr<CFWL_WidgetProperties> properties, | 27 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 28 IFWL_Widget* pOuter) | 28 IFWL_Widget* pOuter) |
| 29 : IFWL_Widget(app, std::move(properties), pOuter), | 29 : IFWL_Widget(app, std::move(properties), pOuter), |
| 30 m_pTimerInfo(nullptr), | 30 m_pTimerInfo(nullptr), |
| 31 m_fRangeMin(0), | 31 m_fRangeMin(0), |
| 32 m_fRangeMax(-1), | 32 m_fRangeMax(-1), |
| 33 m_fPageSize(0), | 33 m_fPageSize(0), |
| 34 m_fStepSize(0), | 34 m_fStepSize(0), |
| 35 m_fPos(0), | 35 m_fPos(0), |
| 36 m_fTrackPos(0), | 36 m_fTrackPos(0), |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 void IFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { | 555 void IFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { |
| 556 IFWL_ScrollBar* pButton = static_cast<IFWL_ScrollBar*>(m_pWidget); | 556 IFWL_ScrollBar* pButton = static_cast<IFWL_ScrollBar*>(m_pWidget); |
| 557 | 557 |
| 558 if (pButton->m_pTimerInfo) | 558 if (pButton->m_pTimerInfo) |
| 559 pButton->m_pTimerInfo->StopTimer(); | 559 pButton->m_pTimerInfo->StopTimer(); |
| 560 | 560 |
| 561 if (!pButton->SendEvent()) | 561 if (!pButton->SendEvent()) |
| 562 pButton->m_pTimerInfo = StartTimer(0, true); | 562 pButton->m_pTimerInfo = StartTimer(0, true); |
| 563 } | 563 } |
| OLD | NEW |