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/fxfa/app/xfa_ffchoicelist.h" | 7 #include "xfa/fxfa/app/xfa_ffchoicelist.h" |
8 | 8 |
9 #include "xfa/fwl/core/cfwl_combobox.h" | 9 #include "xfa/fwl/core/cfwl_combobox.h" |
10 #include "xfa/fwl/core/cfwl_listbox.h" | 10 #include "xfa/fwl/core/cfwl_listbox.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return ((CFWL_ComboBox*)m_pNormalWidget)->EditCopy(wsCopy); | 432 return ((CFWL_ComboBox*)m_pNormalWidget)->EditCopy(wsCopy); |
433 } | 433 } |
434 bool CXFA_FFComboBox::Cut(CFX_WideString& wsCut) { | 434 bool CXFA_FFComboBox::Cut(CFX_WideString& wsCut) { |
435 return m_pDataAcc->IsChoiceListAllowTextEntry() && | 435 return m_pDataAcc->IsChoiceListAllowTextEntry() && |
436 ((CFWL_ComboBox*)m_pNormalWidget)->EditCut(wsCut); | 436 ((CFWL_ComboBox*)m_pNormalWidget)->EditCut(wsCut); |
437 } | 437 } |
438 bool CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) { | 438 bool CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) { |
439 return m_pDataAcc->IsChoiceListAllowTextEntry() && | 439 return m_pDataAcc->IsChoiceListAllowTextEntry() && |
440 ((CFWL_ComboBox*)m_pNormalWidget)->EditPaste(wsPaste); | 440 ((CFWL_ComboBox*)m_pNormalWidget)->EditPaste(wsPaste); |
441 } | 441 } |
442 bool CXFA_FFComboBox::SelectAll() { | 442 void CXFA_FFComboBox::SelectAll() { |
443 return ((CFWL_ComboBox*)m_pNormalWidget)->EditSelectAll(); | 443 ((CFWL_ComboBox*)m_pNormalWidget)->EditSelectAll(); |
444 } | 444 } |
445 bool CXFA_FFComboBox::Delete() { | 445 void CXFA_FFComboBox::Delete() { |
446 return ((CFWL_ComboBox*)m_pNormalWidget)->EditDelete(); | 446 ((CFWL_ComboBox*)m_pNormalWidget)->EditDelete(); |
447 } | 447 } |
448 bool CXFA_FFComboBox::DeSelect() { | 448 void CXFA_FFComboBox::DeSelect() { |
449 return ((CFWL_ComboBox*)m_pNormalWidget)->EditDeSelect(); | 449 ((CFWL_ComboBox*)m_pNormalWidget)->EditDeSelect(); |
450 } | 450 } |
451 void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) { | 451 void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) { |
452 if (bSelected) { | 452 if (bSelected) { |
453 ((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(nIndex); | 453 ((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(nIndex); |
454 } else { | 454 } else { |
455 ((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(-1); | 455 ((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(-1); |
456 } | 456 } |
457 m_pNormalWidget->Update(); | 457 m_pNormalWidget->Update(); |
458 AddInvalidateRect(); | 458 AddInvalidateRect(); |
459 } | 459 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 default: | 532 default: |
533 break; | 533 break; |
534 } | 534 } |
535 m_pOldDelegate->OnProcessEvent(pEvent); | 535 m_pOldDelegate->OnProcessEvent(pEvent); |
536 } | 536 } |
537 | 537 |
538 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, | 538 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, |
539 const CFX_Matrix* pMatrix) { | 539 const CFX_Matrix* pMatrix) { |
540 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 540 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
541 } | 541 } |
OLD | NEW |