| 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> |
| 11 | 11 |
| 12 #include "third_party/base/ptr_util.h" | 12 #include "third_party/base/ptr_util.h" |
| 13 #include "xfa/fwl/core/cfwl_evtclick.h" | 13 #include "xfa/fwl/core/cfwl_evtclick.h" |
| 14 #include "xfa/fwl/core/cfwl_msgkey.h" | 14 #include "xfa/fwl/core/cfwl_msgkey.h" |
| 15 #include "xfa/fwl/core/cfwl_msgmouse.h" | 15 #include "xfa/fwl/core/cfwl_msgmouse.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_timerinfo.h" |
| 18 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 19 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
| 19 #include "xfa/fwl/core/ifwl_themeprovider.h" | 20 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 20 #include "xfa/fwl/core/ifwl_timerinfo.h" | |
| 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( |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 return; | 367 return; |
| 368 | 368 |
| 369 CFWL_EvtClick wmPosChanged; | 369 CFWL_EvtClick wmPosChanged; |
| 370 wmPosChanged.m_pSrcTarget = this; | 370 wmPosChanged.m_pSrcTarget = this; |
| 371 DispatchEvent(&wmPosChanged); | 371 DispatchEvent(&wmPosChanged); |
| 372 | 372 |
| 373 Repaint(bUpEnable ? &m_rtUpButton : &m_rtDnButton); | 373 Repaint(bUpEnable ? &m_rtUpButton : &m_rtDnButton); |
| 374 } | 374 } |
| 375 | 375 |
| 376 IFWL_SpinButton::Timer::Timer(IFWL_SpinButton* pToolTip) | 376 IFWL_SpinButton::Timer::Timer(IFWL_SpinButton* pToolTip) |
| 377 : IFWL_Timer(pToolTip) {} | 377 : CFWL_Timer(pToolTip) {} |
| 378 | 378 |
| 379 void IFWL_SpinButton::Timer::Run(IFWL_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 |