summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_combo_box.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-09-15 13:26:32 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-09-15 21:25:46 +0000
commitbf15730b2c9577d4efd2124d84c6c8ccc5f66b43 (patch)
treeb03fb50d97a3233094437746260c0927464be5ec /fpdfsdk/pwl/cpwl_combo_box.cpp
parentbb2f7e73bef47b4e865118cb52170563d849b4de (diff)
downloadpdfium-bf15730b2c9577d4efd2124d84c6c8ccc5f66b43.tar.xz
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 <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_combo_box.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_combo_box.cpp20
1 files changed, 10 insertions, 10 deletions
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;