Index: xfa/fxfa/app/cxfa_fflistboxdelegate.cpp |
diff --git a/xfa/fxfa/app/cxfa_fflistboxdelegate.cpp b/xfa/fxfa/app/cxfa_fflistboxdelegate.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7d44eef009b77f1fe181d59d01d847c8dd4fd193 |
--- /dev/null |
+++ b/xfa/fxfa/app/cxfa_fflistboxdelegate.cpp |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 PDFium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
+ |
+#include "xfa/fxfa/app/cxfa_fflistboxdelegate.h" |
+ |
+#include "xfa/fxfa/app/xfa_ffchoicelist.h" |
+ |
+CXFA_FFListBoxDelegate::CXFA_FFListBoxDelegate( |
+ std::unique_ptr<IFWL_WidgetDelegate> pDelegate, |
+ CXFA_FFListBox* const pWidget) |
+ : CXFA_FFFieldDelegate(std::move(pDelegate), pWidget) {} |
+ |
+CXFA_FFListBoxDelegate::~CXFA_FFListBoxDelegate() {} |
+ |
+void CXFA_FFListBoxDelegate::OnProcessMessage(CFWL_Message* pMessage) { |
+ m_pDelegate->OnProcessMessage(pMessage); |
+} |
+ |
+void CXFA_FFListBoxDelegate::OnProcessEvent(CFWL_Event* pEvent) { |
+ CXFA_FFFieldDelegate::OnProcessEvent(pEvent); |
+ switch (pEvent->GetClassID()) { |
+ case CFWL_EventType::SelectChanged: { |
+ CFX_Int32Array arrSels; |
+ CXFA_FFListBox* widget = static_cast<CXFA_FFListBox*>(m_pWidget); |
+ widget->OnSelectChanged(widget->GetNormalWidget()->GetWidget(), arrSels); |
+ break; |
+ } |
+ default: |
+ break; |
+ } |
+ m_pDelegate->OnProcessEvent(pEvent); |
+} |
+ |
+void CXFA_FFListBoxDelegate::OnDrawWidget(CFX_Graphics* pGraphics, |
+ const CFX_Matrix* pMatrix) { |
+ m_pDelegate->OnDrawWidget(pGraphics, pMatrix); |
+} |