diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-21 06:22:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-21 06:22:11 -0700 |
commit | f87058d19a3448face48202c7040ee4d95ba39c1 (patch) | |
tree | dca273099a27add24bcfbc6a2ce5e46cf262dbc5 /xfa/fwl/theme/cfwl_listboxtp.cpp | |
parent | b4e8708ce506be308fefc3eb85a427206ef320d8 (diff) | |
download | pdfium-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_listboxtp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_listboxtp.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp index 210949aa41..f1a017ab70 100644 --- a/xfa/fwl/theme/cfwl_listboxtp.cpp +++ b/xfa/fwl/theme/cfwl_listboxtp.cpp @@ -24,16 +24,16 @@ FX_BOOL CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { if (!pParams) return FALSE; switch (pParams->m_iPart) { - case FWL_PART_LTB_Border: { + case CFWL_Part::Border: { DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); break; } - case FWL_PART_LTB_Edge: { + case CFWL_Part::Edge: { DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), &pParams->m_rtPart, &pParams->m_matrix); break; } - case FWL_PART_LTB_Background: { + case CFWL_Part::Background: { FillSoildRect(pParams->m_pGraphics, ArgbEncode(255, 255, 255, 255), &pParams->m_rtPart, &pParams->m_matrix); if (pParams->m_pData) { @@ -42,21 +42,21 @@ FX_BOOL CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { } break; } - case FWL_PART_LTB_ListItem: { + case CFWL_Part::ListItem: { DrawListBoxItem(pParams->m_pGraphics, pParams->m_dwStates, &pParams->m_rtPart, pParams->m_pData, &pParams->m_matrix); break; } - case FWL_PART_LTB_Icon: { + case CFWL_Part::Icon: { pParams->m_pGraphics->StretchImage(pParams->m_pImage, pParams->m_rtPart, &pParams->m_matrix); break; } - case FWL_PART_LTB_Check: { + case CFWL_Part::Check: { uint32_t color = 0xFF000000; - if (pParams->m_dwStates == FWL_PARTSTATE_LTB_Checked) { + if (pParams->m_dwStates == CFWL_PartState_Checked) { color = 0xFFFF0000; - } else if (pParams->m_dwStates == FWL_PARTSTATE_LTB_UnChecked) { + } else if (pParams->m_dwStates == CFWL_PartState_Normal) { color = 0xFF0000FF; } FillSoildRect(pParams->m_pGraphics, color, &pParams->m_rtPart, @@ -79,7 +79,7 @@ void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics, const CFX_RectF* prtItem, void* pData, CFX_Matrix* pMatrix) { - if (dwStates & FWL_PARTSTATE_LTB_Selected) { + if (dwStates & CFWL_PartState_Selected) { pGraphics->SaveGraphState(); CFX_Color crFill(FWL_GetThemeColor(m_dwThemeID) == 0 ? FWLTHEME_COLOR_BKSelected @@ -96,7 +96,7 @@ void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics, pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); pGraphics->RestoreGraphState(); } - if (dwStates & FWL_PARTSTATE_LTB_Focused) { + if (dwStates & CFWL_PartState_Focused) { if (pData) { DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix); } |