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

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

Issue 2511803002: Convert CFWL_EvtSpbClick to CFWL_EvtClick (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_spinbutton.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_spinbutton.cpp
diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp
index f3b8e486a8a8688a58be6ecda313afb9ceb0933c..7ca3ce91359ed9651f0587bba35d422d0c9dffe7 100644
--- a/xfa/fwl/core/ifwl_spinbutton.cpp
+++ b/xfa/fwl/core/ifwl_spinbutton.cpp
@@ -7,6 +7,7 @@
#include "xfa/fwl/core/ifwl_spinbutton.h"
#include "third_party/base/ptr_util.h"
+#include "xfa/fwl/core/cfwl_evtclick.h"
#include "xfa/fwl/core/cfwl_msgkey.h"
#include "xfa/fwl/core/cfwl_msgmouse.h"
#include "xfa/fwl/core/cfwl_themebackground.h"
@@ -236,10 +237,11 @@ void IFWL_SpinButton::OnLButtonDown(CFWL_MsgMouse* pMsg) {
m_iButtonIndex = 1;
m_dwDnState = CFWL_PartState_Pressed;
}
- CFWL_EvtSpbClick wmPosChanged;
+
+ CFWL_EvtClick wmPosChanged;
wmPosChanged.m_pSrcTarget = this;
- wmPosChanged.m_bUp = bUpPress;
DispatchEvent(&wmPosChanged);
+
Repaint(bUpPress ? &m_rtUpButton : &m_rtDnButton);
m_pTimerInfo = m_Timer.StartTimer(kElapseTime, true);
}
@@ -363,10 +365,10 @@ void IFWL_SpinButton::OnKeyDown(CFWL_MsgKey* pMsg) {
if (!bUpEnable && !bDownEnable)
return;
- CFWL_EvtSpbClick wmPosChanged;
+ CFWL_EvtClick wmPosChanged;
wmPosChanged.m_pSrcTarget = this;
- wmPosChanged.m_bUp = bUpEnable;
DispatchEvent(&wmPosChanged);
+
Repaint(bUpEnable ? &m_rtUpButton : &m_rtDnButton);
}
@@ -379,8 +381,7 @@ void IFWL_SpinButton::Timer::Run(IFWL_TimerInfo* pTimerInfo) {
if (!pButton->m_pTimerInfo)
return;
- CFWL_EvtSpbClick wmPosChanged;
+ CFWL_EvtClick wmPosChanged;
wmPosChanged.m_pSrcTarget = pButton;
- wmPosChanged.m_bUp = pButton->m_iButtonIndex == 0;
pButton->DispatchEvent(&wmPosChanged);
}
« no previous file with comments | « xfa/fwl/core/ifwl_spinbutton.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698