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_combo_box.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'fpdfsdk/pwl/cpwl_combo_box.cpp') diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp index 8c5e99ff09..03651949b2 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box.cpp @@ -151,9 +151,9 @@ CFX_ByteString CPWL_ComboBox::GetClassName() const { return "CPWL_ComboBox"; } -void CPWL_ComboBox::OnCreate(PWL_CREATEPARAM& cp) { - cp.dwFlags &= ~PWS_HSCROLL; - cp.dwFlags &= ~PWS_VSCROLL; +void CPWL_ComboBox::OnCreate(CreateParams* pParamsToAdjust) { + pParamsToAdjust->dwFlags &= ~PWS_HSCROLL; + pParamsToAdjust->dwFlags &= ~PWS_VSCROLL; } void CPWL_ComboBox::OnDestroy() { @@ -237,20 +237,20 @@ void CPWL_ComboBox::ClearSelection() { m_pEdit->ClearSelection(); } -void CPWL_ComboBox::CreateChildWnd(const PWL_CREATEPARAM& cp) { +void CPWL_ComboBox::CreateChildWnd(const CreateParams& cp) { CreateEdit(cp); CreateButton(cp); CreateListBox(cp); } -void CPWL_ComboBox::CreateEdit(const PWL_CREATEPARAM& cp) { +void CPWL_ComboBox::CreateEdit(const CreateParams& cp) { if (m_pEdit) return; m_pEdit = new CPWL_Edit(); m_pEdit->AttachFFLData(m_pFormFiller.Get()); - PWL_CREATEPARAM ecp = cp; + CreateParams ecp = cp; ecp.pParentWnd = this; ecp.dwFlags = PWS_VISIBLE | PWS_CHILD | PWS_BORDER | PES_CENTER | PES_AUTOSCROLL | PES_UNDO; @@ -267,13 +267,13 @@ void CPWL_ComboBox::CreateEdit(const PWL_CREATEPARAM& cp) { m_pEdit->Create(ecp); } -void CPWL_ComboBox::CreateButton(const PWL_CREATEPARAM& cp) { +void CPWL_ComboBox::CreateButton(const CreateParams& cp) { if (m_pButton) return; m_pButton = new CPWL_CBButton; - PWL_CREATEPARAM bcp = cp; + CreateParams bcp = cp; bcp.pParentWnd = this; bcp.dwFlags = PWS_VISIBLE | PWS_CHILD | PWS_BORDER | PWS_BACKGROUND; bcp.sBackgroundColor = CFX_Color(COLORTYPE_RGB, 220.0f / 255.0f, @@ -285,14 +285,14 @@ void CPWL_ComboBox::CreateButton(const PWL_CREATEPARAM& cp) { m_pButton->Create(bcp); } -void CPWL_ComboBox::CreateListBox(const PWL_CREATEPARAM& cp) { +void CPWL_ComboBox::CreateListBox(const CreateParams& cp) { if (m_pList) return; m_pList = new CPWL_CBListBox(); m_pList->AttachFFLData(m_pFormFiller.Get()); - PWL_CREATEPARAM lcp = cp; + CreateParams lcp = cp; lcp.pParentWnd = this; lcp.dwFlags = PWS_CHILD | PWS_BORDER | PWS_BACKGROUND | PLBS_HOVERSEL | PWS_VSCROLL; -- cgit v1.2.3