| 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/src/fwl/basewidget/fwl_scrollbarimp.h" | 7 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/fwl_noteimp.h" |
| 10 #include "xfa/fwl/core/fwl_targetimp.h" |
| 11 #include "xfa/fwl/core/fwl_widgetimp.h" |
| 9 #include "xfa/include/fwl/basewidget/fwl_scrollbar.h" | 12 #include "xfa/include/fwl/basewidget/fwl_scrollbar.h" |
| 10 #include "xfa/include/fwl/core/fwl_theme.h" | 13 #include "xfa/include/fwl/core/fwl_theme.h" |
| 11 #include "xfa/src/fwl/core/fwl_noteimp.h" | |
| 12 #include "xfa/src/fwl/core/fwl_targetimp.h" | |
| 13 #include "xfa/src/fwl/core/fwl_widgetimp.h" | |
| 14 | 14 |
| 15 #define FWL_SCROLLBAR_Elapse 500 | 15 #define FWL_SCROLLBAR_Elapse 500 |
| 16 #define FWL_SCROLLBAR_MinThumb 5 | 16 #define FWL_SCROLLBAR_MinThumb 5 |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 IFWL_ScrollBar* IFWL_ScrollBar::Create( | 19 IFWL_ScrollBar* IFWL_ScrollBar::Create( |
| 20 const CFWL_WidgetImpProperties& properties, | 20 const CFWL_WidgetImpProperties& properties, |
| 21 IFWL_Widget* pOuter) { | 21 IFWL_Widget* pOuter) { |
| 22 IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar; | 22 IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar; |
| 23 CFWL_ScrollBarImp* pScrollBarImpl = new CFWL_ScrollBarImp(properties, pOuter); | 23 CFWL_ScrollBarImp* pScrollBarImpl = new CFWL_ScrollBarImp(properties, pOuter); |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 } | 796 } |
| 797 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, | 797 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, |
| 798 const CFX_RectF& rtItem, | 798 const CFX_RectF& rtItem, |
| 799 int32_t& iState) { | 799 int32_t& iState) { |
| 800 if (iState == FWL_PARTSTATE_SCB_Hovered) { | 800 if (iState == FWL_PARTSTATE_SCB_Hovered) { |
| 801 return; | 801 return; |
| 802 } | 802 } |
| 803 iState = FWL_PARTSTATE_SCB_Hovered; | 803 iState = FWL_PARTSTATE_SCB_Hovered; |
| 804 m_pOwner->Repaint(&rtItem); | 804 m_pOwner->Repaint(&rtItem); |
| 805 } | 805 } |
| OLD | NEW |