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

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

Issue 2527683002: Remove DataProvider from CFWL_WidgetProperties (Closed)
Patch Set: Rebase to master Created 4 years 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_datetimepicker.h ('k') | xfa/fwl/core/ifwl_picturebox.cpp » ('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_datetimepicker.h" 7 #include "xfa/fwl/core/ifwl_datetimepicker.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 23 matching lines...) Expand all
34 : IFWL_Widget(app, std::move(properties), nullptr), 34 : IFWL_Widget(app, std::move(properties), nullptr),
35 m_iBtnState(1), 35 m_iBtnState(1),
36 m_iYear(-1), 36 m_iYear(-1),
37 m_iMonth(-1), 37 m_iMonth(-1),
38 m_iDay(-1), 38 m_iDay(-1),
39 m_bLBtnDown(false) { 39 m_bLBtnDown(false) {
40 m_rtBtn.Set(0, 0, 0, 0); 40 m_rtBtn.Set(0, 0, 0, 0);
41 41
42 m_pProperties->m_dwStyleExes = FWL_STYLEEXT_DTP_ShortDateFormat; 42 m_pProperties->m_dwStyleExes = FWL_STYLEEXT_DTP_ShortDateFormat;
43 43
44 auto monthProp = pdfium::MakeUnique<CFWL_WidgetProperties>(this); 44 auto monthProp = pdfium::MakeUnique<CFWL_WidgetProperties>();
45 monthProp->m_dwStyles = FWL_WGTSTYLE_Popup | FWL_WGTSTYLE_Border; 45 monthProp->m_dwStyles = FWL_WGTSTYLE_Popup | FWL_WGTSTYLE_Border;
46 monthProp->m_dwStates = FWL_WGTSTATE_Invisible; 46 monthProp->m_dwStates = FWL_WGTSTATE_Invisible;
47 monthProp->m_pParent = this; 47 monthProp->m_pParent = this;
48 monthProp->m_pThemeProvider = m_pProperties->m_pThemeProvider; 48 monthProp->m_pThemeProvider = m_pProperties->m_pThemeProvider;
49 m_pMonthCal.reset( 49 m_pMonthCal.reset(
50 new IFWL_MonthCalendar(m_pOwnerApp, std::move(monthProp), this)); 50 new IFWL_MonthCalendar(m_pOwnerApp, std::move(monthProp), this));
51 51
52 CFX_RectF rtMonthCal; 52 CFX_RectF rtMonthCal;
53 m_pMonthCal->GetWidgetRect(rtMonthCal, true); 53 m_pMonthCal->GetWidgetRect(rtMonthCal, true);
54 rtMonthCal.Set(0, 0, rtMonthCal.width, rtMonthCal.height); 54 rtMonthCal.Set(0, 0, rtMonthCal.width, rtMonthCal.height);
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 if (DisForm_IsMonthCalendarVisible()) 652 if (DisForm_IsMonthCalendarVisible())
653 ShowMonthCalendar(false); 653 ShowMonthCalendar(false);
654 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { 654 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
655 pMsg->m_pSrcTarget = m_pEdit.get(); 655 pMsg->m_pSrcTarget = m_pEdit.get();
656 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); 656 m_pEdit->GetDelegate()->OnProcessMessage(pMsg);
657 } 657 }
658 } 658 }
659 rtInvalidate.Inflate(2, 2); 659 rtInvalidate.Inflate(2, 2);
660 Repaint(&rtInvalidate); 660 Repaint(&rtInvalidate);
661 } 661 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_datetimepicker.h ('k') | xfa/fwl/core/ifwl_picturebox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698