Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: xfa/fwl/core/ifwl_scrollbar.cpp

Issue 2489013002: Continue cleaning IFWL classes (Closed)
Patch Set: Review fixes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_scrollbar.h ('k') | xfa/fwl/core/ifwl_spinbutton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_scrollbar.cpp
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp
index 949458a7c80cd6fb48f99a343be370302587e9fe..3dc38efa698fad9953589f83f24c2d99060b2cf2 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,
« no previous file with comments | « xfa/fwl/core/ifwl_scrollbar.h ('k') | xfa/fwl/core/ifwl_spinbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698