| 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" | 9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h" |
| 10 #include "xfa/fwl/core/cfwl_message.h" | 10 #include "xfa/fwl/core/cfwl_message.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 m_rtMinBtn.Reset(); | 96 m_rtMinBtn.Reset(); |
| 97 m_rtMaxBtn.Reset(); | 97 m_rtMaxBtn.Reset(); |
| 98 m_rtMinTrack.Reset(); | 98 m_rtMinTrack.Reset(); |
| 99 m_rtMaxTrack.Reset(); | 99 m_rtMaxTrack.Reset(); |
| 100 } | 100 } |
| 101 CFWL_ScrollBarImp::~CFWL_ScrollBarImp() {} | 101 CFWL_ScrollBarImp::~CFWL_ScrollBarImp() {} |
| 102 FWL_ERR CFWL_ScrollBarImp::GetClassName(CFX_WideString& wsClass) const { | 102 FWL_ERR CFWL_ScrollBarImp::GetClassName(CFX_WideString& wsClass) const { |
| 103 wsClass = FWL_CLASS_ScrollBar; | 103 wsClass = FWL_CLASS_ScrollBar; |
| 104 return FWL_ERR_Succeeded; | 104 return FWL_ERR_Succeeded; |
| 105 } | 105 } |
| 106 uint32_t CFWL_ScrollBarImp::GetClassID() const { | 106 |
| 107 return FWL_CLASSHASH_ScrollBar; | |
| 108 } | |
| 109 FWL_ERR CFWL_ScrollBarImp::Initialize() { | 107 FWL_ERR CFWL_ScrollBarImp::Initialize() { |
| 110 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) | 108 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) |
| 111 return FWL_ERR_Indefinite; | 109 return FWL_ERR_Indefinite; |
| 112 m_pDelegate = new CFWL_ScrollBarImpDelegate(this); | 110 m_pDelegate = new CFWL_ScrollBarImpDelegate(this); |
| 113 return FWL_ERR_Succeeded; | 111 return FWL_ERR_Succeeded; |
| 114 } | 112 } |
| 115 FWL_ERR CFWL_ScrollBarImp::Finalize() { | 113 FWL_ERR CFWL_ScrollBarImp::Finalize() { |
| 116 delete m_pDelegate; | 114 delete m_pDelegate; |
| 117 m_pDelegate = nullptr; | 115 m_pDelegate = nullptr; |
| 118 return CFWL_WidgetImp::Finalize(); | 116 return CFWL_WidgetImp::Finalize(); |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 } | 803 } |
| 806 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, | 804 void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem, |
| 807 const CFX_RectF& rtItem, | 805 const CFX_RectF& rtItem, |
| 808 int32_t& iState) { | 806 int32_t& iState) { |
| 809 if (iState == CFWL_PartState_Hovered) { | 807 if (iState == CFWL_PartState_Hovered) { |
| 810 return; | 808 return; |
| 811 } | 809 } |
| 812 iState = CFWL_PartState_Hovered; | 810 iState = CFWL_PartState_Hovered; |
| 813 m_pOwner->Repaint(&rtItem); | 811 m_pOwner->Repaint(&rtItem); |
| 814 } | 812 } |
| OLD | NEW |