Rename enum CFWL_Part to CFWL_ThemePart::Part.
Also rename the enum values to kFoo and fix a lint error in
cfwl_themepart.h.
Bug: pdfium:547
Change-Id: I472970c01091f191788d585d310d55c5814679ec
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/81490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index 2788bfa..9843776 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -64,7 +64,7 @@
CFWL_ThemeBackground param(this, pGraphics);
param.m_PartRect = CFX_RectF(0, 0, GetWidgetRect().Size());
- param.m_iPart = CFWL_Part::Background;
+ param.m_iPart = CFWL_ThemePart::Part::kBackground;
param.m_dwStates = CFWL_PartState_HightLight;
param.m_matrix = mtMatrix;
GetThemeProvider()->DrawBackground(param);
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index b38159e..13a388e 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -56,11 +56,11 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
int32_t dwStates = GetPartStates();
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::Background;
+ param.m_iPart = CFWL_ThemePart::Part::kBackground;
param.m_dwStates = dwStates;
param.m_matrix = matrix;
param.m_PartRect = m_ClientRect;
@@ -70,12 +70,12 @@
IFWL_ThemeProvider* pTheme = GetThemeProvider();
pTheme->DrawBackground(param);
- param.m_iPart = CFWL_Part::CheckBox;
+ param.m_iPart = CFWL_ThemePart::Part::kCheckBox;
param.m_PartRect = m_BoxRect;
pTheme->DrawBackground(param);
CFWL_ThemeText textParam(this, pGraphics);
- textParam.m_iPart = CFWL_Part::Caption;
+ textParam.m_iPart = CFWL_ThemePart::Part::kCaption;
textParam.m_dwStates = dwStates;
textParam.m_matrix = matrix;
textParam.m_PartRect = m_CaptionRect;
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 7d960e5..19dec10 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -107,7 +107,7 @@
pGraphics->ConcatMatrix(matrix);
if (!m_BtnRect.IsEmpty(0.1f)) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::DropDownButton;
+ param.m_iPart = CFWL_ThemePart::Part::kDropDownButton;
param.m_dwStates = m_iBtnState;
param.m_PartRect = m_BtnRect;
GetThemeProvider()->DrawBackground(param);
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index f9055ff..46c2902 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -98,7 +98,7 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
if (!m_BtnRect.IsEmpty())
DrawDropDownButton(pGraphics, matrix);
@@ -182,7 +182,7 @@
void CFWL_DateTimePicker::DrawDropDownButton(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::DropDownButton;
+ param.m_iPart = CFWL_ThemePart::Part::kDropDownButton;
param.m_dwStates = m_iBtnState;
param.m_PartRect = m_BtnRect;
param.m_matrix = mtMatrix;
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 6f8ad13..0e51114 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -141,7 +141,7 @@
DrawContent(pGraphics, matrix);
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
}
void CFWL_Edit::SetText(const WideString& wsText) {
@@ -339,7 +339,7 @@
CFWL_ThemeBackground param(this, pGraphics);
param.m_matrix = mtMatrix;
- param.m_iPart = CFWL_Part::Background;
+ param.m_iPart = CFWL_ThemePart::Part::kBackground;
param.m_pPath = &path;
GetThemeProvider()->DrawBackground(param);
}
@@ -362,7 +362,7 @@
CFWL_ThemeBackground param(this, pGraphics);
param.m_matrix = mtMatrix;
- param.m_iPart = CFWL_Part::CombTextLine;
+ param.m_iPart = CFWL_ThemePart::Part::kCombTextLine;
param.m_pPath = &path;
GetThemeProvider()->DrawBackground(param);
}
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index 4f61db4..613cc16 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -90,7 +90,7 @@
pGraphics->SaveGraphState();
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
CFX_RectF rtClip(m_ContentRect);
if (IsShowHorzScrollBar())
@@ -333,7 +333,7 @@
return;
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::Background;
+ param.m_iPart = CFWL_ThemePart::Part::kBackground;
param.m_matrix = mtMatrix;
param.m_PartRect = m_ClientRect;
if (IsShowHorzScrollBar() && IsShowVertScrollBar())
@@ -394,7 +394,7 @@
CFX_RectF rtFocus(rtItem); // Must outlive |bg_param|.
CFWL_ThemeBackground bg_param(this, pGraphics);
- bg_param.m_iPart = CFWL_Part::ListItem;
+ bg_param.m_iPart = CFWL_ThemePart::Part::kListItem;
bg_param.m_dwStates = dwPartStates;
bg_param.m_matrix = mtMatrix;
bg_param.m_PartRect = rtItem;
@@ -420,7 +420,7 @@
rtText.Deflate(kItemTextMargin, kItemTextMargin);
CFWL_ThemeText textParam(this, pGraphics);
- textParam.m_iPart = CFWL_Part::ListItem;
+ textParam.m_iPart = CFWL_ThemePart::Part::kListItem;
textParam.m_dwStates = dwPartStates;
textParam.m_matrix = mtMatrix;
textParam.m_PartRect = rtText;
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 8b421af..7e6005d 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -125,7 +125,7 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
DrawBackground(pGraphics, matrix);
DrawHeadBK(pGraphics, matrix);
@@ -151,7 +151,7 @@
void CFWL_MonthCalendar::DrawBackground(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::Background;
+ params.m_iPart = CFWL_ThemePart::Part::kBackground;
params.m_PartRect = m_ClientRect;
params.m_matrix = mtMatrix;
GetThemeProvider()->DrawBackground(params);
@@ -160,7 +160,7 @@
void CFWL_MonthCalendar::DrawHeadBK(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::Header;
+ params.m_iPart = CFWL_ThemePart::Part::kHeader;
params.m_PartRect = m_HeadRect;
params.m_matrix = mtMatrix;
GetThemeProvider()->DrawBackground(params);
@@ -169,7 +169,7 @@
void CFWL_MonthCalendar::DrawLButton(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::LBtn;
+ params.m_iPart = CFWL_ThemePart::Part::kLBtn;
params.m_dwStates = m_iLBtnPartStates;
params.m_PartRect = m_LBtnRect;
params.m_matrix = mtMatrix;
@@ -179,7 +179,7 @@
void CFWL_MonthCalendar::DrawRButton(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::RBtn;
+ params.m_iPart = CFWL_ThemePart::Part::kRBtn;
params.m_dwStates = m_iRBtnPartStates;
params.m_PartRect = m_RBtnRect;
params.m_matrix = mtMatrix;
@@ -189,7 +189,7 @@
void CFWL_MonthCalendar::DrawCaption(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeText textParam(this, pGraphics);
- textParam.m_iPart = CFWL_Part::Caption;
+ textParam.m_iPart = CFWL_ThemePart::Part::kCaption;
textParam.m_wsText = GetHeadText(m_iCurYear, m_iCurMonth);
m_HeadSize = CalcTextSize(textParam.m_wsText, false);
CalcHeadSize();
@@ -203,7 +203,7 @@
void CFWL_MonthCalendar::DrawSeparator(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::HSeparator;
+ params.m_iPart = CFWL_ThemePart::Part::kHSeparator;
params.m_PartRect = m_HSepRect;
params.m_matrix = mtMatrix;
GetThemeProvider()->DrawBackground(params);
@@ -212,7 +212,7 @@
void CFWL_MonthCalendar::DrawDatesInBK(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::DateInBK;
+ params.m_iPart = CFWL_ThemePart::Part::kDateInBK;
params.m_matrix = mtMatrix;
IFWL_ThemeProvider* pTheme = GetThemeProvider();
@@ -239,7 +239,7 @@
void CFWL_MonthCalendar::DrawWeek(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeText params(this, pGraphics);
- params.m_iPart = CFWL_Part::Week;
+ params.m_iPart = CFWL_ThemePart::Part::kWeek;
params.m_iTTOAlign = FDE_TextAlignment::kCenter;
params.m_dwTTOStyles.single_line_ = true;
params.m_matrix = mtMatrix;
@@ -260,7 +260,7 @@
void CFWL_MonthCalendar::DrawToday(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeText params(this, pGraphics);
- params.m_iPart = CFWL_Part::Today;
+ params.m_iPart = CFWL_ThemePart::Part::kToday;
params.m_iTTOAlign = FDE_TextAlignment::kCenterLeft;
params.m_wsText = GetTodayText(m_iYear, m_iMonth, m_iDay);
m_TodaySize = CalcTextSize(params.m_wsText, false);
@@ -274,7 +274,7 @@
void CFWL_MonthCalendar::DrawDatesIn(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeText params(this, pGraphics);
- params.m_iPart = CFWL_Part::DatesIn;
+ params.m_iPart = CFWL_ThemePart::Part::kDatesIn;
params.m_iTTOAlign = FDE_TextAlignment::kCenter;
params.m_matrix = mtMatrix;
@@ -296,7 +296,7 @@
void CFWL_MonthCalendar::DrawDatesOut(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeText params(this, pGraphics);
- params.m_iPart = CFWL_Part::DatesOut;
+ params.m_iPart = CFWL_ThemePart::Part::kDatesOut;
params.m_iTTOAlign = FDE_TextAlignment::kCenter;
params.m_matrix = mtMatrix;
GetThemeProvider()->DrawText(params);
@@ -315,7 +315,7 @@
return;
CFWL_ThemeBackground params(this, pGraphics);
- params.m_iPart = CFWL_Part::DateInCircle;
+ params.m_iPart = CFWL_ThemePart::Part::kDateInCircle;
params.m_PartRect = pDate->rect;
params.m_matrix = mtMatrix;
GetThemeProvider()->DrawBackground(params);
diff --git a/xfa/fwl/cfwl_picturebox.cpp b/xfa/fwl/cfwl_picturebox.cpp
index de4e2ba..c212c29 100644
--- a/xfa/fwl/cfwl_picturebox.cpp
+++ b/xfa/fwl/cfwl_picturebox.cpp
@@ -28,7 +28,7 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
}
void CFWL_PictureBox::OnDrawWidget(CFGAS_GEGraphics* pGraphics,
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp
index 3a6c651..bd25e59 100644
--- a/xfa/fwl/cfwl_pushbutton.cpp
+++ b/xfa/fwl/cfwl_pushbutton.cpp
@@ -48,7 +48,7 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
DrawBkground(pGraphics, matrix);
}
@@ -56,7 +56,7 @@
void CFWL_PushButton::DrawBkground(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& matrix) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::Background;
+ param.m_iPart = CFWL_ThemePart::Part::kBackground;
param.m_dwStates = GetPartStates();
param.m_matrix = matrix;
param.m_PartRect = m_ClientRect;
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 40505a9..8fb01f9 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -51,7 +51,7 @@
return;
if (HasBorder())
- DrawBorder(pGraphics, CFWL_Part::Border, matrix);
+ DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
DrawTrack(pGraphics, true, matrix);
DrawTrack(pGraphics, false, matrix);
@@ -77,7 +77,8 @@
bool bLower,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = bLower ? CFWL_Part::LowerTrack : CFWL_Part::UpperTrack;
+ param.m_iPart = bLower ? CFWL_ThemePart::Part::kLowerTrack
+ : CFWL_ThemePart::Part::kUpperTrack;
param.m_dwStates = (m_Properties.m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
: (bLower ? m_iMinTrackState : m_iMaxTrackState);
@@ -90,7 +91,8 @@
bool bMinBtn,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = bMinBtn ? CFWL_Part::ForeArrow : CFWL_Part::BackArrow;
+ param.m_iPart = bMinBtn ? CFWL_ThemePart::Part::kForeArrow
+ : CFWL_ThemePart::Part::kBackArrow;
param.m_dwStates = (m_Properties.m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
: (bMinBtn ? m_iMinButtonState : m_iMaxButtonState);
@@ -103,7 +105,7 @@
void CFWL_ScrollBar::DrawThumb(CFGAS_GEGraphics* pGraphics,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground param(this, pGraphics);
- param.m_iPart = CFWL_Part::Thumb;
+ param.m_iPart = CFWL_ThemePart::Part::kThumb;
param.m_dwStates = (m_Properties.m_dwStates & FWL_WGTSTATE_Disabled)
? CFWL_PartState_Disabled
: m_iThumbButtonState;
diff --git a/xfa/fwl/cfwl_themepart.h b/xfa/fwl/cfwl_themepart.h
index 76abbca..c162772 100644
--- a/xfa/fwl/cfwl_themepart.h
+++ b/xfa/fwl/cfwl_themepart.h
@@ -11,52 +11,6 @@
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/unowned_ptr.h"
-enum class CFWL_Part : uint8_t {
- None = 0,
-
- BackArrow,
- Background,
- Border,
- Caption,
- Check,
- CheckBox,
- CloseBox,
- CombTextLine,
- DateInBK,
- DateInCircle,
- DatesIn,
- DatesOut,
- DownButton,
- DropDownButton,
- ForeArrow,
- HSeparator,
- HeadText,
- Header,
- Icon,
- Image,
- LBtn,
- ListItem,
- LowerTrack,
- MinimizeBox,
- MaximizeBox,
- NarrowCaption,
- RBtn,
- Thumb,
- ThumbBackArrow,
- ThumbForeArrow,
- ThumbLowerTrack,
- ThumbThumb,
- ThumbUpperTrack,
- Today,
- TodayCircle,
- UpButton,
- UpperTrack,
- VSeparator,
- Week,
- WeekNum,
- WeekNumSep
-};
-
enum CFWL_PartState {
CFWL_PartState_Normal = 0,
@@ -79,7 +33,53 @@
class CFWL_ThemePart {
public:
- CFWL_ThemePart(CFWL_Widget* pWidget);
+ enum class Part : uint8_t {
+ kNone = 0,
+
+ kBackArrow,
+ kBackground,
+ kBorder,
+ kCaption,
+ kCheck,
+ kCheckBox,
+ kCloseBox,
+ kCombTextLine,
+ kDateInBK,
+ kDateInCircle,
+ kDatesIn,
+ kDatesOut,
+ kDownButton,
+ kDropDownButton,
+ kForeArrow,
+ kHSeparator,
+ kHeadText,
+ kHeader,
+ kIcon,
+ kImage,
+ kLBtn,
+ kListItem,
+ kLowerTrack,
+ kMinimizeBox,
+ kMaximizeBox,
+ kNarrowCaption,
+ kRBtn,
+ kThumb,
+ kThumbBackArrow,
+ kThumbForeArrow,
+ kThumbLowerTrack,
+ kThumbThumb,
+ kThumbUpperTrack,
+ kToday,
+ kTodayCircle,
+ kUpButton,
+ kUpperTrack,
+ kVSeparator,
+ kWeek,
+ kWeekNum,
+ kWeekNumSep
+ };
+
+ explicit CFWL_ThemePart(CFWL_Widget* pWidget);
~CFWL_ThemePart();
CFWL_Widget* GetWidget() const { return m_pWidget.Get(); }
@@ -88,7 +88,7 @@
CFX_RectF m_PartRect;
UnownedPtr<const CFX_RectF> m_pRtData;
uint32_t m_dwStates = CFWL_PartState_Normal;
- CFWL_Part m_iPart = CFWL_Part::None;
+ Part m_iPart = Part::kNone;
bool m_bMaximize = false;
bool m_bStaticBackground = false;
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 3a207c1..6c3411d 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -279,7 +279,7 @@
}
void CFWL_Widget::DrawBackground(CFGAS_GEGraphics* pGraphics,
- CFWL_Part iPartBk,
+ CFWL_ThemePart::Part iPartBk,
const CFX_Matrix& mtMatrix) {
CFWL_ThemeBackground param(this, pGraphics);
param.m_iPart = iPartBk;
@@ -289,7 +289,7 @@
}
void CFWL_Widget::DrawBorder(CFGAS_GEGraphics* pGraphics,
- CFWL_Part iPartBorder,
+ CFWL_ThemePart::Part iPartBorder,
const CFX_Matrix& matrix) {
CFWL_ThemeBackground param(this, pGraphics);
param.m_iPart = iPartBorder;
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 28ff8e7..1257e0b 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -161,7 +161,7 @@
void UnregisterEventTarget();
void DispatchEvent(CFWL_Event* pEvent);
void DrawBorder(CFGAS_GEGraphics* pGraphics,
- CFWL_Part iPartBorder,
+ CFWL_ThemePart::Part iPartBorder,
const CFX_Matrix& pMatrix);
Properties m_Properties;
@@ -177,7 +177,7 @@
CFWL_Widget* GetParent() const { return m_pWidgetMgr->GetParentWidget(this); }
CFX_SizeF GetOffsetFromParent(CFWL_Widget* pParent);
void DrawBackground(CFGAS_GEGraphics* pGraphics,
- CFWL_Part iPartBk,
+ CFWL_ThemePart::Part iPartBk,
const CFX_Matrix& mtMatrix);
void NotifyDriver();
bool IsParent(CFWL_Widget* pParent);
diff --git a/xfa/fwl/theme/cfwl_barcodetp.cpp b/xfa/fwl/theme/cfwl_barcodetp.cpp
index ffe87d4..12f071c 100644
--- a/xfa/fwl/theme/cfwl_barcodetp.cpp
+++ b/xfa/fwl/theme/cfwl_barcodetp.cpp
@@ -16,10 +16,10 @@
void CFWL_BarcodeTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border:
+ case CFWL_ThemePart::Part::kBorder:
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
- case CFWL_Part::Background:
+ case CFWL_ThemePart::Part::kBackground:
FillBackground(pParams.GetGraphics(), pParams.m_PartRect,
pParams.m_matrix);
break;
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index 91ce1f8..43def2b 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -18,7 +18,7 @@
void CFWL_CaretTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
if (!(pParams.m_dwStates & CFWL_PartState_HightLight))
return;
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 7183ba6..1b9ffaa 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -205,7 +205,7 @@
}
void CFWL_CheckBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
- if (pParams.m_iPart != CFWL_Part::CheckBox)
+ if (pParams.m_iPart != CFWL_ThemePart::Part::kCheckBox)
return;
if ((pParams.m_dwStates & CFWL_PartState_Checked) ||
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index a143f13..5ae8352 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -19,11 +19,11 @@
void CFWL_ComboBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border: {
+ case CFWL_ThemePart::Part::kBorder: {
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
}
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
CFGAS_GEPath path;
const CFX_RectF& rect = pParams.m_PartRect;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
@@ -45,7 +45,7 @@
pParams.GetGraphics()->RestoreGraphState();
break;
}
- case CFWL_Part::DropDownButton: {
+ case CFWL_ThemePart::Part::kDropDownButton: {
DrawDropDownButton(pParams, pParams.m_dwStates, pParams.m_matrix);
break;
}
diff --git a/xfa/fwl/theme/cfwl_datetimepickertp.cpp b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
index 70d3db4..d3a1cdf 100644
--- a/xfa/fwl/theme/cfwl_datetimepickertp.cpp
+++ b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
@@ -16,10 +16,10 @@
void CFWL_DateTimePickerTP::DrawBackground(
const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border:
+ case CFWL_ThemePart::Part::kBorder:
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
- case CFWL_Part::DropDownButton:
+ case CFWL_ThemePart::Part::kDropDownButton:
DrawDropDownButton(pParams, pParams.m_matrix);
break;
default:
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 4f05d19..6fd238f 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -18,11 +18,11 @@
void CFWL_EditTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border: {
+ case CFWL_ThemePart::Part::kBorder: {
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
}
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
if (pParams.m_pPath) {
CFGAS_GEGraphics* pGraphics = pParams.GetGraphics();
pGraphics->SaveGraphState();
@@ -54,7 +54,7 @@
}
break;
}
- case CFWL_Part::CombTextLine: {
+ case CFWL_ThemePart::Part::kCombTextLine: {
CFWL_Widget::AdapterIface* pWidget =
pParams.GetWidget()->GetOutmost()->GetAdapterIface();
FX_ARGB cr = 0xFF000000;
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 41cf9d9..0a17342 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -19,11 +19,11 @@
void CFWL_ListBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border: {
+ case CFWL_ThemePart::Part::kBorder: {
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
}
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
FillSolidRect(pParams.GetGraphics(), ArgbEncode(255, 255, 255, 255),
pParams.m_PartRect, pParams.m_matrix);
if (pParams.m_pRtData) {
@@ -32,12 +32,12 @@
}
break;
}
- case CFWL_Part::ListItem: {
+ case CFWL_ThemePart::Part::kListItem: {
DrawListBoxItem(pParams.GetGraphics(), pParams.m_dwStates,
pParams.m_PartRect, pParams.m_pRtData, pParams.m_matrix);
break;
}
- case CFWL_Part::Check: {
+ case CFWL_ThemePart::Part::kCheck: {
uint32_t color = 0xFF000000;
if (pParams.m_dwStates == CFWL_PartState_Checked) {
color = 0xFFFF0000;
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index c282da6..16aecca 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -33,47 +33,47 @@
void CFWL_MonthCalendarTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border: {
+ case CFWL_ThemePart::Part::kBorder: {
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
}
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
DrawTotalBK(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::Header: {
+ case CFWL_ThemePart::Part::kHeader: {
DrawHeadBk(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::LBtn: {
+ case CFWL_ThemePart::Part::kLBtn: {
FWLTHEME_STATE eState = GetState(pParams.m_dwStates);
DrawArrowBtn(pParams.GetGraphics(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Left, eState, pParams.m_matrix);
break;
}
- case CFWL_Part::RBtn: {
+ case CFWL_ThemePart::Part::kRBtn: {
FWLTHEME_STATE eState = GetState(pParams.m_dwStates);
DrawArrowBtn(pParams.GetGraphics(), pParams.m_PartRect,
FWLTHEME_DIRECTION_Right, eState, pParams.m_matrix);
break;
}
- case CFWL_Part::HSeparator: {
+ case CFWL_ThemePart::Part::kHSeparator: {
DrawHSeparator(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::DatesIn: {
+ case CFWL_ThemePart::Part::kDatesIn: {
DrawDatesInBK(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::TodayCircle: {
+ case CFWL_ThemePart::Part::kTodayCircle: {
DrawTodayCircle(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::DateInCircle: {
+ case CFWL_ThemePart::Part::kDateInCircle: {
DrawDatesInCircle(pParams, pParams.m_matrix);
break;
}
- case CFWL_Part::WeekNumSep: {
+ case CFWL_ThemePart::Part::kWeekNumSep: {
DrawWeekNumSep(pParams, pParams.m_matrix);
break;
}
@@ -84,12 +84,12 @@
void CFWL_MonthCalendarTP::DrawText(const CFWL_ThemeText& pParams) {
EnsureTTOInitialized();
- if ((pParams.m_iPart == CFWL_Part::DatesIn) &&
+ if ((pParams.m_iPart == CFWL_ThemePart::Part::kDatesIn) &&
!(pParams.m_dwStates & FWL_ITEMSTATE_MCD_Flag) &&
(pParams.m_dwStates &
(CFWL_PartState_Hovered | CFWL_PartState_Selected))) {
m_pTextOut->SetTextColor(0xFFFFFFFF);
- } else if (pParams.m_iPart == CFWL_Part::Caption) {
+ } else if (pParams.m_iPart == CFWL_ThemePart::Part::kCaption) {
m_pTextOut->SetTextColor(kCaptionColor);
} else {
m_pTextOut->SetTextColor(0xFF000000);
diff --git a/xfa/fwl/theme/cfwl_pictureboxtp.cpp b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
index 3b0368c..5a16e4a 100644
--- a/xfa/fwl/theme/cfwl_pictureboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
@@ -16,7 +16,7 @@
void CFWL_PictureBoxTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border:
+ case CFWL_ThemePart::Part::kBorder:
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
default:
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index b9cd345..e3689c7 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -23,11 +23,11 @@
void CFWL_PushButtonTP::DrawBackground(const CFWL_ThemeBackground& pParams) {
switch (pParams.m_iPart) {
- case CFWL_Part::Border: {
+ case CFWL_ThemePart::Part::kBorder: {
DrawBorder(pParams.GetGraphics(), pParams.m_PartRect, pParams.m_matrix);
break;
}
- case CFWL_Part::Background: {
+ case CFWL_ThemePart::Part::kBackground: {
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 ad86e65..aaba320 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -32,29 +32,29 @@
CFGAS_GEGraphics* pGraphics = pParams.GetGraphics();
bool bVert = !!pWidget->GetStylesEx();
switch (pParams.m_iPart) {
- case CFWL_Part::ForeArrow: {
+ case CFWL_ThemePart::Part::kForeArrow: {
DrawMaxMinBtn(pGraphics, pParams.m_PartRect,
bVert ? FWLTHEME_DIRECTION_Up : FWLTHEME_DIRECTION_Left,
eState, pParams.m_matrix);
break;
}
- case CFWL_Part::BackArrow: {
+ case CFWL_ThemePart::Part::kBackArrow: {
DrawMaxMinBtn(pGraphics, pParams.m_PartRect,
bVert ? FWLTHEME_DIRECTION_Down : FWLTHEME_DIRECTION_Right,
eState, pParams.m_matrix);
break;
}
- case CFWL_Part::Thumb: {
+ case CFWL_ThemePart::Part::kThumb: {
DrawThumbBtn(pGraphics, pParams.m_PartRect, bVert, eState,
pParams.m_matrix);
break;
}
- case CFWL_Part::LowerTrack: {
+ case CFWL_ThemePart::Part::kLowerTrack: {
DrawTrack(pGraphics, pParams.m_PartRect, bVert, eState, true,
pParams.m_matrix);
break;
}
- case CFWL_Part::UpperTrack: {
+ case CFWL_ThemePart::Part::kUpperTrack: {
DrawTrack(pGraphics, pParams.m_PartRect, bVert, eState, false,
pParams.m_matrix);
break;
diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp
index daaef0d..0c222ed 100644
--- a/xfa/fxfa/cxfa_fwltheme.cpp
+++ b/xfa/fxfa/cxfa_fwltheme.cpp
@@ -101,13 +101,13 @@
m_pTextOut->SetFont(m_pCalendarFont);
m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize);
m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor);
- if ((pParams.m_iPart == CFWL_Part::DatesIn) &&
+ if ((pParams.m_iPart == CFWL_ThemePart::Part::kDatesIn) &&
!(pParams.m_dwStates & FWL_ITEMSTATE_MCD_Flag) &&
(pParams.m_dwStates &
(CFWL_PartState_Hovered | CFWL_PartState_Selected))) {
m_pTextOut->SetTextColor(0xFF888888);
}
- if (pParams.m_iPart == CFWL_Part::Caption)
+ if (pParams.m_iPart == CFWL_ThemePart::Part::kCaption)
m_pTextOut->SetTextColor(ArgbEncode(0xff, 0, 153, 255));
CFGAS_GEGraphics* pGraphics = pParams.GetGraphics();