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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 int32_t IFWL_ComboBox::GetEditLimit() { | 63 int32_t IFWL_ComboBox::GetEditLimit() { |
64 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->GetEditLimit(); | 64 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->GetEditLimit(); |
65 } | 65 } |
66 FWL_Error IFWL_ComboBox::SetEditLimit(int32_t nLimit) { | 66 FWL_Error IFWL_ComboBox::SetEditLimit(int32_t nLimit) { |
67 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->SetEditLimit(nLimit); | 67 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->SetEditLimit(nLimit); |
68 } | 68 } |
69 FWL_Error IFWL_ComboBox::EditDoClipboard(int32_t iCmd) { | 69 FWL_Error IFWL_ComboBox::EditDoClipboard(int32_t iCmd) { |
70 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditDoClipboard(iCmd); | 70 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditDoClipboard(iCmd); |
71 } | 71 } |
72 FX_BOOL IFWL_ComboBox::EditRedo(const CFX_ByteStringC& bsRecord) { | 72 FX_BOOL IFWL_ComboBox::EditRedo(const IFDE_TxtEdtDoRecord* pRecord) { |
73 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditRedo(bsRecord); | 73 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditRedo(pRecord); |
74 } | 74 } |
75 FX_BOOL IFWL_ComboBox::EditUndo(const CFX_ByteStringC& bsRecord) { | 75 FX_BOOL IFWL_ComboBox::EditUndo(const IFDE_TxtEdtDoRecord* pRecord) { |
76 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditUndo(bsRecord); | 76 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->EditUndo(pRecord); |
77 } | 77 } |
78 IFWL_ListBox* IFWL_ComboBox::GetListBoxt() { | 78 IFWL_ListBox* IFWL_ComboBox::GetListBoxt() { |
79 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->GetListBoxt(); | 79 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->GetListBoxt(); |
80 } | 80 } |
81 FX_BOOL IFWL_ComboBox::AfterFocusShowDropList() { | 81 FX_BOOL IFWL_ComboBox::AfterFocusShowDropList() { |
82 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->AfterFocusShowDropList(); | 82 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->AfterFocusShowDropList(); |
83 } | 83 } |
84 FWL_Error IFWL_ComboBox::OpenDropDownList(FX_BOOL bActivate) { | 84 FWL_Error IFWL_ComboBox::OpenDropDownList(FX_BOOL bActivate) { |
85 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->OpenDropDownList(bActivate); | 85 return static_cast<CFWL_ComboBoxImp*>(GetImpl())->OpenDropDownList(bActivate); |
86 } | 86 } |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 FWL_Error CFWL_ComboBoxImp::SetEditLimit(int32_t nLimit) { | 782 FWL_Error CFWL_ComboBoxImp::SetEditLimit(int32_t nLimit) { |
783 if (!m_pEdit) | 783 if (!m_pEdit) |
784 return FWL_Error::Indefinite; | 784 return FWL_Error::Indefinite; |
785 return m_pEdit->SetLimit(nLimit); | 785 return m_pEdit->SetLimit(nLimit); |
786 } | 786 } |
787 FWL_Error CFWL_ComboBoxImp::EditDoClipboard(int32_t iCmd) { | 787 FWL_Error CFWL_ComboBoxImp::EditDoClipboard(int32_t iCmd) { |
788 if (!m_pEdit) | 788 if (!m_pEdit) |
789 return FWL_Error::Indefinite; | 789 return FWL_Error::Indefinite; |
790 return m_pEdit->DoClipboard(iCmd); | 790 return m_pEdit->DoClipboard(iCmd); |
791 } | 791 } |
792 FX_BOOL CFWL_ComboBoxImp::EditRedo(const CFX_ByteStringC& bsRecord) { | 792 |
793 if (!m_pEdit) | 793 FX_BOOL CFWL_ComboBoxImp::EditRedo(const IFDE_TxtEdtDoRecord* pRecord) { |
794 return FALSE; | 794 return m_pEdit && m_pEdit->Redo(pRecord); |
795 return m_pEdit->Redo(bsRecord); | |
796 } | 795 } |
797 FX_BOOL CFWL_ComboBoxImp::EditUndo(const CFX_ByteStringC& bsRecord) { | 796 |
798 if (!m_pEdit) | 797 FX_BOOL CFWL_ComboBoxImp::EditUndo(const IFDE_TxtEdtDoRecord* pRecord) { |
799 return FALSE; | 798 return m_pEdit && m_pEdit->Undo(pRecord); |
800 return m_pEdit->Undo(bsRecord); | |
801 } | 799 } |
| 800 |
802 IFWL_ListBox* CFWL_ComboBoxImp::GetListBoxt() { | 801 IFWL_ListBox* CFWL_ComboBoxImp::GetListBoxt() { |
803 return m_pListBox.get(); | 802 return m_pListBox.get(); |
804 } | 803 } |
805 FX_BOOL CFWL_ComboBoxImp::AfterFocusShowDropList() { | 804 FX_BOOL CFWL_ComboBoxImp::AfterFocusShowDropList() { |
806 if (!m_bNeedShowList) { | 805 if (!m_bNeedShowList) { |
807 return FALSE; | 806 return FALSE; |
808 } | 807 } |
809 if (m_pEdit) { | 808 if (m_pEdit) { |
810 MatchEditText(); | 809 MatchEditText(); |
811 } | 810 } |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 m_pComboBox->ShowDropList(FALSE); | 1850 m_pComboBox->ShowDropList(FALSE); |
1852 } | 1851 } |
1853 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, | 1852 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, |
1854 FX_BOOL bSet) { | 1853 FX_BOOL bSet) { |
1855 if (!bSet) { | 1854 if (!bSet) { |
1856 if (pMsg->m_pSetFocus == NULL) { | 1855 if (pMsg->m_pSetFocus == NULL) { |
1857 m_pComboBox->ShowDropList(FALSE); | 1856 m_pComboBox->ShowDropList(FALSE); |
1858 } | 1857 } |
1859 } | 1858 } |
1860 } | 1859 } |
OLD | NEW |