| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_combolist.h" | 7 #include "xfa/fwl/core/ifwl_combolist.h" |
| 8 | 8 |
| 9 #include "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
| 10 #include "xfa/fwl/core/ifwl_combobox.h" | 10 #include "xfa/fwl/core/ifwl_combobox.h" |
| 11 #include "xfa/fwl/core/ifwl_comboedit.h" | 11 #include "xfa/fwl/core/ifwl_comboedit.h" |
| 12 | 12 |
| 13 IFWL_ComboList::IFWL_ComboList(const IFWL_App* app, | 13 IFWL_ComboList::IFWL_ComboList( |
| 14 const CFWL_WidgetImpProperties& properties, | 14 const IFWL_App* app, |
| 15 IFWL_Widget* pOuter) | 15 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 16 : IFWL_ListBox(app, properties, pOuter), m_bNotifyOwner(true) { | 16 IFWL_Widget* pOuter) |
| 17 : IFWL_ListBox(app, std::move(properties), pOuter), m_bNotifyOwner(true) { |
| 17 ASSERT(pOuter); | 18 ASSERT(pOuter); |
| 18 } | 19 } |
| 19 | 20 |
| 20 int32_t IFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) { | 21 int32_t IFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) { |
| 21 if (wsMatch.IsEmpty()) { | 22 if (wsMatch.IsEmpty()) { |
| 22 return -1; | 23 return -1; |
| 23 } | 24 } |
| 24 if (!m_pProperties->m_pDataProvider) | 25 if (!m_pProperties->m_pDataProvider) |
| 25 return -1; | 26 return -1; |
| 26 IFWL_ListBoxDP* pData = | 27 IFWL_ListBoxDP* pData = |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 CFX_RectF rtInvalidate; | 265 CFX_RectF rtInvalidate; |
| 265 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, | 266 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, |
| 266 m_pProperties->m_rtWidget.height); | 267 m_pProperties->m_rtWidget.height); |
| 267 Repaint(&rtInvalidate); | 268 Repaint(&rtInvalidate); |
| 268 break; | 269 break; |
| 269 } | 270 } |
| 270 default: | 271 default: |
| 271 break; | 272 break; |
| 272 } | 273 } |
| 273 } | 274 } |
| OLD | NEW |