diff options
author | dsinclair <dsinclair@chromium.org> | 2016-05-03 13:00:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-03 13:00:25 -0700 |
commit | 89fcde88f0c03da77d7fd83dece7726d66fd190e (patch) | |
tree | 509e8ee5c74480d1c60892c5868f0b888808f6b9 /xfa/fxfa/app/xfa_ffsignature.cpp | |
parent | 5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed (diff) | |
download | pdfium-89fcde88f0c03da77d7fd83dece7726d66fd190e.tar.xz |
Remove FWL_WGTHITTEST_* defines in favour of enum class.
This Cl updates the FWL_WGTHITTEST_ defines to an enum class and fixes up any
code issues.
Review-Url: https://codereview.chromium.org/1948583002
Diffstat (limited to 'xfa/fxfa/app/xfa_ffsignature.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffsignature.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/xfa/fxfa/app/xfa_ffsignature.cpp b/xfa/fxfa/app/xfa_ffsignature.cpp index ce1cee2033..4008abf808 100644 --- a/xfa/fxfa/app/xfa_ffsignature.cpp +++ b/xfa/fxfa/app/xfa_ffsignature.cpp @@ -96,24 +96,20 @@ FX_BOOL CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) { FX_BOOL CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) { return FALSE; } -uint32_t CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +FWL_WidgetHit CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { if (m_pNormalWidget) { FX_FLOAT ffx = fx, ffy = fy; FWLToClient(ffx, ffy); - uint32_t dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy); - if (dwWidgetHit != FWL_WGTHITTEST_Unknown) { - return FWL_WGTHITTEST_Client; - } + if (m_pNormalWidget->HitTest(ffx, ffy) != FWL_WidgetHit::Unknown) + return FWL_WidgetHit::Client; } CFX_RectF rtBox; GetRectWithoutRotate(rtBox); - if (!rtBox.Contains(fx, fy)) { - return FWL_WGTHITTEST_Unknown; - } - if (m_rtCaption.Contains(fx, fy)) { - return FWL_WGTHITTEST_Titlebar; - } - return FWL_WGTHITTEST_Client; + if (!rtBox.Contains(fx, fy)) + return FWL_WidgetHit::Unknown; + if (m_rtCaption.Contains(fx, fy)) + return FWL_WidgetHit::Titlebar; + return FWL_WidgetHit::Client; } FX_BOOL CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { return FALSE; |