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 "xfa/fgas/font/fgas_gefont.h" | 9 #include "xfa/fgas/font/fgas_gefont.h" |
10 #include "xfa/fwl/core/cfwl_themepart.h" | 10 #include "xfa/fwl/core/cfwl_themepart.h" |
11 #include "xfa/fwl/core/cfx_barcode.h" | 11 #include "xfa/fwl/core/cfx_barcode.h" |
12 #include "xfa/fwl/core/fwl_noteimp.h" | 12 #include "xfa/fwl/core/fwl_noteimp.h" |
13 #include "xfa/fwl/core/ifwl_themeprovider.h" | 13 #include "xfa/fwl/core/ifwl_themeprovider.h" |
14 | 14 |
15 // static | 15 IFWL_Barcode::IFWL_Barcode(const CFWL_WidgetImpProperties& properties) |
16 IFWL_Barcode* IFWL_Barcode::Create(const CFWL_WidgetImpProperties& properties) { | 16 : IFWL_Edit(properties, nullptr), m_dwStatus(0), m_type(BC_UNKNOWN) {} |
17 return new IFWL_Barcode(properties, nullptr); | |
18 } | |
19 | |
20 IFWL_Barcode::IFWL_Barcode(const CFWL_WidgetImpProperties& properties, | |
21 IFWL_Widget* pOuter) | |
22 : IFWL_Edit(properties, pOuter), m_dwStatus(0), m_type(BC_UNKNOWN) {} | |
23 | 17 |
24 IFWL_Barcode::~IFWL_Barcode() {} | 18 IFWL_Barcode::~IFWL_Barcode() {} |
25 | 19 |
26 FWL_Error IFWL_Barcode::GetClassName(CFX_WideString& wsClass) const { | 20 FWL_Error IFWL_Barcode::GetClassName(CFX_WideString& wsClass) const { |
27 wsClass = FWL_CLASS_Barcode; | 21 wsClass = FWL_CLASS_Barcode; |
28 return FWL_Error::Succeeded; | 22 return FWL_Error::Succeeded; |
29 } | 23 } |
30 | 24 |
31 FWL_Type IFWL_Barcode::GetClassID() const { | 25 FWL_Type IFWL_Barcode::GetClassID() const { |
32 return FWL_Type::Barcode; | 26 return FWL_Type::Barcode; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 : CFWL_EditImpDelegate(pOwner) {} | 193 : CFWL_EditImpDelegate(pOwner) {} |
200 | 194 |
201 void CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { | 195 void CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { |
202 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { | 196 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { |
203 IFWL_Barcode* pOwner = static_cast<IFWL_Barcode*>(m_pOwner); | 197 IFWL_Barcode* pOwner = static_cast<IFWL_Barcode*>(m_pOwner); |
204 pOwner->m_pBarcodeEngine.reset(); | 198 pOwner->m_pBarcodeEngine.reset(); |
205 pOwner->m_dwStatus = XFA_BCS_NeedUpdate; | 199 pOwner->m_dwStatus = XFA_BCS_NeedUpdate; |
206 } | 200 } |
207 CFWL_EditImpDelegate::OnProcessEvent(pEvent); | 201 CFWL_EditImpDelegate::OnProcessEvent(pEvent); |
208 } | 202 } |
OLD | NEW |