| 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_listbox.h" | 7 #include "xfa/fwl/core/ifwl_listbox.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "third_party/base/ptr_util.h" | 13 #include "third_party/base/ptr_util.h" |
| 14 #include "xfa/fde/tto/fde_textout.h" | 14 #include "xfa/fde/tto/fde_textout.h" |
| 15 #include "xfa/fwl/core/cfwl_app.h" |
| 15 #include "xfa/fwl/core/cfwl_msgkey.h" | 16 #include "xfa/fwl/core/cfwl_msgkey.h" |
| 16 #include "xfa/fwl/core/cfwl_msgmouse.h" | 17 #include "xfa/fwl/core/cfwl_msgmouse.h" |
| 17 #include "xfa/fwl/core/cfwl_msgmousewheel.h" | 18 #include "xfa/fwl/core/cfwl_msgmousewheel.h" |
| 18 #include "xfa/fwl/core/cfwl_themebackground.h" | 19 #include "xfa/fwl/core/cfwl_themebackground.h" |
| 19 #include "xfa/fwl/core/cfwl_themepart.h" | 20 #include "xfa/fwl/core/cfwl_themepart.h" |
| 20 #include "xfa/fwl/core/cfwl_themetext.h" | 21 #include "xfa/fwl/core/cfwl_themetext.h" |
| 21 #include "xfa/fwl/core/ifwl_app.h" | |
| 22 #include "xfa/fwl/core/ifwl_themeprovider.h" | 22 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const int kItemTextMargin = 2; | 26 const int kItemTextMargin = 2; |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 IFWL_ListBox::IFWL_ListBox(const IFWL_App* app, | 30 IFWL_ListBox::IFWL_ListBox(const CFWL_App* app, |
| 31 std::unique_ptr<CFWL_WidgetProperties> properties, | 31 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 32 IFWL_Widget* pOuter) | 32 IFWL_Widget* pOuter) |
| 33 : IFWL_Widget(app, std::move(properties), pOuter), | 33 : IFWL_Widget(app, std::move(properties), pOuter), |
| 34 m_dwTTOStyles(0), | 34 m_dwTTOStyles(0), |
| 35 m_iTTOAligns(0), | 35 m_iTTOAligns(0), |
| 36 m_hAnchor(nullptr), | 36 m_hAnchor(nullptr), |
| 37 m_fScorllBarWidth(0), | 37 m_fScorllBarWidth(0), |
| 38 m_bLButtonDown(false), | 38 m_bLButtonDown(false), |
| 39 m_pScrollBarTP(nullptr) { | 39 m_pScrollBarTP(nullptr) { |
| 40 m_rtClient.Reset(); | 40 m_rtClient.Reset(); |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 case FWL_SCBCODE::EndScroll: | 1060 case FWL_SCBCODE::EndScroll: |
| 1061 return false; | 1061 return false; |
| 1062 } | 1062 } |
| 1063 if (iCurPos != fPos) { | 1063 if (iCurPos != fPos) { |
| 1064 pScrollBar->SetPos(fPos); | 1064 pScrollBar->SetPos(fPos); |
| 1065 pScrollBar->SetTrackPos(fPos); | 1065 pScrollBar->SetTrackPos(fPos); |
| 1066 Repaint(&m_rtClient); | 1066 Repaint(&m_rtClient); |
| 1067 } | 1067 } |
| 1068 return true; | 1068 return true; |
| 1069 } | 1069 } |
| OLD | NEW |