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/cfwl_msgkey.h" | 10 #include "xfa/fwl/core/cfwl_msgkey.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 CFWL_ListItem* hItem = GetItemAtPoint(pMsg->m_fx, pMsg->m_fy); | 166 CFWL_ListItem* hItem = GetItemAtPoint(pMsg->m_fx, pMsg->m_fy); |
167 if (!hItem) | 167 if (!hItem) |
168 return; | 168 return; |
169 if (!m_pProperties->m_pDataProvider) | 169 if (!m_pProperties->m_pDataProvider) |
170 return; | 170 return; |
171 | 171 |
172 IFWL_ListBoxDP* pData = | 172 IFWL_ListBoxDP* pData = |
173 static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); | 173 static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); |
174 int32_t iSel = pData->GetItemIndex(this, hItem); | 174 ChangeSelected(pData->GetItemIndex(this, hItem)); |
175 CFWL_EvtCmbHoverChanged event; | |
176 event.m_pSrcTarget = m_pOuter; | |
177 event.m_iCurHover = iSel; | |
178 DispatchEvent(&event); | |
179 ChangeSelected(iSel); | |
180 } else if (m_bNotifyOwner) { | 175 } else if (m_bNotifyOwner) { |
181 ClientToOuter(pMsg->m_fx, pMsg->m_fy); | 176 ClientToOuter(pMsg->m_fx, pMsg->m_fy); |
182 IFWL_ComboBox* pOuter = static_cast<IFWL_ComboBox*>(m_pOuter); | 177 IFWL_ComboBox* pOuter = static_cast<IFWL_ComboBox*>(m_pOuter); |
183 pOuter->GetDelegate()->OnProcessMessage(pMsg); | 178 pOuter->GetDelegate()->OnProcessMessage(pMsg); |
184 } | 179 } |
185 } | 180 } |
186 | 181 |
187 void IFWL_ComboList::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) { | 182 void IFWL_ComboList::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) { |
188 if (GetRTClient().Contains(pMsg->m_fx, pMsg->m_fy)) | 183 if (GetRTClient().Contains(pMsg->m_fx, pMsg->m_fy)) |
189 return; | 184 return; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 CFX_RectF rtInvalidate; | 263 CFX_RectF rtInvalidate; |
269 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, | 264 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, |
270 m_pProperties->m_rtWidget.height); | 265 m_pProperties->m_rtWidget.height); |
271 Repaint(&rtInvalidate); | 266 Repaint(&rtInvalidate); |
272 break; | 267 break; |
273 } | 268 } |
274 default: | 269 default: |
275 break; | 270 break; |
276 } | 271 } |
277 } | 272 } |
OLD | NEW |