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 "third_party/abseil-cpp/absl/types/optional.h" 11 #include "xfa/fxfa/parser/cxfa_node.h" 12 13 class CXFA_Barcode final : public CXFA_Node { 14 public: 15 static CXFA_Barcode* FromNode(CXFA_Node* pNode); 16 17 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 18 ~CXFA_Barcode() override; 19 20 XFA_FFWidgetType GetDefaultFFWidgetType() const override; 21 22 WideString GetBarcodeType(); 23 absl::optional<WideString> GetCharEncoding(); 24 absl::optional<bool> GetChecksum(); 25 absl::optional<int32_t> GetDataLength(); 26 absl::optional<char> GetStartChar(); 27 absl::optional<char> GetEndChar(); 28 absl::optional<int32_t> GetECLevel(); 29 absl::optional<int32_t> GetModuleWidth(); 30 absl::optional<int32_t> GetModuleHeight(); 31 absl::optional<bool> GetPrintChecksum(); 32 absl::optional<XFA_AttributeValue> GetTextLocation(); 33 absl::optional<bool> GetTruncate(); 34 absl::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