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

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

Issue 2469893004: Unify CFWL_WidgetProperties and CFWL_WidgetImpProperties. (Closed)
Patch Set: review cleanup 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_datetimeedit.h ('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"
11 #include "xfa/fwl/core/ifwl_datetimepicker.h" 11 #include "xfa/fwl/core/ifwl_datetimepicker.h"
12 12
13 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const IFWL_App* app, 13 IFWL_DateTimeEdit::IFWL_DateTimeEdit(
14 const CFWL_WidgetImpProperties& properties, 14 const IFWL_App* app,
15 IFWL_Widget* pOuter) 15 std::unique_ptr<CFWL_WidgetProperties> properties,
16 : IFWL_Edit(app, properties, pOuter) {} 16 IFWL_Widget* pOuter)
17 : IFWL_Edit(app, std::move(properties), pOuter) {}
17 18
18 void IFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) { 19 void IFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) {
19 if (m_pWidgetMgr->IsFormDisabled()) { 20 if (m_pWidgetMgr->IsFormDisabled()) {
20 DisForm_OnProcessMessage(pMessage); 21 DisForm_OnProcessMessage(pMessage);
21 return; 22 return;
22 } 23 }
23 24
24 CFWL_MessageType dwHashCode = pMessage->GetClassID(); 25 CFWL_MessageType dwHashCode = pMessage->GetClassID();
25 if (dwHashCode == CFWL_MessageType::SetFocus || 26 if (dwHashCode == CFWL_MessageType::SetFocus ||
26 dwHashCode == CFWL_MessageType::KillFocus) { 27 dwHashCode == CFWL_MessageType::KillFocus) {
(...skipping 19 matching lines...) Expand all
46 pDateTime->GetWidgetRect(rtInvalidate); 47 pDateTime->GetWidgetRect(rtInvalidate);
47 pDateTime->ShowMonthCalendar(false); 48 pDateTime->ShowMonthCalendar(false);
48 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); 49 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top);
49 pDateTime->Repaint(&rtInvalidate); 50 pDateTime->Repaint(&rtInvalidate);
50 } 51 }
51 } 52 }
52 } 53 }
53 } 54 }
54 IFWL_Edit::OnProcessMessage(pMessage); 55 IFWL_Edit::OnProcessMessage(pMessage);
55 } 56 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_datetimeedit.h ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698