// CodeGear C++Builder
// Copyright (c) 1995, 2010 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'pBarcode.pas' rev: 22.00
#ifndef PbarcodeHPP
#define PbarcodeHPP
#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 <Graphics.hpp> // Pascal unit
#include <ExtCtrls.hpp> // Pascal unit
#include <Controls.hpp> // Pascal unit
#include <Math.hpp> // Pascal unit
#include <Printers.hpp> // Pascal unit
#include <TypInfo.hpp> // Pascal unit
#include <pCore.hpp> // Pascal unit
#include <Types.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Pbarcode
{
//-- type declarations -------------------------------------------------------
struct DECLSPEC_DRECORD TBarcodeCustomParameters
{
public:
double Alpha;
Types::TPoint Orgin;
System::UnicodeString FullEncoded;
System::UnicodeString Text;
Pcore::TDisplayText DisplayText;
Pcore::TTextPosition TextPosition;
Pcore::TTextAlignment TextAlignment;
Graphics::TFont* TextFont;
int LeftQuietZone_Spacing;
int RightQuietZone_Spacing;
int LeftQuietZone_Width;
int RightQuietZone_Width;
int Symbol_Width;
int Symbol_Height;
int Symbol_V_Offset;
int Symbol_H_Offset;
int Total_Left;
int Total_Top;
int Total_Width;
int Total_Height;
};
typedef void __fastcall (__closure *TOnInvalidChar)(System::TObject* Sender, int Index, System::WideChar BarcodeChar);
typedef void __fastcall (__closure *TOnInvalidLength)(System::TObject* Sender, System::UnicodeString Barcode);
typedef void __fastcall (__closure *TOnDrawText)(System::TObject* Sender, Graphics::TCanvas* Canvas, Pcore::TDrawTextStep Step, TBarcodeCustomParameters &BarcodeParameters, bool &Continue, Types::TPoint &LeftTop, Types::TPoint &RightBottom, System::PInteger &PDx);
typedef void __fastcall (__closure *TOnDrawBarcode)(System::TObject* Sender, Graphics::TCanvas* Canvas, const TBarcodeCustomParameters &Parameters);
#pragma option push -b-
enum TBarcodeOrientation { boLeftRight, boRightLeft, boTopBottom, boBottomTop };
#pragma option pop
class DELPHICLASS TBarcode;
class PASCALIMPLEMENTATION TBarcode : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
int FModule;
Graphics::TColor FSpaceColor;
TBarcodeOrientation FOrientation;
int FLeftMargin;
int FTopMargin;
int FBarcodeWidth;
int FBarcodeHeight;
Pcore::TTextPosition FTextPosition;
Pcore::TTextAlignment FTextAlignment;
Graphics::TFont* FTextFont;
int FTextHSpacing;
int FTextVSpacing;
Graphics::TFont* FOldTextFont;
bool FLocked;
Types::TRect FLockedRect;
Classes::TNotifyEvent FOnChange;
TOnInvalidChar FOnInvalidChar;
TOnInvalidLength FOnInvalidLength;
TOnDrawText FOnDrawText;
TOnDrawBarcode FOnDrawBarcode;
Classes::TNotifyEvent FOnChangeToUpdateDatabase;
Controls::TControl* FImage;
void __fastcall SetImage(const Controls::TControl* Value);
void __fastcall SetBarcode(const System::UnicodeString Value);
void __fastcall SetModule(const int Value);
virtual void __fastcall SetRatio(const double Value);
void __fastcall SetSpaceColor(const Graphics::TColor Value);
void __fastcall SetOrientation(const TBarcodeOrientation Value);
void __fastcall SetLeftMargin(const int Value);
void __fastcall SetTopMargin(const int Value);
void __fastcall SetBarcodeWidth(const int Value);
void __fastcall SetBarcodeHeight(const int Value);
void __fastcall SetDisplayText(const Pcore::TDisplayText Value);
void __fastcall SetTextAlignment(const Pcore::TTextAlignment Value);
void __fastcall SetTextFont(const Graphics::TFont* Value);
void __fastcall SetTextPosition(const Pcore::TTextPosition Value);
void __fastcall SetTextHSpacing(const int Value);
void __fastcall SetTextVSpacing(const int Value);
void __fastcall SetLocked(const bool Value);
System::UnicodeString __fastcall GetFullEncoded(void);
protected:
System::UnicodeString FBarcode;
double FRatio;
bool FAutoCheckDigit;
Graphics::TColor FBarColor;
Pcore::TDisplayText FDisplayText;
virtual void __fastcall SetBarColor(const Graphics::TColor Value);
void __fastcall SetAutoCheckDigit(const bool Value);
virtual void __fastcall Loaded(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
Graphics::TCanvas* __fastcall GetCanvas(void);
int __fastcall GetAngle(void);
virtual void __fastcall GetRegion(Graphics::TCanvas* Canvas, int &AWidth, int &AHeight, int &PerfectWidth, int &TotalHeight, Graphics::TFont* ATextFont = (Graphics::TFont*)(0x0));
void __fastcall ClearRegion(Graphics::TCanvas* Canvas, const Types::TRect &Rect, bool UseSpaceColor = false);
Pcore::TBarcodeDefineExtra __fastcall BuildBarcodeDefineExtra(bool CustomAngle = false, int Angle = 0x0);
virtual TBarcodeCustomParameters __fastcall BuildCustomParameters(const Pcore::TBarcodeDefine &Define, const Pcore::TBarcodeParameters &Parameters);
virtual void __fastcall DoChange(bool ExecuteOnChange = false);
virtual void __fastcall DoInvalidLength(System::UnicodeString Barcode);
virtual void __fastcall DoInvalidChar(System::UnicodeString Barcode, int Index);
virtual void __fastcall DoCustomDrawText(Graphics::TCanvas* Canvas, Pcore::TDrawTextStep Step, Pcore::TBarcodeDefine &Define, Pcore::TBarcodeParameters &Parameters, bool &Continue, Types::TPoint &LeftTop, Types::TPoint &RightBottom, System::PInteger &PDx);
virtual void __fastcall DoDrawLine(int Index, Pcore::TLineType LineType, Graphics::TColor &Color, int &Left, int &Top, int &Width, int &Height);
virtual void __fastcall DoAfterDrawBarcode(Graphics::TCanvas* Canvas, const Pcore::TBarcodeDefine &Define, const Pcore::TBarcodeParameters &Parameters);
virtual bool __fastcall VerifyLength(System::UnicodeString Barcode, bool AutoCheckDigit);
virtual int __fastcall VerifyAllChars(System::UnicodeString Barcode, bool AutoCheckDigit);
virtual bool __fastcall VerifyChar(System::UnicodeString Barcode, int Index, bool AutoCheckDigit);
virtual System::UnicodeString __fastcall AppendCheckDigit(System::UnicodeString Barcode);
virtual void __fastcall GetQuietZonesWidth(Graphics::TCanvas* Canvas, System::UnicodeString FullText, Pcore::TDisplayText DisplayText, Pcore::TTextAlignment Alignment, int &LeftText, int &RightText, int &LeftSpacing, int &RightSpacing);
virtual System::UnicodeString __fastcall MakeData(System::UnicodeString Barcode, bool AutoCheckDigit, System::UnicodeString &FullEncoded);
virtual bool __fastcall IsMultiState(void);
void __fastcall Changed(void);
__property bool AutoCheckDigit = {read=FAutoCheckDigit, write=SetAutoCheckDigit, default=1};
__property System::UnicodeString Barcode = {read=FBarcode, write=SetBarcode};
__property double Ratio = {read=FRatio, write=SetRatio};
__property int TextHSpacing = {read=FTextHSpacing, write=SetTextHSpacing, default=0};
__property Classes::TNotifyEvent OnChangeToUpdateDatabase = {read=FOnChangeToUpdateDatabase, write=FOnChangeToUpdateDatabase};
virtual void __fastcall InternalClear(bool CheckLocked = true, Graphics::TFont* ATextFont = (Graphics::TFont*)(0x0), bool UseSpaceColor = false, bool IsIneternalCall = true);
public:
__fastcall virtual TBarcode(Classes::TComponent* Owner);
__fastcall virtual ~TBarcode(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
virtual void __fastcall Clear(bool UseSpaceColor = false);
virtual void __fastcall Draw(void);
virtual int __fastcall DefaultDisplayWidth(int AModule = 0x0, int AAngle = 0xffffffff)/* overload */;
virtual int __fastcall DefaultDisplayWidth(Gra