| 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 "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
| 10 #include "xfa/fde/tto/fde_textout.h" | 10 #include "xfa/fde/tto/fde_textout.h" |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 void CFWL_ListBoxImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) { | 1055 void CFWL_ListBoxImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) { |
| 1056 if (m_pOwner->m_bLButtonDown) { | 1056 if (m_pOwner->m_bLButtonDown) { |
| 1057 m_pOwner->m_bLButtonDown = FALSE; | 1057 m_pOwner->m_bLButtonDown = FALSE; |
| 1058 m_pOwner->SetGrab(FALSE); | 1058 m_pOwner->SetGrab(FALSE); |
| 1059 DispatchSelChangedEv(); | 1059 DispatchSelChangedEv(); |
| 1060 } | 1060 } |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 void CFWL_ListBoxImpDelegate::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) { | 1063 void CFWL_ListBoxImpDelegate::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) { |
| 1064 if (m_pOwner->IsShowScrollBar(TRUE)) | 1064 if (m_pOwner->IsShowScrollBar(TRUE)) |
| 1065 m_pOwner->m_pVertScrollBar->GetCurrentDelegate()->OnProcessMessage(pMsg); | 1065 m_pOwner->m_pVertScrollBar->GetDelegate()->OnProcessMessage(pMsg); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { | 1068 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { |
| 1069 uint32_t dwKeyCode = pMsg->m_dwKeyCode; | 1069 uint32_t dwKeyCode = pMsg->m_dwKeyCode; |
| 1070 switch (dwKeyCode) { | 1070 switch (dwKeyCode) { |
| 1071 case FWL_VKEY_Tab: | 1071 case FWL_VKEY_Tab: |
| 1072 case FWL_VKEY_Up: | 1072 case FWL_VKEY_Up: |
| 1073 case FWL_VKEY_Down: | 1073 case FWL_VKEY_Down: |
| 1074 case FWL_VKEY_Home: | 1074 case FWL_VKEY_Home: |
| 1075 case FWL_VKEY_End: { | 1075 case FWL_VKEY_End: { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 m_pOwner->Repaint(&m_pOwner->m_rtClient); | 1175 m_pOwner->Repaint(&m_pOwner->m_rtClient); |
| 1176 } | 1176 } |
| 1177 return TRUE; | 1177 return TRUE; |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() { | 1180 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() { |
| 1181 CFWL_EvtLtbSelChanged ev; | 1181 CFWL_EvtLtbSelChanged ev; |
| 1182 ev.m_pSrcTarget = m_pOwner; | 1182 ev.m_pSrcTarget = m_pOwner; |
| 1183 m_pOwner->DispatchEvent(&ev); | 1183 m_pOwner->DispatchEvent(&ev); |
| 1184 } | 1184 } |
| OLD | NEW |