Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: xfa/fwl/core/ifwl_listbox.cpp

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_formproxy.cpp ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_formproxy.cpp ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698