summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_comboboxtp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-21 06:22:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 06:22:11 -0700
commitf87058d19a3448face48202c7040ee4d95ba39c1 (patch)
treedca273099a27add24bcfbc6a2ce5e46cf262dbc5 /xfa/fwl/theme/cfwl_comboboxtp.cpp
parentb4e8708ce506be308fefc3eb85a427206ef320d8 (diff)
downloadpdfium-f87058d19a3448face48202c7040ee4d95ba39c1.tar.xz
Convert some FWL defines to enums.
This CL converts FWL_WGTCAPACITY_* defines to the CFWL_WidgetCapacity enum class. The FWL_PART_* defines to the FWL_Part enum class and the FWL_PartState_* defines to an enum. Review URL: https://codereview.chromium.org/1898713003
Diffstat (limited to 'xfa/fwl/theme/cfwl_comboboxtp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_comboboxtp.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index b9dd7a0300..131e6388f7 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -28,26 +28,26 @@ FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (!pParams)
return FALSE;
switch (pParams->m_iPart) {
- case FWL_PART_CMB_Border: {
+ case CFWL_Part::Border: {
DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
break;
}
- case FWL_PART_CMB_Edge: {
+ case CFWL_Part::Edge: {
DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(),
&pParams->m_rtPart, &pParams->m_matrix);
break;
}
- case FWL_PART_CMB_Background: {
+ case CFWL_Part::Background: {
CFX_Path path;
path.Create();
CFX_RectF& rect = pParams->m_rtPart;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
CFX_Color cr;
switch (pParams->m_dwStates) {
- case FWL_PARTSTATE_CMB_Selected:
+ case CFWL_PartState_Selected:
cr = FWLTHEME_COLOR_BKSelected;
break;
- case FWL_PARTSTATE_CMB_Disabled:
+ case CFWL_PartState_Disabled:
cr = FWLTHEME_COLOR_EDGERB1;
break;
default:
@@ -59,11 +59,11 @@ FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
pParams->m_pGraphics->RestoreGraphState();
break;
}
- case FWL_PART_CMB_DropDownButton: {
+ case CFWL_Part::DropDownButton: {
DrawDropDownButton(pParams, pParams->m_dwStates, &pParams->m_matrix);
break;
}
- case FWL_PART_CMB_StretcgHandler: {
+ case CFWL_Part::StretchHandler: {
DrawStrethHandler(pParams, 0, &pParams->m_matrix);
break;
}
@@ -83,8 +83,8 @@ void CFWL_ComboBoxTP::DrawStrethHandler(CFWL_ThemeBackground* pParams,
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
}
void* CFWL_ComboBoxTP::GetCapacity(CFWL_ThemePart* pThemePart,
- uint32_t dwCapacity) {
- if (dwCapacity == FWL_WGTCAPACITY_CMB_ComboFormHandler) {
+ CFWL_WidgetCapacity dwCapacity) {
+ if (dwCapacity == CFWL_WidgetCapacity::ComboFormHandler) {
m_fValue = FWLTHEME_CAPACITY_ComboFormHandler;
return &m_fValue;
}
@@ -96,19 +96,19 @@ void CFWL_ComboBoxTP::DrawDropDownButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
FWLTHEME_STATE eState = FWLTHEME_STATE_Normal;
switch (dwStates) {
- case FWL_PARTSTATE_CMB_Normal: {
+ case CFWL_PartState_Normal: {
eState = FWLTHEME_STATE_Normal;
break;
}
- case FWL_PARTSTATE_CMB_Hovered: {
+ case CFWL_PartState_Hovered: {
eState = FWLTHEME_STATE_Hover;
break;
}
- case FWL_PARTSTATE_CMB_Pressed: {
+ case CFWL_PartState_Pressed: {
eState = FWLTHEME_STATE_Pressed;
break;
}
- case FWL_PARTSTATE_CMB_Disabled: {
+ case CFWL_PartState_Disabled: {
eState = FWLTHEME_STATE_Disabale;
break;
}