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

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

Issue 2433133002: Remove IFWL_*::Create methods, use new (Closed)
Patch Set: Rebase to master Created 4 years, 2 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
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.h ('k') | xfa/fwl/core/ifwl_scrollbar.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_pushbutton.h" 7 #include "xfa/fwl/core/ifwl_pushbutton.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
11 #include "xfa/fwl/core/cfwl_themebackground.h" 11 #include "xfa/fwl/core/cfwl_themebackground.h"
12 #include "xfa/fwl/core/cfwl_themetext.h" 12 #include "xfa/fwl/core/cfwl_themetext.h"
13 #include "xfa/fwl/core/fwl_noteimp.h" 13 #include "xfa/fwl/core/fwl_noteimp.h"
14 #include "xfa/fwl/core/ifwl_pushbutton.h" 14 #include "xfa/fwl/core/ifwl_pushbutton.h"
15 #include "xfa/fwl/core/ifwl_themeprovider.h" 15 #include "xfa/fwl/core/ifwl_themeprovider.h"
16 16
17 // static 17 IFWL_PushButton::IFWL_PushButton(const CFWL_WidgetImpProperties& properties)
18 IFWL_PushButton* IFWL_PushButton::Create( 18 : IFWL_Widget(properties, nullptr),
19 const CFWL_WidgetImpProperties& properties,
20 IFWL_Widget* pOuter) {
21 return new IFWL_PushButton(properties, pOuter);
22 }
23
24 IFWL_PushButton::IFWL_PushButton(const CFWL_WidgetImpProperties& properties,
25 IFWL_Widget* pOuter)
26 : IFWL_Widget(properties, pOuter),
27 m_bBtnDown(FALSE), 19 m_bBtnDown(FALSE),
28 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), 20 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
29 m_iTTOAlign(FDE_TTOALIGNMENT_Center) { 21 m_iTTOAlign(FDE_TTOALIGNMENT_Center) {
30 m_rtClient.Set(0, 0, 0, 0); 22 m_rtClient.Set(0, 0, 0, 0);
31 m_rtCaption.Set(0, 0, 0, 0); 23 m_rtCaption.Set(0, 0, 0, 0);
32 } 24 }
33 25
34 IFWL_PushButton::~IFWL_PushButton() {} 26 IFWL_PushButton::~IFWL_PushButton() {}
35 27
36 FWL_Error IFWL_PushButton::GetClassName(CFX_WideString& wsClass) const { 28 FWL_Error IFWL_PushButton::GetClassName(CFX_WideString& wsClass) const {
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 CFWL_EvtClick wmClick; 546 CFWL_EvtClick wmClick;
555 wmClick.m_pSrcTarget = m_pOwner; 547 wmClick.m_pSrcTarget = m_pOwner;
556 m_pOwner->DispatchEvent(&wmClick); 548 m_pOwner->DispatchEvent(&wmClick);
557 return; 549 return;
558 } 550 }
559 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) { 551 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) {
560 return; 552 return;
561 } 553 }
562 m_pOwner->DispatchKeyEvent(pMsg); 554 m_pOwner->DispatchKeyEvent(pMsg);
563 } 555 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.h ('k') | xfa/fwl/core/ifwl_scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698