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

Side by Side Diff: xfa/fxfa/app/cxfa_ffdatetimeeditdelegate.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_ffdatetimeeditdelegate.h ('k') | xfa/fxfa/app/cxfa_fffielddelegate.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_ffdatetimeeditdelegate.h"
8
9 #include "xfa/fwl/core/cfwl_event.h"
10 #include "xfa/fwl/core/ifwl_datetimepicker.h"
11 #include "xfa/fxfa/app/xfa_fftextedit.h"
12
13 CXFA_FFDateTimeEditDelegate::CXFA_FFDateTimeEditDelegate(
14 std::unique_ptr<IFWL_WidgetDelegate> pDelegate,
15 CXFA_FFDateTimeEdit* const pWidget)
16 : CXFA_FFTextEditDelegate(std::move(pDelegate), pWidget) {}
17
18 CXFA_FFDateTimeEditDelegate::~CXFA_FFDateTimeEditDelegate() {}
19
20 void CXFA_FFDateTimeEditDelegate::OnProcessEvent(CFWL_Event* pEvent) {
21 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) {
22 CXFA_FFDateTimeEdit* widget = static_cast<CXFA_FFDateTimeEdit*>(m_pWidget);
23 CFWL_Event_DtpSelectChanged* event =
24 static_cast<CFWL_Event_DtpSelectChanged*>(pEvent);
25
26 widget->OnSelectChanged(widget->GetNormalWidget()->GetWidget(),
27 event->iYear, event->iMonth, event->iDay);
28 return;
29 }
30 CXFA_FFTextEditDelegate::OnProcessEvent(pEvent);
31 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/cxfa_ffdatetimeeditdelegate.h ('k') | xfa/fxfa/app/cxfa_fffielddelegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698