summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_combobox.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-08 14:05:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-08 14:05:14 -0800
commit43ac44cbf52076fd2354d5276c95d5b4b4a06d64 (patch)
tree28670fc2d1ee83358c717fb43ca7bc9301b2480f /xfa/fwl/cfwl_combobox.cpp
parent53ed03d9d865c312fdaa4434b83ed60619881226 (diff)
downloadpdfium-43ac44cbf52076fd2354d5276c95d5b4b4a06d64.tar.xz
Cleanup CFWL_Widget code to return CFX_RectFs where appropriate
This Cl changes the various Get*Rect methods in CFWL_Widget to return CFX_RectF classes instead of taking an out parameter. The Repaint method is split into Repaint() and RepaintRect() in order to change the param to a const CFX_RectF& from a CFX_RectF*. Review-Url: https://codereview.chromium.org/2560873005
Diffstat (limited to 'xfa/fwl/cfwl_combobox.cpp')
-rw-r--r--xfa/fwl/cfwl_combobox.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 83c3d4a1d9..eb6bb632cd 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -400,7 +400,7 @@ void CFWL_ComboBox::Layout() {
if (m_pWidgetMgr->IsFormDisabled())
return DisForm_Layout();
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
if (!pFWidth)
@@ -504,7 +504,7 @@ void CFWL_ComboBox::ResetListItemAlignment() {
void CFWL_ComboBox::ProcessSelChanged(bool bLButtonUp) {
m_iCurSel = m_pListBox->GetItemIndex(this, m_pListBox->GetSelItem(0));
if (!IsDropDownStyle()) {
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
@@ -614,7 +614,7 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
CFX_RectF rect = m_pListBox->GetWidgetRect();
rect.Inflate(2, 2);
- Repaint(&rect);
+ RepaintRect(rect);
}
void CFWL_ComboBox::DisForm_ModifyStylesEx(uint32_t dwStylesExAdded,
@@ -709,7 +709,7 @@ CFX_RectF CFWL_ComboBox::DisForm_GetBBox() const {
}
void CFWL_ComboBox::DisForm_Layout() {
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
m_rtContent = m_rtClient;
FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
@@ -822,13 +822,13 @@ void CFWL_ComboBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
return;
}
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
if (!IsDropDownStyle() || pMsg->m_pDstTarget == m_pListBox.get()) {
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
if (!m_pEdit)
@@ -851,11 +851,11 @@ void CFWL_ComboBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
m_bLButtonDown = true;
m_iBtnState = CFWL_PartState_Pressed;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
ShowDropList(true);
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_ComboBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
@@ -865,7 +865,7 @@ void CFWL_ComboBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
else
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
void CFWL_ComboBox::OnMouseMove(CFWL_MessageMouse* pMsg) {
@@ -879,7 +879,7 @@ void CFWL_ComboBox::OnMouseMove(CFWL_MessageMouse* pMsg) {
if ((iOldState != m_iBtnState) &&
!((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) ==
FWL_WGTSTATE_Disabled)) {
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
}
@@ -888,7 +888,7 @@ void CFWL_ComboBox::OnMouseLeave(CFWL_MessageMouse* pMsg) {
!((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) ==
FWL_WGTSTATE_Disabled)) {
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
}
@@ -935,7 +935,7 @@ void CFWL_ComboBox::DoSubCtrlKey(CFWL_MessageKey* pMsg) {
if (bDropDown && m_pEdit)
SyncEditText(m_iCurSel);
else
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}