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/cfwl_monthcalendar.h" | 7 #include "xfa/fwl/core/cfwl_monthcalendar.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 if (m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy)) | 989 if (m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy)) |
990 return; | 990 return; |
991 | 991 |
992 int32_t iOldSel = 0; | 992 int32_t iOldSel = 0; |
993 if (m_arrSelDays.GetSize() > 0) | 993 if (m_arrSelDays.GetSize() > 0) |
994 iOldSel = m_arrSelDays[0]; | 994 iOldSel = m_arrSelDays[0]; |
995 | 995 |
996 int32_t iCurSel = GetDayAtPoint(pMsg->m_fx, pMsg->m_fy); | 996 int32_t iCurSel = GetDayAtPoint(pMsg->m_fx, pMsg->m_fy); |
997 CFX_RectF rt; | 997 CFX_RectF rt; |
998 CFWL_DateTimePicker* pIPicker = static_cast<CFWL_DateTimePicker*>(m_pOuter); | 998 CFWL_DateTimePicker* pIPicker = static_cast<CFWL_DateTimePicker*>(m_pOuter); |
999 pIPicker->GetFormProxy()->GetWidgetRect(rt); | 999 pIPicker->GetFormProxy()->GetWidgetRect(rt, false); |
1000 rt.Set(0, 0, rt.width, rt.height); | 1000 rt.Set(0, 0, rt.width, rt.height); |
1001 if (iCurSel > 0) { | 1001 if (iCurSel > 0) { |
1002 DATEINFO* lpDatesInfo = m_arrDates.GetAt(iCurSel - 1); | 1002 DATEINFO* lpDatesInfo = m_arrDates.GetAt(iCurSel - 1); |
1003 CFX_RectF rtInvalidate(lpDatesInfo->rect); | 1003 CFX_RectF rtInvalidate(lpDatesInfo->rect); |
1004 if (iOldSel > 0 && iOldSel <= m_arrDates.GetSize()) { | 1004 if (iOldSel > 0 && iOldSel <= m_arrDates.GetSize()) { |
1005 lpDatesInfo = m_arrDates.GetAt(iOldSel - 1); | 1005 lpDatesInfo = m_arrDates.GetAt(iOldSel - 1); |
1006 rtInvalidate.Union(lpDatesInfo->rect); | 1006 rtInvalidate.Union(lpDatesInfo->rect); |
1007 } | 1007 } |
1008 AddSelDay(iCurSel); | 1008 AddSelDay(iCurSel); |
1009 if (!m_pOuter) | 1009 if (!m_pOuter) |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 uint32_t dwSt, | 1102 uint32_t dwSt, |
1103 CFX_RectF rc, | 1103 CFX_RectF rc, |
1104 CFX_WideString& wsday) | 1104 CFX_WideString& wsday) |
1105 : iDay(day), | 1105 : iDay(day), |
1106 iDayOfWeek(dayofweek), | 1106 iDayOfWeek(dayofweek), |
1107 dwStates(dwSt), | 1107 dwStates(dwSt), |
1108 rect(rc), | 1108 rect(rc), |
1109 wsDay(wsday) {} | 1109 wsDay(wsday) {} |
1110 | 1110 |
1111 CFWL_MonthCalendar::DATEINFO::~DATEINFO() {} | 1111 CFWL_MonthCalendar::DATEINFO::~DATEINFO() {} |
OLD | NEW |