Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: xfa/fwl/core/ifwl_datetimeedit.cpp

Issue 2506083002: Continue formatting fwl/core (Closed)
Patch Set: format Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 CFWL_MessageType dwHashCode = pMessage->GetClassID(); 25 CFWL_MessageType dwHashCode = pMessage->GetClassID();
26 if (dwHashCode == CFWL_MessageType::SetFocus || 26 if (dwHashCode == CFWL_MessageType::SetFocus ||
27 dwHashCode == CFWL_MessageType::KillFocus) { 27 dwHashCode == CFWL_MessageType::KillFocus) {
28 IFWL_Widget* pOuter = GetOuter(); 28 IFWL_Widget* pOuter = GetOuter();
29 pOuter->GetDelegate()->OnProcessMessage(pMessage); 29 pOuter->GetDelegate()->OnProcessMessage(pMessage);
30 } 30 }
31 } 31 }
32 32
33 void IFWL_DateTimeEdit::DisForm_OnProcessMessage(CFWL_Message* pMessage) { 33 void IFWL_DateTimeEdit::DisForm_OnProcessMessage(CFWL_Message* pMessage) {
34 CFWL_MessageType dwHashCode = pMessage->GetClassID(); 34 CFWL_MessageType dwHashCode = pMessage->GetClassID();
35 if (m_pWidgetMgr->IsFormDisabled()) { 35 if (!m_pWidgetMgr->IsFormDisabled() ||
36 if (dwHashCode == CFWL_MessageType::Mouse) { 36 dwHashCode != CFWL_MessageType::Mouse) {
37 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); 37 IFWL_Edit::OnProcessMessage(pMessage);
38 if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown || 38 return;
39 pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) { 39 }
40 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
41 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
42 40
43 IFWL_DateTimePicker* pDateTime = 41 CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage);
44 static_cast<IFWL_DateTimePicker*>(m_pOuter); 42 if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown ||
45 if (pDateTime->IsMonthCalendarVisible()) { 43 pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) {
46 CFX_RectF rtInvalidate; 44 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
47 pDateTime->GetWidgetRect(rtInvalidate); 45 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
48 pDateTime->ShowMonthCalendar(false); 46
49 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); 47 IFWL_DateTimePicker* pDateTime =
50 pDateTime->Repaint(&rtInvalidate); 48 static_cast<IFWL_DateTimePicker*>(m_pOuter);
51 } 49 if (pDateTime->IsMonthCalendarVisible()) {
52 } 50 CFX_RectF rtInvalidate;
51 pDateTime->GetWidgetRect(rtInvalidate);
52 pDateTime->ShowMonthCalendar(false);
53 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top);
54 pDateTime->Repaint(&rtInvalidate);
53 } 55 }
54 } 56 }
55 IFWL_Edit::OnProcessMessage(pMessage); 57 IFWL_Edit::OnProcessMessage(pMessage);
56 } 58 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698