1 // Copyright 2017 The PDFium Authors 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_FXFA_PARSER_CXFA_BARCODE_H_ 8 #define XFA_FXFA_PARSER_CXFA_BARCODE_H_ 9 10 #include <optional> 11 12 #include "xfa/fxfa/parser/cxfa_node.h" 13 14 class CXFA_Barcode final : public CXFA_Node { 15 public: 16 static CXFA_Barcode* FromNode(CXFA_Node* pNode); 17 18 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 19 ~CXFA_Barcode() override; 20 21 XFA_FFWidgetType GetDefaultFFWidgetType() const override; 22 23 WideString GetBarcodeType(); 24 std::optional<bool> GetChecksum(); 25 std::optional<int32_t> GetDataLength(); 26 std::optional<char> GetStartChar(); 27 std::optional<char> GetEndChar(); 28 std::optional<int32_t> GetECLevel(); 29 std::optional<int32_t> GetModuleWidth(); 30 std::optional<int32_t> GetModuleHeight(); 31 std::optional<bool> GetPrintChecksum(); 32 std::optional<XFA_AttributeValue> GetTextLocation(); 33 std::optional<bool> GetTruncate(); 34 std::optional<int8_t> GetWideNarrowRatio(); 35 36 private: 37 CXFA_Barcode(CXFA_Document* doc, XFA_PacketType packet); 38 }; 39 40 #endif // XFA_FXFA_PARSER_CXFA_BARCODE_H_ 41