// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'pBarCode.pas' rev: 4.00

#ifndef pBarCodeHPP
#define pBarCodeHPP

#pragma delphiheader begin
#pragma option push -w-
#include <Menus.hpp>	// Pascal unit
#include <HBarCode.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Math.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Pbarcode
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TInvalidChar)(System::TObject* Sender, AnsiString &Barcode);

class DELPHICLASS TBarCode;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TBarCode : public Extctrls::TCustomPanel 
{
	typedef Extctrls::TCustomPanel inherited;
	
private:
	AnsiString FBarCode;
	Hbarcode::TBarType FBarType;
	int FBarHeight;
	int FModul;
	double FRatio;
	Hbarcode::TCheckSum FCheckSum;
	Graphics::TColor FColorSpc;
	Graphics::TColor FColorBar;
	Hbarcode::TOrientation FOrientation;
	Hbarcode::TTextShow FTextShow;
	Hbarcode::TTextPosition FTextPosition;
	Graphics::TColor FTextColor;
	int FHMargin;
	bool FAutoWidth;
	Classes::TNotifyEvent FOnChange;
	TInvalidChar FOnInvalidChar;
	double __fastcall GetAngle(void);
	void __fastcall SetBarType(const Hbarcode::TBarType Value);
	void __fastcall SetBarHeight(const int Value);
	void __fastcall SetModul(const int Value);
	void __fastcall SetRatio(const double Value);
	void __fastcall SetCheckSum(const Hbarcode::TCheckSum Value);
	void __fastcall SetColorSpc(const Graphics::TColor Value);
	void __fastcall SetColorBar(const Graphics::TColor Value);
	void __fastcall SetOrientation(const Hbarcode::TOrientation Value);
	void __fastcall SetTextShow(const Hbarcode::TTextShow Value);
	void __fastcall SetTextPosition(const Hbarcode::TTextPosition Value);
	void __fastcall SetTextColor(const Graphics::TColor Value);
	void __fastcall SetHMargin(const int Value);
	void __fastcall SetAutoWidth(const bool Value);
	AnsiString __fastcall GetBarTypeName(void);
	void __fastcall SetAbout(const AnsiString Value);
	AnsiString __fastcall GetAbout(void);
	
protected:
	virtual void __fastcall SetBarcode(const AnsiString Value);
	virtual void __fastcall DoChange(void);
	
public:
	__fastcall virtual TBarCode(Classes::TComponent* Owner);
	__fastcall virtual ~TBarCode(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual void __fastcall Paint(void);
	int __fastcall AutoSetWidth(int H_Margin);
	void __fastcall Draw(Graphics::TCanvas* DCanvas, const int DLeft, const int DTop, const int DHeight
		, const double DAngle)/* overload */;
	void __fastcall Draw(Graphics::TCanvas* DCanvas, const int DLeft, const int DTop, const int DHeight
		)/* overload */;
	int __fastcall GetBarWidth(void);
	int __fastcall GetBarHeight(void);
	int __fastcall GetCanvasHeight(const int DHeight, const double DAngle)/* overload */;
	int __fastcall GetCanvasWidth(const int DHeight, const double DAngle)/* overload */;
	int __fastcall GetCanvasHeight(const int DHeight)/* overload */;
	int __fastcall GetCanvasWidth(const int DHeight)/* overload */;
	void __fastcall Print(const Hbarcode::TUnits DUnit, const double DLeft, const double DTop, const double 
		DHeight, const double DModul, const double DAngle)/* overload */;
	void __fastcall Print(const Hbarcode::TUnits DUnit, const double DLeft, const double DTop, const double 
		DHeight, const double DModul)/* overload */;
	double __fastcall GetPrnBarWidth(const Hbarcode::TUnits DUnit, const double DModul);
	double __fastcall GetPrnCanvasHeight(const Hbarcode::TUnits DUnit, const double DHeight, const double 
		DModul, const double DAngle)/* overload */;
	double __fastcall GetPrnCanvasWidth(const Hbarcode::TUnits DUnit, const double DHeight, const double 
		DModul, const double DAngle)/* overload */;
	double __fastcall GetPrnCanvasHeight(const Hbarcode::TUnits DUnit, const double DHeight, const double 
		DModul)/* overload */;
	double __fastcall GetPrnCanvasWidth(const Hbarcode::TUnits DUnit, const double DHeight, const double 
		DModul)/* overload */;
	void __fastcall H_DrawBar(Graphics::TCanvas* H_Canvas, const Hbarcode::TBarType H_BarType, const AnsiString 
		H_BarCode, const int H_Modul, const double H_Ratio, const Hbarcode::TCheckSum H_CheckSum, const int 
		H_Left, const int H_Top, const int H_Height, const Graphics::TFont* H_TextFont, const Hbarcode::TTextShow 
		H_TextShow, const Hbarcode::TTextPosition H_TextPosition, const Graphics::TColor H_BarColor, const 
		Graphics::TColor H_SpcColor, const Graphics::TColor H_BackColor, const double H_Angle);
	int __fastcall H_GetBarWidth(const Hbarcode::TBarType BW_Type, const AnsiString BW_Code, const int 
		BW_Modul, const double BW_Ratio, const Hbarcode::TCheckSum BW_CheckSum);
	int __fastcall H_GetCanvasWidth(const Hbarcode::TBarType CW_Type, const AnsiString CW_Code, const int 
		CW_Modul, const double CW_Ratio, const Hbarcode::TCheckSum CW_CheckSum, const int CW_Height, const 
		double CW_Angle);
	int __fastcall H_GetCanvasHeight(const Hbarcode::TBarType CH_Type, const AnsiString CH_Code, const 
		int CH_Modul, const double CH_Ratio, const Hbarcode::TCheckSum CH_CheckSum, const int CH_Height, const 
		double CH_Angle);
	void __fastcall H_PrintBar(const Hbarcode::TUnits H_Unit, const Hbarcode::TBarType H_BarType, const 
		AnsiString H_BarCode, const double H_Modul, const double H_Ratio, const Hbarcode::TCheckSum H_CheckSum
		, const double H_Left, const double H_Top, const double H_Height, const Graphics::TFont* H_TextFont
		, const Hbarcode::TTextShow H_TextShow, const Hbarcode::TTextPosition H_TextPosition, const Graphics::TColor 
		H_BarColor, const Graphics::TColor H_SpcColor, const Graphics::TColor H_BackColor, const double H_Angle
		);
	double __fastcall H_GetPrnBarWidth(const Hbarcode::TUnits BW_Unit, const Hbarcode::TBarType BW_Type
		, const AnsiString BW_Code, const double BW_Modul, const double BW_Ratio, const Hbarcode::TCheckSum 
		BW_CheckSum);
	double __fastcall H_PrnCanvasWidth(const Hbarcode::TUnits CW_Unit, const Hbarcode::TBarType CW_Type
		, const AnsiString CW_Code, const double CW_Modul, const double CW_Ratio, const Hbarcode::TCheckSum 
		CW_CheckSum, const double CW_Height, const double CW_Angle);
	double __fastcall H_PrnCanvasHeight(const Hbarcode::TUnits CH_Unit, const Hbarcode::TBarType CH_Type
		, const AnsiString CH_Code, const double CH_Modul, const double CH_Ratio, const Hbarcode::TCheckSum 
		CH_CheckSum, const double CH_Height, const double CH_Angle);
	AnsiString __fastcall H_GetBarTypeName(const Hbarcode::TBarType BN_BarType);
	__property AnsiString BarTypeName = {read=GetBarTypeName};
	__property int BarWidth = {read=GetBarWidth, nodefault};
	__property DockManager ;
	
__published:
	__property Hbarcode::TBarType BarType = {read=FBarType, write=SetBarType, default=3};
	__property AnsiString BarCode = {read=FBarCode, write=SetBarcode};
	__property int BarHeight = {read=FBarHeight, write=SetBarHeight, default=0};
	__property int Modul = {read=FModul, write=SetModul, nodefault};
	__property double Ratio = {read=FRatio, write=SetRatio};
	__property Hbarcode::TCheckSum CheckSum = {read=FCheckSum, write=SetCheckSum, default=0};
	__property Graphics::TColor ColorSpc = {read=FColorSpc, write=SetColorSpc, default=16777215};
	__property Graphics::TColor ColorBar = {read=FColorBar, write=SetColorBar, default=0};
	__property Hbarcode::TOrientation Orientation = {read=FOrientation, write=SetOrientation, default=0
		};
	__property Hbarcode::TTextShow TextShow = {read=FTextShow, write=SetTextShow, default=0};
	__property Hbarcode::TTextPosition TextPosition = {read=FTextPosition, write=SetTextPosition, default=5
		};
	__property Graphics::TColor TextColor = {read=FTextColor, write=SetTextColor, default=16777215};
	__property bool AutoWidth = {read=FAutoWidth, write=SetAutoWidth, default=0};
	__property int HMargin = {read=FHMargin, write=SetHMargin, default=0};
	__property AnsiString About = {read=GetAbout, write=SetAbout};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	__property TInvalidChar OnInvalidChar = {read=FOnInvalidChar, write=FOnInvalidChar};
	__property Align ;
	__property Alignment ;
	__property Anchors ;
	__property AutoSize ;
	__property BevelInner ;
	__property BevelOuter ;
	__property BevelWidth ;
	__property BiDiMode ;
	__property BorderWidth ;
	__property BorderStyle ;
	__property Color ;
	__property Constraints ;
	__property Ctl3D ;
	__property UseDockManager ;
	__property DockSite ;
	__property DragCursor ;
	__property DragKind ;
	__property DragMode ;
	__property Enabled ;
	__property FullRepaint ;
	__property Font ;
	__property Locked ;
	__property ParentBiDiMode ;
	__property ParentColor ;
	__property ParentCtl3D ;
	__property ParentFont ;
	__property ParentShowHint ;
	__property PopupMenu ;
	__property ShowHint ;
	__property TabOrder ;
	__property TabStop ;
	__property Visible ;
	__property OnCanResize ;
	__property OnClick ;
	__property OnConstrainedResize ;
	__property OnDockDrop ;
	__property OnDockOver ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDock ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnGetSiteInfo ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnResize ;
	__property OnStartDock ;
	__property OnStartDrag ;
	__property OnUnDock ;
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TBarCode(HWND ParentWindow) : Extctrls::TCustomPanel(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
#define ErrorBarcode "Barcode must be numeric."
#define ErrorBarType "Wrong barcode type."
#define ErrorLength "Invalid barcode length."
#define ErrorCode93 "Code_93 bad data."
#define ErrorInternal "Internal Error."
#define CopyrightInfo "BarCode VCL Component, Copyright(C) Han-soft Software.(htt"\
	"p://www.han-soft.com)"
#define Author "Han-soft Software"
#define Registration "9nt/(u'(&[yz*}t3HJtr=xu'k$`0J%&r#tNp$N<x{*1.?6-0yAnJp<A$v{"\
	"C$c}0WI"
#define TrialMessage "=TXn`0YZl9QZZ9DX"
#define TrialYear "z2?dWI"
#define YearFormat "b{)GYD"
#define BuilderClass "=C >V&p\"%Y#:X"
#define AlignClass "=C{7{~Wv-Y%{zHG"
#define AlignCaption "*nx5#UI"

}	/* namespace Pbarcode */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Pbarcode;
#endif
#pragma option pop	// -w-

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