summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-10 10:25:32 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-10 10:25:32 -0800
commit12f72bfc06198fcddf86f366adbbdeb152163b0e (patch)
tree61c3b3859382950e75fc8044639d3e9cea10cf16 /xfa
parentbe6b14899381d31628887d3cf4af086a3acb7eef (diff)
downloadpdfium-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')
-rw-r--r--xfa/fwl/core/ifwl_edit.cpp2
-rw-r--r--xfa/fwl/core/ifwl_listbox.cpp2
-rw-r--r--xfa/fwl/core/ifwl_scrollbar.cpp63
-rw-r--r--xfa/fwl/core/ifwl_scrollbar.h95
-rw-r--r--xfa/fwl/core/ifwl_spinbutton.cpp32
-rw-r--r--xfa/fwl/core/ifwl_spinbutton.h25
-rw-r--r--xfa/fwl/core/ifwl_themeprovider.h2
-rw-r--r--xfa/fwl/core/ifwl_timer.cpp4
-rw-r--r--xfa/fwl/core/ifwl_timer.h5
-rw-r--r--xfa/fwl/core/ifwl_tooltip.cpp25
-rw-r--r--xfa/fwl/core/ifwl_tooltip.h15
-rw-r--r--xfa/fwl/core/ifwl_widgetdelegate.h2
12 files changed, 84 insertions, 188 deletions
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index aa18d2f576..79896ea636 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -1931,7 +1931,7 @@ bool IFWL_Edit::OnScroll(IFWL_ScrollBar* pScrollBar,
uint32_t dwCode,
FX_FLOAT fPos) {
CFX_SizeF fs;
- pScrollBar->GetRange(fs.x, fs.y);
+ pScrollBar->GetRange(&fs.x, &fs.y);
FX_FLOAT iCurPos = pScrollBar->GetPos();
FX_FLOAT fStep = pScrollBar->GetStepSize();
switch (dwCode) {
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp
index aef74ae746..d52e8b1c8c 100644
--- a/xfa/fwl/core/ifwl_listbox.cpp
+++ b/xfa/fwl/core/ifwl_listbox.cpp
@@ -1092,7 +1092,7 @@ bool IFWL_ListBox::OnScroll(IFWL_ScrollBar* pScrollBar,
uint32_t dwCode,
FX_FLOAT fPos) {
CFX_SizeF fs;
- pScrollBar->GetRange(fs.x, fs.y);
+ pScrollBar->GetRange(&fs.x, &fs.y);
FX_FLOAT iCurPos = pScrollBar->GetPos();
FX_FLOAT fStep = pScrollBar->GetStepSize();
switch (dwCode) {
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,
diff --git a/xfa/fwl/core/ifwl_scrollbar.h b/xfa/fwl/core/ifwl_scrollbar.h
index 07393a9040..78164fd50a 100644
--- a/xfa/fwl/core/ifwl_scrollbar.h
+++ b/xfa/fwl/core/ifwl_scrollbar.h
@@ -9,7 +9,6 @@
#include "core/fxcrt/fx_system.h"
#include "xfa/fwl/core/cfwl_widgetproperties.h"
-#include "xfa/fwl/core/fwl_error.h"
#include "xfa/fwl/core/ifwl_dataprovider.h"
#include "xfa/fwl/core/ifwl_timer.h"
#include "xfa/fwl/core/ifwl_widget.h"
@@ -51,21 +50,25 @@ class IFWL_ScrollBar : public IFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- bool IsVertical();
- FWL_Error GetRange(FX_FLOAT& fMin, FX_FLOAT& fMax);
- FWL_Error SetRange(FX_FLOAT fMin, FX_FLOAT fMax);
- FX_FLOAT GetPageSize();
- FWL_Error SetPageSize(FX_FLOAT fPageSize);
- FX_FLOAT GetStepSize();
- FWL_Error SetStepSize(FX_FLOAT fStepSize);
- FX_FLOAT GetPos();
- FWL_Error SetPos(FX_FLOAT fPos);
- FX_FLOAT GetTrackPos();
- FWL_Error SetTrackPos(FX_FLOAT fTrackPos);
- bool DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f);
- FWL_Error SetOuter(IFWL_Widget* pOuter);
+ void GetRange(FX_FLOAT* fMin, FX_FLOAT* fMax) const {
+ ASSERT(fMin);
+ ASSERT(fMax);
+ *fMin = m_fRangeMin;
+ *fMax = m_fRangeMax;
+ }
+ void SetRange(FX_FLOAT fMin, FX_FLOAT fMax) {
+ m_fRangeMin = fMin;
+ m_fRangeMax = fMax;
+ }
+ FX_FLOAT GetPageSize() const { return m_fPageSize; }
+ void SetPageSize(FX_FLOAT fPageSize) { m_fPageSize = fPageSize; }
+ FX_FLOAT GetStepSize() const { return m_fStepSize; }
+ void SetStepSize(FX_FLOAT fStepSize) { m_fStepSize = fStepSize; }
+ FX_FLOAT GetPos() const { return m_fPos; }
+ void SetPos(FX_FLOAT fPos) { m_fPos = fPos; }
+ void SetTrackPos(FX_FLOAT fTrackPos);
- protected:
+ private:
class Timer : public IFWL_Timer {
public:
explicit Timer(IFWL_ScrollBar* pToolTip);
@@ -75,7 +78,9 @@ class IFWL_ScrollBar : public IFWL_Widget {
};
friend class IFWL_ScrollBar::Timer;
- IFWL_ScrollBar();
+ bool IsVertical() const {
+ return !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_SCB_Vert);
+ }
void DrawTrack(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
bool bLower = true,
@@ -98,6 +103,33 @@ class IFWL_ScrollBar : public IFWL_Widget {
void GetTrackRect(CFX_RectF& rect, bool bLower = true);
bool SendEvent();
bool OnScroll(uint32_t dwCode, FX_FLOAT fPos);
+ void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ void OnMouseLeave();
+ void OnMouseWheel(FX_FLOAT fx,
+ FX_FLOAT fy,
+ uint32_t dwFlags,
+ FX_FLOAT fDeltaX,
+ FX_FLOAT fDeltaY);
+ bool DoScroll(uint32_t dwCode, FX_FLOAT fPos = 0.0f);
+ void DoMouseDown(int32_t iItem,
+ const CFX_RectF& rtItem,
+ int32_t& iState,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ void DoMouseUp(int32_t iItem,
+ const CFX_RectF& rtItem,
+ int32_t& iState,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ void DoMouseMove(int32_t iItem,
+ const CFX_RectF& rtItem,
+ int32_t& iState,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
+ void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
IFWL_TimerInfo* m_pTimerInfo;
FX_FLOAT m_fRangeMin;
@@ -115,10 +147,7 @@ class IFWL_ScrollBar : public IFWL_Widget {
FX_FLOAT m_cpTrackPointX;
FX_FLOAT m_cpTrackPointY;
int32_t m_iMouseWheel;
- bool m_bTrackMouseLeave;
- bool m_bMouseHover;
bool m_bMouseDown;
- bool m_bRepaintThumb;
FX_FLOAT m_fButtonLen;
bool m_bMinSize;
CFX_RectF m_rtClient;
@@ -130,34 +159,6 @@ class IFWL_ScrollBar : public IFWL_Widget {
bool m_bCustomLayout;
FX_FLOAT m_fMinThumb;
IFWL_ScrollBar::Timer m_Timer;
-
- private:
- void OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- void OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- void OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- void OnMouseLeave();
- void OnMouseWheel(FX_FLOAT fx,
- FX_FLOAT fy,
- uint32_t dwFlags,
- FX_FLOAT fDeltaX,
- FX_FLOAT fDeltaY);
- void DoMouseDown(int32_t iItem,
- const CFX_RectF& rtItem,
- int32_t& iState,
- FX_FLOAT fx,
- FX_FLOAT fy);
- void DoMouseUp(int32_t iItem,
- const CFX_RectF& rtItem,
- int32_t& iState,
- FX_FLOAT fx,
- FX_FLOAT fy);
- void DoMouseMove(int32_t iItem,
- const CFX_RectF& rtItem,
- int32_t& iState,
- FX_FLOAT fx,
- FX_FLOAT fy);
- void DoMouseLeave(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
- void DoMouseHover(int32_t iItem, const CFX_RectF& rtItem, int32_t& iState);
};
#endif // XFA_FWL_CORE_IFWL_SCROLLBAR_H_
diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp
index 716f56c629..0352ed991e 100644
--- a/xfa/fwl/core/ifwl_spinbutton.cpp
+++ b/xfa/fwl/core/ifwl_spinbutton.cpp
@@ -110,16 +110,14 @@ void IFWL_SpinButton::DrawWidget(CFX_Graphics* pGraphics,
DrawDownButton(pGraphics, pTheme, pMatrix);
}
-FWL_Error IFWL_SpinButton::EnableButton(bool bEnable, bool bUp) {
+void IFWL_SpinButton::EnableButton(bool bEnable, bool bUp) {
if (bUp)
m_dwUpState = bEnable ? CFWL_PartState_Normal : CFWL_PartState_Disabled;
else
m_dwDnState = bEnable ? CFWL_PartState_Normal : CFWL_PartState_Disabled;
-
- return FWL_Error::Succeeded;
}
-bool IFWL_SpinButton::IsButtonEnable(bool bUp) {
+bool IFWL_SpinButton::IsButtonEnabled(bool bUp) {
if (bUp)
return (m_dwUpState != CFWL_PartState_Disabled);
return (m_dwDnState != CFWL_PartState_Disabled);
@@ -223,9 +221,9 @@ void IFWL_SpinButton::OnLButtonDown(CFWL_MsgMouse* pMsg) {
return;
bool bUpPress =
- (m_rtUpButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsButtonEnable(true));
+ (m_rtUpButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsButtonEnabled(true));
bool bDnPress =
- (m_rtDnButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsButtonEnable(false));
+ (m_rtDnButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsButtonEnabled(false));
if (!bUpPress && !bDnPress)
return;
if (bUpPress) {
@@ -257,11 +255,11 @@ void IFWL_SpinButton::OnLButtonUp(CFWL_MsgMouse* pMsg) {
}
bool bRepaint = false;
CFX_RectF rtInvalidate;
- if (m_dwUpState == CFWL_PartState_Pressed && IsButtonEnable(true)) {
+ if (m_dwUpState == CFWL_PartState_Pressed && IsButtonEnabled(true)) {
m_dwUpState = CFWL_PartState_Normal;
bRepaint = true;
rtInvalidate = m_rtUpButton;
- } else if (m_dwDnState == CFWL_PartState_Pressed && IsButtonEnable(false)) {
+ } else if (m_dwDnState == CFWL_PartState_Pressed && IsButtonEnabled(false)) {
m_dwDnState = CFWL_PartState_Normal;
bRepaint = true;
rtInvalidate = m_rtDnButton;
@@ -280,13 +278,13 @@ void IFWL_SpinButton::OnMouseMove(CFWL_MsgMouse* pMsg) {
CFX_RectF rtInvlidate;
rtInvlidate.Reset();
if (m_rtUpButton.Contains(pMsg->m_fx, pMsg->m_fy)) {
- if (IsButtonEnable(true)) {
+ if (IsButtonEnabled(true)) {
if (m_dwUpState == CFWL_PartState_Hovered) {
m_dwUpState = CFWL_PartState_Hovered;
bRepaint = true;
rtInvlidate = m_rtUpButton;
}
- if (m_dwDnState != CFWL_PartState_Normal && IsButtonEnable(false)) {
+ if (m_dwDnState != CFWL_PartState_Normal && IsButtonEnabled(false)) {
m_dwDnState = CFWL_PartState_Normal;
if (bRepaint)
rtInvlidate.Union(m_rtDnButton);
@@ -296,17 +294,17 @@ void IFWL_SpinButton::OnMouseMove(CFWL_MsgMouse* pMsg) {
bRepaint = true;
}
}
- if (!IsButtonEnable(false))
+ if (!IsButtonEnabled(false))
EnableButton(false, false);
} else if (m_rtDnButton.Contains(pMsg->m_fx, pMsg->m_fy)) {
- if (IsButtonEnable(false)) {
+ if (IsButtonEnabled(false)) {
if (m_dwDnState != CFWL_PartState_Hovered) {
m_dwDnState = CFWL_PartState_Hovered;
bRepaint = true;
rtInvlidate = m_rtDnButton;
}
- if (m_dwUpState != CFWL_PartState_Normal && IsButtonEnable(true)) {
+ if (m_dwUpState != CFWL_PartState_Normal && IsButtonEnabled(true)) {
m_dwUpState = CFWL_PartState_Normal;
if (bRepaint)
rtInvlidate.Union(m_rtUpButton);
@@ -339,9 +337,9 @@ void IFWL_SpinButton::OnMouseMove(CFWL_MsgMouse* pMsg) {
void IFWL_SpinButton::OnMouseLeave(CFWL_MsgMouse* pMsg) {
if (!pMsg)
return;
- if (m_dwUpState != CFWL_PartState_Normal && IsButtonEnable(true))
+ if (m_dwUpState != CFWL_PartState_Normal && IsButtonEnabled(true))
m_dwUpState = CFWL_PartState_Normal;
- if (m_dwDnState != CFWL_PartState_Normal && IsButtonEnable(false))
+ if (m_dwDnState != CFWL_PartState_Normal && IsButtonEnabled(false))
m_dwDnState = CFWL_PartState_Normal;
Repaint(&m_rtClient);
@@ -358,8 +356,8 @@ void IFWL_SpinButton::OnKeyDown(CFWL_MsgKey* pMsg) {
if (!bUp && !bDown)
return;
- bool bUpEnable = IsButtonEnable(true);
- bool bDownEnable = IsButtonEnable(false);
+ bool bUpEnable = IsButtonEnabled(true);
+ bool bDownEnable = IsButtonEnabled(false);
if (!bUpEnable && !bDownEnable)
return;
diff --git a/xfa/fwl/core/ifwl_spinbutton.h b/xfa/fwl/core/ifwl_spinbutton.h
index f2d3c0203a..39aee9fabe 100644
--- a/xfa/fwl/core/ifwl_spinbutton.h
+++ b/xfa/fwl/core/ifwl_spinbutton.h
@@ -21,8 +21,8 @@ FWL_EVENT_DEF(CFWL_EvtSpbClick, CFWL_EventType::Click, bool m_bUp;)
class IFWL_SpinButton : public IFWL_Widget {
public:
- explicit IFWL_SpinButton(const IFWL_App* app,
- std::unique_ptr<CFWL_WidgetProperties> properties);
+ IFWL_SpinButton(const IFWL_App* app,
+ std::unique_ptr<CFWL_WidgetProperties> properties);
~IFWL_SpinButton() override;
// IFWL_Widget
@@ -37,10 +37,7 @@ class IFWL_SpinButton : public IFWL_Widget {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- FWL_Error EnableButton(bool bEnable, bool bUp = true);
- bool IsButtonEnable(bool bUp = true);
-
- protected:
+ private:
class Timer : public IFWL_Timer {
public:
explicit Timer(IFWL_SpinButton* pToolTip);
@@ -50,12 +47,20 @@ class IFWL_SpinButton : public IFWL_Widget {
};
friend class IFWL_SpinButton::Timer;
+ void EnableButton(bool bEnable, bool bUp = true);
+ bool IsButtonEnabled(bool bUp = true);
void DrawUpButton(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix);
void DrawDownButton(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix);
+ void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
+ void OnLButtonDown(CFWL_MsgMouse* pMsg);
+ void OnLButtonUp(CFWL_MsgMouse* pMsg);
+ void OnMouseMove(CFWL_MsgMouse* pMsg);
+ void OnMouseLeave(CFWL_MsgMouse* pMsg);
+ void OnKeyDown(CFWL_MsgKey* pMsg);
CFX_RectF m_rtClient;
CFX_RectF m_rtUpButton;
@@ -66,14 +71,6 @@ class IFWL_SpinButton : public IFWL_Widget {
bool m_bLButtonDwn;
IFWL_TimerInfo* m_pTimerInfo;
IFWL_SpinButton::Timer m_Timer;
-
- private:
- void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
- void OnLButtonDown(CFWL_MsgMouse* pMsg);
- void OnLButtonUp(CFWL_MsgMouse* pMsg);
- void OnMouseMove(CFWL_MsgMouse* pMsg);
- void OnMouseLeave(CFWL_MsgMouse* pMsg);
- void OnKeyDown(CFWL_MsgKey* pMsg);
};
#endif // XFA_FWL_CORE_IFWL_SPINBUTTON_H_
diff --git a/xfa/fwl/core/ifwl_themeprovider.h b/xfa/fwl/core/ifwl_themeprovider.h
index 166d8a72ca..855b967ec3 100644
--- a/xfa/fwl/core/ifwl_themeprovider.h
+++ b/xfa/fwl/core/ifwl_themeprovider.h
@@ -8,8 +8,6 @@
#define XFA_FWL_CORE_IFWL_THEMEPROVIDER_H_
#include "core/fxcrt/fx_coordinates.h"
-#include "core/fxcrt/fx_system.h"
-#include "xfa/fwl/core/fwl_error.h"
#include "xfa/fwl/theme/cfwl_widgettp.h"
class CFWL_ThemeBackground;
diff --git a/xfa/fwl/core/ifwl_timer.cpp b/xfa/fwl/core/ifwl_timer.cpp
index 3f81eec476..c6f431c3be 100644
--- a/xfa/fwl/core/ifwl_timer.cpp
+++ b/xfa/fwl/core/ifwl_timer.cpp
@@ -28,6 +28,6 @@ IFWL_TimerInfo* IFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) {
return pTimerInfo;
}
-FWL_Error IFWL_TimerInfo::StopTimer() {
- return m_pMgr->Stop(this);
+void IFWL_TimerInfo::StopTimer() {
+ m_pMgr->Stop(this);
}
diff --git a/xfa/fwl/core/ifwl_timer.h b/xfa/fwl/core/ifwl_timer.h
index 7562085060..71fe6bf188 100644
--- a/xfa/fwl/core/ifwl_timer.h
+++ b/xfa/fwl/core/ifwl_timer.h
@@ -8,7 +8,6 @@
#define XFA_FWL_CORE_IFWL_TIMER_H_
#include "core/fxcrt/fx_system.h"
-#include "xfa/fwl/core/fwl_error.h"
class IFWL_AdapterTimerMgr;
class IFWL_TimerInfo;
@@ -33,9 +32,9 @@ class IFWL_TimerInfo {
}
virtual ~IFWL_TimerInfo() {}
- FWL_Error StopTimer();
+ void StopTimer();
- protected:
+ private:
IFWL_AdapterTimerMgr* m_pMgr; // Not owned.
};
diff --git a/xfa/fwl/core/ifwl_tooltip.cpp b/xfa/fwl/core/ifwl_tooltip.cpp
index 35718228c3..8a34a857b2 100644
--- a/xfa/fwl/core/ifwl_tooltip.cpp
+++ b/xfa/fwl/core/ifwl_tooltip.cpp
@@ -20,7 +20,6 @@ IFWL_ToolTip::IFWL_ToolTip(const IFWL_App* app,
std::unique_ptr<CFWL_WidgetProperties> properties,
IFWL_Widget* pOuter)
: IFWL_Form(app, std::move(properties), pOuter),
- m_bBtnDown(false),
m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
m_iTTOAlign(FDE_TTOALIGNMENT_Center),
m_pTimerInfoShow(nullptr),
@@ -159,30 +158,6 @@ void IFWL_ToolTip::UpdateTextOutStyles() {
}
}
-void IFWL_ToolTip::SetAnchor(const CFX_RectF& rtAnchor) {
- m_rtAnchor = rtAnchor;
-}
-
-void IFWL_ToolTip::Show() {
- IFWL_ToolTipDP* pData =
- static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider);
- int32_t nInitDelay = pData->GetInitialDelay(this);
- if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible))
- m_pTimerInfoShow = m_TimerShow.StartTimer(nInitDelay, false);
-}
-
-void IFWL_ToolTip::Hide() {
- SetStates(FWL_WGTSTATE_Invisible, true);
- if (m_pTimerInfoHide) {
- m_pTimerInfoHide->StopTimer();
- m_pTimerInfoHide = nullptr;
- }
- if (m_pTimerInfoShow) {
- m_pTimerInfoShow->StopTimer();
- m_pTimerInfoShow = nullptr;
- }
-}
-
void IFWL_ToolTip::SetStates(uint32_t dwStates, bool bSet) {
if ((dwStates & FWL_WGTSTATE_Invisible) && !bSet) {
IFWL_ToolTipDP* pData =
diff --git a/xfa/fwl/core/ifwl_tooltip.h b/xfa/fwl/core/ifwl_tooltip.h
index 14430f420e..a9ef5e27f5 100644
--- a/xfa/fwl/core/ifwl_tooltip.h
+++ b/xfa/fwl/core/ifwl_tooltip.h
@@ -50,11 +50,7 @@ class IFWL_ToolTip : public IFWL_Form {
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) override;
- void SetAnchor(const CFX_RectF& rtAnchor);
- void Show();
- void Hide();
-
- protected:
+ private:
class Timer : public IFWL_Timer {
public:
explicit Timer(IFWL_ToolTip* pToolTip);
@@ -75,7 +71,6 @@ class IFWL_ToolTip : public IFWL_Form {
CFX_RectF m_rtClient;
CFX_RectF m_rtCaption;
- bool m_bBtnDown;
uint32_t m_dwTTOStyles;
int32_t m_iTTOAlign;
CFX_RectF m_rtAnchor;
@@ -83,14 +78,6 @@ class IFWL_ToolTip : public IFWL_Form {
IFWL_TimerInfo* m_pTimerInfoHide;
IFWL_ToolTip::Timer m_TimerShow;
IFWL_ToolTip::Timer m_TimerHide;
-
- private:
- void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
- void OnLButtonDown(CFWL_MsgMouse* pMsg);
- void OnLButtonUp(CFWL_MsgMouse* pMsg);
- void OnMouseMove(CFWL_MsgMouse* pMsg);
- void OnMouseLeave(CFWL_MsgMouse* pMsg);
- void OnKeyDown(CFWL_MsgKey* pMsg);
};
#endif // XFA_FWL_CORE_IFWL_TOOLTIP_H_
diff --git a/xfa/fwl/core/ifwl_widgetdelegate.h b/xfa/fwl/core/ifwl_widgetdelegate.h
index b013375da8..7de14824c5 100644
--- a/xfa/fwl/core/ifwl_widgetdelegate.h
+++ b/xfa/fwl/core/ifwl_widgetdelegate.h
@@ -9,8 +9,6 @@
#include <stdint.h>
-#include "xfa/fwl/core/fwl_error.h"
-
class CFWL_Event;
class CFWL_Message;
class CFX_Graphics;