summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/basewidget')
-rw-r--r--xfa/fwl/basewidget/fwl_caretimp.cpp15
-rw-r--r--xfa/fwl/basewidget/fwl_caretimp.h2
-rw-r--r--xfa/fwl/basewidget/fwl_comboboximp.cpp12
-rw-r--r--xfa/fwl/basewidget/fwl_comboboximp.h2
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp6
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.h2
-rw-r--r--xfa/fwl/basewidget/fwl_pushbuttonimp.cpp8
-rw-r--r--xfa/fwl/basewidget/fwl_pushbuttonimp.h2
-rw-r--r--xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp6
-rw-r--r--xfa/fwl/basewidget/fwl_tooltipctrlimp.h2
-rw-r--r--xfa/fwl/basewidget/ifwl_caret.h2
11 files changed, 33 insertions, 26 deletions
diff --git a/xfa/fwl/basewidget/fwl_caretimp.cpp b/xfa/fwl/basewidget/fwl_caretimp.cpp
index c61c459f2e..23a5213a4d 100644
--- a/xfa/fwl/basewidget/fwl_caretimp.cpp
+++ b/xfa/fwl/basewidget/fwl_caretimp.cpp
@@ -22,8 +22,8 @@ IFWL_Caret* IFWL_Caret::Create(const CFWL_WidgetImpProperties& properties,
return pCaret;
}
IFWL_Caret::IFWL_Caret() {}
-FWL_ERR IFWL_Caret::ShowCaret(FX_BOOL bFlag) {
- return static_cast<CFWL_CaretImp*>(GetImpl())->ShowCaret(bFlag);
+void IFWL_Caret::ShowCaret(FX_BOOL bFlag) {
+ static_cast<CFWL_CaretImp*>(GetImpl())->ShowCaret(bFlag);
}
FWL_ERR IFWL_Caret::GetFrequency(uint32_t& elapse) {
return static_cast<CFWL_CaretImp*>(GetImpl())->GetFrequency(elapse);
@@ -82,15 +82,16 @@ FWL_ERR CFWL_CaretImp::DrawWidget(CFX_Graphics* pGraphics,
DrawCaretBK(pGraphics, m_pProperties->m_pThemeProvider, pMatrix);
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_CaretImp::ShowCaret(FX_BOOL bFlag) {
+
+void CFWL_CaretImp::ShowCaret(FX_BOOL bFlag) {
if (m_hTimer) {
FWL_StopTimer(m_hTimer);
- m_hTimer = NULL;
+ m_hTimer = nullptr;
}
- if (bFlag) {
+ if (bFlag)
m_hTimer = FWL_StartTimer(m_pTimer, m_dwElapse);
- }
- return SetStates(FWL_WGTSTATE_Invisible, !bFlag);
+
+ SetStates(FWL_WGTSTATE_Invisible, !bFlag);
}
FWL_ERR CFWL_CaretImp::GetFrequency(uint32_t& elapse) {
elapse = m_dwElapse;
diff --git a/xfa/fwl/basewidget/fwl_caretimp.h b/xfa/fwl/basewidget/fwl_caretimp.h
index 47c3a1a7f5..81d6e45449 100644
--- a/xfa/fwl/basewidget/fwl_caretimp.h
+++ b/xfa/fwl/basewidget/fwl_caretimp.h
@@ -30,7 +30,7 @@ class CFWL_CaretImp : public CFWL_WidgetImp {
virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = NULL);
- virtual FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);
+ virtual void ShowCaret(FX_BOOL bFlag = TRUE);
virtual FWL_ERR GetFrequency(uint32_t& elapse);
virtual FWL_ERR SetFrequency(uint32_t elapse);
virtual FWL_ERR SetColor(CFX_Color crFill);
diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp
index e86a52eaa0..5b3e7c7c35 100644
--- a/xfa/fwl/basewidget/fwl_comboboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp
@@ -722,16 +722,16 @@ FWL_ERR CFWL_ComboBoxImp::SetCurSel(int32_t iSel) {
m_iCurSel = bClearSel ? -1 : iSel;
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ComboBoxImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
+
+void CFWL_ComboBoxImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
FX_BOOL bIsDropDown = IsDropDownStyle();
- if (bIsDropDown && m_pEdit) {
+ if (bIsDropDown && m_pEdit)
m_pEdit->SetStates(dwStates, bSet);
- }
- if (m_pListBox) {
+ if (m_pListBox)
m_pListBox->SetStates(dwStates, bSet);
- }
- return CFWL_WidgetImp::SetStates(dwStates, bSet);
+ CFWL_WidgetImp::SetStates(dwStates, bSet);
}
+
FWL_ERR CFWL_ComboBoxImp::SetEditText(const CFX_WideString& wsText) {
if (!m_pEdit)
return FWL_ERR_Indefinite;
diff --git a/xfa/fwl/basewidget/fwl_comboboximp.h b/xfa/fwl/basewidget/fwl_comboboximp.h
index a4138b27a8..202ba7cae2 100644
--- a/xfa/fwl/basewidget/fwl_comboboximp.h
+++ b/xfa/fwl/basewidget/fwl_comboboximp.h
@@ -91,7 +91,7 @@ class CFWL_ComboBoxImp : public CFWL_WidgetImp {
virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
virtual FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded,
uint32_t dwStylesExRemoved);
- virtual FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
+ virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
virtual FWL_ERR Update();
virtual FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy);
virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 01557ba2cc..bf4f911ea8 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -296,13 +296,15 @@ FWL_ERR CFWL_EditImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
}
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_EditImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
+
+void CFWL_EditImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) ||
(m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) {
ShowCaret(FALSE);
}
- return CFWL_WidgetImp::SetStates(dwStates, bSet);
+ CFWL_WidgetImp::SetStates(dwStates, bSet);
}
+
FWL_ERR CFWL_EditImp::SetWidgetRect(const CFX_RectF& rect) {
return CFWL_WidgetImp::SetWidgetRect(rect);
}
diff --git a/xfa/fwl/basewidget/fwl_editimp.h b/xfa/fwl/basewidget/fwl_editimp.h
index 3732b48f1f..72f2ad03e4 100644
--- a/xfa/fwl/basewidget/fwl_editimp.h
+++ b/xfa/fwl/basewidget/fwl_editimp.h
@@ -38,7 +38,7 @@ class CFWL_EditImp : public CFWL_WidgetImp {
FWL_ERR SetWidgetRect(const CFX_RectF& rect) override;
FWL_ERR Update() override;
FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override;
- FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE) override;
+ void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE) override;
FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = NULL) override;
FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override;
diff --git a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp
index b1e5f6bdb4..6fab925c91 100644
--- a/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp
+++ b/xfa/fwl/basewidget/fwl_pushbuttonimp.cpp
@@ -83,13 +83,15 @@ FWL_ERR CFWL_PushButtonImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
}
return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_PushButtonImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
+
+void CFWL_PushButtonImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
if ((dwStates & FWL_WGTSTATE_Disabled) && bSet) {
m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled;
- return FWL_ERR_Succeeded;
+ return;
}
- return CFWL_WidgetImp::SetStates(dwStates, bSet);
+ CFWL_WidgetImp::SetStates(dwStates, bSet);
}
+
FWL_ERR CFWL_PushButtonImp::Update() {
if (IsLocked()) {
return FWL_ERR_Indefinite;
diff --git a/xfa/fwl/basewidget/fwl_pushbuttonimp.h b/xfa/fwl/basewidget/fwl_pushbuttonimp.h
index be6941249c..50a984f5c1 100644
--- a/xfa/fwl/basewidget/fwl_pushbuttonimp.h
+++ b/xfa/fwl/basewidget/fwl_pushbuttonimp.h
@@ -24,7 +24,7 @@ class CFWL_PushButtonImp : public CFWL_WidgetImp {
virtual FWL_ERR Initialize();
virtual FWL_ERR Finalize();
virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
- virtual FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
+ virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE);
virtual FWL_ERR Update();
virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = NULL);
diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
index 2ce52c65a4..0a8d343cef 100644
--- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
+++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
@@ -225,15 +225,17 @@ FWL_ERR CFWL_ToolTipImp::Hide() {
}
return TRUE;
}
-FWL_ERR CFWL_ToolTipImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
+
+void CFWL_ToolTipImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
if ((dwStates & FWL_WGTSTATE_Invisible) && !bSet) {
IFWL_ToolTipDP* pData =
static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider);
int32_t nAutoPopDelay = pData->GetAutoPopDelay(m_pInterface);
m_hTimerHide = FWL_StartTimer(&m_TimerHide, nAutoPopDelay, FALSE);
}
- return CFWL_WidgetImp::SetStates(dwStates, bSet);
+ CFWL_WidgetImp::SetStates(dwStates, bSet);
}
+
void CFWL_ToolTipImp::RefreshToolTipPos() {
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_TTP_NoAnchor) == 0) {
CFX_RectF rtPopup;
diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.h b/xfa/fwl/basewidget/fwl_tooltipctrlimp.h
index 119c3e1159..0c053869ed 100644
--- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.h
+++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.h
@@ -28,7 +28,7 @@ class CFWL_ToolTipImp : public CFWL_FormImp {
virtual FWL_ERR Update();
virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = NULL);
- virtual FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet);
+ virtual void SetStates(uint32_t dwStates, FX_BOOL bSet);
virtual FWL_ERR GetClientRect(CFX_RectF& rect);
FWL_ERR SetAnchor(const CFX_RectF& rtAnchor);
FWL_ERR Show();
diff --git a/xfa/fwl/basewidget/ifwl_caret.h b/xfa/fwl/basewidget/ifwl_caret.h
index 08a98c91c4..9d0c8a70f9 100644
--- a/xfa/fwl/basewidget/ifwl_caret.h
+++ b/xfa/fwl/basewidget/ifwl_caret.h
@@ -19,7 +19,7 @@ class IFWL_Caret : public IFWL_Widget {
static IFWL_Caret* Create(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter);
- FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);
+ void ShowCaret(FX_BOOL bFlag = TRUE);
FWL_ERR GetFrequency(uint32_t& elapse);
FWL_ERR SetFrequency(uint32_t elapse);
FWL_ERR SetColor(CFX_Color crFill);