| 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/basewidget/fwl_monthcalendarimp.h" | 7 #include "xfa/fwl/basewidget/fwl_monthcalendarimp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 const CFX_Matrix* pMatrix) { | 384 const CFX_Matrix* pMatrix) { |
| 385 CFWL_ThemeBackground params; | 385 CFWL_ThemeBackground params; |
| 386 params.m_pWidget = m_pInterface; | 386 params.m_pWidget = m_pInterface; |
| 387 params.m_iPart = CFWL_Part::DateInBK; | 387 params.m_iPart = CFWL_Part::DateInBK; |
| 388 params.m_pGraphics = pGraphics; | 388 params.m_pGraphics = pGraphics; |
| 389 if (pMatrix) { | 389 if (pMatrix) { |
| 390 params.m_matrix.Concat(*pMatrix); | 390 params.m_matrix.Concat(*pMatrix); |
| 391 } | 391 } |
| 392 int32_t iCount = m_arrDates.GetSize(); | 392 int32_t iCount = m_arrDates.GetSize(); |
| 393 for (int32_t j = 0; j < iCount; j++) { | 393 for (int32_t j = 0; j < iCount; j++) { |
| 394 FWL_DATEINFO* pDataInfo = (FWL_DATEINFO*)m_arrDates.GetAt(j); | 394 FWL_DATEINFO* pDataInfo = m_arrDates.GetAt(j); |
| 395 if (pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Selected) { | 395 if (pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Selected) { |
| 396 params.m_dwStates |= CFWL_PartState_Selected; | 396 params.m_dwStates |= CFWL_PartState_Selected; |
| 397 if (((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_NoTodayCircle) == | 397 if (((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_NoTodayCircle) == |
| 398 0) && | 398 0) && |
| 399 pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Flag) { | 399 pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Flag) { |
| 400 params.m_dwStates |= CFWL_PartState_Flagged; | 400 params.m_dwStates |= CFWL_PartState_Flagged; |
| 401 } | 401 } |
| 402 if (pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Focused) { | 402 if (pDataInfo->dwStates & FWL_ITEMSTATE_MCD_Focused) { |
| 403 params.m_dwStates |= CFWL_PartState_Focused; | 403 params.m_dwStates |= CFWL_PartState_Focused; |
| 404 } | 404 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 params.m_pWidget = m_pInterface; | 514 params.m_pWidget = m_pInterface; |
| 515 params.m_iPart = CFWL_Part::DatesIn; | 515 params.m_iPart = CFWL_Part::DatesIn; |
| 516 params.m_pGraphics = pGraphics; | 516 params.m_pGraphics = pGraphics; |
| 517 params.m_dwStates = CFWL_PartState_Normal; | 517 params.m_dwStates = CFWL_PartState_Normal; |
| 518 params.m_iTTOAlign = FDE_TTOALIGNMENT_Center; | 518 params.m_iTTOAlign = FDE_TTOALIGNMENT_Center; |
| 519 if (pMatrix) { | 519 if (pMatrix) { |
| 520 params.m_matrix.Concat(*pMatrix); | 520 params.m_matrix.Concat(*pMatrix); |
| 521 } | 521 } |
| 522 int32_t iCount = m_arrDates.GetSize(); | 522 int32_t iCount = m_arrDates.GetSize(); |
| 523 for (int32_t j = 0; j < iCount; j++) { | 523 for (int32_t j = 0; j < iCount; j++) { |
| 524 FWL_DATEINFO* pDataInfo = (FWL_DATEINFO*)m_arrDates.GetAt(j); | 524 FWL_DATEINFO* pDataInfo = m_arrDates.GetAt(j); |
| 525 params.m_wsText = pDataInfo->wsDay; | 525 params.m_wsText = pDataInfo->wsDay; |
| 526 params.m_rtPart = pDataInfo->rect; | 526 params.m_rtPart = pDataInfo->rect; |
| 527 params.m_dwStates = pDataInfo->dwStates; | 527 params.m_dwStates = pDataInfo->dwStates; |
| 528 if (j + 1 == m_iHovered) { | 528 if (j + 1 == m_iHovered) { |
| 529 params.m_dwStates |= CFWL_PartState_Hovered; | 529 params.m_dwStates |= CFWL_PartState_Hovered; |
| 530 } | 530 } |
| 531 params.m_dwTTOStyles = FDE_TTOSTYLE_SingleLine; | 531 params.m_dwTTOStyles = FDE_TTOSTYLE_SingleLine; |
| 532 pTheme->DrawText(¶ms); | 532 pTheme->DrawText(¶ms); |
| 533 } | 533 } |
| 534 } | 534 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 551 const CFX_Matrix* pMatrix) { | 551 const CFX_Matrix* pMatrix) { |
| 552 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_NoTodayCircle) { | 552 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_NoTodayCircle) { |
| 553 return; | 553 return; |
| 554 } | 554 } |
| 555 if (m_iMonth != m_iCurMonth || m_iYear != m_iCurYear) { | 555 if (m_iMonth != m_iCurMonth || m_iYear != m_iCurYear) { |
| 556 return; | 556 return; |
| 557 } | 557 } |
| 558 if (m_iDay < 1 || m_iDay > m_arrDates.GetSize()) { | 558 if (m_iDay < 1 || m_iDay > m_arrDates.GetSize()) { |
| 559 return; | 559 return; |
| 560 } | 560 } |
| 561 FWL_DATEINFO* pDate = (FWL_DATEINFO*)m_arrDates[m_iDay - 1]; | 561 FWL_DATEINFO* pDate = m_arrDates[m_iDay - 1]; |
| 562 if (!pDate) | 562 if (!pDate) |
| 563 return; | 563 return; |
| 564 CFWL_ThemeBackground params; | 564 CFWL_ThemeBackground params; |
| 565 params.m_pWidget = m_pInterface; | 565 params.m_pWidget = m_pInterface; |
| 566 params.m_iPart = CFWL_Part::DateInCircle; | 566 params.m_iPart = CFWL_Part::DateInCircle; |
| 567 params.m_pGraphics = pGraphics; | 567 params.m_pGraphics = pGraphics; |
| 568 params.m_rtPart = pDate->rect; | 568 params.m_rtPart = pDate->rect; |
| 569 params.m_dwStates = CFWL_PartState_Normal; | 569 params.m_dwStates = CFWL_PartState_Normal; |
| 570 if (pMatrix) { | 570 if (pMatrix) { |
| 571 params.m_matrix.Concat(*pMatrix); | 571 params.m_matrix.Concat(*pMatrix); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 } | 708 } |
| 709 CalDateItem(); | 709 CalDateItem(); |
| 710 } | 710 } |
| 711 void CFWL_MonthCalendarImp::CalDateItem() { | 711 void CFWL_MonthCalendarImp::CalDateItem() { |
| 712 FX_BOOL bNewWeek = FALSE; | 712 FX_BOOL bNewWeek = FALSE; |
| 713 int32_t iWeekOfMonth = 0; | 713 int32_t iWeekOfMonth = 0; |
| 714 FX_FLOAT fLeft = m_rtDates.left; | 714 FX_FLOAT fLeft = m_rtDates.left; |
| 715 FX_FLOAT fTop = m_rtDates.top; | 715 FX_FLOAT fTop = m_rtDates.top; |
| 716 int32_t iCount = m_arrDates.GetSize(); | 716 int32_t iCount = m_arrDates.GetSize(); |
| 717 for (int32_t i = 0; i < iCount; i++) { | 717 for (int32_t i = 0; i < iCount; i++) { |
| 718 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates.GetAt(i); | 718 FWL_DATEINFO* pDateInfo = m_arrDates.GetAt(i); |
| 719 if (bNewWeek) { | 719 if (bNewWeek) { |
| 720 iWeekOfMonth++; | 720 iWeekOfMonth++; |
| 721 bNewWeek = FALSE; | 721 bNewWeek = FALSE; |
| 722 } | 722 } |
| 723 pDateInfo->rect.Set( | 723 pDateInfo->rect.Set( |
| 724 fLeft + pDateInfo->iDayOfWeek * (m_szCell.x + (MONTHCAL_HMARGIN * 2)), | 724 fLeft + pDateInfo->iDayOfWeek * (m_szCell.x + (MONTHCAL_HMARGIN * 2)), |
| 725 fTop + iWeekOfMonth * (m_szCell.y + (MONTHCAL_VMARGIN * 2)), | 725 fTop + iWeekOfMonth * (m_szCell.y + (MONTHCAL_VMARGIN * 2)), |
| 726 m_szCell.x + (MONTHCAL_HMARGIN * 2), | 726 m_szCell.x + (MONTHCAL_HMARGIN * 2), |
| 727 m_szCell.y + (MONTHCAL_VMARGIN * 2)); | 727 m_szCell.y + (MONTHCAL_VMARGIN * 2)); |
| 728 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_WeekNumbers) { | 728 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_WeekNumbers) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 m_iYear = 1; | 844 m_iYear = 1; |
| 845 m_iCurYear = m_iYear; | 845 m_iCurYear = m_iYear; |
| 846 m_iCurMonth = m_iMonth; | 846 m_iCurMonth = m_iMonth; |
| 847 } | 847 } |
| 848 GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday); | 848 GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday); |
| 849 GetHeadText(m_iCurYear, m_iCurMonth, m_wsHead); | 849 GetHeadText(m_iCurYear, m_iCurMonth, m_wsHead); |
| 850 m_dtMin = DATE(1500, 12, 1); | 850 m_dtMin = DATE(1500, 12, 1); |
| 851 m_dtMax = DATE(2200, 1, 1); | 851 m_dtMax = DATE(2200, 1, 1); |
| 852 return TRUE; | 852 return TRUE; |
| 853 } | 853 } |
| 854 |
| 854 void CFWL_MonthCalendarImp::ClearDateItem() { | 855 void CFWL_MonthCalendarImp::ClearDateItem() { |
| 855 int32_t iCount = m_arrDates.GetSize(); | 856 for (int32_t i = 0; i < m_arrDates.GetSize(); i++) |
| 856 for (int32_t i = 0; i < iCount; i++) { | 857 delete m_arrDates.GetAt(i); |
| 857 FWL_DATEINFO* pData = (FWL_DATEINFO*)m_arrDates.GetAt(i); | 858 |
| 858 delete pData; | |
| 859 } | |
| 860 m_arrDates.RemoveAll(); | 859 m_arrDates.RemoveAll(); |
| 861 } | 860 } |
| 861 |
| 862 void CFWL_MonthCalendarImp::ReSetDateItem() { | 862 void CFWL_MonthCalendarImp::ReSetDateItem() { |
| 863 m_pDateTime->Set(m_iCurYear, m_iCurMonth, 1); | 863 m_pDateTime->Set(m_iCurYear, m_iCurMonth, 1); |
| 864 int32_t iDays = FX_DaysInMonth(m_iCurYear, m_iCurMonth); | 864 int32_t iDays = FX_DaysInMonth(m_iCurYear, m_iCurMonth); |
| 865 int32_t iDayOfWeek = m_pDateTime->GetDayOfWeek(); | 865 int32_t iDayOfWeek = m_pDateTime->GetDayOfWeek(); |
| 866 for (int32_t i = 0; i < iDays; i++) { | 866 for (int32_t i = 0; i < iDays; i++) { |
| 867 if (iDayOfWeek >= 7) { | 867 if (iDayOfWeek >= 7) { |
| 868 iDayOfWeek = 0; | 868 iDayOfWeek = 0; |
| 869 } | 869 } |
| 870 CFX_WideString wsDay; | 870 CFX_WideString wsDay; |
| 871 wsDay.Format(L"%d", i + 1); | 871 wsDay.Format(L"%d", i + 1); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 FX_BOOL CFWL_MonthCalendarImp::RemoveSelDay(int32_t iDay, FX_BOOL bAll) { | 927 FX_BOOL CFWL_MonthCalendarImp::RemoveSelDay(int32_t iDay, FX_BOOL bAll) { |
| 928 if (iDay == -1 && !bAll) { | 928 if (iDay == -1 && !bAll) { |
| 929 return FALSE; | 929 return FALSE; |
| 930 } | 930 } |
| 931 if (bAll) { | 931 if (bAll) { |
| 932 int32_t iCount = m_arrSelDays.GetSize(); | 932 int32_t iCount = m_arrSelDays.GetSize(); |
| 933 int32_t iDatesCount = m_arrDates.GetSize(); | 933 int32_t iDatesCount = m_arrDates.GetSize(); |
| 934 for (int32_t i = 0; i < iCount; i++) { | 934 for (int32_t i = 0; i < iCount; i++) { |
| 935 int32_t iSelDay = m_arrSelDays.GetAt(i); | 935 int32_t iSelDay = m_arrSelDays.GetAt(i); |
| 936 if (iSelDay <= iDatesCount) { | 936 if (iSelDay <= iDatesCount) { |
| 937 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates.GetAt(iSelDay - 1); | 937 FWL_DATEINFO* pDateInfo = m_arrDates.GetAt(iSelDay - 1); |
| 938 pDateInfo->dwStates &= ~FWL_ITEMSTATE_MCD_Selected; | 938 pDateInfo->dwStates &= ~FWL_ITEMSTATE_MCD_Selected; |
| 939 } | 939 } |
| 940 } | 940 } |
| 941 m_arrSelDays.RemoveAll(); | 941 m_arrSelDays.RemoveAll(); |
| 942 } else { | 942 } else { |
| 943 int32_t index = m_arrSelDays.Find(iDay); | 943 int32_t index = m_arrSelDays.Find(iDay); |
| 944 if (index == -1) { | 944 if (index == -1) { |
| 945 return FALSE; | 945 return FALSE; |
| 946 } | 946 } |
| 947 int32_t iSelDay = m_arrSelDays.GetAt(iDay); | 947 int32_t iSelDay = m_arrSelDays.GetAt(iDay); |
| 948 int32_t iDatesCount = m_arrDates.GetSize(); | 948 int32_t iDatesCount = m_arrDates.GetSize(); |
| 949 if (iSelDay <= iDatesCount) { | 949 if (iSelDay <= iDatesCount) { |
| 950 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates.GetAt(iSelDay - 1); | 950 FWL_DATEINFO* pDateInfo = m_arrDates.GetAt(iSelDay - 1); |
| 951 pDateInfo->dwStates &= ~FWL_ITEMSTATE_MCD_Selected; | 951 pDateInfo->dwStates &= ~FWL_ITEMSTATE_MCD_Selected; |
| 952 } | 952 } |
| 953 m_arrSelDays.RemoveAt(index); | 953 m_arrSelDays.RemoveAt(index); |
| 954 } | 954 } |
| 955 return TRUE; | 955 return TRUE; |
| 956 } | 956 } |
| 957 FX_BOOL CFWL_MonthCalendarImp::AddSelDay(int32_t iDay) { | 957 FX_BOOL CFWL_MonthCalendarImp::AddSelDay(int32_t iDay) { |
| 958 ASSERT(iDay > 0); | 958 ASSERT(iDay > 0); |
| 959 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_MultiSelect) { | 959 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_MultiSelect) { |
| 960 } else { | 960 } else { |
| 961 if (m_arrSelDays.Find(iDay) == -1) { | 961 if (m_arrSelDays.Find(iDay) == -1) { |
| 962 RemoveSelDay(-1, TRUE); | 962 RemoveSelDay(-1, TRUE); |
| 963 if (iDay <= m_arrDates.GetSize()) { | 963 if (iDay <= m_arrDates.GetSize()) { |
| 964 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates.GetAt(iDay - 1); | 964 FWL_DATEINFO* pDateInfo = m_arrDates.GetAt(iDay - 1); |
| 965 pDateInfo->dwStates |= FWL_ITEMSTATE_MCD_Selected; | 965 pDateInfo->dwStates |= FWL_ITEMSTATE_MCD_Selected; |
| 966 } | 966 } |
| 967 m_arrSelDays.Add(iDay); | 967 m_arrSelDays.Add(iDay); |
| 968 } | 968 } |
| 969 } | 969 } |
| 970 return TRUE; | 970 return TRUE; |
| 971 } | 971 } |
| 972 FX_BOOL CFWL_MonthCalendarImp::JumpToToday() { | 972 FX_BOOL CFWL_MonthCalendarImp::JumpToToday() { |
| 973 if (m_iYear != m_iCurYear || m_iMonth != m_iCurMonth) { | 973 if (m_iYear != m_iCurYear || m_iMonth != m_iCurMonth) { |
| 974 m_iCurYear = m_iYear; | 974 m_iCurYear = m_iYear; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 994 } | 994 } |
| 995 void CFWL_MonthCalendarImp::GetTodayText(int32_t iYear, | 995 void CFWL_MonthCalendarImp::GetTodayText(int32_t iYear, |
| 996 int32_t iMonth, | 996 int32_t iMonth, |
| 997 int32_t iDay, | 997 int32_t iDay, |
| 998 CFX_WideString& wsToday) { | 998 CFX_WideString& wsToday) { |
| 999 wsToday.Format(L", %d/%d/%d", iDay, iMonth, iYear); | 999 wsToday.Format(L", %d/%d/%d", iDay, iMonth, iYear); |
| 1000 } | 1000 } |
| 1001 int32_t CFWL_MonthCalendarImp::GetDayAtPoint(FX_FLOAT x, FX_FLOAT y) { | 1001 int32_t CFWL_MonthCalendarImp::GetDayAtPoint(FX_FLOAT x, FX_FLOAT y) { |
| 1002 int32_t iCount = m_arrDates.GetSize(); | 1002 int32_t iCount = m_arrDates.GetSize(); |
| 1003 for (int32_t i = 0; i < iCount; i++) { | 1003 for (int32_t i = 0; i < iCount; i++) { |
| 1004 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates.GetAt(i); | 1004 FWL_DATEINFO* pDateInfo = m_arrDates.GetAt(i); |
| 1005 if (pDateInfo->rect.Contains(x, y)) { | 1005 if (pDateInfo->rect.Contains(x, y)) { |
| 1006 return ++i; | 1006 return ++i; |
| 1007 } | 1007 } |
| 1008 } | 1008 } |
| 1009 return -1; | 1009 return -1; |
| 1010 } | 1010 } |
| 1011 FX_BOOL CFWL_MonthCalendarImp::GetDayRect(int32_t iDay, CFX_RectF& rtDay) { | 1011 FX_BOOL CFWL_MonthCalendarImp::GetDayRect(int32_t iDay, CFX_RectF& rtDay) { |
| 1012 if (iDay <= 0 || iDay > m_arrDates.GetSize()) { | 1012 if (iDay <= 0 || iDay > m_arrDates.GetSize()) { |
| 1013 return FALSE; | 1013 return FALSE; |
| 1014 } | 1014 } |
| 1015 FWL_DATEINFO* pDateInfo = (FWL_DATEINFO*)m_arrDates[iDay - 1]; | 1015 FWL_DATEINFO* pDateInfo = m_arrDates[iDay - 1]; |
| 1016 if (!pDateInfo) | 1016 if (!pDateInfo) |
| 1017 return FALSE; | 1017 return FALSE; |
| 1018 rtDay = pDateInfo->rect; | 1018 rtDay = pDateInfo->rect; |
| 1019 return TRUE; | 1019 return TRUE; |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 CFWL_MonthCalendarImpDelegate::CFWL_MonthCalendarImpDelegate( | 1022 CFWL_MonthCalendarImpDelegate::CFWL_MonthCalendarImpDelegate( |
| 1023 CFWL_MonthCalendarImp* pOwner) | 1023 CFWL_MonthCalendarImp* pOwner) |
| 1024 : m_pOwner(pOwner) {} | 1024 : m_pOwner(pOwner) {} |
| 1025 | 1025 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 } else { | 1107 } else { |
| 1108 int32_t iOldSel = 0; | 1108 int32_t iOldSel = 0; |
| 1109 if (m_pOwner->m_arrSelDays.GetSize() > 0) { | 1109 if (m_pOwner->m_arrSelDays.GetSize() > 0) { |
| 1110 iOldSel = m_pOwner->m_arrSelDays[0]; | 1110 iOldSel = m_pOwner->m_arrSelDays[0]; |
| 1111 } else { | 1111 } else { |
| 1112 return; | 1112 return; |
| 1113 } | 1113 } |
| 1114 int32_t iCurSel = m_pOwner->GetDayAtPoint(pMsg->m_fx, pMsg->m_fy); | 1114 int32_t iCurSel = m_pOwner->GetDayAtPoint(pMsg->m_fx, pMsg->m_fy); |
| 1115 FX_BOOL bSelChanged = iCurSel > 0 && iCurSel != iOldSel; | 1115 FX_BOOL bSelChanged = iCurSel > 0 && iCurSel != iOldSel; |
| 1116 if (bSelChanged) { | 1116 if (bSelChanged) { |
| 1117 FWL_DATEINFO* lpDatesInfo = | 1117 FWL_DATEINFO* lpDatesInfo = m_pOwner->m_arrDates.GetAt(iCurSel - 1); |
| 1118 (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iCurSel - 1); | |
| 1119 CFX_RectF rtInvalidate(lpDatesInfo->rect); | 1118 CFX_RectF rtInvalidate(lpDatesInfo->rect); |
| 1120 if (iOldSel > 0) { | 1119 if (iOldSel > 0) { |
| 1121 lpDatesInfo = (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iOldSel - 1); | 1120 lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1); |
| 1122 rtInvalidate.Union(lpDatesInfo->rect); | 1121 rtInvalidate.Union(lpDatesInfo->rect); |
| 1123 } | 1122 } |
| 1124 m_pOwner->AddSelDay(iCurSel); | 1123 m_pOwner->AddSelDay(iCurSel); |
| 1125 CFWL_EvtClick wmClick; | 1124 CFWL_EvtClick wmClick; |
| 1126 wmClick.m_pSrcTarget = m_pOwner->m_pInterface; | 1125 wmClick.m_pSrcTarget = m_pOwner->m_pInterface; |
| 1127 m_pOwner->DispatchEvent(&wmClick); | 1126 m_pOwner->DispatchEvent(&wmClick); |
| 1128 CFWL_EventMcdDateChanged wmDateSelected; | 1127 CFWL_EventMcdDateChanged wmDateSelected; |
| 1129 wmDateSelected.m_iStartDay = iCurSel; | 1128 wmDateSelected.m_iStartDay = iCurSel; |
| 1130 wmDateSelected.m_iEndDay = iCurSel; | 1129 wmDateSelected.m_iEndDay = iCurSel; |
| 1131 wmDateSelected.m_iOldMonth = m_pOwner->m_iCurMonth; | 1130 wmDateSelected.m_iOldMonth = m_pOwner->m_iCurMonth; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 if (m_pOwner->m_iHovered > 0) { | 1190 if (m_pOwner->m_iHovered > 0) { |
| 1192 CFX_RectF rtInvalidate; | 1191 CFX_RectF rtInvalidate; |
| 1193 rtInvalidate.Set(0, 0, 0, 0); | 1192 rtInvalidate.Set(0, 0, 0, 0); |
| 1194 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); | 1193 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); |
| 1195 m_pOwner->m_iHovered = -1; | 1194 m_pOwner->m_iHovered = -1; |
| 1196 if (!rtInvalidate.IsEmpty()) { | 1195 if (!rtInvalidate.IsEmpty()) { |
| 1197 m_pOwner->Repaint(&rtInvalidate); | 1196 m_pOwner->Repaint(&rtInvalidate); |
| 1198 } | 1197 } |
| 1199 } | 1198 } |
| 1200 } | 1199 } |
| OLD | NEW |