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_barcode.h" | 7 #include "xfa/fwl/core/ifwl_barcode.h" |
8 | 8 |
9 #include "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
10 #include "xfa/fgas/font/fgas_gefont.h" | 10 #include "xfa/fgas/font/fgas_gefont.h" |
11 #include "xfa/fwl/core/cfwl_themepart.h" | 11 #include "xfa/fwl/core/cfwl_themepart.h" |
12 #include "xfa/fwl/core/cfx_barcode.h" | 12 #include "xfa/fwl/core/cfx_barcode.h" |
13 #include "xfa/fwl/core/fwl_noteimp.h" | 13 #include "xfa/fwl/core/fwl_noteimp.h" |
14 #include "xfa/fwl/core/ifwl_themeprovider.h" | 14 #include "xfa/fwl/core/ifwl_themeprovider.h" |
15 | 15 |
16 IFWL_Barcode::IFWL_Barcode(const IFWL_App* app, | 16 IFWL_Barcode::IFWL_Barcode(const IFWL_App* app, |
17 const CFWL_WidgetImpProperties& properties) | 17 std::unique_ptr<CFWL_WidgetProperties> properties) |
18 : IFWL_Edit(app, properties, nullptr), m_dwStatus(0), m_type(BC_UNKNOWN) { | 18 : IFWL_Edit(app, std::move(properties), nullptr), |
19 } | 19 m_dwStatus(0), |
| 20 m_type(BC_UNKNOWN) {} |
20 | 21 |
21 IFWL_Barcode::~IFWL_Barcode() {} | 22 IFWL_Barcode::~IFWL_Barcode() {} |
22 | 23 |
23 FWL_Type IFWL_Barcode::GetClassID() const { | 24 FWL_Type IFWL_Barcode::GetClassID() const { |
24 return FWL_Type::Barcode; | 25 return FWL_Type::Barcode; |
25 } | 26 } |
26 | 27 |
27 FWL_Error IFWL_Barcode::Update() { | 28 FWL_Error IFWL_Barcode::Update() { |
28 if (IsLocked()) { | 29 if (IsLocked()) { |
29 return FWL_Error::Indefinite; | 30 return FWL_Error::Indefinite; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return false; | 175 return false; |
175 } | 176 } |
176 | 177 |
177 void IFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) { | 178 void IFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) { |
178 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { | 179 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { |
179 m_pBarcodeEngine.reset(); | 180 m_pBarcodeEngine.reset(); |
180 m_dwStatus = XFA_BCS_NeedUpdate; | 181 m_dwStatus = XFA_BCS_NeedUpdate; |
181 } | 182 } |
182 IFWL_Edit::OnProcessEvent(pEvent); | 183 IFWL_Edit::OnProcessEvent(pEvent); |
183 } | 184 } |
OLD | NEW |