OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #include "xfa/fxfa/app/cxfa_fflistboxdelegate.h" |
| 8 |
| 9 #include "xfa/fxfa/app/xfa_ffchoicelist.h" |
| 10 |
| 11 CXFA_FFListBoxDelegate::CXFA_FFListBoxDelegate( |
| 12 std::unique_ptr<IFWL_WidgetDelegate> pDelegate, |
| 13 CXFA_FFListBox* const pWidget) |
| 14 : CXFA_FFFieldDelegate(std::move(pDelegate), pWidget) {} |
| 15 |
| 16 CXFA_FFListBoxDelegate::~CXFA_FFListBoxDelegate() {} |
| 17 |
| 18 void CXFA_FFListBoxDelegate::OnProcessMessage(CFWL_Message* pMessage) { |
| 19 m_pDelegate->OnProcessMessage(pMessage); |
| 20 } |
| 21 |
| 22 void CXFA_FFListBoxDelegate::OnProcessEvent(CFWL_Event* pEvent) { |
| 23 CXFA_FFFieldDelegate::OnProcessEvent(pEvent); |
| 24 switch (pEvent->GetClassID()) { |
| 25 case CFWL_EventType::SelectChanged: { |
| 26 CFX_Int32Array arrSels; |
| 27 CXFA_FFListBox* widget = static_cast<CXFA_FFListBox*>(m_pWidget); |
| 28 widget->OnSelectChanged(widget->GetNormalWidget()->GetWidget(), arrSels); |
| 29 break; |
| 30 } |
| 31 default: |
| 32 break; |
| 33 } |
| 34 m_pDelegate->OnProcessEvent(pEvent); |
| 35 } |
| 36 |
| 37 void CXFA_FFListBoxDelegate::OnDrawWidget(CFX_Graphics* pGraphics, |
| 38 const CFX_Matrix* pMatrix) { |
| 39 m_pDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 40 } |
OLD | NEW |