diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-10 10:25:32 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-10 10:25:32 -0800 |
commit | 12f72bfc06198fcddf86f366adbbdeb152163b0e (patch) | |
tree | 61c3b3859382950e75fc8044639d3e9cea10cf16 /xfa/fwl/core/ifwl_scrollbar.cpp | |
parent | be6b14899381d31628887d3cf4af086a3acb7eef (diff) | |
download | pdfium-12f72bfc06198fcddf86f366adbbdeb152163b0e.tar.xz |
Continue cleaning IFWL classes
More work cleaning up visiblity, unused methods and return values.
Review-Url: https://codereview.chromium.org/2489013002
Diffstat (limited to 'xfa/fwl/core/ifwl_scrollbar.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_scrollbar.cpp | 63 |
1 files changed, 3 insertions, 60 deletions
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp index 949458a7c8..3dc38efa69 100644 --- a/xfa/fwl/core/ifwl_scrollbar.cpp +++ b/xfa/fwl/core/ifwl_scrollbar.cpp @@ -38,10 +38,7 @@ IFWL_ScrollBar::IFWL_ScrollBar( m_cpTrackPointX(0), m_cpTrackPointY(0), m_iMouseWheel(0), - m_bTrackMouseLeave(false), - m_bMouseHover(false), m_bMouseDown(false), - m_bRepaintThumb(false), m_fButtonLen(0), m_bMinSize(false), m_bCustomLayout(false), @@ -109,59 +106,11 @@ void IFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics, DrawThumb(pGraphics, pTheme, pMatrix); } -inline bool IFWL_ScrollBar::IsVertical() { - return m_pProperties->m_dwStyleExes & FWL_STYLEEXT_SCB_Vert; -} - -FWL_Error IFWL_ScrollBar::GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax) { - fMin = m_fRangeMin; - fMax = m_fRangeMax; - return FWL_Error::Succeeded; -} - -FWL_Error IFWL_ScrollBar::SetRange(FX_FLOAT fMin, FX_FLOAT fMax) { - m_fRangeMin = fMin; - m_fRangeMax = fMax; - return FWL_Error::Succeeded; -} - -FX_FLOAT IFWL_ScrollBar::GetPageSize() { - return m_fPageSize; -} - -FWL_Error IFWL_ScrollBar::SetPageSize(FX_FLOAT fPageSize) { - m_fPageSize = fPageSize; - return FWL_Error::Succeeded; -} - -FX_FLOAT IFWL_ScrollBar::GetStepSize() { - return m_fStepSize; -} - -FWL_Error IFWL_ScrollBar::SetStepSize(FX_FLOAT fStepSize) { - m_fStepSize = fStepSize; - return FWL_Error::Succeeded; -} - -FX_FLOAT IFWL_ScrollBar::GetPos() { - return m_fPos; -} - -FWL_Error IFWL_ScrollBar::SetPos(FX_FLOAT fPos) { - m_fPos = fPos; - return FWL_Error::Succeeded; -} - -FX_FLOAT IFWL_ScrollBar::GetTrackPos() { - return m_fTrackPos; -} - -FWL_Error IFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { +void IFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { m_fTrackPos = fTrackPos; CalcThumbButtonRect(m_rtThumb); CalcMinTrackRect(m_rtMinTrack); CalcMaxTrackRect(m_rtMaxTrack); - return FWL_Error::Succeeded; } bool IFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) { @@ -171,23 +120,17 @@ bool IFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) { case FWL_SCBCODE_PageBackward: case FWL_SCBCODE_PageForward: case FWL_SCBCODE_StepBackward: - break; case FWL_SCBCODE_StepForward: - break; case FWL_SCBCODE_Pos: case FWL_SCBCODE_TrackPos: case FWL_SCBCODE_EndScroll: break; - default: { return false; } + default: + return false; } return OnScroll(dwCode, fPos); } -FWL_Error IFWL_ScrollBar::SetOuter(IFWL_Widget* pOuter) { - m_pOuter = pOuter; - return FWL_Error::Succeeded; -} - void IFWL_ScrollBar::DrawTrack(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme, bool bLower, |