diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-08 14:05:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-08 14:05:14 -0800 |
commit | 43ac44cbf52076fd2354d5276c95d5b4b4a06d64 (patch) | |
tree | 28670fc2d1ee83358c717fb43ca7bc9301b2480f /xfa/fwl/cfwl_widget.h | |
parent | 53ed03d9d865c312fdaa4434b83ed60619881226 (diff) | |
download | pdfium-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_widget.h')
-rw-r--r-- | xfa/fwl/cfwl_widget.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h index 53839a761b..64fc526ad6 100644 --- a/xfa/fwl/cfwl_widget.h +++ b/xfa/fwl/cfwl_widget.h @@ -53,7 +53,7 @@ class CFWL_Widget : public IFWL_WidgetDelegate { virtual bool IsInstance(const CFX_WideStringC& wsClass) const; virtual CFX_RectF GetAutosizedWidgetRect(); virtual CFX_RectF GetWidgetRect(); - virtual void GetClientRect(CFX_RectF& rect); + virtual CFX_RectF GetClientRect(); virtual void ModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved); virtual void SetStates(uint32_t dwStates); @@ -109,7 +109,8 @@ class CFWL_Widget : public IFWL_WidgetDelegate { void SetLayoutItem(void* pItem) { m_pLayoutItem = pItem; } void SetFocus(bool bFocus); - void Repaint(const CFX_RectF* pRect); + void RepaintRect(const CFX_RectF& pRect); + void Repaint(); protected: CFWL_Widget(const CFWL_App* app, @@ -121,10 +122,10 @@ class CFWL_Widget : public IFWL_WidgetDelegate { bool IsLocked() const { return m_iLock > 0; } bool HasBorder() const; bool HasEdge() const; - void GetEdgeRect(CFX_RectF& rtEdge); + CFX_RectF GetEdgeRect(); FX_FLOAT GetBorderSize(bool bCX); FX_FLOAT GetEdgeWidth(); - void GetRelativeRect(CFX_RectF& rect); + CFX_RectF GetRelativeRect(); void* GetThemeCapacity(CFWL_WidgetCapacity dwCapacity); IFWL_ThemeProvider* GetAvailableTheme(); CFX_SizeF CalcTextSize(const CFX_WideString& wsText, |