summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme')
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.cpp6
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.h4
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.cpp6
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.h4
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.cpp5
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.h4
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp5
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.h4
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp38
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h10
10 files changed, 16 insertions, 70 deletions
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 033ee14ef3..9a96eedb04 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -41,12 +41,10 @@ bool CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) {
return pWidget && pWidget->GetClassID() == FWL_Type::CheckBox;
}
-uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren) {
+uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) {
if (m_pThemeData)
SetThemeData(FWL_GetThemeColor(dwThemeID));
- return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
+ return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID);
}
FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) {
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index 42d86d180f..d6beae8573 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -19,9 +19,7 @@ class CFWL_CheckBoxTP : public CFWL_WidgetTP {
// CFWL_WidgeTP
bool IsValidWidget(IFWL_Widget* pWidget) override;
- uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE) override;
+ uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) override;
FX_BOOL DrawText(CFWL_ThemeText* pParams) override;
FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
FWL_Error Initialize() override;
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index eee199ee6d..3cbe007b5f 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -60,12 +60,10 @@ bool CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) {
}
uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren) {
+ uint32_t dwThemeID) {
if (m_pThemeData)
SetThemeData(FWL_GetThemeColor(dwThemeID));
-
- return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
+ return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID);
}
FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.h b/xfa/fwl/theme/cfwl_monthcalendartp.h
index b10258a7f9..b69b32c613 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.h
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.h
@@ -18,9 +18,7 @@ class CFWL_MonthCalendarTP : public CFWL_WidgetTP {
// CFWL_WidgetTP
bool IsValidWidget(IFWL_Widget* pWidget) override;
- uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE) override;
+ uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) override;
FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
FX_BOOL DrawText(CFWL_ThemeText* pParams) override;
void* GetCapacity(CFWL_ThemePart* pThemePart,
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index cf9991e0f4..982a6f4b6d 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -25,10 +25,9 @@ bool CFWL_PushButtonTP::IsValidWidget(IFWL_Widget* pWidget) {
return pWidget && pWidget->GetClassID() == FWL_Type::PushButton;
}
uint32_t CFWL_PushButtonTP::SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren) {
+ uint32_t dwThemeID) {
SetThemeData(FWL_GetThemeColor(dwThemeID));
- return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
+ return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID);
}
FX_BOOL CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
switch (pParams->m_iPart) {
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.h b/xfa/fwl/theme/cfwl_pushbuttontp.h
index 6c091f7ffd..053ca28831 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.h
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.h
@@ -18,9 +18,7 @@ class CFWL_PushButtonTP : public CFWL_WidgetTP {
// CFWL_WidgetTP
bool IsValidWidget(IFWL_Widget* pWidget) override;
- uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE) override;
+ uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) override;
FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
void* GetCapacity(CFWL_ThemePart* pThemePart,
CFWL_WidgetCapacity dwCapacity) override;
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 6583f0e030..40d55786fe 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -37,11 +37,10 @@ void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart,
return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity);
}
uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren) {
+ uint32_t dwThemeID) {
if (m_pThemeData)
SetThemeData(FWL_GetThemeColor(dwThemeID));
- return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
+ return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID);
}
FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (!pParams)
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.h b/xfa/fwl/theme/cfwl_scrollbartp.h
index e9c6222cd3..6643bb700b 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.h
+++ b/xfa/fwl/theme/cfwl_scrollbartp.h
@@ -18,9 +18,7 @@ class CFWL_ScrollBarTP : public CFWL_WidgetTP {
// CFWL_WidgetTP
bool IsValidWidget(IFWL_Widget* pWidget) override;
- uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE) override;
+ uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) override;
FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) override;
void* GetCapacity(CFWL_ThemePart* pThemePart,
CFWL_WidgetCapacity dwCapacity) override;
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index a1b458cb41..5c54afd8fc 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -36,19 +36,6 @@ const float kCYBorder = 1.0f;
} // namespace
-static void FWL_SetChildThemeID(IFWL_Widget* pParent, uint32_t dwThemeID) {
- CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance();
- IFWL_Widget* pChild = pWidgetMgr->GetFirstChildWidget(pParent);
- while (pChild) {
- IFWL_ThemeProvider* pTheme = pChild->GetThemeProvider();
- if (pTheme) {
- pTheme->SetThemeID(pChild, dwThemeID, FALSE);
- }
- FWL_SetChildThemeID(pChild, dwThemeID);
- pChild = pWidgetMgr->GetNextSiblingWidget(pChild);
- }
-}
-
bool CFWL_WidgetTP::IsValidWidget(IFWL_Widget* pWidget) {
return FALSE;
}
@@ -57,17 +44,11 @@ uint32_t CFWL_WidgetTP::GetThemeID(IFWL_Widget* pWidget) {
return m_dwThemeID;
}
-uint32_t CFWL_WidgetTP::SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren) {
+uint32_t CFWL_WidgetTP::SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID) {
uint32_t dwOld = m_dwThemeID;
m_dwThemeID = dwThemeID;
- if (CFWL_ArrowData::HasInstance()) {
+ if (CFWL_ArrowData::HasInstance())
CFWL_ArrowData::GetInstance()->SetColorData(FWL_GetThemeColor(dwThemeID));
- }
- if (bChildren) {
- FWL_SetChildThemeID(pWidget, dwThemeID);
- }
return dwOld;
}
@@ -165,17 +146,6 @@ FX_BOOL CFWL_WidgetTP::IsCustomizedLayout(IFWL_Widget* pWidget) {
return FWL_GetThemeLayout(m_dwThemeID);
}
-FWL_Error CFWL_WidgetTP::GetPartRect(CFWL_ThemePart* pThemePart,
- CFX_RectF& rect) {
- return FWL_Error::Succeeded;
-}
-
-FX_BOOL CFWL_WidgetTP::IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return TRUE;
-}
-
FX_BOOL CFWL_WidgetTP::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
if (!pParams)
return FALSE;
@@ -757,10 +727,6 @@ CFGAS_GEFont* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
return m_FontsArray.back()->GetFont();
}
-FX_BOOL FWLTHEME_Init() {
- return TRUE;
-}
-
void FWLTHEME_Release() {
CFWL_ArrowData::DestroyInstance();
CFWL_FontManager::DestroyInstance();
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index a6fc4d65fb..ddd504b050 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -112,9 +112,7 @@ class CFWL_WidgetTP {
virtual bool IsValidWidget(IFWL_Widget* pWidget);
virtual uint32_t GetThemeID(IFWL_Widget* pWidget);
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE);
+ virtual uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID);
virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix);
virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget,
const CFX_Matrix& matrix);
@@ -123,10 +121,6 @@ class CFWL_WidgetTP {
virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
CFWL_WidgetCapacity dwCapacity);
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget);
- virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart);
- virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy);
virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
FWL_Error SetFont(IFWL_Widget* pWidget,
@@ -227,7 +221,7 @@ class CFWL_WidgetTP {
uint32_t m_dwThemeID;
CFX_Matrix _ctm;
};
-FX_BOOL FWLTHEME_Init();
+
void FWLTHEME_Release();
uint32_t FWL_GetThemeLayout(uint32_t dwThemeID);
uint32_t FWL_GetThemeColor(uint32_t dwThemeID);