| 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" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void SetTruncated(FX_BOOL truncated) { | 73 void SetTruncated(FX_BOOL truncated) { |
| 74 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED; | 74 m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED; |
| 75 m_barcodeData.m_bTruncated = truncated; | 75 m_barcodeData.m_bTruncated = truncated; |
| 76 } | 76 } |
| 77 void ResetBarcodeAttributes() { | 77 void ResetBarcodeAttributes() { |
| 78 m_barcodeData.m_dwAttributeMask = FWL_BCDATTRIBUTE_NONE; | 78 m_barcodeData.m_dwAttributeMask = FWL_BCDATTRIBUTE_NONE; |
| 79 } | 79 } |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 CFWL_Barcode(); | 82 CFWL_Barcode(); |
| 83 virtual ~CFWL_Barcode(); | 83 ~CFWL_Barcode() override; |
| 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(); |
| 88 | 88 |
| 89 // IFWL_DataProvider |
| 89 FWL_Error GetCaption(IFWL_Widget* pWidget, | 90 FWL_Error GetCaption(IFWL_Widget* pWidget, |
| 90 CFX_WideString& wsCaption) override; | 91 CFX_WideString& wsCaption) override; |
| 91 BC_CHAR_ENCODING GetCharEncoding() override { return m_eCharEncoding; } | 92 |
| 92 int32_t GetModuleHeight() override { return m_nModuleHeight; } | 93 // IFWL_BarcodeDP |
| 93 int32_t GetModuleWidth() override { return m_nModuleWidth; } | 94 BC_CHAR_ENCODING GetCharEncoding() override; |
| 94 int32_t GetDataLength() override { return m_nDataLength; } | 95 int32_t GetModuleHeight() override; |
| 95 int32_t GetCalChecksum() override { return m_nCalChecksum; } | 96 int32_t GetModuleWidth() override; |
| 96 FX_BOOL GetPrintChecksum() override { return m_bPrintChecksum; } | 97 int32_t GetDataLength() override; |
| 97 BC_TEXT_LOC GetTextLocation() override { return m_eTextLocation; } | 98 int32_t GetCalChecksum() override; |
| 98 int32_t GetWideNarrowRatio() override { return m_nWideNarrowRatio; } | 99 FX_BOOL GetPrintChecksum() override; |
| 99 FX_CHAR GetStartChar() override { return m_cStartChar; } | 100 BC_TEXT_LOC GetTextLocation() override; |
| 100 FX_CHAR GetEndChar() override { return m_cEndChar; } | 101 int32_t GetWideNarrowRatio() override; |
| 101 int32_t GetVersion() override { return m_nVersion; } | 102 FX_CHAR GetStartChar() override; |
| 102 int32_t GetErrorCorrectionLevel() override { return m_nECLevel; } | 103 FX_CHAR GetEndChar() override; |
| 103 FX_BOOL GetTruncated() override { return m_bTruncated; } | 104 int32_t GetVersion() override; |
| 104 uint32_t GetBarcodeAttributeMask() override { return m_dwAttributeMask; } | 105 int32_t GetErrorCorrectionLevel() override; |
| 106 FX_BOOL GetTruncated() override; |
| 107 uint32_t GetBarcodeAttributeMask() override; |
| 105 | 108 |
| 106 BC_CHAR_ENCODING m_eCharEncoding; | 109 BC_CHAR_ENCODING m_eCharEncoding; |
| 107 int32_t m_nModuleHeight, m_nModuleWidth; | 110 int32_t m_nModuleHeight, m_nModuleWidth; |
| 108 int32_t m_nDataLength; | 111 int32_t m_nDataLength; |
| 109 int32_t m_nCalChecksum; | 112 int32_t m_nCalChecksum; |
| 110 FX_BOOL m_bPrintChecksum; | 113 FX_BOOL m_bPrintChecksum; |
| 111 BC_TEXT_LOC m_eTextLocation; | 114 BC_TEXT_LOC m_eTextLocation; |
| 112 int32_t m_nWideNarrowRatio; | 115 int32_t m_nWideNarrowRatio; |
| 113 FX_CHAR m_cStartChar, m_cEndChar; | 116 FX_CHAR m_cStartChar, m_cEndChar; |
| 114 int32_t m_nVersion; | 117 int32_t m_nVersion; |
| 115 int32_t m_nECLevel; | 118 int32_t m_nECLevel; |
| 116 FX_BOOL m_bTruncated; | 119 FX_BOOL m_bTruncated; |
| 117 uint32_t m_dwAttributeMask; | 120 uint32_t m_dwAttributeMask; |
| 118 }; | 121 }; |
| 119 | 122 |
| 120 CFWL_BarcodeDP m_barcodeData; | 123 CFWL_BarcodeDP m_barcodeData; |
| 121 }; | 124 }; |
| 122 | 125 |
| 123 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ | 126 #endif // XFA_FWL_LIGHTWIDGET_CFWL_BARCODE_H_ |
| OLD | NEW |