| 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_spinbutton.h" | 7 #include "xfa/fwl/core/ifwl_spinbutton.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const int kMinWidth = 18; | 24 const int kMinWidth = 18; |
| 25 const int kMinHeight = 32; | 25 const int kMinHeight = 32; |
| 26 const int kElapseTime = 200; | 26 const int kElapseTime = 200; |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 IFWL_SpinButton::IFWL_SpinButton( | 30 IFWL_SpinButton::IFWL_SpinButton( |
| 31 const IFWL_App* app, | 31 const CFWL_App* app, |
| 32 std::unique_ptr<CFWL_WidgetProperties> properties) | 32 std::unique_ptr<CFWL_WidgetProperties> properties) |
| 33 : IFWL_Widget(app, std::move(properties), nullptr), | 33 : IFWL_Widget(app, std::move(properties), nullptr), |
| 34 m_dwUpState(CFWL_PartState_Normal), | 34 m_dwUpState(CFWL_PartState_Normal), |
| 35 m_dwDnState(CFWL_PartState_Normal), | 35 m_dwDnState(CFWL_PartState_Normal), |
| 36 m_iButtonIndex(0), | 36 m_iButtonIndex(0), |
| 37 m_bLButtonDwn(false), | 37 m_bLButtonDwn(false), |
| 38 m_pTimerInfo(nullptr), | 38 m_pTimerInfo(nullptr), |
| 39 m_Timer(this) { | 39 m_Timer(this) { |
| 40 m_rtClient.Reset(); | 40 m_rtClient.Reset(); |
| 41 m_rtUpButton.Reset(); | 41 m_rtUpButton.Reset(); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 void IFWL_SpinButton::Timer::Run(CFWL_TimerInfo* pTimerInfo) { | 379 void IFWL_SpinButton::Timer::Run(CFWL_TimerInfo* pTimerInfo) { |
| 380 IFWL_SpinButton* pButton = static_cast<IFWL_SpinButton*>(m_pWidget); | 380 IFWL_SpinButton* pButton = static_cast<IFWL_SpinButton*>(m_pWidget); |
| 381 | 381 |
| 382 if (!pButton->m_pTimerInfo) | 382 if (!pButton->m_pTimerInfo) |
| 383 return; | 383 return; |
| 384 | 384 |
| 385 CFWL_EvtClick wmPosChanged; | 385 CFWL_EvtClick wmPosChanged; |
| 386 wmPosChanged.m_pSrcTarget = pButton; | 386 wmPosChanged.m_pSrcTarget = pButton; |
| 387 pButton->DispatchEvent(&wmPosChanged); | 387 pButton->DispatchEvent(&wmPosChanged); |
| 388 } | 388 } |
| OLD | NEW |