From 54ab2343c338f55735c37ed6751040791e1df1e2 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 26 May 2016 17:35:54 -0700 Subject: Add opaque "layout item" to widgets for caller's use. This avoids another use of CFX_PrivateData. Note that in the old code, we'd be calling through a m_pImpl onto the same underlying object as we passed as the "key" argument when setting the value, which explains why the get calls, happening one object lower, pass the same argument as which they are being inovked against. Review-Url: https://codereview.chromium.org/2010923002 --- xfa/fwl/core/fwl_widgetimp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xfa/fwl/core/fwl_widgetimp.h') diff --git a/xfa/fwl/core/fwl_widgetimp.h b/xfa/fwl/core/fwl_widgetimp.h index 3fdef9786c..8a887126e3 100644 --- a/xfa/fwl/core/fwl_widgetimp.h +++ b/xfa/fwl/core/fwl_widgetimp.h @@ -80,6 +80,8 @@ class CFWL_WidgetImp { CFX_SizeF GetOffsetFromParent(IFWL_Widget* pParent); uint32_t GetEventKey() const; void SetEventKey(uint32_t key); + void* GetLayoutItem() const; + void SetLayoutItem(void* pItem); protected: friend class CFWL_WidgetImpDelegate; @@ -162,6 +164,7 @@ class CFWL_WidgetImp { IFWL_WidgetDelegate* m_pCurDelegate; IFWL_Widget* m_pOuter; IFWL_Widget* m_pInterface; + void* m_pLayoutItem; int32_t m_iLock; uint32_t m_nEventKey; }; -- cgit v1.2.3