| 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 <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 case FWL_VKEY_Up: | 253 case FWL_VKEY_Up: |
| 254 case FWL_VKEY_Down: | 254 case FWL_VKEY_Down: |
| 255 case FWL_VKEY_Home: | 255 case FWL_VKEY_Home: |
| 256 case FWL_VKEY_End: { | 256 case FWL_VKEY_End: { |
| 257 IFWL_ComboBox* pOuter = static_cast<IFWL_ComboBox*>(m_pOuter); | 257 IFWL_ComboBox* pOuter = static_cast<IFWL_ComboBox*>(m_pOuter); |
| 258 IFWL_ListBox::DataProvider* pData = | 258 IFWL_ListBox::DataProvider* pData = |
| 259 static_cast<IFWL_ListBox::DataProvider*>( | 259 static_cast<IFWL_ListBox::DataProvider*>( |
| 260 m_pProperties->m_pDataProvider); | 260 m_pProperties->m_pDataProvider); |
| 261 CFWL_ListItem* hItem = | 261 CFWL_ListItem* hItem = |
| 262 pData->GetItem(this, pOuter->GetCurrentSelection()); | 262 pData->GetItem(this, pOuter->GetCurrentSelection()); |
| 263 hItem = GetItem(hItem, dwKeyCode); | 263 hItem = GetListItem(hItem, dwKeyCode); |
| 264 if (!hItem) | 264 if (!hItem) |
| 265 break; | 265 break; |
| 266 | 266 |
| 267 SetSelection(hItem, hItem, true); | 267 SetSelection(hItem, hItem, true); |
| 268 ScrollToVisible(hItem); | 268 ScrollToVisible(hItem); |
| 269 CFX_RectF rtInvalidate; | 269 CFX_RectF rtInvalidate; |
| 270 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, | 270 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, |
| 271 m_pProperties->m_rtWidget.height); | 271 m_pProperties->m_rtWidget.height); |
| 272 Repaint(&rtInvalidate); | 272 Repaint(&rtInvalidate); |
| 273 break; | 273 break; |
| 274 } | 274 } |
| 275 default: | 275 default: |
| 276 break; | 276 break; |
| 277 } | 277 } |
| 278 } | 278 } |
| OLD | NEW |