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 #ifndef XFA_FWL_CORE_CFWL_BARCODE_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_BARCODE_H_ |
8 #define XFA_FWL_CORE_CFWL_BARCODE_H_ | 8 #define XFA_FWL_CORE_CFWL_BARCODE_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_edit.h" | 10 #include "xfa/fwl/core/cfwl_edit.h" |
11 #include "xfa/fwl/core/fwl_error.h" | 11 #include "xfa/fwl/core/fwl_error.h" |
12 #include "xfa/fwl/core/ifwl_barcode.h" | 12 #include "xfa/fwl/core/ifwl_barcode.h" |
13 | 13 |
14 class CFWL_Widget; | 14 class CFWL_Widget; |
15 class CFWL_WidgetProperties; | 15 class CFWL_WidgetProperties; |
16 | 16 |
17 class CFWL_Barcode : public CFWL_Edit { | 17 class CFWL_Barcode : public CFWL_Edit { |
18 public: | 18 public: |
19 CFWL_Barcode(); | 19 CFWL_Barcode(const IFWL_App*); |
20 ~CFWL_Barcode() override; | 20 ~CFWL_Barcode() override; |
21 | 21 |
22 IFWL_Barcode* GetWidget() override; | 22 IFWL_Barcode* GetWidget() override; |
23 const IFWL_Barcode* GetWidget() const override; | 23 const IFWL_Barcode* GetWidget() const override; |
24 | 24 |
25 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); | 25 void Initialize(const CFWL_WidgetProperties* pProperties); |
| 26 |
26 void SetType(BC_TYPE type); | 27 void SetType(BC_TYPE type); |
27 FX_BOOL IsProtectedType(); | 28 FX_BOOL IsProtectedType(); |
28 | 29 |
29 void SetCharEncoding(BC_CHAR_ENCODING encoding) { | 30 void SetCharEncoding(BC_CHAR_ENCODING encoding) { |
30 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; | 31 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; |
31 m_barcodeData.m_eCharEncoding = encoding; | 32 m_barcodeData.m_eCharEncoding = encoding; |
32 } | 33 } |
33 void SetModuleHeight(int32_t height) { | 34 void SetModuleHeight(int32_t height) { |
34 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; | 35 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; |
35 m_barcodeData.m_nModuleHeight = height; | 36 m_barcodeData.m_nModuleHeight = height; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int32_t m_nVersion; | 122 int32_t m_nVersion; |
122 int32_t m_nECLevel; | 123 int32_t m_nECLevel; |
123 FX_BOOL m_bTruncated; | 124 FX_BOOL m_bTruncated; |
124 uint32_t m_dwAttributeMask; | 125 uint32_t m_dwAttributeMask; |
125 }; | 126 }; |
126 | 127 |
127 CFWL_BarcodeDP m_barcodeData; | 128 CFWL_BarcodeDP m_barcodeData; |
128 }; | 129 }; |
129 | 130 |
130 #endif // XFA_FWL_CORE_CFWL_BARCODE_H_ | 131 #endif // XFA_FWL_CORE_CFWL_BARCODE_H_ |
OLD | NEW |