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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 : CFWL_MonthCalendarImpDelegate(pOwner), m_pOwner(pOwner) { | 24 : CFWL_MonthCalendarImpDelegate(pOwner), m_pOwner(pOwner) { |
25 m_bFlag = FALSE; | 25 m_bFlag = FALSE; |
26 } | 26 } |
27 | 27 |
28 void CFWL_DateTimeCalendarImpDelegate::OnProcessMessage( | 28 void CFWL_DateTimeCalendarImpDelegate::OnProcessMessage( |
29 CFWL_Message* pMessage) { | 29 CFWL_Message* pMessage) { |
30 CFWL_MessageType dwCode = pMessage->GetClassID(); | 30 CFWL_MessageType dwCode = pMessage->GetClassID(); |
31 if (dwCode == CFWL_MessageType::SetFocus || | 31 if (dwCode == CFWL_MessageType::SetFocus || |
32 dwCode == CFWL_MessageType::KillFocus) { | 32 dwCode == CFWL_MessageType::KillFocus) { |
33 IFWL_Widget* pOuter = m_pOwner->GetOuter(); | 33 IFWL_Widget* pOuter = m_pOwner->GetOuter(); |
34 pOuter->GetCurrentDelegate()->OnProcessMessage(pMessage); | 34 pOuter->GetDelegate()->OnProcessMessage(pMessage); |
35 return; | 35 return; |
36 } | 36 } |
37 if (dwCode == CFWL_MessageType::Mouse) { | 37 if (dwCode == CFWL_MessageType::Mouse) { |
38 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); | 38 CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage); |
39 if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonDown) | 39 if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonDown) |
40 OnLButtonDownEx(pMsg); | 40 OnLButtonDownEx(pMsg); |
41 else if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonUp) | 41 else if (pMsg->m_dwCmd == FWL_MouseCommand::LeftButtonUp) |
42 OnLButtonUpEx(pMsg); | 42 OnLButtonUpEx(pMsg); |
43 return; | 43 return; |
44 } | 44 } |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 rtInvalidate.Union(lpDatesInfo->rect); | 195 rtInvalidate.Union(lpDatesInfo->rect); |
196 } | 196 } |
197 m_pOwner->AddSelDay(iCurSel); | 197 m_pOwner->AddSelDay(iCurSel); |
198 IFWL_DateTimePicker* pDateTime = | 198 IFWL_DateTimePicker* pDateTime = |
199 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); | 199 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); |
200 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, | 200 pDateTime->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, |
201 iCurSel); | 201 iCurSel); |
202 pDateTime->ShowMonthCalendar(FALSE); | 202 pDateTime->ShowMonthCalendar(FALSE); |
203 } | 203 } |
204 } | 204 } |
OLD | NEW |