summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_listboximp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-03 13:00:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-03 13:00:25 -0700
commit89fcde88f0c03da77d7fd83dece7726d66fd190e (patch)
tree509e8ee5c74480d1c60892c5868f0b888808f6b9 /xfa/fwl/basewidget/fwl_listboximp.cpp
parent5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed (diff)
downloadpdfium-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/fwl/basewidget/fwl_listboximp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_listboximp.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp
index 9b5d2fc424..dd017e215f 100644
--- a/xfa/fwl/basewidget/fwl_listboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_listboximp.cpp
@@ -142,25 +142,22 @@ FWL_ERR CFWL_ListBoxImp::Update() {
CalcSize();
return FWL_ERR_Succeeded;
}
-uint32_t CFWL_ListBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
+FWL_WidgetHit CFWL_ListBoxImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
if (IsShowScrollBar(FALSE)) {
CFX_RectF rect;
m_pHorzScrollBar->GetWidgetRect(rect);
- if (rect.Contains(fx, fy)) {
- return FWL_WGTHITTEST_HScrollBar;
- }
+ if (rect.Contains(fx, fy))
+ return FWL_WidgetHit::HScrollBar;
}
if (IsShowScrollBar(TRUE)) {
CFX_RectF rect;
m_pVertScrollBar->GetWidgetRect(rect);
- if (rect.Contains(fx, fy)) {
- return FWL_WGTHITTEST_VScrollBar;
- }
- }
- if (m_rtClient.Contains(fx, fy)) {
- return FWL_WGTHITTEST_Client;
+ if (rect.Contains(fx, fy))
+ return FWL_WidgetHit::VScrollBar;
}
- return FWL_WGTHITTEST_Unknown;
+ if (m_rtClient.Contains(fx, fy))
+ return FWL_WidgetHit::Client;
+ return FWL_WidgetHit::Unknown;
}
FWL_ERR CFWL_ListBoxImp::DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {