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 "xfa/fwl/core/cfwl_widgetmgr.h" | 9 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
10 #include "xfa/fwl/core/ifwl_datetimepicker.h" | 10 #include "xfa/fwl/core/ifwl_datetimepicker.h" |
11 | 11 |
12 // static | |
13 IFWL_DateTimeEdit* IFWL_DateTimeEdit::Create( | |
14 const CFWL_WidgetImpProperties& properties, | |
15 IFWL_Widget* pOuter) { | |
16 return new IFWL_DateTimeEdit(properties, pOuter); | |
17 } | |
18 | |
19 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties, | 12 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties, |
20 IFWL_Widget* pOuter) | 13 IFWL_Widget* pOuter) |
21 : IFWL_Edit(properties, pOuter) {} | 14 : IFWL_Edit(properties, pOuter) {} |
22 | 15 |
23 FWL_Error IFWL_DateTimeEdit::Initialize() { | 16 FWL_Error IFWL_DateTimeEdit::Initialize() { |
24 m_pDelegate = new CFWL_DateTimeEditImpDelegate(this); | 17 m_pDelegate = new CFWL_DateTimeEditImpDelegate(this); |
25 if (IFWL_Edit::Initialize() != FWL_Error::Succeeded) | 18 if (IFWL_Edit::Initialize() != FWL_Error::Succeeded) |
26 return FWL_Error::Indefinite; | 19 return FWL_Error::Indefinite; |
27 return FWL_Error::Succeeded; | 20 return FWL_Error::Succeeded; |
28 } | 21 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 pDateTime->GetWidgetRect(rtInvalidate); | 63 pDateTime->GetWidgetRect(rtInvalidate); |
71 pDateTime->ShowMonthCalendar(FALSE); | 64 pDateTime->ShowMonthCalendar(FALSE); |
72 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); | 65 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); |
73 pDateTime->Repaint(&rtInvalidate); | 66 pDateTime->Repaint(&rtInvalidate); |
74 } | 67 } |
75 } | 68 } |
76 } | 69 } |
77 } | 70 } |
78 CFWL_EditImpDelegate::OnProcessMessage(pMessage); | 71 CFWL_EditImpDelegate::OnProcessMessage(pMessage); |
79 } | 72 } |
OLD | NEW |