Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: xfa/include/fwl/lightwidget/barcode.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/include/fwl/lightwidget/app.h ('k') | xfa/include/fwl/lightwidget/checkbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 _FWL_BARCODE_LIGHT_H 7 #ifndef _FWL_BARCODE_LIGHT_H
8 #define _FWL_BARCODE_LIGHT_H 8 #define _FWL_BARCODE_LIGHT_H
9 class CFWL_Widget; 9 class CFWL_Widget;
10 class CFWL_WidgetProperties; 10 class CFWL_WidgetProperties;
11 class IFWL_BarcodeDP; 11 class IFWL_BarcodeDP;
12 class CFWL_Edit; 12 class CFWL_Edit;
13 class CFWL_Barcode; 13 class CFWL_Barcode;
14 class CFWL_BarcodeDP; 14 class CFWL_BarcodeDP;
15 class CFWL_Barcode : public CFWL_Edit 15 class CFWL_Barcode : public CFWL_Edit
16 { 16 {
17 public: 17 public:
18 static CFWL_Barcode* Create(); 18 static CFWL_Barcode* Create();
19 FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL); 19 FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
20 void SetType(BC_TYPE type); 20 void SetType(BC_TYPE type);
21 FX_BOOL IsProtectedType(); 21 FX_BOOL IsProtectedType();
22 public: 22 public:
23 void SetCharEncoding(BC_CHAR_ENCODING encoding) 23 void SetCharEncoding(BC_CHAR_ENCODING encoding)
24 { 24 {
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(FX_INT32 height) 28 void» » SetModuleHeight(int32_t height)
29 { 29 {
30 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT; 30 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
31 m_barcodeData.m_nModuleHeight = height; 31 m_barcodeData.m_nModuleHeight = height;
32 } 32 }
33 void» » SetModuleWidth(FX_INT32 width) 33 void» » SetModuleWidth(int32_t width)
34 { 34 {
35 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH; 35 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
36 m_barcodeData.m_nModuleWidth = width; 36 m_barcodeData.m_nModuleWidth = width;
37 } 37 }
38 void» » SetDataLength(FX_INT32 dataLength) 38 void» » SetDataLength(int32_t dataLength)
39 { 39 {
40 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH; 40 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
41 m_barcodeData.m_nDataLength = dataLength; 41 m_barcodeData.m_nDataLength = dataLength;
42 ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength); 42 ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
43 } 43 }
44 void» » SetCalChecksum(FX_INT32 calChecksum) 44 void» » SetCalChecksum(int32_t calChecksum)
45 { 45 {
46 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM; 46 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
47 m_barcodeData.m_nCalChecksum = calChecksum; 47 m_barcodeData.m_nCalChecksum = calChecksum;
48 } 48 }
49 void SetPrintChecksum(FX_BOOL printChecksum) 49 void SetPrintChecksum(FX_BOOL printChecksum)
50 { 50 {
51 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM; 51 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
52 m_barcodeData.m_bPrintChecksum = printChecksum; 52 m_barcodeData.m_bPrintChecksum = printChecksum;
53 } 53 }
54 void SetTextLocation(BC_TEXT_LOC location) 54 void SetTextLocation(BC_TEXT_LOC location)
55 { 55 {
56 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION; 56 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
57 m_barcodeData.m_eTextLocation = location; 57 m_barcodeData.m_eTextLocation = location;
58 } 58 }
59 void» » SetWideNarrowRatio(FX_INT32 ratio) 59 void» » SetWideNarrowRatio(int32_t ratio)
60 { 60 {
61 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO; 61 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
62 m_barcodeData.m_nWideNarrowRatio = ratio; 62 m_barcodeData.m_nWideNarrowRatio = ratio;
63 } 63 }
64 void SetStartChar(FX_CHAR startChar) 64 void SetStartChar(FX_CHAR startChar)
65 { 65 {
66 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR; 66 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
67 m_barcodeData.m_cStartChar = startChar; 67 m_barcodeData.m_cStartChar = startChar;
68 } 68 }
69 void SetEndChar(FX_CHAR endChar) 69 void SetEndChar(FX_CHAR endChar)
70 { 70 {
71 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR; 71 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
72 m_barcodeData.m_cEndChar = endChar; 72 m_barcodeData.m_cEndChar = endChar;
73 } 73 }
74 void» » SetVersion(FX_INT32 version) 74 void» » SetVersion(int32_t version)
75 { 75 {
76 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION; 76 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
77 m_barcodeData.m_nVersion = version; 77 m_barcodeData.m_nVersion = version;
78 } 78 }
79 void» » SetErrorCorrectionLevel(FX_INT32 ecLevel) 79 void» » SetErrorCorrectionLevel(int32_t ecLevel)
80 { 80 {
81 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL; 81 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
82 m_barcodeData.m_nECLevel = ecLevel; 82 m_barcodeData.m_nECLevel = ecLevel;
83 } 83 }
84 void SetTruncated(FX_BOOL truncated) 84 void SetTruncated(FX_BOOL truncated)
85 { 85 {
86 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED; 86 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
87 m_barcodeData.m_bTruncated = truncated; 87 m_barcodeData.m_bTruncated = truncated;
88 } 88 }
89 void ResetBarcodeAttributes() 89 void ResetBarcodeAttributes()
90 { 90 {
91 m_barcodeData.m_dwAttributeMask = 0; 91 m_barcodeData.m_dwAttributeMask = 0;
92 } 92 }
93 protected: 93 protected:
94 CFWL_Barcode(); 94 CFWL_Barcode();
95 virtual ~CFWL_Barcode(); 95 virtual ~CFWL_Barcode();
96 class CFWL_BarcodeDP : public IFWL_BarcodeDP 96 class CFWL_BarcodeDP : public IFWL_BarcodeDP
97 { 97 {
98 public: 98 public:
99 virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption); 99 virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
100 BC_CHAR_ENCODING m_eCharEncoding; 100 BC_CHAR_ENCODING m_eCharEncoding;
101 virtual BC_CHAR_ENCODING GetCharEncoding() 101 virtual BC_CHAR_ENCODING GetCharEncoding()
102 { 102 {
103 return m_eCharEncoding; 103 return m_eCharEncoding;
104 } 104 }
105 FX_INT32» » » » » m_nModuleHeight, m_nModu leWidth; 105 int32_t»» » » » m_nModuleHeight, m_nModuleWidth;
106 virtual FX_INT32» » » GetModuleHeight() 106 virtual int32_t»» » GetModuleHeight()
107 { 107 {
108 return m_nModuleHeight; 108 return m_nModuleHeight;
109 } 109 }
110 virtual FX_INT32» » » GetModuleWidth() 110 virtual int32_t»» » GetModuleWidth()
111 { 111 {
112 return m_nModuleWidth; 112 return m_nModuleWidth;
113 } 113 }
114 FX_INT32» » » » » m_nDataLength; 114 int32_t»» » » » m_nDataLength;
115 virtual FX_INT32» » » GetDataLength() 115 virtual int32_t»» » GetDataLength()
116 { 116 {
117 return m_nDataLength; 117 return m_nDataLength;
118 } 118 }
119 FX_INT32» » » » » m_nCalChecksum; 119 int32_t»» » » » m_nCalChecksum;
120 virtual FX_INT32» » » GetCalChecksum() 120 virtual int32_t»» » GetCalChecksum()
121 { 121 {
122 return m_nCalChecksum; 122 return m_nCalChecksum;
123 } 123 }
124 FX_BOOL m_bPrintChecksum; 124 FX_BOOL m_bPrintChecksum;
125 virtual FX_BOOL GetPrintChecksum() 125 virtual FX_BOOL GetPrintChecksum()
126 { 126 {
127 return m_bPrintChecksum; 127 return m_bPrintChecksum;
128 } 128 }
129 129
130 BC_TEXT_LOC m_eTextLocation; 130 BC_TEXT_LOC m_eTextLocation;
131 virtual BC_TEXT_LOC GetTextLocation() 131 virtual BC_TEXT_LOC GetTextLocation()
132 { 132 {
133 return m_eTextLocation; 133 return m_eTextLocation;
134 } 134 }
135 FX_INT32» » » » » m_nWideNarrowRatio; 135 int32_t»» » » » m_nWideNarrowRatio;
136 virtual FX_INT32» » » GetWideNarrowRatio() 136 virtual int32_t»» » GetWideNarrowRatio()
137 { 137 {
138 return m_nWideNarrowRatio; 138 return m_nWideNarrowRatio;
139 } 139 }
140 FX_CHAR m_cStartChar, m_cEndChar ; 140 FX_CHAR m_cStartChar, m_cEndChar ;
141 virtual FX_CHAR GetStartChar() 141 virtual FX_CHAR GetStartChar()
142 { 142 {
143 return m_cStartChar; 143 return m_cStartChar;
144 } 144 }
145 virtual FX_CHAR GetEndChar() 145 virtual FX_CHAR GetEndChar()
146 { 146 {
147 return m_cEndChar; 147 return m_cEndChar;
148 } 148 }
149 FX_INT32» » » » » m_nVersion; 149 int32_t»» » » » m_nVersion;
150 virtual FX_INT32» » » GetVersion() 150 virtual int32_t»» » GetVersion()
151 { 151 {
152 return m_nVersion; 152 return m_nVersion;
153 } 153 }
154 FX_INT32» » » » » m_nECLevel; 154 int32_t»» » » » m_nECLevel;
155 virtual FX_INT32» » » GetErrorCorrectionLevel() 155 virtual int32_t»» » GetErrorCorrectionLevel()
156 { 156 {
157 return m_nECLevel; 157 return m_nECLevel;
158 } 158 }
159 FX_BOOL m_bTruncated; 159 FX_BOOL m_bTruncated;
160 virtual FX_BOOL GetTruncated() 160 virtual FX_BOOL GetTruncated()
161 { 161 {
162 return m_bTruncated; 162 return m_bTruncated;
163 } 163 }
164 FX_DWORD m_dwAttributeMask; 164 FX_DWORD m_dwAttributeMask;
165 virtual FX_DWORD GetBarcodeAttributeMask() 165 virtual FX_DWORD GetBarcodeAttributeMask()
166 { 166 {
167 return m_dwAttributeMask; 167 return m_dwAttributeMask;
168 } 168 }
169 public: 169 public:
170 CFWL_BarcodeDP() 170 CFWL_BarcodeDP()
171 : m_dwAttributeMask(0) 171 : m_dwAttributeMask(0)
172 { 172 {
173 } 173 }
174 }; 174 };
175 CFWL_BarcodeDP m_barcodeData; 175 CFWL_BarcodeDP m_barcodeData;
176 }; 176 };
177 #endif 177 #endif
OLDNEW
« no previous file with comments | « xfa/include/fwl/lightwidget/app.h ('k') | xfa/include/fwl/lightwidget/checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698