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

Unified Diff: xfa/fwl/basewidget/fwl_editimp.cpp

Issue 1901183002: Remove CFWL_Note. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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/basewidget/fwl_datetimepickerimp.cpp ('k') | xfa/fwl/basewidget/fwl_listboximp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_editimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 54e8abcb8b95b8cb55ae231a257456a4c5fe2046..74db0c96affafe0dab814cf9458d762bb7e35cf8 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -1729,28 +1729,31 @@ void CFWL_EditImp::ProcessInsertError(int32_t iError) {
default: {}
}
}
+
CFWL_EditImpDelegate::CFWL_EditImpDelegate(CFWL_EditImp* pOwner)
: m_pOwner(pOwner) {}
+
int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return 0;
- uint32_t dwMsgCode = pMessage->GetClassID();
+
+ CFWL_MessageType dwMsgCode = pMessage->GetClassID();
int32_t iRet = 1;
switch (dwMsgCode) {
- case FWL_MSGHASH_Activate: {
+ case CFWL_MessageType::Activate: {
DoActivate(static_cast<CFWL_MsgActivate*>(pMessage));
break;
}
- case FWL_MSGHASH_Deactivate: {
+ case CFWL_MessageType::Deactivate: {
DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage));
break;
}
- case FWL_MSGHASH_SetFocus:
- case FWL_MSGHASH_KillFocus: {
- OnFocusChanged(pMessage, dwMsgCode == FWL_MSGHASH_SetFocus);
+ case CFWL_MessageType::SetFocus:
+ case CFWL_MessageType::KillFocus: {
+ OnFocusChanged(pMessage, dwMsgCode == CFWL_MessageType::SetFocus);
break;
}
- case FWL_MSGHASH_Mouse: {
+ case CFWL_MessageType::Mouse: {
CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
uint32_t dwCmd = pMsg->m_dwCmd;
switch (dwCmd) {
@@ -1774,32 +1777,35 @@ int32_t CFWL_EditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
DoButtonDown(pMsg);
break;
}
- default: {}
+ default:
+ break;
}
break;
}
- case FWL_MSGHASH_Key: {
+ case CFWL_MessageType::Key: {
CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
uint32_t dwCmd = pKey->m_dwCmd;
- if (dwCmd == FWL_MSGKEYCMD_KeyDown) {
+ if (dwCmd == FWL_MSGKEYCMD_KeyDown)
OnKeyDown(pKey);
- } else if (dwCmd == FWL_MSGKEYCMD_Char) {
+ else if (dwCmd == FWL_MSGKEYCMD_Char)
OnChar(pKey);
- }
break;
}
- default: { iRet = 0; }
+ default: {
+ iRet = 0;
+ break;
+ }
}
CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
return iRet;
}
+
FWL_ERR CFWL_EditImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
if (!pEvent)
return FWL_ERR_Indefinite;
- uint32_t dwHashCode = pEvent->GetClassID();
- if (dwHashCode != FWL_EVTHASH_Scroll) {
+ if (pEvent->GetClassID() != CFWL_EventType::Scroll)
return FWL_ERR_Succeeded;
- }
+
IFWL_Widget* pSrcTarget = pEvent->m_pSrcTarget;
if ((pSrcTarget == m_pOwner->m_pVertScrollBar.get() &&
m_pOwner->m_pVertScrollBar) ||
@@ -1811,6 +1817,7 @@ FWL_ERR CFWL_EditImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
}
return FWL_ERR_Succeeded;
}
+
FWL_ERR CFWL_EditImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
return m_pOwner->DrawWidget(pGraphics, pMatrix);
« no previous file with comments | « xfa/fwl/basewidget/fwl_datetimepickerimp.cpp ('k') | xfa/fwl/basewidget/fwl_listboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698