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_datetimepickerimp.h" | 7 #include "xfa/fwl/basewidget/fwl_datetimepickerimp.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/fwl_editimp.h" | 9 #include "xfa/fwl/basewidget/fwl_editimp.h" |
10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" | 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1); | 319 lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1); |
320 rtInvalidate.Union(lpDatesInfo->rect); | 320 rtInvalidate.Union(lpDatesInfo->rect); |
321 } | 321 } |
322 m_pOwner->AddSelDay(iCurSel); | 322 m_pOwner->AddSelDay(iCurSel); |
323 if (!m_pOwner->m_pOuter) | 323 if (!m_pOwner->m_pOuter) |
324 return; | 324 return; |
325 pPicker->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, | 325 pPicker->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth, |
326 iCurSel); | 326 iCurSel); |
327 pPicker->ShowMonthCalendar(FALSE); | 327 pPicker->ShowMonthCalendar(FALSE); |
328 } else if (m_bFlag && (!rt.Contains(pMsg->m_fx, pMsg->m_fy))) { | 328 } else if (m_bFlag && (!rt.Contains(pMsg->m_fx, pMsg->m_fy))) { |
329 IFWL_DateTimePicker* pIPicker = | |
330 static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter); | |
331 CFWL_DateTimePickerImp* pPicker = | |
332 static_cast<CFWL_DateTimePickerImp*>(pIPicker->GetImpl()); | |
333 pPicker->ShowMonthCalendar(FALSE); | 329 pPicker->ShowMonthCalendar(FALSE); |
334 } | 330 } |
335 m_bFlag = 0; | 331 m_bFlag = 0; |
336 } | 332 } |
337 void CFWL_DateTimeCalendarImpDelegate::OnMouseMoveEx(CFWL_MsgMouse* pMsg) { | 333 void CFWL_DateTimeCalendarImpDelegate::OnMouseMoveEx(CFWL_MsgMouse* pMsg) { |
338 if (m_pOwner->m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_MultiSelect) { | 334 if (m_pOwner->m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_MultiSelect) { |
339 return; | 335 return; |
340 } | 336 } |
341 FX_BOOL bRepaint = FALSE; | 337 FX_BOOL bRepaint = FALSE; |
342 CFX_RectF rtInvalidate; | 338 CFX_RectF rtInvalidate; |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1177 } |
1182 if (m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { | 1178 if (m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { |
1183 pMsg->m_pSrcTarget = m_pOwner->m_pEdit.get(); | 1179 pMsg->m_pSrcTarget = m_pOwner->m_pEdit.get(); |
1184 IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pEdit->SetDelegate(NULL); | 1180 IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pEdit->SetDelegate(NULL); |
1185 pDelegate->OnProcessMessage(pMsg); | 1181 pDelegate->OnProcessMessage(pMsg); |
1186 } | 1182 } |
1187 } | 1183 } |
1188 rtInvalidate.Inflate(2, 2); | 1184 rtInvalidate.Inflate(2, 2); |
1189 m_pOwner->Repaint(&rtInvalidate); | 1185 m_pOwner->Repaint(&rtInvalidate); |
1190 } | 1186 } |
OLD | NEW |