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

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

Issue 2432423002: Merge the CFWL_*Imp classes into the IFWL_* classes. (Closed)
Patch Set: Review feedback Created 4 years, 2 months 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/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp
similarity index 84%
rename from xfa/fwl/basewidget/fwl_scrollbarimp.cpp
rename to xfa/fwl/core/ifwl_scrollbar.cpp
index 7e68ea22723861c92ba7c74c54a8eb69a7d4b381..15478ff0929067c46dfdd0ed7497a2024d2e8fb8 100644
--- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
+++ b/xfa/fwl/core/ifwl_scrollbar.cpp
@@ -4,14 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fwl/basewidget/fwl_scrollbarimp.h"
+#include "xfa/fwl/core/ifwl_scrollbar.h"
-#include "xfa/fwl/basewidget/ifwl_scrollbar.h"
#include "xfa/fwl/core/cfwl_message.h"
#include "xfa/fwl/core/cfwl_themebackground.h"
#include "xfa/fwl/core/cfwl_themepart.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_widgetimp.h"
+#include "xfa/fwl/core/ifwl_scrollbar.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
#define FWL_SCROLLBAR_Elapse 500
@@ -21,52 +20,12 @@
IFWL_ScrollBar* IFWL_ScrollBar::Create(
const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter) {
- IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar;
- CFWL_ScrollBarImp* pScrollBarImpl = new CFWL_ScrollBarImp(properties, pOuter);
- pScrollBar->SetImpl(pScrollBarImpl);
- pScrollBarImpl->SetInterface(pScrollBar);
- return pScrollBar;
+ return new IFWL_ScrollBar(properties, pOuter);
}
-IFWL_ScrollBar::IFWL_ScrollBar() {}
-FX_BOOL IFWL_ScrollBar::IsVertical() {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->IsVertical();
-}
-FWL_Error IFWL_ScrollBar::GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->GetRange(fMin, fMax);
-}
-FWL_Error IFWL_ScrollBar::SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetRange(fMin, fMax);
-}
-FX_FLOAT IFWL_ScrollBar::GetPageSize() {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->GetPageSize();
-}
-FWL_Error IFWL_ScrollBar::SetPageSize(FX_FLOAT fPageSize) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetPageSize(fPageSize);
-}
-FX_FLOAT IFWL_ScrollBar::GetStepSize() {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->GetStepSize();
-}
-FWL_Error IFWL_ScrollBar::SetStepSize(FX_FLOAT fStepSize) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetStepSize(fStepSize);
-}
-FX_FLOAT IFWL_ScrollBar::GetPos() {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->GetPos();
-}
-FWL_Error IFWL_ScrollBar::SetPos(FX_FLOAT fPos) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetPos(fPos);
-}
-FX_FLOAT IFWL_ScrollBar::GetTrackPos() {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->GetTrackPos();
-}
-FWL_Error IFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->SetTrackPos(fTrackPos);
-}
-FX_BOOL IFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) {
- return static_cast<CFWL_ScrollBarImp*>(GetImpl())->DoScroll(dwCode, fPos);
-}
-CFWL_ScrollBarImp::CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : CFWL_WidgetImp(properties, pOuter),
+
+IFWL_ScrollBar::IFWL_ScrollBar(const CFWL_WidgetImpProperties& properties,
+ IFWL_Widget* pOuter)
+ : IFWL_Widget(properties, pOuter),
m_pTimerInfo(nullptr),
m_fRangeMin(0),
m_fRangeMax(-1),
@@ -99,31 +58,32 @@ CFWL_ScrollBarImp::CFWL_ScrollBarImp(const CFWL_WidgetImpProperties& properties,
m_rtMaxTrack.Reset();
}
-CFWL_ScrollBarImp::~CFWL_ScrollBarImp() {}
+IFWL_ScrollBar::~IFWL_ScrollBar() {}
-FWL_Error CFWL_ScrollBarImp::GetClassName(CFX_WideString& wsClass) const {
+FWL_Error IFWL_ScrollBar::GetClassName(CFX_WideString& wsClass) const {
wsClass = FWL_CLASS_ScrollBar;
return FWL_Error::Succeeded;
}
-FWL_Type CFWL_ScrollBarImp::GetClassID() const {
+FWL_Type IFWL_ScrollBar::GetClassID() const {
return FWL_Type::ScrollBar;
}
-FWL_Error CFWL_ScrollBarImp::Initialize() {
- if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded)
+FWL_Error IFWL_ScrollBar::Initialize() {
+ if (IFWL_Widget::Initialize() != FWL_Error::Succeeded)
return FWL_Error::Indefinite;
m_pDelegate = new CFWL_ScrollBarImpDelegate(this);
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_ScrollBarImp::Finalize() {
+FWL_Error IFWL_ScrollBar::Finalize() {
delete m_pDelegate;
m_pDelegate = nullptr;
- return CFWL_WidgetImp::Finalize();
+ return IFWL_Widget::Finalize();
}
-FWL_Error CFWL_ScrollBarImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
+
+FWL_Error IFWL_ScrollBar::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
if (bAutoSize) {
rect.Set(0, 0, 0, 0);
FX_FLOAT* pfMinWidth = static_cast<FX_FLOAT*>(
@@ -135,13 +95,14 @@ FWL_Error CFWL_ScrollBarImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
} else {
rect.Set(0, 0, (*pfMinWidth) * 3, (*pfMinWidth));
}
- CFWL_WidgetImp::GetWidgetRect(rect, TRUE);
+ IFWL_Widget::GetWidgetRect(rect, TRUE);
} else {
rect = m_pProperties->m_rtWidget;
}
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_ScrollBarImp::Update() {
+
+FWL_Error IFWL_ScrollBar::Update() {
if (IsLocked()) {
return FWL_Error::Indefinite;
}
@@ -151,8 +112,9 @@ FWL_Error CFWL_ScrollBarImp::Update() {
Layout();
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_ScrollBarImp::DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+
+FWL_Error IFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
if (!pGraphics)
return FWL_Error::Indefinite;
if (!m_pProperties->m_pThemeProvider)
@@ -171,51 +133,63 @@ FWL_Error CFWL_ScrollBarImp::DrawWidget(CFX_Graphics* pGraphics,
DrawThumb(pGraphics, pTheme, pMatrix);
return FWL_Error::Succeeded;
}
-inline FX_BOOL CFWL_ScrollBarImp::IsVertical() {
+
+inline FX_BOOL IFWL_ScrollBar::IsVertical() {
return m_pProperties->m_dwStyleExes & FWL_STYLEEXT_SCB_Vert;
}
-FWL_Error CFWL_ScrollBarImp::GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax) {
+
+FWL_Error IFWL_ScrollBar::GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax) {
fMin = m_fRangeMin;
fMax = m_fRangeMax;
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_ScrollBarImp::SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
+
+FWL_Error IFWL_ScrollBar::SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
m_fRangeMin = fMin;
m_fRangeMax = fMax;
return FWL_Error::Succeeded;
}
-FX_FLOAT CFWL_ScrollBarImp::GetPageSize() {
+
+FX_FLOAT IFWL_ScrollBar::GetPageSize() {
return m_fPageSize;
}
-FWL_Error CFWL_ScrollBarImp::SetPageSize(FX_FLOAT fPageSize) {
+
+FWL_Error IFWL_ScrollBar::SetPageSize(FX_FLOAT fPageSize) {
m_fPageSize = fPageSize;
return FWL_Error::Succeeded;
}
-FX_FLOAT CFWL_ScrollBarImp::GetStepSize() {
+
+FX_FLOAT IFWL_ScrollBar::GetStepSize() {
return m_fStepSize;
}
-FWL_Error CFWL_ScrollBarImp::SetStepSize(FX_FLOAT fStepSize) {
+
+FWL_Error IFWL_ScrollBar::SetStepSize(FX_FLOAT fStepSize) {
m_fStepSize = fStepSize;
return FWL_Error::Succeeded;
}
-FX_FLOAT CFWL_ScrollBarImp::GetPos() {
+
+FX_FLOAT IFWL_ScrollBar::GetPos() {
return m_fPos;
}
-FWL_Error CFWL_ScrollBarImp::SetPos(FX_FLOAT fPos) {
+
+FWL_Error IFWL_ScrollBar::SetPos(FX_FLOAT fPos) {
m_fPos = fPos;
return FWL_Error::Succeeded;
}
-FX_FLOAT CFWL_ScrollBarImp::GetTrackPos() {
+
+FX_FLOAT IFWL_ScrollBar::GetTrackPos() {
return m_fTrackPos;
}
-FWL_Error CFWL_ScrollBarImp::SetTrackPos(FX_FLOAT fTrackPos) {
+
+FWL_Error IFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) {
m_fTrackPos = fTrackPos;
CalcThumbButtonRect(m_rtThumb);
CalcMinTrackRect(m_rtMinTrack);
CalcMaxTrackRect(m_rtMaxTrack);
return FWL_Error::Succeeded;
}
-FX_BOOL CFWL_ScrollBarImp::DoScroll(uint32_t dwCode, FX_FLOAT fPos) {
+
+FX_BOOL IFWL_ScrollBar::DoScroll(uint32_t dwCode, FX_FLOAT fPos) {
switch (dwCode) {
case FWL_SCBCODE_Min:
case FWL_SCBCODE_Max:
@@ -234,7 +208,7 @@ FX_BOOL CFWL_ScrollBarImp::DoScroll(uint32_t dwCode, FX_FLOAT fPos) {
return OnScroll(dwCode, fPos);
}
-void CFWL_ScrollBarImp::Run(IFWL_TimerInfo* pTimerInfo) {
+void IFWL_ScrollBar::Run(IFWL_TimerInfo* pTimerInfo) {
if (m_pTimerInfo)
m_pTimerInfo->StopTimer();
@@ -242,16 +216,17 @@ void CFWL_ScrollBarImp::Run(IFWL_TimerInfo* pTimerInfo) {
m_pTimerInfo = StartTimer(0, true);
}
-FWL_Error CFWL_ScrollBarImp::SetOuter(IFWL_Widget* pOuter) {
+FWL_Error IFWL_ScrollBar::SetOuter(IFWL_Widget* pOuter) {
m_pOuter = pOuter;
return FWL_Error::Succeeded;
}
-void CFWL_ScrollBarImp::DrawTrack(CFX_Graphics* pGraphics,
- IFWL_ThemeProvider* pTheme,
- FX_BOOL bLower,
- const CFX_Matrix* pMatrix) {
+
+void IFWL_ScrollBar::DrawTrack(CFX_Graphics* pGraphics,
+ IFWL_ThemeProvider* pTheme,
+ FX_BOOL bLower,
+ const CFX_Matrix* pMatrix) {
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_iPart = bLower ? CFWL_Part::LowerTrack : CFWL_Part::UpperTrack;
param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
@@ -261,12 +236,13 @@ void CFWL_ScrollBarImp::DrawTrack(CFX_Graphics* pGraphics,
param.m_rtPart = bLower ? m_rtMinTrack : m_rtMaxTrack;
pTheme->DrawBackground(&param);
}
-void CFWL_ScrollBarImp::DrawArrowBtn(CFX_Graphics* pGraphics,
- IFWL_ThemeProvider* pTheme,
- FX_BOOL bMinBtn,
- const CFX_Matrix* pMatrix) {
+
+void IFWL_ScrollBar::DrawArrowBtn(CFX_Graphics* pGraphics,
+ IFWL_ThemeProvider* pTheme,
+ FX_BOOL bMinBtn,
+ const CFX_Matrix* pMatrix) {
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_iPart = bMinBtn ? CFWL_Part::ForeArrow : CFWL_Part::BackArrow;
param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
@@ -278,11 +254,12 @@ void CFWL_ScrollBarImp::DrawArrowBtn(CFX_Graphics* pGraphics,
pTheme->DrawBackground(&param);
}
}
-void CFWL_ScrollBarImp::DrawThumb(CFX_Graphics* pGraphics,
- IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
+
+void IFWL_ScrollBar::DrawThumb(CFX_Graphics* pGraphics,
+ IFWL_ThemeProvider* pTheme,
+ const CFX_Matrix* pMatrix) {
CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
+ param.m_pWidget = this;
param.m_iPart = CFWL_Part::Thumb;
param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
@@ -292,13 +269,14 @@ void CFWL_ScrollBarImp::DrawThumb(CFX_Graphics* pGraphics,
param.m_rtPart = m_rtThumb;
pTheme->DrawBackground(&param);
}
-void CFWL_ScrollBarImp::Layout() {
+
+void IFWL_ScrollBar::Layout() {
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
CFWL_ThemePart part;
- part.m_pWidget = m_pInterface;
+ part.m_pWidget = this;
m_fMinThumb = *static_cast<FX_FLOAT*>(
pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Size));
- m_bCustomLayout = pTheme->IsCustomizedLayout(m_pInterface);
+ m_bCustomLayout = pTheme->IsCustomizedLayout(this);
GetClientRect(m_rtClient);
CalcButtonLen();
CalcMinButtonRect(m_rtMinBtn);
@@ -307,7 +285,8 @@ void CFWL_ScrollBarImp::Layout() {
CalcMinTrackRect(m_rtMinTrack);
CalcMaxTrackRect(m_rtMaxTrack);
}
-void CFWL_ScrollBarImp::CalcButtonLen() {
+
+void IFWL_ScrollBar::CalcButtonLen() {
m_fButtonLen = IsVertical() ? m_rtClient.width : m_rtClient.height;
FX_FLOAT fLength = IsVertical() ? m_rtClient.height : m_rtClient.width;
if (fLength < m_fButtonLen * 2) {
@@ -317,7 +296,8 @@ void CFWL_ScrollBarImp::CalcButtonLen() {
m_bMinSize = FALSE;
}
}
-void CFWL_ScrollBarImp::CalcMinButtonRect(CFX_RectF& rect) {
+
+void IFWL_ScrollBar::CalcMinButtonRect(CFX_RectF& rect) {
if (m_bCustomLayout)
return;
@@ -327,7 +307,7 @@ void CFWL_ScrollBarImp::CalcMinButtonRect(CFX_RectF& rect) {
rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height;
}
-void CFWL_ScrollBarImp::CalcMaxButtonRect(CFX_RectF& rect) {
+void IFWL_ScrollBar::CalcMaxButtonRect(CFX_RectF& rect) {
if (m_bCustomLayout)
return;
@@ -338,7 +318,7 @@ void CFWL_ScrollBarImp::CalcMaxButtonRect(CFX_RectF& rect) {
rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height;
}
-void CFWL_ScrollBarImp::CalcThumbButtonRect(CFX_RectF& rect) {
+void IFWL_ScrollBar::CalcThumbButtonRect(CFX_RectF& rect) {
if (!IsEnabled()) {
m_rtThumb.Reset();
return;
@@ -433,7 +413,8 @@ void CFWL_ScrollBarImp::CalcThumbButtonRect(CFX_RectF& rect) {
rect.height = IsVertical() ? fThumbSize : rtClient.height;
}
}
-void CFWL_ScrollBarImp::CalcMinTrackRect(CFX_RectF& rect) {
+
+void IFWL_ScrollBar::CalcMinTrackRect(CFX_RectF& rect) {
if (m_bMinSize) {
rect.Empty();
return;
@@ -465,7 +446,8 @@ void CFWL_ScrollBarImp::CalcMinTrackRect(CFX_RectF& rect) {
}
}
}
-void CFWL_ScrollBarImp::CalcMaxTrackRect(CFX_RectF& rect) {
+
+void IFWL_ScrollBar::CalcMaxTrackRect(CFX_RectF& rect) {
if (m_bMinSize) {
rect.Empty();
return;
@@ -495,7 +477,8 @@ void CFWL_ScrollBarImp::CalcMaxTrackRect(CFX_RectF& rect) {
}
}
}
-FX_FLOAT CFWL_ScrollBarImp::GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy) {
+
+FX_FLOAT IFWL_ScrollBar::GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy) {
FX_FLOAT fDiffX = fx - m_cpTrackPointX;
FX_FLOAT fDiffY = fy - m_cpTrackPointY;
FX_FLOAT fRange = m_fRangeMax - m_fRangeMin;
@@ -540,7 +523,8 @@ FX_FLOAT CFWL_ScrollBarImp::GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy) {
}
return fPos;
}
-void CFWL_ScrollBarImp::GetTrackRect(CFX_RectF& rect, FX_BOOL bLower) {
+
+void IFWL_ScrollBar::GetTrackRect(CFX_RectF& rect, FX_BOOL bLower) {
FX_BOOL bDisabled = m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled;
if (bDisabled || m_bCustomLayout) {
rect = bLower ? m_rtMinTrack : m_rtMaxTrack;
@@ -577,7 +561,8 @@ void CFWL_ScrollBarImp::GetTrackRect(CFX_RectF& rect, FX_BOOL bLower) {
}
}
}
-FX_BOOL CFWL_ScrollBarImp::SendEvent() {
+
+FX_BOOL IFWL_ScrollBar::SendEvent() {
if (m_iMinButtonState == CFWL_PartState_Pressed) {
DoScroll(FWL_SCBCODE_StepBackward, m_fTrackPos);
return FALSE;
@@ -601,18 +586,19 @@ FX_BOOL CFWL_ScrollBarImp::SendEvent() {
}
return TRUE;
}
-FX_BOOL CFWL_ScrollBarImp::OnScroll(uint32_t dwCode, FX_FLOAT fPos) {
+
+FX_BOOL IFWL_ScrollBar::OnScroll(uint32_t dwCode, FX_FLOAT fPos) {
FX_BOOL bRet = TRUE;
CFWL_EvtScroll ev;
ev.m_iScrollCode = dwCode;
- ev.m_pSrcTarget = m_pInterface;
+ ev.m_pSrcTarget = this;
ev.m_fPos = fPos;
ev.m_pRet = &bRet;
DispatchEvent(&ev);
return bRet;
}
-CFWL_ScrollBarImpDelegate::CFWL_ScrollBarImpDelegate(CFWL_ScrollBarImp* pOwner)
+CFWL_ScrollBarImpDelegate::CFWL_ScrollBarImpDelegate(IFWL_ScrollBar* pOwner)
: m_pOwner(pOwner) {}
void CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
@@ -639,9 +625,7 @@ void CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
OnMouseLeave();
break;
}
- default: {
- break;
- }
+ default: { break; }
}
} else if (dwMsgCode == CFWL_MessageType::MouseWheel) {
CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage);
@@ -703,6 +687,7 @@ void CFWL_ScrollBarImpDelegate::OnLButtonUp(uint32_t dwFlags,
DoMouseUp(4, m_pOwner->m_rtMaxTrack, m_pOwner->m_iMaxTrackState, fx, fy);
m_pOwner->SetGrab(FALSE);
}
+
void CFWL_ScrollBarImpDelegate::OnMouseMove(uint32_t dwFlags,
FX_FLOAT fx,
FX_FLOAT fy) {
@@ -712,6 +697,7 @@ void CFWL_ScrollBarImpDelegate::OnMouseMove(uint32_t dwFlags,
DoMouseMove(3, m_pOwner->m_rtMinTrack, m_pOwner->m_iMinTrackState, fx, fy);
DoMouseMove(4, m_pOwner->m_rtMaxTrack, m_pOwner->m_iMaxTrackState, fx, fy);
}
+
void CFWL_ScrollBarImpDelegate::OnMouseLeave() {
DoMouseLeave(0, m_pOwner->m_rtMinBtn, m_pOwner->m_iMinButtonState);
DoMouseLeave(1, m_pOwner->m_rtThumb, m_pOwner->m_iThumbButtonState);
@@ -719,6 +705,7 @@ void CFWL_ScrollBarImpDelegate::OnMouseLeave() {
DoMouseLeave(3, m_pOwner->m_rtMinTrack, m_pOwner->m_iMinTrackState);
DoMouseLeave(4, m_pOwner->m_rtMaxTrack, m_pOwner->m_iMaxTrackState);
}
+
void CFWL_ScrollBarImpDelegate::OnMouseWheel(FX_FLOAT fx,
FX_FLOAT fy,
uint32_t dwFlags,
@@ -728,6 +715,7 @@ void CFWL_ScrollBarImpDelegate::OnMouseWheel(FX_FLOAT fx,
m_pOwner->SendEvent();
m_pOwner->m_iMouseWheel = 0;
}
+
void CFWL_ScrollBarImpDelegate::DoMouseDown(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState,
@@ -742,6 +730,7 @@ void CFWL_ScrollBarImpDelegate::DoMouseDown(int32_t iItem,
iState = CFWL_PartState_Pressed;
m_pOwner->Repaint(&rtItem);
}
+
void CFWL_ScrollBarImpDelegate::DoMouseUp(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState,
@@ -756,6 +745,7 @@ void CFWL_ScrollBarImpDelegate::DoMouseUp(int32_t iItem,
m_pOwner->Repaint(&rtItem);
m_pOwner->OnScroll(FWL_SCBCODE_EndScroll, m_pOwner->m_fTrackPos);
}
+
void CFWL_ScrollBarImpDelegate::DoMouseMove(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState,
@@ -776,6 +766,7 @@ void CFWL_ScrollBarImpDelegate::DoMouseMove(int32_t iItem,
m_pOwner->OnScroll(FWL_SCBCODE_TrackPos, fPos);
}
}
+
void CFWL_ScrollBarImpDelegate::DoMouseLeave(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState) {
@@ -785,6 +776,7 @@ void CFWL_ScrollBarImpDelegate::DoMouseLeave(int32_t iItem,
iState = CFWL_PartState_Normal;
m_pOwner->Repaint(&rtItem);
}
+
void CFWL_ScrollBarImpDelegate::DoMouseHover(int32_t iItem,
const CFX_RectF& rtItem,
int32_t& iState) {
« 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