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