| 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 "../../include/pdfwindow/PDFWindow.h" | 7 #include "../../include/pdfwindow/PDFWindow.h" |
| 8 #include "../../include/pdfwindow/PWL_Wnd.h" | 8 #include "../../include/pdfwindow/PWL_Wnd.h" |
| 9 #include "../../include/pdfwindow/PWL_EditCtrl.h" | 9 #include "../../include/pdfwindow/PWL_EditCtrl.h" |
| 10 #include "../../include/pdfwindow/PWL_Edit.h" | 10 #include "../../include/pdfwindow/PWL_Edit.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 FX_INT32 CPWL_ComboBox::GetSelect() const | 259 FX_INT32 CPWL_ComboBox::GetSelect() const |
| 260 { | 260 { |
| 261 return m_nSelectItem; | 261 return m_nSelectItem; |
| 262 } | 262 } |
| 263 | 263 |
| 264 void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex) | 264 void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex) |
| 265 { | 265 { |
| 266 if (m_pList) | 266 if (m_pList) |
| 267 m_pList->Select(nItemIndex); | 267 m_pList->Select(nItemIndex); |
| 268 | 268 |
| 269 » m_pEdit->SetText(m_pList->GetText()); | 269 » m_pEdit->SetText(m_pList->GetText().c_str()); |
| 270 | 270 |
| 271 m_nSelectItem = nItemIndex; | 271 m_nSelectItem = nItemIndex; |
| 272 } | 272 } |
| 273 | 273 |
| 274 void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar) | 274 void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar) |
| 275 { | 275 { |
| 276 if (m_pEdit) | 276 if (m_pEdit) |
| 277 { | 277 { |
| 278 m_pEdit->SetSel(nStartChar,nEndChar); | 278 m_pEdit->SetSel(nStartChar,nEndChar); |
| 279 } | 279 } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 | 667 |
| 668 FX_BOOL CPWL_ComboBox::IsPopup() const | 668 FX_BOOL CPWL_ComboBox::IsPopup() const |
| 669 { | 669 { |
| 670 return m_bPopup; | 670 return m_bPopup; |
| 671 } | 671 } |
| 672 | 672 |
| 673 void CPWL_ComboBox::SetSelectText() | 673 void CPWL_ComboBox::SetSelectText() |
| 674 { | 674 { |
| 675 CFX_WideString swText = m_pList->GetText(); | 675 CFX_WideString swText = m_pList->GetText(); |
| 676 m_pEdit->SelectAll(); | 676 m_pEdit->SelectAll(); |
| 677 » m_pEdit->ReplaceSel(m_pList->GetText()); | 677 » m_pEdit->ReplaceSel(m_pList->GetText().c_str()); |
| 678 m_pEdit->SelectAll(); | 678 m_pEdit->SelectAll(); |
| 679 | 679 |
| 680 m_nSelectItem = m_pList->GetCurSel(); | 680 m_nSelectItem = m_pList->GetCurSel(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 FX_BOOL CPWL_ComboBox::IsModified() const | 683 FX_BOOL CPWL_ComboBox::IsModified() const |
| 684 { | 684 { |
| 685 return m_pEdit->IsModified(); | 685 return m_pEdit->IsModified(); |
| 686 } | 686 } |
| 687 | 687 |
| 688 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) | 688 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) |
| 689 { | 689 { |
| 690 m_pFillerNotify = pNotify; | 690 m_pFillerNotify = pNotify; |
| 691 | 691 |
| 692 if (m_pEdit) | 692 if (m_pEdit) |
| 693 m_pEdit->SetFillerNotify(pNotify); | 693 m_pEdit->SetFillerNotify(pNotify); |
| 694 | 694 |
| 695 if (m_pList) | 695 if (m_pList) |
| 696 m_pList->SetFillerNotify(pNotify); | 696 m_pList->SetFillerNotify(pNotify); |
| 697 } | 697 } |
| 698 | 698 |
| OLD | NEW |