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

Side by Side Diff: xfa/fwl/basewidget/fwl_datetimepickerimp.cpp

Issue 1946213003: Remove CLASSHASH defines in favour of an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months 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
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/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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 m_pEdit(nullptr), 430 m_pEdit(nullptr),
431 m_pMonthCal(nullptr), 431 m_pMonthCal(nullptr),
432 m_pForm(nullptr) { 432 m_pForm(nullptr) {
433 m_rtBtn.Set(0, 0, 0, 0); 433 m_rtBtn.Set(0, 0, 0, 0);
434 } 434 }
435 CFWL_DateTimePickerImp::~CFWL_DateTimePickerImp() {} 435 CFWL_DateTimePickerImp::~CFWL_DateTimePickerImp() {}
436 FWL_ERR CFWL_DateTimePickerImp::GetClassName(CFX_WideString& wsClass) const { 436 FWL_ERR CFWL_DateTimePickerImp::GetClassName(CFX_WideString& wsClass) const {
437 wsClass = FWL_CLASS_DateTimePicker; 437 wsClass = FWL_CLASS_DateTimePicker;
438 return FWL_ERR_Succeeded; 438 return FWL_ERR_Succeeded;
439 } 439 }
440 uint32_t CFWL_DateTimePickerImp::GetClassID() const { 440
441 return FWL_CLASSHASH_DateTimePicker;
442 }
443 FWL_ERR CFWL_DateTimePickerImp::Initialize() { 441 FWL_ERR CFWL_DateTimePickerImp::Initialize() {
444 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) 442 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
445 return FWL_ERR_Indefinite; 443 return FWL_ERR_Indefinite;
446 m_pDelegate = new CFWL_DateTimePickerImpDelegate(this); 444 m_pDelegate = new CFWL_DateTimePickerImpDelegate(this);
447 m_pProperties->m_dwStyleExes = FWL_STYLEEXT_DTP_ShortDateFormat; 445 m_pProperties->m_dwStyleExes = FWL_STYLEEXT_DTP_ShortDateFormat;
448 CFWL_WidgetImpProperties propMonth; 446 CFWL_WidgetImpProperties propMonth;
449 propMonth.m_dwStyles = FWL_WGTSTYLE_Popup | FWL_WGTSTYLE_Border; 447 propMonth.m_dwStyles = FWL_WGTSTYLE_Popup | FWL_WGTSTYLE_Border;
450 propMonth.m_dwStates = FWL_WGTSTATE_Invisible; 448 propMonth.m_dwStates = FWL_WGTSTATE_Invisible;
451 propMonth.m_pDataProvider = &m_MonthCalendarDP; 449 propMonth.m_pDataProvider = &m_MonthCalendarDP;
452 propMonth.m_pParent = m_pInterface; 450 propMonth.m_pParent = m_pInterface;
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 } 1162 }
1165 if (m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { 1163 if (m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
1166 pMsg->m_pSrcTarget = m_pOwner->m_pEdit.get(); 1164 pMsg->m_pSrcTarget = m_pOwner->m_pEdit.get();
1167 IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pEdit->SetDelegate(NULL); 1165 IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pEdit->SetDelegate(NULL);
1168 pDelegate->OnProcessMessage(pMsg); 1166 pDelegate->OnProcessMessage(pMsg);
1169 } 1167 }
1170 } 1168 }
1171 rtInvalidate.Inflate(2, 2); 1169 rtInvalidate.Inflate(2, 2);
1172 m_pOwner->Repaint(&rtInvalidate); 1170 m_pOwner->Repaint(&rtInvalidate);
1173 } 1171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698