From bf15730b2c9577d4efd2124d84c6c8ccc5f66b43 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 15 Sep 2017 13:26:32 -0700 Subject: Move CPWL_CREATPARAM to CPWL_Wnd::CreateParams This nesting makes so much more sense when I read the code. Fix member naming for this in CPWL_Wnd. Pass in/out CreateParams arg as pointer. Kill Reset() method, only called during destroy and nothing needs explicit cleanup. Change-Id: If50e403e11c131e7656da09c0cb36866223d64c6 Reviewed-on: https://pdfium-review.googlesource.com/14070 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fpdfsdk/pwl/cpwl_scroll_bar.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/pwl/cpwl_scroll_bar.h') diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h index e35a6a0fc2..44c72cbbe2 100644 --- a/fpdfsdk/pwl/cpwl_scroll_bar.h +++ b/fpdfsdk/pwl/cpwl_scroll_bar.h @@ -50,7 +50,7 @@ class CPWL_SBButton : public CPWL_Wnd { // CPWL_Wnd CFX_ByteString GetClassName() const override; - void OnCreate(PWL_CREATEPARAM& cp) override; + void OnCreate(CreateParams* pParamsToAdjust) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, const CFX_Matrix& mtUser2Device) override; bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override; @@ -120,9 +120,9 @@ class CPWL_ScrollBar : public CPWL_Wnd { explicit CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); ~CPWL_ScrollBar() override; - // CPWL_Wnd + // CPWL_Wnd: CFX_ByteString GetClassName() const override; - void OnCreate(PWL_CREATEPARAM& cp) override; + void OnCreate(CreateParams* pParamsToAdjust) override; void OnDestroy() override; void RePosChildWnd() override; void DrawThisAppearance(CFX_RenderDevice* pDevice, @@ -134,7 +134,7 @@ class CPWL_ScrollBar : public CPWL_Wnd { void NotifyLButtonDown(CPWL_Wnd* child, const CFX_PointF& pos) override; void NotifyLButtonUp(CPWL_Wnd* child, const CFX_PointF& pos) override; void NotifyMouseMove(CPWL_Wnd* child, const CFX_PointF& pos) override; - void CreateChildWnd(const PWL_CREATEPARAM& cp) override; + void CreateChildWnd(const CreateParams& cp) override; void TimerProc() override; float GetScrollBarWidth() const; @@ -151,7 +151,7 @@ class CPWL_ScrollBar : public CPWL_Wnd { CFX_FloatRect GetScrollArea() const; private: - void CreateButtons(const PWL_CREATEPARAM& cp); + void CreateButtons(const CreateParams& cp); void OnMinButtonLBDown(const CFX_PointF& point); void OnMinButtonLBUp(const CFX_PointF& point); -- cgit v1.2.3