| 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/core/ifwl_combobox.h" | 7 #include "xfa/fwl/core/ifwl_combobox.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "third_party/base/ptr_util.h" | 13 #include "third_party/base/ptr_util.h" |
| 14 #include "xfa/fde/cfde_txtedtengine.h" | 14 #include "xfa/fde/cfde_txtedtengine.h" |
| 15 #include "xfa/fde/tto/fde_textout.h" | 15 #include "xfa/fde/tto/fde_textout.h" |
| 16 #include "xfa/fwl/core/cfwl_app.h" |
| 16 #include "xfa/fwl/core/cfwl_evteditchanged.h" | 17 #include "xfa/fwl/core/cfwl_evteditchanged.h" |
| 17 #include "xfa/fwl/core/cfwl_evtpostdropdown.h" | 18 #include "xfa/fwl/core/cfwl_evtpostdropdown.h" |
| 18 #include "xfa/fwl/core/cfwl_evtpredropdown.h" | 19 #include "xfa/fwl/core/cfwl_evtpredropdown.h" |
| 19 #include "xfa/fwl/core/cfwl_evtselectchanged.h" | 20 #include "xfa/fwl/core/cfwl_evtselectchanged.h" |
| 20 #include "xfa/fwl/core/cfwl_evttextchanged.h" | 21 #include "xfa/fwl/core/cfwl_evttextchanged.h" |
| 21 #include "xfa/fwl/core/cfwl_msgkey.h" | 22 #include "xfa/fwl/core/cfwl_msgkey.h" |
| 22 #include "xfa/fwl/core/cfwl_msgkillfocus.h" | 23 #include "xfa/fwl/core/cfwl_msgkillfocus.h" |
| 23 #include "xfa/fwl/core/cfwl_msgmouse.h" | 24 #include "xfa/fwl/core/cfwl_msgmouse.h" |
| 24 #include "xfa/fwl/core/cfwl_msgsetfocus.h" | 25 #include "xfa/fwl/core/cfwl_msgsetfocus.h" |
| 25 #include "xfa/fwl/core/cfwl_notedriver.h" | 26 #include "xfa/fwl/core/cfwl_notedriver.h" |
| 26 #include "xfa/fwl/core/cfwl_themebackground.h" | 27 #include "xfa/fwl/core/cfwl_themebackground.h" |
| 27 #include "xfa/fwl/core/cfwl_themepart.h" | 28 #include "xfa/fwl/core/cfwl_themepart.h" |
| 28 #include "xfa/fwl/core/cfwl_themetext.h" | 29 #include "xfa/fwl/core/cfwl_themetext.h" |
| 29 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 30 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
| 30 #include "xfa/fwl/core/ifwl_app.h" | |
| 31 #include "xfa/fwl/core/ifwl_formproxy.h" | 31 #include "xfa/fwl/core/ifwl_formproxy.h" |
| 32 #include "xfa/fwl/core/ifwl_listbox.h" | 32 #include "xfa/fwl/core/ifwl_listbox.h" |
| 33 #include "xfa/fwl/core/ifwl_themeprovider.h" | 33 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 34 | 34 |
| 35 IFWL_ComboBox::IFWL_ComboBox(const IFWL_App* app, | 35 IFWL_ComboBox::IFWL_ComboBox(const CFWL_App* app, |
| 36 std::unique_ptr<CFWL_WidgetProperties> properties) | 36 std::unique_ptr<CFWL_WidgetProperties> properties) |
| 37 : IFWL_Widget(app, std::move(properties), nullptr), | 37 : IFWL_Widget(app, std::move(properties), nullptr), |
| 38 m_pComboBoxProxy(nullptr), | 38 m_pComboBoxProxy(nullptr), |
| 39 m_bLButtonDown(false), | 39 m_bLButtonDown(false), |
| 40 m_iCurSel(-1), | 40 m_iCurSel(-1), |
| 41 m_iBtnState(CFWL_PartState_Normal), | 41 m_iBtnState(CFWL_PartState_Normal), |
| 42 m_fComboFormHandler(0) { | 42 m_fComboFormHandler(0) { |
| 43 m_rtClient.Reset(); | 43 m_rtClient.Reset(); |
| 44 m_rtBtn.Reset(); | 44 m_rtBtn.Reset(); |
| 45 m_rtHandler.Reset(); | 45 m_rtHandler.Reset(); |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 else | 1140 else |
| 1141 iCurSel++; | 1141 iCurSel++; |
| 1142 } | 1142 } |
| 1143 m_iCurSel = iCurSel; | 1143 m_iCurSel = iCurSel; |
| 1144 SyncEditText(m_iCurSel); | 1144 SyncEditText(m_iCurSel); |
| 1145 return; | 1145 return; |
| 1146 } | 1146 } |
| 1147 if (m_pEdit) | 1147 if (m_pEdit) |
| 1148 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 1148 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
| 1149 } | 1149 } |
| OLD | NEW |