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

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

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: Review feedback 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 "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1068
1069 void CFWL_ListBoxImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) { 1069 void CFWL_ListBoxImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
1070 if (m_pOwner->m_bLButtonDown) { 1070 if (m_pOwner->m_bLButtonDown) {
1071 m_pOwner->m_bLButtonDown = FALSE; 1071 m_pOwner->m_bLButtonDown = FALSE;
1072 m_pOwner->SetGrab(FALSE); 1072 m_pOwner->SetGrab(FALSE);
1073 DispatchSelChangedEv(); 1073 DispatchSelChangedEv();
1074 } 1074 }
1075 } 1075 }
1076 1076
1077 void CFWL_ListBoxImpDelegate::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) { 1077 void CFWL_ListBoxImpDelegate::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) {
1078 if (!m_pOwner->IsShowScrollBar(TRUE)) { 1078 if (m_pOwner->IsShowScrollBar(TRUE))
1079 return; 1079 m_pOwner->m_pVertScrollBar->GetCurrentDelegate()->OnProcessMessage(pMsg);
1080 }
1081 IFWL_WidgetDelegate* pDelegate =
1082 m_pOwner->m_pVertScrollBar->SetDelegate(nullptr);
1083 pDelegate->OnProcessMessage(pMsg);
1084 } 1080 }
1085 1081
1086 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { 1082 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) {
1087 uint32_t dwKeyCode = pMsg->m_dwKeyCode; 1083 uint32_t dwKeyCode = pMsg->m_dwKeyCode;
1088 switch (dwKeyCode) { 1084 switch (dwKeyCode) {
1089 case FWL_VKEY_Tab: 1085 case FWL_VKEY_Tab:
1090 case FWL_VKEY_Up: 1086 case FWL_VKEY_Up:
1091 case FWL_VKEY_Down: 1087 case FWL_VKEY_Down:
1092 case FWL_VKEY_Home: 1088 case FWL_VKEY_Home:
1093 case FWL_VKEY_End: { 1089 case FWL_VKEY_End: {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 m_pOwner->Repaint(&m_pOwner->m_rtClient); 1189 m_pOwner->Repaint(&m_pOwner->m_rtClient);
1194 } 1190 }
1195 return TRUE; 1191 return TRUE;
1196 } 1192 }
1197 1193
1198 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() { 1194 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() {
1199 CFWL_EvtLtbSelChanged ev; 1195 CFWL_EvtLtbSelChanged ev;
1200 ev.m_pSrcTarget = m_pOwner; 1196 ev.m_pSrcTarget = m_pOwner;
1201 m_pOwner->DispatchEvent(&ev); 1197 m_pOwner->DispatchEvent(&ev);
1202 } 1198 }
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