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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_barcode.h

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 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/fwl/core/include/ifwl_adaptertimermgr.h ('k') | xfa/fwl/lightwidget/cfwl_barcode.cpp » ('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 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_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); 20 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL);
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 protected: 81 protected:
82 CFWL_Barcode(); 82 CFWL_Barcode();
83 virtual ~CFWL_Barcode(); 83 virtual ~CFWL_Barcode();
84 84
85 class CFWL_BarcodeDP : public IFWL_BarcodeDP { 85 class CFWL_BarcodeDP : public IFWL_BarcodeDP {
86 public: 86 public:
87 CFWL_BarcodeDP() : m_dwAttributeMask(FWL_BCDATTRIBUTE_NONE) {} 87 CFWL_BarcodeDP() : m_dwAttributeMask(FWL_BCDATTRIBUTE_NONE) {}
88 88
89 FWL_ERR GetCaption(IFWL_Widget* pWidget, 89 FWL_Error GetCaption(IFWL_Widget* pWidget,
90 CFX_WideString& wsCaption) override; 90 CFX_WideString& wsCaption) override;
91 BC_CHAR_ENCODING GetCharEncoding() override { return m_eCharEncoding; } 91 BC_CHAR_ENCODING GetCharEncoding() override { return m_eCharEncoding; }
92 int32_t GetModuleHeight() override { return m_nModuleHeight; } 92 int32_t GetModuleHeight() override { return m_nModuleHeight; }
93 int32_t GetModuleWidth() override { return m_nModuleWidth; } 93 int32_t GetModuleWidth() override { return m_nModuleWidth; }
94 int32_t GetDataLength() override { return m_nDataLength; } 94 int32_t GetDataLength() override { return m_nDataLength; }
95 int32_t GetCalChecksum() override { return m_nCalChecksum; } 95 int32_t GetCalChecksum() override { return m_nCalChecksum; }
96 FX_BOOL GetPrintChecksum() override { return m_bPrintChecksum; } 96 FX_BOOL GetPrintChecksum() override { return m_bPrintChecksum; }
97 BC_TEXT_LOC GetTextLocation() override { return m_eTextLocation; } 97 BC_TEXT_LOC GetTextLocation() override { return m_eTextLocation; }
98 int32_t GetWideNarrowRatio() override { return m_nWideNarrowRatio; } 98 int32_t GetWideNarrowRatio() override { return m_nWideNarrowRatio; }
99 FX_CHAR GetStartChar() override { return m_cStartChar; } 99 FX_CHAR GetStartChar() override { return m_cStartChar; }
100 FX_CHAR GetEndChar() override { return m_cEndChar; } 100 FX_CHAR GetEndChar() override { return m_cEndChar; }
(...skipping 13 matching lines...) Expand all
114 int32_t m_nVersion; 114 int32_t m_nVersion;
115 int32_t m_nECLevel; 115 int32_t m_nECLevel;
116 FX_BOOL m_bTruncated; 116 FX_BOOL m_bTruncated;
117 uint32_t m_dwAttributeMask; 117 uint32_t m_dwAttributeMask;
118 }; 118 };
119 119
120 CFWL_BarcodeDP m_barcodeData; 120 CFWL_BarcodeDP m_barcodeData;
121 }; 121 };
122 122
123 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ 123 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/include/ifwl_adaptertimermgr.h ('k') | xfa/fwl/lightwidget/cfwl_barcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698