OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_ | |
8 #define XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_ | |
9 | |
10 #include "xfa/fwl/basewidget/ifwl_edit.h" | |
11 #include "xfa/fxbarcode/BC_Library.h" | |
12 | |
13 class CFWL_WidgetImpProperties; | |
14 | |
15 #define FWL_CLASS_Barcode L"FWL_BARCODE" | |
16 | |
17 enum FWL_BCDAttribute { | |
18 FWL_BCDATTRIBUTE_NONE = 0, | |
19 FWL_BCDATTRIBUTE_CHARENCODING = 1 << 0, | |
20 FWL_BCDATTRIBUTE_MODULEHEIGHT = 1 << 1, | |
21 FWL_BCDATTRIBUTE_MODULEWIDTH = 1 << 2, | |
22 FWL_BCDATTRIBUTE_DATALENGTH = 1 << 3, | |
23 FWL_BCDATTRIBUTE_CALCHECKSUM = 1 << 4, | |
24 FWL_BCDATTRIBUTE_PRINTCHECKSUM = 1 << 5, | |
25 FWL_BCDATTRIBUTE_TEXTLOCATION = 1 << 6, | |
26 FWL_BCDATTRIBUTE_WIDENARROWRATIO = 1 << 7, | |
27 FWL_BCDATTRIBUTE_STARTCHAR = 1 << 8, | |
28 FWL_BCDATTRIBUTE_ENDCHAR = 1 << 9, | |
29 FWL_BCDATTRIBUTE_VERSION = 1 << 10, | |
30 FWL_BCDATTRIBUTE_ECLEVEL = 1 << 11, | |
31 FWL_BCDATTRIBUTE_TRUNCATED = 1 << 12 | |
32 }; | |
33 | |
34 class IFWL_BarcodeDP : public IFWL_EditDP { | |
35 public: | |
36 virtual BC_CHAR_ENCODING GetCharEncoding() = 0; | |
37 virtual int32_t GetModuleHeight() = 0; | |
38 virtual int32_t GetModuleWidth() = 0; | |
39 virtual int32_t GetDataLength() = 0; | |
40 virtual int32_t GetCalChecksum() = 0; | |
41 virtual FX_BOOL GetPrintChecksum() = 0; | |
42 virtual BC_TEXT_LOC GetTextLocation() = 0; | |
43 virtual int32_t GetWideNarrowRatio() = 0; | |
44 virtual FX_CHAR GetStartChar() = 0; | |
45 virtual FX_CHAR GetEndChar() = 0; | |
46 virtual int32_t GetVersion() = 0; | |
47 virtual int32_t GetErrorCorrectionLevel() = 0; | |
48 virtual FX_BOOL GetTruncated() = 0; | |
49 virtual uint32_t GetBarcodeAttributeMask() = 0; | |
50 }; | |
51 | |
52 class IFWL_Barcode : public IFWL_Edit { | |
53 public: | |
54 static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties); | |
55 void SetType(BC_TYPE type); | |
56 FX_BOOL IsProtectedType(); | |
57 | |
58 protected: | |
59 IFWL_Barcode(); | |
60 }; | |
61 | |
62 #endif // XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_ | |
OLD | NEW |