Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: xfa/fxfa/app/cxfa_fflistboxdelegate.cpp

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/cxfa_fflistboxdelegate.h ('k') | xfa/fxfa/app/cxfa_ffnumericeditdelegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/cxfa_fflistboxdelegate.h ('k') | xfa/fxfa/app/cxfa_ffnumericeditdelegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698