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 "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
10 #include "xfa/fwl/core/cfwl_app.h" | 10 #include "xfa/fwl/cfwl_app.h" |
11 #include "xfa/fwl/core/cfwl_combobox.h" | 11 #include "xfa/fwl/cfwl_combobox.h" |
12 #include "xfa/fwl/core/cfwl_edit.h" | 12 #include "xfa/fwl/cfwl_edit.h" |
13 #include "xfa/fwl/core/cfwl_evtselectchanged.h" | 13 #include "xfa/fwl/cfwl_eventselectchanged.h" |
14 #include "xfa/fwl/core/cfwl_listbox.h" | 14 #include "xfa/fwl/cfwl_listbox.h" |
15 #include "xfa/fwl/core/cfwl_notedriver.h" | 15 #include "xfa/fwl/cfwl_notedriver.h" |
16 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 16 #include "xfa/fwl/cfwl_widgetproperties.h" |
17 #include "xfa/fxfa/app/xfa_fffield.h" | 17 #include "xfa/fxfa/app/xfa_fffield.h" |
18 #include "xfa/fxfa/app/xfa_fwladapter.h" | 18 #include "xfa/fxfa/app/xfa_fwladapter.h" |
19 #include "xfa/fxfa/cxfa_eventparam.h" | 19 #include "xfa/fxfa/cxfa_eventparam.h" |
20 #include "xfa/fxfa/xfa_ffdoc.h" | 20 #include "xfa/fxfa/xfa_ffdoc.h" |
21 #include "xfa/fxfa/xfa_ffdocview.h" | 21 #include "xfa/fxfa/xfa_ffdocview.h" |
22 #include "xfa/fxfa/xfa_ffpageview.h" | 22 #include "xfa/fxfa/xfa_ffpageview.h" |
23 #include "xfa/fxfa/xfa_ffwidget.h" | 23 #include "xfa/fxfa/xfa_ffwidget.h" |
24 | 24 |
25 CXFA_FFListBox::CXFA_FFListBox(CXFA_FFPageView* pPageView, | 25 CXFA_FFListBox::CXFA_FFListBox(CXFA_FFPageView* pPageView, |
26 CXFA_WidgetAcc* pDataAcc) | 26 CXFA_WidgetAcc* pDataAcc) |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 } | 501 } |
502 | 502 |
503 void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { | 503 void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { |
504 m_pOldDelegate->OnProcessMessage(pMessage); | 504 m_pOldDelegate->OnProcessMessage(pMessage); |
505 } | 505 } |
506 | 506 |
507 void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { | 507 void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { |
508 CXFA_FFField::OnProcessEvent(pEvent); | 508 CXFA_FFField::OnProcessEvent(pEvent); |
509 switch (pEvent->GetType()) { | 509 switch (pEvent->GetType()) { |
510 case CFWL_Event::Type::SelectChanged: { | 510 case CFWL_Event::Type::SelectChanged: { |
511 CFWL_EvtSelectChanged* postEvent = | 511 CFWL_EventSelectChanged* postEvent = |
512 static_cast<CFWL_EvtSelectChanged*>(pEvent); | 512 static_cast<CFWL_EventSelectChanged*>(pEvent); |
513 OnSelectChanged(m_pNormalWidget, postEvent->bLButtonUp); | 513 OnSelectChanged(m_pNormalWidget, postEvent->bLButtonUp); |
514 break; | 514 break; |
515 } | 515 } |
516 case CFWL_Event::Type::EditChanged: { | 516 case CFWL_Event::Type::EditChanged: { |
517 CFX_WideString wsChanged; | 517 CFX_WideString wsChanged; |
518 OnTextChanged(m_pNormalWidget, wsChanged); | 518 OnTextChanged(m_pNormalWidget, wsChanged); |
519 break; | 519 break; |
520 } | 520 } |
521 case CFWL_Event::Type::PreDropDown: { | 521 case CFWL_Event::Type::PreDropDown: { |
522 OnPreOpen(m_pNormalWidget); | 522 OnPreOpen(m_pNormalWidget); |
523 break; | 523 break; |
524 } | 524 } |
525 case CFWL_Event::Type::PostDropDown: { | 525 case CFWL_Event::Type::PostDropDown: { |
526 OnPostOpen(m_pNormalWidget); | 526 OnPostOpen(m_pNormalWidget); |
527 break; | 527 break; |
528 } | 528 } |
529 default: | 529 default: |
530 break; | 530 break; |
531 } | 531 } |
532 m_pOldDelegate->OnProcessEvent(pEvent); | 532 m_pOldDelegate->OnProcessEvent(pEvent); |
533 } | 533 } |
534 | 534 |
535 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, | 535 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, |
536 const CFX_Matrix* pMatrix) { | 536 const CFX_Matrix* pMatrix) { |
537 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 537 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
538 } | 538 } |
OLD | NEW |