| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 m_rtHandler.Reset(); | 483 m_rtHandler.Reset(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 CFWL_ComboBoxImp::~CFWL_ComboBoxImp() {} | 486 CFWL_ComboBoxImp::~CFWL_ComboBoxImp() {} |
| 487 | 487 |
| 488 FWL_Error CFWL_ComboBoxImp::GetClassName(CFX_WideString& wsClass) const { | 488 FWL_Error CFWL_ComboBoxImp::GetClassName(CFX_WideString& wsClass) const { |
| 489 wsClass = FWL_CLASS_ComboBox; | 489 wsClass = FWL_CLASS_ComboBox; |
| 490 return FWL_Error::Succeeded; | 490 return FWL_Error::Succeeded; |
| 491 } | 491 } |
| 492 | 492 |
| 493 uint32_t CFWL_ComboBoxImp::GetClassID() const { | 493 FWL_Type CFWL_ComboBoxImp::GetClassID() const { |
| 494 return FWL_CLASSHASH_ComboBox; | 494 return FWL_Type::ComboBox; |
| 495 } | 495 } |
| 496 | 496 |
| 497 FWL_Error CFWL_ComboBoxImp::Initialize() { | 497 FWL_Error CFWL_ComboBoxImp::Initialize() { |
| 498 if (m_pWidgetMgr->IsFormDisabled()) | 498 if (m_pWidgetMgr->IsFormDisabled()) |
| 499 return DisForm_Initialize(); | 499 return DisForm_Initialize(); |
| 500 |
| 500 if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded) | 501 if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded) |
| 501 return FWL_Error::Indefinite; | 502 return FWL_Error::Indefinite; |
| 502 | 503 |
| 503 m_pDelegate = new CFWL_ComboBoxImpDelegate(this); | 504 m_pDelegate = new CFWL_ComboBoxImpDelegate(this); |
| 504 CFWL_WidgetImpProperties prop; | 505 CFWL_WidgetImpProperties prop; |
| 505 prop.m_pThemeProvider = m_pProperties->m_pThemeProvider; | 506 prop.m_pThemeProvider = m_pProperties->m_pThemeProvider; |
| 506 prop.m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; | 507 prop.m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; |
| 507 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListItemIconText) | 508 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListItemIconText) |
| 508 prop.m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; | 509 prop.m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; |
| 509 | 510 |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 m_pComboBox->ShowDropList(FALSE); | 1851 m_pComboBox->ShowDropList(FALSE); |
| 1851 } | 1852 } |
| 1852 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, | 1853 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, |
| 1853 FX_BOOL bSet) { | 1854 FX_BOOL bSet) { |
| 1854 if (!bSet) { | 1855 if (!bSet) { |
| 1855 if (pMsg->m_pSetFocus == NULL) { | 1856 if (pMsg->m_pSetFocus == NULL) { |
| 1856 m_pComboBox->ShowDropList(FALSE); | 1857 m_pComboBox->ShowDropList(FALSE); |
| 1857 } | 1858 } |
| 1858 } | 1859 } |
| 1859 } | 1860 } |
| OLD | NEW |