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

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

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: 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
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))
Tom Sepez 2016/10/31 19:12:33 nit: ditto
dsinclair 2016/10/31 19:54:50 Done.
1079 return; 1079 return;
1080 } 1080 m_pOwner->m_pVertScrollBar->GetCurrentDelegate()->OnProcessMessage(pMsg);
1081 IFWL_WidgetDelegate* pDelegate =
1082 m_pOwner->m_pVertScrollBar->SetDelegate(nullptr);
1083 pDelegate->OnProcessMessage(pMsg);
1084 } 1081 }
1085 1082
1086 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { 1083 void CFWL_ListBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) {
1087 uint32_t dwKeyCode = pMsg->m_dwKeyCode; 1084 uint32_t dwKeyCode = pMsg->m_dwKeyCode;
1088 switch (dwKeyCode) { 1085 switch (dwKeyCode) {
1089 case FWL_VKEY_Tab: 1086 case FWL_VKEY_Tab:
1090 case FWL_VKEY_Up: 1087 case FWL_VKEY_Up:
1091 case FWL_VKEY_Down: 1088 case FWL_VKEY_Down:
1092 case FWL_VKEY_Home: 1089 case FWL_VKEY_Home:
1093 case FWL_VKEY_End: { 1090 case FWL_VKEY_End: {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 m_pOwner->Repaint(&m_pOwner->m_rtClient); 1190 m_pOwner->Repaint(&m_pOwner->m_rtClient);
1194 } 1191 }
1195 return TRUE; 1192 return TRUE;
1196 } 1193 }
1197 1194
1198 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() { 1195 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() {
1199 CFWL_EvtLtbSelChanged ev; 1196 CFWL_EvtLtbSelChanged ev;
1200 ev.m_pSrcTarget = m_pOwner; 1197 ev.m_pSrcTarget = m_pOwner;
1201 m_pOwner->DispatchEvent(&ev); 1198 m_pOwner->DispatchEvent(&ev);
1202 } 1199 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698