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

Side by Side Diff: xfa/fwl/basewidget/fwl_pushbuttonimp.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_pushbuttonimp.h" 7 #include "xfa/fwl/basewidget/fwl_pushbuttonimp.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/basewidget/ifwl_pushbutton.h" 10 #include "xfa/fwl/basewidget/ifwl_pushbutton.h"
(...skipping 25 matching lines...) Expand all
36 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), 36 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
37 m_iTTOAlign(FDE_TTOALIGNMENT_Center) { 37 m_iTTOAlign(FDE_TTOALIGNMENT_Center) {
38 m_rtClient.Set(0, 0, 0, 0); 38 m_rtClient.Set(0, 0, 0, 0);
39 m_rtCaption.Set(0, 0, 0, 0); 39 m_rtCaption.Set(0, 0, 0, 0);
40 } 40 }
41 CFWL_PushButtonImp::~CFWL_PushButtonImp() {} 41 CFWL_PushButtonImp::~CFWL_PushButtonImp() {}
42 FWL_ERR CFWL_PushButtonImp::GetClassName(CFX_WideString& wsClass) const { 42 FWL_ERR CFWL_PushButtonImp::GetClassName(CFX_WideString& wsClass) const {
43 wsClass = FWL_CLASS_PushButton; 43 wsClass = FWL_CLASS_PushButton;
44 return FWL_ERR_Succeeded; 44 return FWL_ERR_Succeeded;
45 } 45 }
46 uint32_t CFWL_PushButtonImp::GetClassID() const { 46
47 return FWL_CLASSHASH_PushButton;
48 }
49 FWL_ERR CFWL_PushButtonImp::Initialize() { 47 FWL_ERR CFWL_PushButtonImp::Initialize() {
50 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) 48 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
51 return FWL_ERR_Indefinite; 49 return FWL_ERR_Indefinite;
52 m_pDelegate = new CFWL_PushButtonImpDelegate(this); 50 m_pDelegate = new CFWL_PushButtonImpDelegate(this);
53 return FWL_ERR_Succeeded; 51 return FWL_ERR_Succeeded;
54 } 52 }
55 FWL_ERR CFWL_PushButtonImp::Finalize() { 53 FWL_ERR CFWL_PushButtonImp::Finalize() {
56 delete m_pDelegate; 54 delete m_pDelegate;
57 m_pDelegate = nullptr; 55 m_pDelegate = nullptr;
58 return CFWL_WidgetImp::Finalize(); 56 return CFWL_WidgetImp::Finalize();
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 CFWL_EvtClick wmClick; 547 CFWL_EvtClick wmClick;
550 wmClick.m_pSrcTarget = m_pOwner->m_pInterface; 548 wmClick.m_pSrcTarget = m_pOwner->m_pInterface;
551 m_pOwner->DispatchEvent(&wmClick); 549 m_pOwner->DispatchEvent(&wmClick);
552 return; 550 return;
553 } 551 }
554 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) { 552 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) {
555 return; 553 return;
556 } 554 }
557 m_pOwner->DispatchKeyEvent(pMsg); 555 m_pOwner->DispatchKeyEvent(pMsg);
558 } 556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698