| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 if (m_pWidgetMgr->IsFormDisabled()) { | 44 if (m_pWidgetMgr->IsFormDisabled()) { |
| 45 DisForm_InitComboList(); | 45 DisForm_InitComboList(); |
| 46 DisForm_InitComboEdit(); | 46 DisForm_InitComboEdit(); |
| 47 return; | 47 return; |
| 48 } | 48 } |
| 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) | |
| 54 prop->m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; | |
| 55 m_pListBox = | 53 m_pListBox = |
| 56 pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); | 54 pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); |
| 57 | 55 |
| 58 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { | 56 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { |
| 59 m_pEdit = pdfium::MakeUnique<CFWL_ComboEdit>( | 57 m_pEdit = pdfium::MakeUnique<CFWL_ComboEdit>( |
| 60 m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), this); | 58 m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), this); |
| 61 m_pEdit->SetOuter(this); | 59 m_pEdit->SetOuter(this); |
| 62 } | 60 } |
| 63 if (m_pEdit) | 61 if (m_pEdit) |
| 64 m_pEdit->SetParent(this); | 62 m_pEdit->SetParent(this); |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 else | 1057 else |
| 1060 iCurSel++; | 1058 iCurSel++; |
| 1061 } | 1059 } |
| 1062 m_iCurSel = iCurSel; | 1060 m_iCurSel = iCurSel; |
| 1063 SyncEditText(m_iCurSel); | 1061 SyncEditText(m_iCurSel); |
| 1064 return; | 1062 return; |
| 1065 } | 1063 } |
| 1066 if (m_pEdit) | 1064 if (m_pEdit) |
| 1067 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 1065 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
| 1068 } | 1066 } |
| OLD | NEW |