Rename CFWL_ThemePart::m_rtPart to m_PartRect
Avoid conflict with m_iPart in absence of Hungarian prefix.
Also:
-- initialize in header.
-- pack tighter.
Change-Id: I078d1bf0ec3e1ed3e529167a7f053fd9138bafb1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69630
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index ef5bdcc..437ce4a 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -72,7 +72,7 @@
CFWL_ThemeBackground param;
param.m_pWidget = this;
param.m_pGraphics = pGraphics;
- param.m_rtPart = CFX_RectF(0, 0, GetWidgetRect().Size());
+ param.m_PartRect = CFX_RectF(0, 0, GetWidgetRect().Size());
param.m_iPart = CFWL_Part::Background;
param.m_dwStates = CFWL_PartState_HightLight;
if (pMatrix)
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index 1342554..ee8c71b 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -75,14 +75,14 @@
param.m_dwStates = dwStates;
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(matrix);
- param.m_rtPart = m_rtClient;
+ param.m_PartRect = m_rtClient;
if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
param.m_pRtData = &m_rtFocus;
pTheme->DrawBackground(param);
param.m_iPart = CFWL_Part::CheckBox;
- param.m_rtPart = m_rtBox;
+ param.m_PartRect = m_rtBox;
pTheme->DrawBackground(param);
CFWL_ThemeText textParam;
@@ -91,7 +91,7 @@
textParam.m_dwStates = dwStates;
textParam.m_pGraphics = pGraphics;
textParam.m_matrix.Concat(matrix);
- textParam.m_rtPart = m_rtCaption;
+ textParam.m_PartRect = m_rtCaption;
textParam.m_wsText = L"Check box";
textParam.m_dwTTOStyles = m_TTOStyles;
textParam.m_iTTOAlign = m_iTTOAlign;
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 9c5edf4..0886ebe 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -106,7 +106,7 @@
param.m_iPart = CFWL_Part::DropDownButton;
param.m_dwStates = m_iBtnState;
param.m_pGraphics = pGraphics;
- param.m_rtPart = m_rtBtn;
+ param.m_PartRect = m_rtBtn;
pTheme->DrawBackground(param);
}
pGraphics->RestoreGraphState();
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 3318f4d..1193966 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -207,7 +207,7 @@
param.m_iPart = CFWL_Part::DropDownButton;
param.m_dwStates = m_iBtnState;
param.m_pGraphics = pGraphics;
- param.m_rtPart = m_rtBtn;
+ param.m_PartRect = m_rtBtn;
if (pMatrix)
param.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(param);
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 1f265b5..cb9cb24 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -350,7 +350,7 @@
param.m_dwStates = CFWL_PartState_Disabled;
param.m_pGraphics = pGraphics;
param.m_matrix = *pMatrix;
- param.m_rtPart = m_rtClient;
+ param.m_PartRect = m_rtClient;
pTheme->DrawBackground(param);
if (!IsShowScrollBar(true) || !IsShowScrollBar(false))
@@ -363,7 +363,7 @@
rtScroll.height);
param.m_bStaticBackground = true;
param.m_bMaximize = true;
- param.m_rtPart = rtStatic;
+ param.m_PartRect = rtStatic;
pTheme->DrawBackground(param);
}
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index b2b0f2e..a2fad92 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -356,7 +356,7 @@
param.m_dwStates = 0;
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = m_rtClient;
+ param.m_PartRect = m_rtClient;
if (IsShowScrollBar(false) && IsShowScrollBar(true))
param.m_pRtData = &m_rtStatic;
if (!IsEnabled())
@@ -422,14 +422,14 @@
bg_param.m_dwStates = dwPartStates;
bg_param.m_pGraphics = pGraphics;
bg_param.m_matrix.Concat(*pMatrix);
- bg_param.m_rtPart = rtItem;
+ bg_param.m_PartRect = rtItem;
bg_param.m_bMaximize = true;
CFX_RectF rtFocus(rtItem);
bg_param.m_pRtData = &rtFocus;
if (m_pVertScrollBar && !m_pHorzScrollBar &&
(dwPartStates & CFWL_PartState_Focused)) {
- bg_param.m_rtPart.left += 1;
- bg_param.m_rtPart.width -= (m_fScorllBarWidth + 1);
+ bg_param.m_PartRect.left += 1;
+ bg_param.m_PartRect.width -= (m_fScorllBarWidth + 1);
rtFocus.Deflate(0.5, 0.5, 1 + m_fScorllBarWidth, 1);
}
pTheme->DrawBackground(bg_param);
@@ -450,7 +450,7 @@
textParam.m_dwStates = dwPartStates;
textParam.m_pGraphics = pGraphics;
textParam.m_matrix.Concat(*pMatrix);
- textParam.m_rtPart = rtText;
+ textParam.m_PartRect = rtText;
textParam.m_wsText = std::move(wsText);
textParam.m_dwTTOStyles = m_TTOStyles;
textParam.m_iTTOAlign = m_iTTOAligns;
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 76d9156..b15a799 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -163,7 +163,7 @@
params.m_iPart = CFWL_Part::Background;
params.m_pGraphics = pGraphics;
params.m_dwStates = CFWL_PartState_Normal;
- params.m_rtPart = m_rtClient;
+ params.m_PartRect = m_rtClient;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(params);
@@ -177,7 +177,7 @@
params.m_iPart = CFWL_Part::Header;
params.m_pGraphics = pGraphics;
params.m_dwStates = CFWL_PartState_Normal;
- params.m_rtPart = m_rtHead;
+ params.m_PartRect = m_rtHead;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(params);
@@ -191,7 +191,7 @@
params.m_iPart = CFWL_Part::LBtn;
params.m_pGraphics = pGraphics;
params.m_dwStates = m_iLBtnPartStates;
- params.m_rtPart = m_rtLBtn;
+ params.m_PartRect = m_rtLBtn;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(params);
@@ -205,7 +205,7 @@
params.m_iPart = CFWL_Part::RBtn;
params.m_pGraphics = pGraphics;
params.m_dwStates = m_iRBtnPartStates;
- params.m_rtPart = m_rtRBtn;
+ params.m_PartRect = m_rtRBtn;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(params);
@@ -223,7 +223,7 @@
m_szHead = CalcTextSize(textParam.m_wsText,
m_pProperties->m_pThemeProvider.Get(), false);
CalcHeadSize();
- textParam.m_rtPart = m_rtHeadText;
+ textParam.m_PartRect = m_rtHeadText;
textParam.m_dwTTOStyles.single_line_ = true;
textParam.m_iTTOAlign = FDE_TextAlignment::kCenter;
if (pMatrix)
@@ -239,7 +239,7 @@
params.m_iPart = CFWL_Part::HSeparator;
params.m_pGraphics = pGraphics;
params.m_dwStates = CFWL_PartState_Normal;
- params.m_rtPart = m_rtHSep;
+ params.m_PartRect = m_rtHSep;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
pTheme->DrawBackground(params);
@@ -269,7 +269,7 @@
params.m_dwStates = CFWL_PartState_Flagged;
pTheme->DrawBackground(params);
}
- params.m_rtPart = pDataInfo->rect;
+ params.m_PartRect = pDataInfo->rect;
pTheme->DrawBackground(params);
params.m_dwStates = 0;
}
@@ -295,7 +295,7 @@
CFX_RectF(m_rtWeek.left + i * (m_szCell.width + MONTHCAL_HMARGIN * 2),
m_rtWeek.top, m_szCell);
- params.m_rtPart = rtDayOfWeek;
+ params.m_PartRect = rtDayOfWeek;
params.m_wsText = GetAbbreviatedDayOfWeek(i);
pTheme->DrawText(params);
}
@@ -315,7 +315,7 @@
m_szToday = CalcTextSize(params.m_wsText,
m_pProperties->m_pThemeProvider.Get(), false);
CalcTodaySize();
- params.m_rtPart = m_rtToday;
+ params.m_PartRect = m_rtToday;
params.m_dwTTOStyles.single_line_ = true;
if (pMatrix)
@@ -339,7 +339,7 @@
for (int32_t j = 0; j < iCount; j++) {
DATEINFO* pDataInfo = m_arrDates[j].get();
params.m_wsText = pDataInfo->wsDay;
- params.m_rtPart = pDataInfo->rect;
+ params.m_PartRect = pDataInfo->rect;
params.m_dwStates = pDataInfo->dwStates;
if (j + 1 == m_iHovered)
params.m_dwStates |= CFWL_PartState_Hovered;
@@ -380,7 +380,7 @@
params.m_pWidget = this;
params.m_iPart = CFWL_Part::DateInCircle;
params.m_pGraphics = pGraphics;
- params.m_rtPart = pDate->rect;
+ params.m_PartRect = pDate->rect;
params.m_dwStates = CFWL_PartState_Normal;
if (pMatrix)
params.m_matrix.Concat(*pMatrix);
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp
index 7806399..b1ff8e0 100644
--- a/xfa/fwl/cfwl_pushbutton.cpp
+++ b/xfa/fwl/cfwl_pushbutton.cpp
@@ -72,7 +72,7 @@
param.m_pGraphics = pGraphics;
if (pMatrix)
param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = m_rtClient;
+ param.m_PartRect = m_rtClient;
if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
param.m_pRtData = &m_rtCaption;
pTheme->DrawBackground(param);
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 4269049..580bb31 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -91,7 +91,7 @@
: (bLower ? m_iMinTrackState : m_iMaxTrackState);
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = bLower ? m_rtMinTrack : m_rtMaxTrack;
+ param.m_PartRect = bLower ? m_rtMinTrack : m_rtMaxTrack;
pTheme->DrawBackground(param);
}
@@ -107,8 +107,8 @@
: (bMinBtn ? m_iMinButtonState : m_iMaxButtonState);
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = bMinBtn ? m_rtMinBtn : m_rtMaxBtn;
- if (param.m_rtPart.height > 0 && param.m_rtPart.width > 0)
+ param.m_PartRect = bMinBtn ? m_rtMinBtn : m_rtMaxBtn;
+ if (param.m_PartRect.height > 0 && param.m_PartRect.width > 0)
pTheme->DrawBackground(param);
}
@@ -123,7 +123,7 @@
: m_iThumbButtonState;
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = m_rtThumb;
+ param.m_PartRect = m_rtThumb;
pTheme->DrawBackground(param);
}
diff --git a/xfa/fwl/cfwl_themepart.cpp b/xfa/fwl/cfwl_themepart.cpp
index 831e494..0a98a4b 100644
--- a/xfa/fwl/cfwl_themepart.cpp
+++ b/xfa/fwl/cfwl_themepart.cpp
@@ -6,10 +6,4 @@
#include "xfa/fwl/cfwl_themepart.h"
-CFWL_ThemePart::CFWL_ThemePart()
- : m_pWidget(nullptr),
- m_iPart(CFWL_Part::None),
- m_dwStates(CFWL_PartState_Normal),
- m_bMaximize(false),
- m_bStaticBackground(false),
- m_pRtData(nullptr) {}
+CFWL_ThemePart::CFWL_ThemePart() = default;
diff --git a/xfa/fwl/cfwl_themepart.h b/xfa/fwl/cfwl_themepart.h
index 46be205..af85e37 100644
--- a/xfa/fwl/cfwl_themepart.h
+++ b/xfa/fwl/cfwl_themepart.h
@@ -10,7 +10,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
-enum class CFWL_Part {
+enum class CFWL_Part : uint8_t {
None = 0,
BackArrow,
@@ -81,13 +81,13 @@
CFWL_ThemePart();
CFX_Matrix m_matrix;
- CFX_RectF m_rtPart;
- CFWL_Widget* m_pWidget;
- CFWL_Part m_iPart;
- uint32_t m_dwStates;
- bool m_bMaximize;
- bool m_bStaticBackground;
- CFX_RectF* m_pRtData;
+ CFX_RectF m_PartRect;
+ CFWL_Widget* m_pWidget = nullptr;
+ CFX_RectF* m_pRtData = nullptr;
+ uint32_t m_dwStates = CFWL_PartState_Normal;
+ CFWL_Part m_iPart = CFWL_Part::None;
+ bool m_bMaximize = false;
+ bool m_bStaticBackground = false;
};
#endif // XFA_FWL_CFWL_THEMEPART_H_
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 39b706b..d5f5639 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -320,7 +320,7 @@
param.m_pGraphics = pGraphics;
if (pMatrix)
param.m_matrix = *pMatrix;
- param.m_rtPart = GetRelativeRect();
+ param.m_PartRect = GetRelativeRect();
pTheme->DrawBackground(param);
}
@@ -333,7 +333,7 @@
param.m_iPart = iPartBorder;
param.m_pGraphics = pGraphics;
param.m_matrix = matrix;
- param.m_rtPart = GetRelativeRect();
+ param.m_PartRect = GetRelativeRect();
pTheme->DrawBackground(param);
}
diff --git a/xfa/fwl/theme/cfwl_barcodetp.cpp b/xfa/fwl/theme/cfwl_barcodetp.cpp
index 222d008..c94fe17 100644
--- a/xfa/fwl/theme/cfwl_barcodetp.cpp
+++ b/xfa/fwl/theme/cfwl_barcodetp.cpp
@@ -17,10 +17,11 @@
void CFWL_BarcodeTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border:
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
case CFWL_Part::Background:
- FillBackground(pParams.m_pGraphics.Get(), pParams.m_rtPart,
+ FillBackground(pParams.m_pGraphics.Get(), pParams.m_PartRect,
pParams.m_matrix);
break;
default:
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index 8d32a37..22f19bd 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -24,7 +24,7 @@
return;
DrawCaretBK(pParams.m_pGraphics.Get(), pParams.m_dwStates,
- pParams.m_rtPart, pParams.m_matrix);
+ pParams.m_PartRect, pParams.m_matrix);
break;
}
default:
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 3436389..6e4ae8b 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -219,7 +219,7 @@
if ((pParams.m_dwStates & CFWL_PartState_Checked) ||
(pParams.m_dwStates & CFWL_PartState_Neutral)) {
DrawCheckSign(pParams.m_pWidget, pParams.m_pGraphics.Get(),
- pParams.m_rtPart, pParams.m_dwStates, pParams.m_matrix);
+ pParams.m_PartRect, pParams.m_dwStates, pParams.m_matrix);
}
}
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index 6cc842d..e663275 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -21,12 +21,13 @@
void CFWL_ComboBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border: {
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
}
case CFWL_Part::Background: {
CXFA_GEPath path;
- const CFX_RectF& rect = pParams.m_rtPart;
+ const CFX_RectF& rect = pParams.m_PartRect;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
FX_ARGB argb_color;
switch (pParams.m_dwStates) {
@@ -78,6 +79,6 @@
default:
break;
}
- DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_rtPart,
+ DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Down, eState, pParams.m_matrix);
}
diff --git a/xfa/fwl/theme/cfwl_datetimepickertp.cpp b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
index a185952..1f6bb63 100644
--- a/xfa/fwl/theme/cfwl_datetimepickertp.cpp
+++ b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
@@ -17,7 +17,8 @@
const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border:
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
case CFWL_Part::DropDownButton:
DrawDropDownButton(pParams, pParams.m_matrix);
@@ -53,6 +54,6 @@
default:
break;
}
- DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_rtPart,
+ DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Down, eState, matrix);
}
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index cacdf09..1a6c56f 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -32,7 +32,8 @@
switch (pParams.m_iPart) {
case CFWL_Part::Border: {
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
}
case CFWL_Part::Background: {
@@ -45,8 +46,8 @@
pGraphics->RestoreGraphState();
} else {
CXFA_GEPath path;
- path.AddRectangle(pParams.m_rtPart.left, pParams.m_rtPart.top,
- pParams.m_rtPart.width, pParams.m_rtPart.height);
+ path.AddRectangle(pParams.m_PartRect.left, pParams.m_PartRect.top,
+ pParams.m_PartRect.width, pParams.m_PartRect.height);
CXFA_GEColor cr(FWLTHEME_COLOR_Background);
if (!pParams.m_bStaticBackground) {
if (pParams.m_dwStates & CFWL_PartState_Disabled)
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 28b5e34..239f97e 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -21,12 +21,13 @@
void CFWL_ListBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border: {
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
}
case CFWL_Part::Background: {
FillSolidRect(pParams.m_pGraphics.Get(), ArgbEncode(255, 255, 255, 255),
- pParams.m_rtPart, pParams.m_matrix);
+ pParams.m_PartRect, pParams.m_matrix);
if (pParams.m_pRtData) {
FillSolidRect(pParams.m_pGraphics.Get(), FWLTHEME_COLOR_Background,
*pParams.m_pRtData, pParams.m_matrix);
@@ -35,7 +36,7 @@
}
case CFWL_Part::ListItem: {
DrawListBoxItem(pParams.m_pGraphics.Get(), pParams.m_dwStates,
- pParams.m_rtPart, pParams.m_pRtData, pParams.m_matrix);
+ pParams.m_PartRect, pParams.m_pRtData, pParams.m_matrix);
break;
}
case CFWL_Part::Check: {
@@ -45,7 +46,7 @@
} else if (pParams.m_dwStates == CFWL_PartState_Normal) {
color = 0xFF0000FF;
}
- FillSolidRect(pParams.m_pGraphics.Get(), color, pParams.m_rtPart,
+ FillSolidRect(pParams.m_pGraphics.Get(), color, pParams.m_PartRect,
pParams.m_matrix);
break;
}
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index 47ba930..01b9eed 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -35,7 +35,8 @@
void CFWL_MonthCalendarTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border: {
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
}
case CFWL_Part::Background: {
@@ -48,13 +49,13 @@
}
case CFWL_Part::LBtn: {
FWLTHEME_STATE eState = GetState(pParams.m_dwStates);
- DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_rtPart,
+ DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Left, eState, pParams.m_matrix);
break;
}
case CFWL_Part::RBtn: {
FWLTHEME_STATE eState = GetState(pParams.m_dwStates);
- DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_rtPart,
+ DrawArrowBtn(pParams.m_pGraphics.Get(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Right, eState, pParams.m_matrix);
break;
}
@@ -101,7 +102,7 @@
void CFWL_MonthCalendarTP::DrawTotalBK(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtTotal(pParams.m_rtPart);
+ CFX_RectF rtTotal(pParams.m_PartRect);
path.AddRectangle(rtTotal.left, rtTotal.top, rtTotal.width, rtTotal.height);
pParams.m_pGraphics->SaveGraphState();
pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kBackgroundColor));
@@ -112,7 +113,7 @@
void CFWL_MonthCalendarTP::DrawHeadBk(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtHead = pParams.m_rtPart;
+ CFX_RectF rtHead = pParams.m_PartRect;
path.AddRectangle(rtHead.left, rtHead.top, rtHead.width, rtHead.height);
pParams.m_pGraphics->SaveGraphState();
pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kBackgroundColor));
@@ -123,7 +124,7 @@
void CFWL_MonthCalendarTP::DrawLButton(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtLBtn = pParams.m_rtPart;
+ CFX_RectF rtLBtn = pParams.m_PartRect;
path.AddRectangle(rtLBtn.left, rtLBtn.top, rtLBtn.width, rtLBtn.height);
pParams.m_pGraphics->SaveGraphState();
pParams.m_pGraphics->SetStrokeColor(
@@ -156,7 +157,7 @@
void CFWL_MonthCalendarTP::DrawRButton(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtRBtn = pParams.m_rtPart;
+ CFX_RectF rtRBtn = pParams.m_PartRect;
path.AddRectangle(rtRBtn.left, rtRBtn.top, rtRBtn.width, rtRBtn.height);
pParams.m_pGraphics->SaveGraphState();
pParams.m_pGraphics->SetStrokeColor(
@@ -189,7 +190,7 @@
void CFWL_MonthCalendarTP::DrawHSeparator(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtHSep = pParams.m_rtPart;
+ CFX_RectF rtHSep = pParams.m_PartRect;
path.MoveTo(CFX_PointF(rtHSep.left, rtHSep.top + rtHSep.height / 2));
path.LineTo(CFX_PointF(rtHSep.right(), rtHSep.top + rtHSep.height / 2));
pParams.m_pGraphics->SaveGraphState();
@@ -201,7 +202,7 @@
void CFWL_MonthCalendarTP::DrawWeekNumSep(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtWeekSep = pParams.m_rtPart;
+ CFX_RectF rtWeekSep = pParams.m_PartRect;
path.MoveTo(rtWeekSep.TopLeft());
path.LineTo(rtWeekSep.BottomLeft());
pParams.m_pGraphics->SaveGraphState();
@@ -215,7 +216,7 @@
pParams.m_pGraphics->SaveGraphState();
if (pParams.m_dwStates & CFWL_PartState_Selected) {
CXFA_GEPath path;
- CFX_RectF rtSelDay = pParams.m_rtPart;
+ CFX_RectF rtSelDay = pParams.m_PartRect;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams.m_pGraphics->SetFillColor(
@@ -223,7 +224,7 @@
pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
} else if (pParams.m_dwStates & CFWL_PartState_Hovered) {
CXFA_GEPath path;
- CFX_RectF rtSelDay = pParams.m_rtPart;
+ CFX_RectF rtSelDay = pParams.m_PartRect;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kDatesHoverBackgroundColor));
@@ -236,7 +237,7 @@
const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtSelDay = pParams.m_rtPart;
+ CFX_RectF rtSelDay = pParams.m_PartRect;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams.m_pGraphics->SaveGraphState();
@@ -248,7 +249,7 @@
void CFWL_MonthCalendarTP::DrawTodayCircle(const CFWL_ThemeBackground& pParams,
const CFX_Matrix& matrix) {
CXFA_GEPath path;
- CFX_RectF rtTodayCircle = pParams.m_rtPart;
+ CFX_RectF rtTodayCircle = pParams.m_PartRect;
path.AddRectangle(rtTodayCircle.left, rtTodayCircle.top, rtTodayCircle.width,
rtTodayCircle.height);
pParams.m_pGraphics->SaveGraphState();
diff --git a/xfa/fwl/theme/cfwl_pictureboxtp.cpp b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
index 39611bd..ea13b6c 100644
--- a/xfa/fwl/theme/cfwl_pictureboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
@@ -17,7 +17,8 @@
void CFWL_PictureBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border:
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
default:
break;
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 45144b4..b962d09 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -25,11 +25,12 @@
void CFWL_PushButtonTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
case CFWL_Part::Border: {
- DrawBorder(pParams.m_pGraphics.Get(), pParams.m_rtPart, pParams.m_matrix);
+ DrawBorder(pParams.m_pGraphics.Get(), pParams.m_PartRect,
+ pParams.m_matrix);
break;
}
case CFWL_Part::Background: {
- const CFX_RectF& rect = pParams.m_rtPart;
+ const CFX_RectF& rect = pParams.m_PartRect;
float fRight = rect.right();
float fBottom = rect.bottom();
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 55adc3e..74fd251 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -40,29 +40,29 @@
bool bVert = !!pWidget->GetStylesEx();
switch (pParams.m_iPart) {
case CFWL_Part::ForeArrow: {
- DrawMaxMinBtn(pGraphics, pParams.m_rtPart,
+ DrawMaxMinBtn(pGraphics, pParams.m_PartRect,
bVert ? FWLTHEME_DIRECTION_Up : FWLTHEME_DIRECTION_Left,
eState, pParams.m_matrix);
break;
}
case CFWL_Part::BackArrow: {
- DrawMaxMinBtn(pGraphics, pParams.m_rtPart,
+ DrawMaxMinBtn(pGraphics, pParams.m_PartRect,
bVert ? FWLTHEME_DIRECTION_Down : FWLTHEME_DIRECTION_Right,
eState, pParams.m_matrix);
break;
}
case CFWL_Part::Thumb: {
- DrawThumbBtn(pGraphics, pParams.m_rtPart, bVert, eState, true,
+ DrawThumbBtn(pGraphics, pParams.m_PartRect, bVert, eState, true,
pParams.m_matrix);
break;
}
case CFWL_Part::LowerTrack: {
- DrawTrack(pGraphics, pParams.m_rtPart, bVert, eState, true,
+ DrawTrack(pGraphics, pParams.m_PartRect, bVert, eState, true,
pParams.m_matrix);
break;
}
case CFWL_Part::UpperTrack: {
- DrawTrack(pGraphics, pParams.m_rtPart, bVert, eState, false,
+ DrawTrack(pGraphics, pParams.m_PartRect, bVert, eState, false,
pParams.m_matrix);
break;
}
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 677f6b8..16563d3 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -52,7 +52,7 @@
m_pTextOut->SetMatrix(matrix);
m_pTextOut->DrawLogicText(pGraphics->GetRenderDevice(),
WideStringView(pParams.m_wsText.c_str(), iLen),
- pParams.m_rtPart);
+ pParams.m_PartRect);
}
const RetainPtr<CFGAS_GEFont>& CFWL_WidgetTP::GetFont() const {
diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp
index dd35664..594f87f 100644
--- a/xfa/fxfa/cxfa_fwltheme.cpp
+++ b/xfa/fxfa/cxfa_fwltheme.cpp
@@ -121,7 +121,7 @@
m_pTextOut->SetMatrix(mtPart);
m_pTextOut->DrawLogicText(pRenderDevice, pParams.m_wsText.AsStringView(),
- pParams.m_rtPart);
+ pParams.m_PartRect);
return;
}
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams.m_pWidget);
@@ -143,7 +143,7 @@
m_pTextOut->SetMatrix(mtPart);
m_pTextOut->DrawLogicText(pRenderDevice, pParams.m_wsText.AsStringView(),
- pParams.m_rtPart);
+ pParams.m_PartRect);
}
CFX_RectF CXFA_FWLTheme::GetUIMargin(const CFWL_ThemePart& pThemePart) const {