| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fwl/core/ifwl_datetimeedit.h" | 7 #include "xfa/fwl/core/ifwl_datetimeedit.h" |
| 8 | 8 |
| 9 #include "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
| 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
| 11 #include "xfa/fwl/core/ifwl_datetimepicker.h" | 11 #include "xfa/fwl/core/ifwl_datetimepicker.h" |
| 12 | 12 |
| 13 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const IFWL_App* app, | 13 IFWL_DateTimeEdit::IFWL_DateTimeEdit( |
| 14 const CFWL_WidgetImpProperties& properties, | 14 const IFWL_App* app, |
| 15 IFWL_Widget* pOuter) | 15 std::unique_ptr<CFWL_WidgetProperties> properties, |
| 16 : IFWL_Edit(app, properties, pOuter) {} | 16 IFWL_Widget* pOuter) |
| 17 : IFWL_Edit(app, std::move(properties), pOuter) {} |
| 17 | 18 |
| 18 void IFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) { | 19 void IFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) { |
| 19 if (m_pWidgetMgr->IsFormDisabled()) { | 20 if (m_pWidgetMgr->IsFormDisabled()) { |
| 20 DisForm_OnProcessMessage(pMessage); | 21 DisForm_OnProcessMessage(pMessage); |
| 21 return; | 22 return; |
| 22 } | 23 } |
| 23 | 24 |
| 24 CFWL_MessageType dwHashCode = pMessage->GetClassID(); | 25 CFWL_MessageType dwHashCode = pMessage->GetClassID(); |
| 25 if (dwHashCode == CFWL_MessageType::SetFocus || | 26 if (dwHashCode == CFWL_MessageType::SetFocus || |
| 26 dwHashCode == CFWL_MessageType::KillFocus) { | 27 dwHashCode == CFWL_MessageType::KillFocus) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 46 pDateTime->GetWidgetRect(rtInvalidate); | 47 pDateTime->GetWidgetRect(rtInvalidate); |
| 47 pDateTime->ShowMonthCalendar(false); | 48 pDateTime->ShowMonthCalendar(false); |
| 48 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); | 49 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); |
| 49 pDateTime->Repaint(&rtInvalidate); | 50 pDateTime->Repaint(&rtInvalidate); |
| 50 } | 51 } |
| 51 } | 52 } |
| 52 } | 53 } |
| 53 } | 54 } |
| 54 IFWL_Edit::OnProcessMessage(pMessage); | 55 IFWL_Edit::OnProcessMessage(pMessage); |
| 55 } | 56 } |
| OLD | NEW |