| 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/basewidget/fwl_comboboximp.h" | 7 #include "xfa/fwl/basewidget/fwl_comboboximp.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fee/fde_txtedtengine.h" | 10 #include "xfa/fee/fde_txtedtengine.h" |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 m_bNeedShowList(FALSE) { | 481 m_bNeedShowList(FALSE) { |
| 482 m_rtClient.Reset(); | 482 m_rtClient.Reset(); |
| 483 m_rtBtn.Reset(); | 483 m_rtBtn.Reset(); |
| 484 m_rtHandler.Reset(); | 484 m_rtHandler.Reset(); |
| 485 } | 485 } |
| 486 CFWL_ComboBoxImp::~CFWL_ComboBoxImp() {} | 486 CFWL_ComboBoxImp::~CFWL_ComboBoxImp() {} |
| 487 FWL_ERR CFWL_ComboBoxImp::GetClassName(CFX_WideString& wsClass) const { | 487 FWL_ERR CFWL_ComboBoxImp::GetClassName(CFX_WideString& wsClass) const { |
| 488 wsClass = FWL_CLASS_ComboBox; | 488 wsClass = FWL_CLASS_ComboBox; |
| 489 return FWL_ERR_Succeeded; | 489 return FWL_ERR_Succeeded; |
| 490 } | 490 } |
| 491 uint32_t CFWL_ComboBoxImp::GetClassID() const { | 491 |
| 492 return FWL_CLASSHASH_ComboBox; | |
| 493 } | |
| 494 FWL_ERR CFWL_ComboBoxImp::Initialize() { | 492 FWL_ERR CFWL_ComboBoxImp::Initialize() { |
| 495 if (m_pWidgetMgr->IsFormDisabled()) { | 493 if (m_pWidgetMgr->IsFormDisabled()) { |
| 496 return DisForm_Initialize(); | 494 return DisForm_Initialize(); |
| 497 } | 495 } |
| 498 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) | 496 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) |
| 499 return FWL_WGTSTATE_Invisible; // Probably a bug; not a FWL_ERR_ value. | 497 return FWL_WGTSTATE_Invisible; // Probably a bug; not a FWL_ERR_ value. |
| 500 m_pDelegate = new CFWL_ComboBoxImpDelegate(this); | 498 m_pDelegate = new CFWL_ComboBoxImpDelegate(this); |
| 501 CFWL_WidgetImpProperties prop; | 499 CFWL_WidgetImpProperties prop; |
| 502 prop.m_pThemeProvider = m_pProperties->m_pThemeProvider; | 500 prop.m_pThemeProvider = m_pProperties->m_pThemeProvider; |
| 503 prop.m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; | 501 prop.m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 m_pComboBox->ShowDropList(FALSE); | 1841 m_pComboBox->ShowDropList(FALSE); |
| 1844 } | 1842 } |
| 1845 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, | 1843 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, |
| 1846 FX_BOOL bSet) { | 1844 FX_BOOL bSet) { |
| 1847 if (!bSet) { | 1845 if (!bSet) { |
| 1848 if (pMsg->m_pSetFocus == NULL) { | 1846 if (pMsg->m_pSetFocus == NULL) { |
| 1849 m_pComboBox->ShowDropList(FALSE); | 1847 m_pComboBox->ShowDropList(FALSE); |
| 1850 } | 1848 } |
| 1851 } | 1849 } |
| 1852 } | 1850 } |
| OLD | NEW |