| 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" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 dwHashCode == CFWL_MessageType::KillFocus) { | 105 dwHashCode == CFWL_MessageType::KillFocus) { |
| 106 OnDropListFocusChanged(pMessage, dwHashCode == CFWL_MessageType::SetFocus); | 106 OnDropListFocusChanged(pMessage, dwHashCode == CFWL_MessageType::SetFocus); |
| 107 } else if (dwHashCode == CFWL_MessageType::Mouse) { | 107 } else if (dwHashCode == CFWL_MessageType::Mouse) { |
| 108 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); | 108 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); |
| 109 if (m_pOwner->IsShowScrollBar(TRUE) && m_pOwner->m_pVertScrollBar) { | 109 if (m_pOwner->IsShowScrollBar(TRUE) && m_pOwner->m_pVertScrollBar) { |
| 110 CFX_RectF rect; | 110 CFX_RectF rect; |
| 111 m_pOwner->m_pVertScrollBar->GetWidgetRect(rect); | 111 m_pOwner->m_pVertScrollBar->GetWidgetRect(rect); |
| 112 if (rect.Contains(pMsg->m_fx, pMsg->m_fy)) { | 112 if (rect.Contains(pMsg->m_fx, pMsg->m_fy)) { |
| 113 pMsg->m_fx -= rect.left; | 113 pMsg->m_fx -= rect.left; |
| 114 pMsg->m_fy -= rect.top; | 114 pMsg->m_fy -= rect.top; |
| 115 m_pOwner->m_pVertScrollBar->GetCurrentDelegate()->OnProcessMessage( | 115 m_pOwner->m_pVertScrollBar->GetDelegate()->OnProcessMessage(pMsg); |
| 116 pMsg); | |
| 117 return; | 116 return; |
| 118 } | 117 } |
| 119 } | 118 } |
| 120 switch (pMsg->m_dwCmd) { | 119 switch (pMsg->m_dwCmd) { |
| 121 case FWL_MouseCommand::Move: { | 120 case FWL_MouseCommand::Move: { |
| 122 backDefault = FALSE; | 121 backDefault = FALSE; |
| 123 OnDropListMouseMove(pMsg); | 122 OnDropListMouseMove(pMsg); |
| 124 break; | 123 break; |
| 125 } | 124 } |
| 126 case FWL_MouseCommand::LeftButtonDown: { | 125 case FWL_MouseCommand::LeftButtonDown: { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 CFX_RectF rtInvalidate; | 268 CFX_RectF rtInvalidate; |
| 270 rtInvalidate.Set(0, 0, m_pOwner->m_pProperties->m_rtWidget.width, | 269 rtInvalidate.Set(0, 0, m_pOwner->m_pProperties->m_rtWidget.width, |
| 271 m_pOwner->m_pProperties->m_rtWidget.height); | 270 m_pOwner->m_pProperties->m_rtWidget.height); |
| 272 m_pOwner->Repaint(&rtInvalidate); | 271 m_pOwner->Repaint(&rtInvalidate); |
| 273 break; | 272 break; |
| 274 } | 273 } |
| 275 default: | 274 default: |
| 276 break; | 275 break; |
| 277 } | 276 } |
| 278 } | 277 } |
| OLD | NEW |