OLD | NEW |
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 "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
10 #include "xfa/fde/tto/fde_textout.h" | 10 #include "xfa/fde/tto/fde_textout.h" |
11 #include "xfa/fwl/core/cfwl_message.h" | 11 #include "xfa/fwl/core/cfwl_message.h" |
12 #include "xfa/fwl/core/cfwl_themebackground.h" | 12 #include "xfa/fwl/core/cfwl_themebackground.h" |
13 #include "xfa/fwl/core/cfwl_themetext.h" | 13 #include "xfa/fwl/core/cfwl_themetext.h" |
14 #include "xfa/fwl/core/fwl_noteimp.h" | 14 #include "xfa/fwl/core/fwl_noteimp.h" |
15 #include "xfa/fwl/core/ifwl_pushbutton.h" | 15 #include "xfa/fwl/core/ifwl_pushbutton.h" |
16 #include "xfa/fwl/core/ifwl_themeprovider.h" | 16 #include "xfa/fwl/core/ifwl_themeprovider.h" |
17 | 17 |
18 IFWL_PushButton::IFWL_PushButton(const IFWL_App* app, | 18 IFWL_PushButton::IFWL_PushButton( |
19 const CFWL_WidgetImpProperties& properties) | 19 const IFWL_App* app, |
20 : IFWL_Widget(app, properties, nullptr), | 20 std::unique_ptr<CFWL_WidgetProperties> properties) |
| 21 : IFWL_Widget(app, std::move(properties), nullptr), |
21 m_bBtnDown(false), | 22 m_bBtnDown(false), |
22 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), | 23 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), |
23 m_iTTOAlign(FDE_TTOALIGNMENT_Center) { | 24 m_iTTOAlign(FDE_TTOALIGNMENT_Center) { |
24 m_rtClient.Set(0, 0, 0, 0); | 25 m_rtClient.Set(0, 0, 0, 0); |
25 m_rtCaption.Set(0, 0, 0, 0); | 26 m_rtCaption.Set(0, 0, 0, 0); |
26 } | 27 } |
27 | 28 |
28 IFWL_PushButton::~IFWL_PushButton() {} | 29 IFWL_PushButton::~IFWL_PushButton() {} |
29 | 30 |
30 FWL_Type IFWL_PushButton::GetClassID() const { | 31 FWL_Type IFWL_PushButton::GetClassID() const { |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 CFWL_EvtClick wmClick; | 517 CFWL_EvtClick wmClick; |
517 wmClick.m_pSrcTarget = this; | 518 wmClick.m_pSrcTarget = this; |
518 DispatchEvent(&wmClick); | 519 DispatchEvent(&wmClick); |
519 return; | 520 return; |
520 } | 521 } |
521 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) | 522 if (pMsg->m_dwKeyCode != FWL_VKEY_Tab) |
522 return; | 523 return; |
523 | 524 |
524 DispatchKeyEvent(pMsg); | 525 DispatchKeyEvent(pMsg); |
525 } | 526 } |
OLD | NEW |