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_datetimepicker.h" | 7 #include "xfa/fwl/core/ifwl_datetimepicker.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_evteditchanged.h" | 10 #include "xfa/fwl/core/cfwl_evteditchanged.h" |
| 11 #include "xfa/fwl/core/cfwl_evtselectchanged.h" |
11 #include "xfa/fwl/core/cfwl_msgmouse.h" | 12 #include "xfa/fwl/core/cfwl_msgmouse.h" |
12 #include "xfa/fwl/core/cfwl_msgsetfocus.h" | 13 #include "xfa/fwl/core/cfwl_msgsetfocus.h" |
13 #include "xfa/fwl/core/cfwl_themebackground.h" | 14 #include "xfa/fwl/core/cfwl_themebackground.h" |
14 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 15 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
15 #include "xfa/fwl/core/fwl_noteimp.h" | 16 #include "xfa/fwl/core/fwl_noteimp.h" |
16 #include "xfa/fwl/core/ifwl_formproxy.h" | 17 #include "xfa/fwl/core/ifwl_formproxy.h" |
17 #include "xfa/fwl/core/ifwl_spinbutton.h" | 18 #include "xfa/fwl/core/ifwl_spinbutton.h" |
18 #include "xfa/fwl/core/ifwl_themeprovider.h" | 19 #include "xfa/fwl/core/ifwl_themeprovider.h" |
19 | 20 |
20 namespace { | 21 namespace { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 m_iYear = iYear; | 350 m_iYear = iYear; |
350 m_iMonth = iMonth; | 351 m_iMonth = iMonth; |
351 m_iDay = iDay; | 352 m_iDay = iDay; |
352 | 353 |
353 CFX_WideString wsText; | 354 CFX_WideString wsText; |
354 FormatDateString(m_iYear, m_iMonth, m_iDay, wsText); | 355 FormatDateString(m_iYear, m_iMonth, m_iDay, wsText); |
355 m_pEdit->SetText(wsText); | 356 m_pEdit->SetText(wsText); |
356 m_pEdit->Update(); | 357 m_pEdit->Update(); |
357 Repaint(&m_rtClient); | 358 Repaint(&m_rtClient); |
358 | 359 |
359 CFWL_Event_DtpSelectChanged ev; | 360 CFWL_EvtSelectChanged ev; |
360 ev.m_pSrcTarget = this; | 361 ev.m_pSrcTarget = this; |
361 ev.iYear = m_iYear; | 362 ev.iYear = m_iYear; |
362 ev.iMonth = m_iMonth; | 363 ev.iMonth = m_iMonth; |
363 ev.iDay = m_iDay; | 364 ev.iDay = m_iDay; |
364 DispatchEvent(&ev); | 365 DispatchEvent(&ev); |
365 } | 366 } |
366 | 367 |
367 void IFWL_DateTimePicker::InitProxyForm() { | 368 void IFWL_DateTimePicker::InitProxyForm() { |
368 if (m_pForm) | 369 if (m_pForm) |
369 return; | 370 return; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 return m_iCurDay; | 677 return m_iCurDay; |
677 } | 678 } |
678 | 679 |
679 int32_t IFWL_DateTimePicker::GetCurMonth(IFWL_Widget* pWidget) { | 680 int32_t IFWL_DateTimePicker::GetCurMonth(IFWL_Widget* pWidget) { |
680 return m_iCurMonth; | 681 return m_iCurMonth; |
681 } | 682 } |
682 | 683 |
683 int32_t IFWL_DateTimePicker::GetCurYear(IFWL_Widget* pWidget) { | 684 int32_t IFWL_DateTimePicker::GetCurYear(IFWL_Widget* pWidget) { |
684 return m_iCurYear; | 685 return m_iCurYear; |
685 } | 686 } |
OLD | NEW |