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_LIGHTWIDGET_CFWL_BARCODE_H_ | 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ |
8 #define XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ | 8 #define XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ |
9 | 9 |
10 #include "xfa/fwl/basewidget/ifwl_barcode.h" | 10 #include "xfa/fwl/basewidget/ifwl_barcode.h" |
11 #include "xfa/fwl/core/fwl_error.h" | 11 #include "xfa/fwl/core/fwl_error.h" |
12 #include "xfa/fwl/lightwidget/cfwl_edit.h" | 12 #include "xfa/fwl/lightwidget/cfwl_edit.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 static CFWL_Barcode* Create(); | 19 static CFWL_Barcode* Create(); |
20 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL); | 20 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); |
21 void SetType(BC_TYPE type); | 21 void SetType(BC_TYPE type); |
22 FX_BOOL IsProtectedType(); | 22 FX_BOOL IsProtectedType(); |
23 | 23 |
24 void SetCharEncoding(BC_CHAR_ENCODING encoding) { | 24 void SetCharEncoding(BC_CHAR_ENCODING encoding) { |
25 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; | 25 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; |
26 m_barcodeData.m_eCharEncoding = encoding; | 26 m_barcodeData.m_eCharEncoding = encoding; |
27 } | 27 } |
28 void SetModuleHeight(int32_t height) { | 28 void SetModuleHeight(int32_t height) { |
29 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; | 29 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; |
30 m_barcodeData.m_nModuleHeight = height; | 30 m_barcodeData.m_nModuleHeight = height; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 int32_t m_nVersion; | 117 int32_t m_nVersion; |
118 int32_t m_nECLevel; | 118 int32_t m_nECLevel; |
119 FX_BOOL m_bTruncated; | 119 FX_BOOL m_bTruncated; |
120 uint32_t m_dwAttributeMask; | 120 uint32_t m_dwAttributeMask; |
121 }; | 121 }; |
122 | 122 |
123 CFWL_BarcodeDP m_barcodeData; | 123 CFWL_BarcodeDP m_barcodeData; |
124 }; | 124 }; |
125 | 125 |
126 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ | 126 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ |
OLD | NEW |