blob: eae618ec6b19a2f1b50406be7da065da2c15e56e [file] [log] [blame]
Dan Sinclaira98600a2016-03-21 15:15:56 -04001// Copyright 2016 PDFium Authors. All rights reserved.
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
Dan Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_CBC_ONECODE_H_
8#define FXBARCODE_CBC_ONECODE_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
Tom Sepezea23e0a2017-05-01 14:24:19 -070010#include <memory>
11
dsinclaira52ab742016-09-29 13:59:29 -070012#include "core/fxcrt/fx_string.h"
13#include "core/fxcrt/fx_system.h"
Dan Sinclaire7786682017-03-29 15:18:41 -040014#include "fxbarcode/cbc_codebase.h"
Dan Sinclaira98600a2016-03-21 15:15:56 -040015
Lei Zhang1badb852017-04-20 15:58:56 -070016class CBC_OneDimWriter;
Dan Sinclaira98600a2016-03-21 15:15:56 -040017class CFX_Font;
Dan Sinclaira98600a2016-03-21 15:15:56 -040018
19class CBC_OneCode : public CBC_CodeBase {
20 public:
Tom Sepezea23e0a2017-05-01 14:24:19 -070021 explicit CBC_OneCode(std::unique_ptr<CBC_Writer> pWriter);
thestigfbe14b92016-05-02 13:31:10 -070022 ~CBC_OneCode() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040023
Ryan Harrison275e2602017-09-18 14:23:18 -040024 virtual bool CheckContentValidity(const WideStringView& contents);
25 virtual WideString FilterContents(const WideStringView& contents);
Dan Sinclaira98600a2016-03-21 15:15:56 -040026
tsepezd19e9122016-11-02 15:43:18 -070027 virtual void SetPrintChecksum(bool checksum);
Dan Sinclaira98600a2016-03-21 15:15:56 -040028 virtual void SetDataLength(int32_t length);
tsepezd19e9122016-11-02 15:43:18 -070029 virtual void SetCalChecksum(bool calc);
30 virtual bool SetFont(CFX_Font* cFont);
Dan Sinclair05df0752017-03-14 14:43:42 -040031 virtual void SetFontSize(float size);
Dan Sinclaira98600a2016-03-21 15:15:56 -040032 virtual void SetFontStyle(int32_t style);
33 virtual void SetFontColor(FX_ARGB color);
Lei Zhang1badb852017-04-20 15:58:56 -070034
35 private:
36 CBC_OneDimWriter* GetOneDimWriter();
Dan Sinclaira98600a2016-03-21 15:15:56 -040037};
38
Dan Sinclaire7786682017-03-29 15:18:41 -040039#endif // FXBARCODE_CBC_ONECODE_H_