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 "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 #include "xfa/fwl/core/ifwl_formproxy.h" | 12 #include "xfa/fwl/core/ifwl_formproxy.h" |
13 | 13 |
14 IFWL_DateTimeCalendar::IFWL_DateTimeCalendar( | 14 IFWL_DateTimeCalendar::IFWL_DateTimeCalendar( |
15 const IFWL_App* app, | 15 const IFWL_App* app, |
16 const CFWL_WidgetImpProperties& properties, | 16 std::unique_ptr<CFWL_WidgetProperties> properties, |
17 IFWL_Widget* pOuter) | 17 IFWL_Widget* pOuter) |
18 : IFWL_MonthCalendar(app, properties, pOuter), m_bFlag(false) {} | 18 : IFWL_MonthCalendar(app, std::move(properties), pOuter), m_bFlag(false) {} |
19 | 19 |
20 void IFWL_DateTimeCalendar::OnProcessMessage(CFWL_Message* pMessage) { | 20 void IFWL_DateTimeCalendar::OnProcessMessage(CFWL_Message* pMessage) { |
21 CFWL_MessageType dwCode = pMessage->GetClassID(); | 21 CFWL_MessageType dwCode = pMessage->GetClassID(); |
22 if (dwCode == CFWL_MessageType::SetFocus || | 22 if (dwCode == CFWL_MessageType::SetFocus || |
23 dwCode == CFWL_MessageType::KillFocus) { | 23 dwCode == CFWL_MessageType::KillFocus) { |
24 IFWL_Widget* pOuter = GetOuter(); | 24 IFWL_Widget* pOuter = GetOuter(); |
25 pOuter->GetDelegate()->OnProcessMessage(pMessage); | 25 pOuter->GetDelegate()->OnProcessMessage(pMessage); |
26 return; | 26 return; |
27 } | 27 } |
28 if (dwCode == CFWL_MessageType::Mouse) { | 28 if (dwCode == CFWL_MessageType::Mouse) { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 lpDatesInfo = m_arrDates.GetAt(iOldSel - 1); | 175 lpDatesInfo = m_arrDates.GetAt(iOldSel - 1); |
176 rtInvalidate.Union(lpDatesInfo->rect); | 176 rtInvalidate.Union(lpDatesInfo->rect); |
177 } | 177 } |
178 AddSelDay(iCurSel); | 178 AddSelDay(iCurSel); |
179 IFWL_DateTimePicker* pDateTime = | 179 IFWL_DateTimePicker* pDateTime = |
180 static_cast<IFWL_DateTimePicker*>(m_pOuter); | 180 static_cast<IFWL_DateTimePicker*>(m_pOuter); |
181 pDateTime->ProcessSelChanged(m_iCurYear, m_iCurMonth, iCurSel); | 181 pDateTime->ProcessSelChanged(m_iCurYear, m_iCurMonth, iCurSel); |
182 pDateTime->ShowMonthCalendar(false); | 182 pDateTime->ShowMonthCalendar(false); |
183 } | 183 } |
184 } | 184 } |
OLD | NEW |