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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 DATEINFO* pDateInfo = m_arrDates[iDay - 1]; | 905 DATEINFO* pDateInfo = m_arrDates[iDay - 1]; |
906 if (!pDateInfo) | 906 if (!pDateInfo) |
907 return; | 907 return; |
908 rtDay = pDateInfo->rect; | 908 rtDay = pDateInfo->rect; |
909 } | 909 } |
910 | 910 |
911 void CFWL_MonthCalendar::OnProcessMessage(CFWL_Message* pMessage) { | 911 void CFWL_MonthCalendar::OnProcessMessage(CFWL_Message* pMessage) { |
912 if (!pMessage) | 912 if (!pMessage) |
913 return; | 913 return; |
914 | 914 |
915 CFWL_MessageType dwMsgCode = pMessage->GetClassID(); | 915 switch (pMessage->GetType()) { |
916 switch (dwMsgCode) { | 916 case CFWL_Message::Type::SetFocus: |
917 case CFWL_MessageType::SetFocus: | 917 case CFWL_Message::Type::KillFocus: |
918 case CFWL_MessageType::KillFocus: | |
919 GetOuter()->GetDelegate()->OnProcessMessage(pMessage); | 918 GetOuter()->GetDelegate()->OnProcessMessage(pMessage); |
920 break; | 919 break; |
921 case CFWL_MessageType::Key: | 920 case CFWL_Message::Type::Key: |
922 break; | 921 break; |
923 case CFWL_MessageType::Mouse: { | 922 case CFWL_Message::Type::Mouse: { |
924 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); | 923 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); |
925 switch (pMouse->m_dwCmd) { | 924 switch (pMouse->m_dwCmd) { |
926 case FWL_MouseCommand::LeftButtonDown: | 925 case FWL_MouseCommand::LeftButtonDown: |
927 OnLButtonDown(pMouse); | 926 OnLButtonDown(pMouse); |
928 break; | 927 break; |
929 case FWL_MouseCommand::LeftButtonUp: | 928 case FWL_MouseCommand::LeftButtonUp: |
930 OnLButtonUp(pMouse); | 929 OnLButtonUp(pMouse); |
931 break; | 930 break; |
932 case FWL_MouseCommand::Move: | 931 case FWL_MouseCommand::Move: |
933 OnMouseMove(pMouse); | 932 OnMouseMove(pMouse); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 uint32_t dwSt, | 1101 uint32_t dwSt, |
1103 CFX_RectF rc, | 1102 CFX_RectF rc, |
1104 CFX_WideString& wsday) | 1103 CFX_WideString& wsday) |
1105 : iDay(day), | 1104 : iDay(day), |
1106 iDayOfWeek(dayofweek), | 1105 iDayOfWeek(dayofweek), |
1107 dwStates(dwSt), | 1106 dwStates(dwSt), |
1108 rect(rc), | 1107 rect(rc), |
1109 wsDay(wsday) {} | 1108 wsDay(wsday) {} |
1110 | 1109 |
1111 CFWL_MonthCalendar::DATEINFO::~DATEINFO() {} | 1110 CFWL_MonthCalendar::DATEINFO::~DATEINFO() {} |
OLD | NEW |