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_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 } |
OLD | NEW |