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_datetimecalendar.h" | 7 #include "xfa/fwl/core/ifwl_datetimecalendar.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 #include "xfa/fwl/core/ifwl_formproxy.h" | 11 #include "xfa/fwl/core/ifwl_formproxy.h" |
12 | 12 |
13 // static | |
14 IFWL_DateTimeCalendar* IFWL_DateTimeCalendar::Create( | |
15 const CFWL_WidgetImpProperties& properties, | |
16 IFWL_Widget* pOuter) { | |
17 return new IFWL_DateTimeCalendar(properties, pOuter); | |
18 } | |
19 | |
20 IFWL_DateTimeCalendar::IFWL_DateTimeCalendar( | 13 IFWL_DateTimeCalendar::IFWL_DateTimeCalendar( |
21 const CFWL_WidgetImpProperties& properties, | 14 const CFWL_WidgetImpProperties& properties, |
22 IFWL_Widget* pOuter) | 15 IFWL_Widget* pOuter) |
23 : IFWL_MonthCalendar(properties, pOuter) {} | 16 : IFWL_MonthCalendar(properties, pOuter) {} |
24 | 17 |
25 FWL_Error IFWL_DateTimeCalendar::Initialize() { | 18 FWL_Error IFWL_DateTimeCalendar::Initialize() { |
26 if (IFWL_MonthCalendar::Initialize() != FWL_Error::Succeeded) | 19 if (IFWL_MonthCalendar::Initialize() != FWL_Error::Succeeded) |
27 return FWL_Error::Indefinite; | 20 return FWL_Error::Indefinite; |
28 delete m_pDelegate; | 21 delete m_pDelegate; |
29 m_pDelegate = new CFWL_DateTimeCalendarImpDelegate(this); | 22 m_pDelegate = new CFWL_DateTimeCalendarImpDelegate(this); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 rtInvalidate.Union(lpDatesInfo->rect); | 206 rtInvalidate.Union(lpDatesInfo->rect); |
214 } | 207 } |
215 m_pOwner->AddSelDay(iCurSel); | 208 m_pOwner->AddSelDay(iCurSel); |
216 IFWL_DateTimePicker* pDateTime = | 209 IFWL_DateTimePicker* pDateTime = |
217 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); | 210 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); |
218 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, | 211 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, |
219 iCurSel); | 212 iCurSel); |
220 pDateTime->ShowMonthCalendar(FALSE); | 213 pDateTime->ShowMonthCalendar(FALSE); |
221 } | 214 } |
222 } | 215 } |
OLD | NEW |