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

Unified Diff: xfa/fwl/core/ifwl_listbox.cpp

Issue 2509283003: Unify the three CFWL_EventType::SelectChange classes. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_listbox.h ('k') | xfa/fxfa/app/xfa_ffchoicelist.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_listbox.cpp
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp
index 4a8f9395b6f3388ed81c1c453d519370ad4a1fee..f1ee2f524598734e0a1a4433dfc32819d99a7052 100644
--- a/xfa/fwl/core/ifwl_listbox.cpp
+++ b/xfa/fwl/core/ifwl_listbox.cpp
@@ -843,20 +843,6 @@ bool IFWL_ListBox::IsShowScrollBar(bool bVert) {
(m_pProperties->m_dwStates & FWL_WGTSTATE_Focused);
}
-void IFWL_ListBox::ProcessSelChanged() {
- CFWL_EvtLtbSelChanged selEvent;
- selEvent.m_pSrcTarget = this;
- CFX_Int32Array arrSels;
- int32_t iCount = CountSelItems();
- for (int32_t i = 0; i < iCount; i++) {
- CFWL_ListItem* item = GetSelItem(i);
- if (!item)
- continue;
- selEvent.iarraySels.Add(i);
- }
- DispatchEvent(&selEvent);
npm 2016/11/17 18:39:07 I agree with deletion of unused m_pSrcTarget and i
dsinclair 2016/11/17 18:39:54 All the ones I've seen check the EventType before
npm 2016/11/17 18:45:07 I think there is only one implementation of Dispat
-}
-
void IFWL_ListBox::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return;
@@ -974,7 +960,6 @@ void IFWL_ListBox::OnLButtonDown(CFWL_MsgMouse* pMsg) {
SetFocusItem(pItem);
ScrollToVisible(pItem);
SetGrab(true);
- ProcessSelChanged();
Repaint(&m_rtClient);
}
@@ -984,7 +969,6 @@ void IFWL_ListBox::OnLButtonUp(CFWL_MsgMouse* pMsg) {
m_bLButtonDown = false;
SetGrab(false);
- DispatchSelChangedEv();
}
void IFWL_ListBox::OnMouseWheel(CFWL_MsgMouseWheel* pMsg) {
@@ -1005,8 +989,6 @@ void IFWL_ListBox::OnKeyDown(CFWL_MsgKey* pMsg) {
bool bShift = !!(pMsg->m_dwFlags & FWL_KEYFLAG_Shift);
bool bCtrl = !!(pMsg->m_dwFlags & FWL_KEYFLAG_Ctrl);
OnVK(pItem, bShift, bCtrl);
- DispatchSelChangedEv();
- ProcessSelChanged();
break;
}
default:
@@ -1097,9 +1079,3 @@ bool IFWL_ListBox::OnScroll(IFWL_ScrollBar* pScrollBar,
}
return true;
}
-
-void IFWL_ListBox::DispatchSelChangedEv() {
- CFWL_EvtLtbSelChanged ev;
- ev.m_pSrcTarget = this;
- DispatchEvent(&ev);
-}
« no previous file with comments | « xfa/fwl/core/ifwl_listbox.h ('k') | xfa/fxfa/app/xfa_ffchoicelist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698