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

Side by Side Diff: xfa/fwl/basewidget/fwl_spinbuttonimp.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_spinbuttonimp.h" 7 #include "xfa/fwl/basewidget/fwl_spinbuttonimp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_spinbutton.h" 9 #include "xfa/fwl/basewidget/ifwl_spinbutton.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 m_rtClient.Reset(); 52 m_rtClient.Reset();
53 m_rtUpButton.Reset(); 53 m_rtUpButton.Reset();
54 m_rtDnButton.Reset(); 54 m_rtDnButton.Reset();
55 m_pProperties->m_dwStyleExes |= FWL_STYLEEXE_SPB_Vert; 55 m_pProperties->m_dwStyleExes |= FWL_STYLEEXE_SPB_Vert;
56 } 56 }
57 CFWL_SpinButtonImp::~CFWL_SpinButtonImp() {} 57 CFWL_SpinButtonImp::~CFWL_SpinButtonImp() {}
58 FWL_ERR CFWL_SpinButtonImp::GetClassName(CFX_WideString& wsClass) const { 58 FWL_ERR CFWL_SpinButtonImp::GetClassName(CFX_WideString& wsClass) const {
59 wsClass = FWL_CLASS_SpinButton; 59 wsClass = FWL_CLASS_SpinButton;
60 return FWL_ERR_Succeeded; 60 return FWL_ERR_Succeeded;
61 } 61 }
62 uint32_t CFWL_SpinButtonImp::GetClassID() const { 62
63 return FWL_CLASSHASH_SpinButton;
64 }
65 FWL_ERR CFWL_SpinButtonImp::Initialize() { 63 FWL_ERR CFWL_SpinButtonImp::Initialize() {
66 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) 64 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
67 return FWL_ERR_Indefinite; 65 return FWL_ERR_Indefinite;
68 m_pDelegate = new CFWL_SpinButtonImpDelegate(this); 66 m_pDelegate = new CFWL_SpinButtonImpDelegate(this);
69 return FWL_ERR_Succeeded; 67 return FWL_ERR_Succeeded;
70 } 68 }
71 FWL_ERR CFWL_SpinButtonImp::Finalize() { 69 FWL_ERR CFWL_SpinButtonImp::Finalize() {
72 delete m_pDelegate; 70 delete m_pDelegate;
73 m_pDelegate = nullptr; 71 m_pDelegate = nullptr;
74 return CFWL_WidgetImp::Finalize(); 72 return CFWL_WidgetImp::Finalize();
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (!bUpEnable && !bDownEnable) { 422 if (!bUpEnable && !bDownEnable) {
425 return; 423 return;
426 } 424 }
427 CFWL_EvtSpbClick wmPosChanged; 425 CFWL_EvtSpbClick wmPosChanged;
428 wmPosChanged.m_pSrcTarget = m_pOwner->m_pInterface; 426 wmPosChanged.m_pSrcTarget = m_pOwner->m_pInterface;
429 wmPosChanged.m_bUp = bUpEnable; 427 wmPosChanged.m_bUp = bUpEnable;
430 m_pOwner->DispatchEvent(&wmPosChanged); 428 m_pOwner->DispatchEvent(&wmPosChanged);
431 m_pOwner->Repaint(bUpEnable ? &m_pOwner->m_rtUpButton 429 m_pOwner->Repaint(bUpEnable ? &m_pOwner->m_rtUpButton
432 : &m_pOwner->m_rtDnButton); 430 : &m_pOwner->m_rtDnButton);
433 } 431 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698