From 89fcde88f0c03da77d7fd83dece7726d66fd190e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 3 May 2016 13:00:25 -0700 Subject: 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 --- xfa/fxfa/app/xfa_fffield.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'xfa/fxfa/app/xfa_fffield.cpp') diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index d19bb4cf37..a0744def07 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -598,24 +598,20 @@ FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) { TranslateFWLMessage(&ms); return TRUE; } -uint32_t CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) { +FWL_WidgetHit CXFA_FFField::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_Border; + if (!rtBox.Contains(fx, fy)) + return FWL_WidgetHit::Unknown; + if (m_rtCaption.Contains(fx, fy)) + return FWL_WidgetHit::Titlebar; + return FWL_WidgetHit::Border; } FX_BOOL CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) { return TRUE; -- cgit v1.2.3