OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fwl/cfwl_combobox.h" | 7 #include "xfa/fwl/cfwl_combobox.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 auto prop = pdfium::MakeUnique<CFWL_WidgetProperties>(); | 50 auto prop = pdfium::MakeUnique<CFWL_WidgetProperties>(); |
51 prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; | 51 prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; |
52 prop->m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; | 52 prop->m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; |
53 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListItemIconText) | 53 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListItemIconText) |
54 prop->m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; | 54 prop->m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; |
55 m_pListBox = | 55 m_pListBox = |
56 pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); | 56 pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); |
57 | 57 |
58 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { | 58 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { |
59 m_pEdit.reset(new CFWL_ComboEdit( | 59 m_pEdit = pdfium::MakeUnique<CFWL_ComboEdit>( |
60 m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), this)); | 60 m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), this); |
61 m_pEdit->SetOuter(this); | 61 m_pEdit->SetOuter(this); |
62 } | 62 } |
63 if (m_pEdit) | 63 if (m_pEdit) |
64 m_pEdit->SetParent(this); | 64 m_pEdit->SetParent(this); |
65 | 65 |
66 SetStates(m_pProperties->m_dwStates); | 66 SetStates(m_pProperties->m_dwStates); |
67 } | 67 } |
68 | 68 |
69 CFWL_ComboBox::~CFWL_ComboBox() {} | 69 CFWL_ComboBox::~CFWL_ComboBox() {} |
70 | 70 |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 else | 1061 else |
1062 iCurSel++; | 1062 iCurSel++; |
1063 } | 1063 } |
1064 m_iCurSel = iCurSel; | 1064 m_iCurSel = iCurSel; |
1065 SyncEditText(m_iCurSel); | 1065 SyncEditText(m_iCurSel); |
1066 return; | 1066 return; |
1067 } | 1067 } |
1068 if (m_pEdit) | 1068 if (m_pEdit) |
1069 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 1069 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
1070 } | 1070 } |
OLD | NEW |