summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_datetimepickerimp.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/basewidget/fwl_datetimepickerimp.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/basewidget/fwl_datetimepickerimp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_datetimepickerimp.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
index d436c47374..21616992b1 100644
--- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
+++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
@@ -250,11 +250,11 @@ int32_t CFWL_DateTimeCalendarImpDelegate::OnProcessMessage(
}
void CFWL_DateTimeCalendarImpDelegate::OnLButtonDownEx(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
- m_pOwner->m_iLBtnPartStates = FWL_PARTSTATE_MCD_Pressed;
+ m_pOwner->m_iLBtnPartStates = CFWL_PartState_Pressed;
m_pOwner->PrevMonth();
m_pOwner->Repaint(&m_pOwner->m_rtClient);
} else if (m_pOwner->m_rtRBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
- m_pOwner->m_iRBtnPartStates |= FWL_PARTSTATE_MCD_Pressed;
+ m_pOwner->m_iRBtnPartStates |= CFWL_PartState_Pressed;
m_pOwner->NextMonth();
m_pOwner->Repaint(&m_pOwner->m_rtClient);
} else if (m_pOwner->m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy)) {
@@ -499,8 +499,8 @@ FWL_ERR CFWL_DateTimePickerImp::Update() {
}
m_pEdit->SetThemeProvider(m_pProperties->m_pThemeProvider);
GetClientRect(m_rtClient);
- FX_FLOAT* pFWidth =
- static_cast<FX_FLOAT*>(GetThemeCapacity(FWL_WGTCAPACITY_ScrollBarWidth));
+ FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
+ GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
if (!pFWidth)
return FWL_ERR_Indefinite;
FX_FLOAT fBtn = *pFWidth;
@@ -554,10 +554,10 @@ FWL_ERR CFWL_DateTimePickerImp::DrawWidget(CFX_Graphics* pGraphics,
return FWL_ERR_Indefinite;
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder()) {
- DrawBorder(pGraphics, FWL_PART_DTP_Border, pTheme, pMatrix);
+ DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
}
if (HasEdge()) {
- DrawEdge(pGraphics, FWL_PART_DTP_Edge, pTheme, pMatrix);
+ DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
}
if (!m_rtBtn.IsEmpty()) {
DrawDropDownButton(pGraphics, pTheme, pMatrix);
@@ -692,7 +692,7 @@ void CFWL_DateTimePickerImp::DrawDropDownButton(CFX_Graphics* pGraphics,
} else {
CFWL_ThemeBackground param;
param.m_pWidget = m_pInterface;
- param.m_iPart = FWL_PART_DTP_DropDownButton;
+ param.m_iPart = CFWL_Part::DropDownButton;
param.m_dwStates = m_iBtnState;
param.m_pGraphics = pGraphics;
param.m_rtPart = m_rtBtn;
@@ -948,8 +948,8 @@ FWL_ERR CFWL_DateTimePickerImp::DisForm_Update() {
pData->GetToday(m_pInterface, m_MonthCalendarDP.m_iCurYear,
m_MonthCalendarDP.m_iCurMonth, m_MonthCalendarDP.m_iCurDay);
}
- FX_FLOAT* pWidth =
- static_cast<FX_FLOAT*>(GetThemeCapacity(FWL_WGTCAPACITY_ScrollBarWidth));
+ FX_FLOAT* pWidth = static_cast<FX_FLOAT*>(
+ GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
if (!pWidth)
return 0;
m_fBtn = *pWidth;
@@ -1112,23 +1112,23 @@ void CFWL_DateTimePickerImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
return;
m_pOwner->m_bLBtnDown = FALSE;
if (m_pOwner->m_rtBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
- m_pOwner->m_iBtnState = FWL_PARTSTATE_DTP_Hovered;
+ m_pOwner->m_iBtnState = CFWL_PartState_Hovered;
} else {
- m_pOwner->m_iBtnState = FWL_PARTSTATE_DTP_Normal;
+ m_pOwner->m_iBtnState = CFWL_PartState_Normal;
}
m_pOwner->Repaint(&m_pOwner->m_rtBtn);
}
void CFWL_DateTimePickerImpDelegate::OnMouseMove(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_rtBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
} else {
- m_pOwner->m_iBtnState = FWL_PARTSTATE_DTP_Normal;
+ m_pOwner->m_iBtnState = CFWL_PartState_Normal;
}
m_pOwner->Repaint(&m_pOwner->m_rtBtn);
}
void CFWL_DateTimePickerImpDelegate::OnMouseLeave(CFWL_MsgMouse* pMsg) {
if (!pMsg)
return;
- m_pOwner->m_iBtnState = FWL_PARTSTATE_DTP_Normal;
+ m_pOwner->m_iBtnState = CFWL_PartState_Normal;
m_pOwner->Repaint(&m_pOwner->m_rtBtn);
}
void CFWL_DateTimePickerImpDelegate::DisForm_OnFocusChanged(CFWL_Message* pMsg,