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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag)) | 566 if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag)) |
567 { | 567 { |
568 if (bExit) return FALSE; | 568 if (bExit) return FALSE; |
569 SetSelectText(); | 569 SetSelectText(); |
570 } | 570 } |
571 } | 571 } |
572 return TRUE; | 572 return TRUE; |
573 } | 573 } |
574 | 574 |
575 if (HasFlag(PCBS_ALLOWCUSTOMTEXT)) | 575 if (HasFlag(PCBS_ALLOWCUSTOMTEXT)) |
576 » » return m_pEdit->OnKeyDown(nChar,nFlag); | 576 return m_pEdit->OnKeyDown(nChar,nFlag); |
577 » else | 577 |
578 » » return FALSE; | 578 return FALSE; |
579 } | 579 } |
580 | 580 |
581 FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) | 581 FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) |
582 { | 582 { |
583 » if (!m_pList) return FALSE; | 583 » if (!m_pList) |
584 » if (!m_pEdit) return FALSE; | 584 return FALSE; |
| 585 |
| 586 » if (!m_pEdit) |
| 587 return FALSE; |
585 | 588 |
586 m_nSelectItem = -1; | 589 m_nSelectItem = -1; |
| 590 if (HasFlag(PCBS_ALLOWCUSTOMTEXT)) |
| 591 return m_pEdit->OnChar(nChar,nFlag); |
| 592 |
587 FX_BOOL bExit = FALSE; | 593 FX_BOOL bExit = FALSE; |
588 | 594 return m_pList->OnCharWithExit(nChar,bExit,nFlag) ? bExit : FALSE; |
589 » if (HasFlag(PCBS_ALLOWCUSTOMTEXT)) | |
590 » { | |
591 » » return m_pEdit->OnChar(nChar,nFlag); | |
592 » } | |
593 » else | |
594 » { | |
595 » » if (m_pList->OnCharWithExit(nChar,bExit,nFlag)) | |
596 » » { | |
597 » » » return bExit; | |
598 » » } | |
599 » » else | |
600 » » » return FALSE; | |
601 » } | |
602 } | 595 } |
603 | 596 |
604 void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
tr_t lParam) | 597 void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
tr_t lParam) |
605 { | 598 { |
606 switch (msg) | 599 switch (msg) |
607 { | 600 { |
608 case PNM_LBUTTONDOWN: | 601 case PNM_LBUTTONDOWN: |
609 if (pWnd == m_pButton) | 602 if (pWnd == m_pButton) |
610 { | 603 { |
611 SetPopup(!m_bPopup); | 604 SetPopup(!m_bPopup); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 { | 646 { |
654 m_pFillerNotify = pNotify; | 647 m_pFillerNotify = pNotify; |
655 | 648 |
656 if (m_pEdit) | 649 if (m_pEdit) |
657 m_pEdit->SetFillerNotify(pNotify); | 650 m_pEdit->SetFillerNotify(pNotify); |
658 | 651 |
659 if (m_pList) | 652 if (m_pList) |
660 m_pList->SetFillerNotify(pNotify); | 653 m_pList->SetFillerNotify(pNotify); |
661 } | 654 } |
662 | 655 |
OLD | NEW |