⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm_stbarc.hpp

📁 这是一个功能强大
💻 HPP
字号:
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rm_stbarc.pas' rev: 11.00

#ifndef Rm_stbarcHPP
#define Rm_stbarcHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Rm_stbase.hpp>	// Pascal unit
#include <Rm_stconst.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rm_stbarc
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TStBarKind { bkSpace, bkBar, bkThreeQuarterBar, bkHalfBar, bkGuard, bkSupplement, bkBlankSpace };
#pragma option pop

typedef Set<TStBarKind, bkSpace, bkBlankSpace>  TStBarKindSet;

typedef Byte TStDigitArray[255];

class DELPHICLASS TStBarData;
class PASCALIMPLEMENTATION TStBarData : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TStBarKindSet FKind;
	int FModules;
	__property TStBarKindSet Kind = {read=FKind, write=FKind, nodefault};
	__property int Modules = {read=FModules, write=FModules, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TStBarData(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TStBarData(void) { }
	#pragma option pop
	
};


class DELPHICLASS TStBarCodeInfo;
class PASCALIMPLEMENTATION TStBarCodeInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TStBarData* operator[](int Index) { return Bars[Index]; }
	
private:
	Classes::TList* FBars;
	TStBarData* __fastcall GetBars(int Index);
	int __fastcall GetCount(void);
	
public:
	__fastcall virtual TStBarCodeInfo(void);
	__fastcall virtual ~TStBarCodeInfo(void);
	void __fastcall Add(int ModuleCount, TStBarKindSet BarKind);
	void __fastcall Clear(void);
	__property TStBarData* Bars[int Index] = {read=GetBars/*, default*/};
	__property int Count = {read=GetCount, nodefault};
};


#pragma option push -b-
enum TStBarCodeType { bcUPC_A, bcUPC_E, bcEAN_8, bcEAN_13, bcInterleaved2of5, bcCodabar, bcCode11, bcCode39, bcCode93, bcCode128 };
#pragma option pop

#pragma option push -b-
enum TStCode128CodeSubset { csCodeA, csCodeB, csCodeC };
#pragma option pop

class DELPHICLASS TStBarCode;
class PASCALIMPLEMENTATION TStBarCode : public Controls::TGraphicControl 
{
	typedef Controls::TGraphicControl inherited;
	
protected:
	bool FAddCheckChar;
	TStBarCodeType FBarCodeType;
	Graphics::TColor FBarColor;
	double FBarToSpaceRatio;
	int FBarNarrowToWideRatio;
	double FBarWidth;
	TStCode128CodeSubset FCode128Subset;
	bool FBearerBars;
	bool FShowCode;
	bool FShowGuardChars;
	AnsiString FSupplementalCode;
	bool FTallGuardBars;
	bool FExtendedSyntax;
	TStBarCodeInfo* bcBarInfo;
	int bcBarModWidth;
	int bcCheckK;
	Byte bcDigits[255];
	int bcDigitCount;
	int bcSpaceModWidth;
	int bcNormalWidth;
	int bcSpaceWidth;
	int bcSupplementWidth;
	AnsiString __fastcall GetCode();
	AnsiString __fastcall GetVersion();
	void __fastcall SetAddCheckChar(bool Value);
	void __fastcall SetBarCodeType(TStBarCodeType Value);
	void __fastcall SetBarColor(Graphics::TColor Value);
	void __fastcall SetBarToSpaceRatio(double Value);
	void __fastcall SetBarNarrowToWideRatio(int Value);
	void __fastcall SetBarWidth(double Value);
	void __fastcall SetBearerBars(bool Value);
	void __fastcall SetCode(const AnsiString Value);
	void __fastcall SetCode128Subset(TStCode128CodeSubset Value);
	void __fastcall SetExtendedSyntax(const bool v);
	void __fastcall SetShowCode(bool Value);
	void __fastcall SetShowGuardChars(bool Value);
	void __fastcall SetSupplementalCode(const AnsiString Value);
	void __fastcall SetTallGuardBars(bool Value);
	void __fastcall SetVersion(const AnsiString Value);
	void __fastcall CalcBarCode(void);
	void __fastcall CalcBarCodeWidth(void);
	int __fastcall DrawBar(int XPos, int YPos, int AWidth, int AHeight);
	void __fastcall DrawBarCode(const Types::TRect &R);
	int __fastcall GetDigits(AnsiString Characters);
	void __fastcall PaintPrim(const Types::TRect &R);
	double __fastcall SmallestLineWidth(int PixelsPerInch);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Msg);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Paint(void);
	
public:
	__fastcall virtual TStBarCode(Classes::TComponent* AOwner);
	__fastcall virtual ~TStBarCode(void);
	void __fastcall CopyToClipboard(void);
	void __fastcall GetCheckCharacters(const AnsiString S, int &C, int &K);
	double __fastcall GetBarCodeWidth(Graphics::TCanvas* ACanvas);
	void __fastcall PaintToCanvas(Graphics::TCanvas* ACanvas, const Types::TRect &ARect);
	void __fastcall PaintToCanvasSize(Graphics::TCanvas* ACanvas, double X, double Y, double H);
	void __fastcall PaintToDC(HDC DC, const Types::TRect &ARect);
	void __fastcall PaintToDCSize(HDC DC, double X, double Y, double W, double H);
	void __fastcall SaveToFile(const AnsiString FileName);
	bool __fastcall Validate(bool DisplayError);
	
__published:
	__property Align  = {default=0};
	__property Color  = {default=-16777211};
	__property Cursor  = {default=0};
	__property Enabled  = {default=1};
	__property Font ;
	__property ParentColor  = {default=1};
	__property ParentFont  = {default=1};
	__property ParentShowHint  = {default=1};
	__property ShowHint ;
	__property Visible  = {default=1};
	__property bool AddCheckChar = {read=FAddCheckChar, write=SetAddCheckChar, nodefault};
	__property TStBarCodeType BarCodeType = {read=FBarCodeType, write=SetBarCodeType, nodefault};
	__property Graphics::TColor BarColor = {read=FBarColor, write=SetBarColor, nodefault};
	__property double BarToSpaceRatio = {read=FBarToSpaceRatio, write=SetBarToSpaceRatio};
	__property int BarNarrowToWideRatio = {read=FBarNarrowToWideRatio, write=SetBarNarrowToWideRatio, default=2};
	__property double BarWidth = {read=FBarWidth, write=SetBarWidth};
	__property bool BearerBars = {read=FBearerBars, write=SetBearerBars, nodefault};
	__property AnsiString Code = {read=GetCode, write=SetCode};
	__property TStCode128CodeSubset Code128Subset = {read=FCode128Subset, write=SetCode128Subset, nodefault};
	__property bool ExtendedSyntax = {read=FExtendedSyntax, write=SetExtendedSyntax, default=0};
	__property bool ShowCode = {read=FShowCode, write=SetShowCode, nodefault};
	__property bool ShowGuardChars = {read=FShowGuardChars, write=SetShowGuardChars, nodefault};
	__property AnsiString SupplementalCode = {read=FSupplementalCode, write=SetSupplementalCode};
	__property bool TallGuardBars = {read=FTallGuardBars, write=SetTallGuardBars, nodefault};
	__property AnsiString Version = {read=GetVersion, write=SetVersion, stored=false};
	__property OnClick ;
	__property OnDblClick ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
};


//-- var, const, procedure ---------------------------------------------------
static const Byte bcMaxBarCodeLen = 0xff;
static const bool bcGuardBarAbove = true;
static const bool bcGuardBarBelow = true;
static const Shortint bcDefNarrowToWideRatio = 0x2;

}	/* namespace Rm_stbarc */
using namespace Rm_stbarc;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Rm_stbarc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -