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_datetimeedit.h" | 7 #include "xfa/fwl/core/ifwl_datetimeedit.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 24 matching lines...) Expand all Loading... |
35 if (m_pWidgetMgr->IsFormDisabled()) { | 35 if (m_pWidgetMgr->IsFormDisabled()) { |
36 if (dwHashCode == CFWL_MessageType::Mouse) { | 36 if (dwHashCode == CFWL_MessageType::Mouse) { |
37 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); | 37 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); |
38 if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown || | 38 if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown || |
39 pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) { | 39 pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) { |
40 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) | 40 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) |
41 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; | 41 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; |
42 | 42 |
43 IFWL_DateTimePicker* pDateTime = | 43 IFWL_DateTimePicker* pDateTime = |
44 static_cast<IFWL_DateTimePicker*>(m_pOuter); | 44 static_cast<IFWL_DateTimePicker*>(m_pOuter); |
45 if (pDateTime->IsMonthCalendarShowed()) { | 45 if (pDateTime->IsMonthCalendarVisible()) { |
46 CFX_RectF rtInvalidate; | 46 CFX_RectF rtInvalidate; |
47 pDateTime->GetWidgetRect(rtInvalidate); | 47 pDateTime->GetWidgetRect(rtInvalidate); |
48 pDateTime->ShowMonthCalendar(false); | 48 pDateTime->ShowMonthCalendar(false); |
49 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); | 49 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); |
50 pDateTime->Repaint(&rtInvalidate); | 50 pDateTime->Repaint(&rtInvalidate); |
51 } | 51 } |
52 } | 52 } |
53 } | 53 } |
54 } | 54 } |
55 IFWL_Edit::OnProcessMessage(pMessage); | 55 IFWL_Edit::OnProcessMessage(pMessage); |
56 } | 56 } |
OLD | NEW |