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

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

Issue 2530993002: Cleanup FWL Event and Message code. (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
Index: xfa/fwl/core/cfwl_combobox.cpp
diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp
index 5996af9c411fef721d2a67589d8ac7d09f6e6905..83c42bb3500697b090a41a2e1518bbe3f88af712 100644
--- a/xfa/fwl/core/cfwl_combobox.cpp
+++ b/xfa/fwl/core/cfwl_combobox.cpp
@@ -14,9 +14,7 @@
#include "xfa/fde/cfde_txtedtengine.h"
#include "xfa/fde/tto/fde_textout.h"
#include "xfa/fwl/core/cfwl_app.h"
-#include "xfa/fwl/core/cfwl_evteditchanged.h"
-#include "xfa/fwl/core/cfwl_evtpostdropdown.h"
-#include "xfa/fwl/core/cfwl_evtpredropdown.h"
+#include "xfa/fwl/core/cfwl_event.h"
#include "xfa/fwl/core/cfwl_evtselectchanged.h"
#include "xfa/fwl/core/cfwl_evttextchanged.h"
#include "xfa/fwl/core/cfwl_formproxy.h"
@@ -399,7 +397,7 @@ void CFWL_ComboBox::ShowDropList(bool bActivate) {
m_pListBox->SetWidgetRect(m_rtList);
m_pListBox->Update();
- CFWL_EvtPreDropDown ev;
+ CFWL_Event ev(CFWL_EventType::PreDropDown);
ev.m_pSrcTarget = this;
DispatchEvent(&ev);
@@ -608,7 +606,7 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
return;
if (bActivate) {
- CFWL_EvtPreDropDown preEvent;
+ CFWL_Event preEvent(CFWL_EventType::PreDropDown);
preEvent.m_pSrcTarget = this;
DispatchEvent(&preEvent);
@@ -642,7 +640,7 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
m_pListBox->SetStates(FWL_WGTSTATE_Invisible, !bActivate);
if (bActivate) {
- CFWL_EvtPostDropDown postEvent;
+ CFWL_Event postEvent(CFWL_EventType::PostDropDown);
postEvent.m_pSrcTarget = this;
DispatchEvent(&postEvent);
}
@@ -841,7 +839,7 @@ void CFWL_ComboBox::OnProcessEvent(CFWL_Event* pEvent) {
pScrollEv.m_fPos = pScrollEvent->m_fPos;
DispatchEvent(&pScrollEv);
} else if (dwFlag == CFWL_EventType::TextChanged) {
- CFWL_EvtEditChanged pTemp;
+ CFWL_Event pTemp(CFWL_EventType::EditChanged);
pTemp.m_pSrcTarget = this;
DispatchEvent(&pTemp);
}
@@ -934,10 +932,8 @@ void CFWL_ComboBox::OnMouseLeave(CFWL_MsgMouse* pMsg) {
void CFWL_ComboBox::OnKey(CFWL_MsgKey* pMsg) {
uint32_t dwKeyCode = pMsg->m_dwKeyCode;
- if (dwKeyCode == FWL_VKEY_Tab) {
- DispatchKeyEvent(pMsg);
+ if (dwKeyCode == FWL_VKEY_Tab)
return;
- }
if (pMsg->m_pDstTarget == this)
DoSubCtrlKey(pMsg);
}

Powered by Google App Engine
This is Rietveld 408576698