summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-21 13:12:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 13:12:06 -0700
commit5d9da0c1255a75dd9b7b2005f8b7d6ae4948feaf (patch)
treedf40bedc2582cab695e7bf4b2056bfddd4969908 /xfa/fwl/basewidget/fwl_scrollbarimp.cpp
parent0f6425fff33e4096b4e1fbfb954edae1349c0145 (diff)
downloadpdfium-5d9da0c1255a75dd9b7b2005f8b7d6ae4948feaf.tar.xz
Remove CFWL_Note.
This CL removes the CFWL_Note class. The two subclasses, CFWL_Event and CFWL_Message are distinct types and should not be related by the subclass. The code has been updated to pass the correct types as needed. The various FWL_EVTHASH and FWL_MSGHASH defines have all been removed and turned into an FWL_EventType and FWL_MessageType enum classes. BUG=pdfium:474 Review URL: https://codereview.chromium.org/1901183002
Diffstat (limited to 'xfa/fwl/basewidget/fwl_scrollbarimp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_scrollbarimp.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
index 8812076f6b..fed93fbc07 100644
--- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
+++ b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
@@ -625,14 +625,17 @@ FX_BOOL CFWL_ScrollBarImp::OnScroll(uint32_t dwCode, FX_FLOAT fPos) {
DispatchEvent(&ev);
return bRet;
}
+
CFWL_ScrollBarImpDelegate::CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner)
: m_pOwner(pOwner) {}
+
int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return 0;
+
int32_t iRet = 1;
- uint32_t dwMsgCode = pMessage->GetClassID();
- if (dwMsgCode == FWL_MSGHASH_Mouse) {
+ CFWL_MessageType dwMsgCode = pMessage->GetClassID();
+ if (dwMsgCode == CFWL_MessageType::Mouse) {
CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
uint32_t dwCmd = pMsg->m_dwCmd;
switch (dwCmd) {
@@ -652,9 +655,12 @@ int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
OnMouseLeave();
break;
}
- default: { iRet = 0; }
+ default: {
+ iRet = 0;
+ break;
+ }
}
- } else if (dwMsgCode == FWL_MSGHASH_MouseWheel) {
+ } else if (dwMsgCode == CFWL_MessageType::MouseWheel) {
CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage);
OnMouseWheel(pMsg->m_fx, pMsg->m_fy, pMsg->m_dwFlags, pMsg->m_fDeltaX,
pMsg->m_fDeltaY);
@@ -663,6 +669,7 @@ int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
}
return iRet;
}
+
FWL_ERR CFWL_ScrollBarImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
return m_pOwner->DrawWidget(pGraphics, pMatrix);