// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Anyprint.pas' rev: 21.00

#ifndef AnyprintHPP
#define AnyprintHPP

#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 <Messages.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Anygrids.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Objlist.hpp>	// Pascal unit
#include <Anyrichedit.hpp>	// Pascal unit
#include <Richedit.hpp>	// Pascal unit
#include <Reportobj.hpp>	// Pascal unit
#include <Anychart.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Namelist.hpp>	// Pascal unit
#include <Anymetafile.hpp>	// Pascal unit
#include <Variants.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit

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

namespace Anyprint
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TBandType { btReportTitle, btPageHeader, btPageHeaderLeft, btPageHeaderMiddle, btPageHeaderRight, btFooterLeft, btFooterMiddle, btFooterRight, btSummaryLeft, btSummaryMiddle, btSummaryRight, btPageFooterLeft, btPageFooterMiddle, btPageFooterRight };
#pragma option pop

typedef void __fastcall (__closure *TPrintTextEvent)(System::TObject* Sender, int PageNo, System::WideString &Text);

typedef void __fastcall (__closure *TPrintPageEvent)(System::TObject* Sender, int PageNo, int PageCount);

typedef void __fastcall (__closure *TPrintCellEvent)(System::TObject* Sender, const Types::TRect &CellArea);

typedef void __fastcall (__closure *TGetRecordCountEvent)(System::TObject* Sender, int &RecordCount);

typedef void __fastcall (__closure *TPrintRecordEvent)(System::TObject* Sender, int RecordIndex);

typedef void __fastcall (__closure *TDrawTextBandEvent)(System::TObject* Sender, TBandType BandType, Graphics::TCanvas* Canvas, const System::WideString Text, const Types::TRect &Rect, bool &Handled);

typedef void __fastcall (__closure *TPrintUserControlEvent)(System::TObject* Sender, Controls::TWinControl* AControl, bool &NeedPrint);

#pragma option push -b-
enum TPrintPages { pgAll, pgOdd, pgEven };
#pragma option pop

class DELPHICLASS TPrintCellData;
class PASCALIMPLEMENTATION TPrintCellData : public Anygrids::TCellData
{
	typedef Anygrids::TCellData inherited;
	
public:
	/* TCellData.Create */ inline __fastcall TPrintCellData(void) : Anygrids::TCellData() { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TPrintCellData(void) { }
	
};


class DELPHICLASS TAnyPrint;
class PASCALIMPLEMENTATION TAnyPrint : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	Types::TRect FPrintCellArea;
	bool FDrawGridLine;
	TPrintCellEvent FOnPrintCell;
	TGetRecordCountEvent FOnGetRecordCount;
	TPrintRecordEvent FOnPrintRecord;
	Classes::TNotifyEvent FOnFinish;
	TDrawTextBandEvent FOnDrawTextBand;
	Namelist::TNameList* PageRecordInfo;
	int FCurrRecordIndex;
	int FPageCount;
	Classes::TNotifyEvent FOnPrintReport;
	int __fastcall GetPrintZoom(void);
	void __fastcall SetPrintZoom(const int Value);
	int __fastcall GetPageScreenHeight(void);
	int __fastcall GetPageScreenWidth(void);
	void __fastcall SetDirectToPrinter(const bool Value);
	bool FHorzAutoCenter;
	bool FVertAutoCenter;
	int FpgSize;
	int FpgWidth;
	int FTitleRows;
	int FpgHeight;
	Anygrids::TCustomAnyGrid* FAnyGrid;
	Reportobj::TFooterParams* FFooter;
	Reportobj::TFooterParams* FPageFooter;
	Reportobj::TFooterParams* FSummary;
	Reportobj::TPageHeaderParams* FPageHeader;
	Reportobj::TPageMargins* FPageMargins;
	Printers::TPrinterOrientation FOrientation;
	Reportobj::TTitleParams* FTitle;
	bool First;
	Objlist::TObjList* PageList;
	int HorzPages;
	int VertPages;
	Objlist::TObjList* TitleList;
	Objlist::TObjList* FooterList;
	Objlist::TObjList* TitleColumnList;
	Objlist::TObjList* FooterColumnList;
	bool FColorPrinter;
	short FBin;
	StaticArray<System::WideChar, 128> FDevice;
	StaticArray<System::WideChar, 260> FDriver;
	StaticArray<System::WideChar, 128> FPort;
	unsigned FDeviceMode;
	_devicemodeW *FMode;
	TPrintTextEvent FOnPrintText;
	bool Printing;
	int PrinterIndex;
	bool FCollate;
	int FCopies;
	System::WideString FPageNumbers;
	TPrintPages FPrintPages;
	System::WideString FDocumentName;
	Forms::TForm* FProgressForm;
	bool FShowProgress;
	bool FModalPreview;
	TPrintUserControlEvent FOnPrintUserControl;
	Forms::TForm* FRichParent;
	bool FDisablePrint;
	_RTL_CRITICAL_SECTION FDrawCritical;
	int FFooterRows;
	Anyrichedit::TAnyRichEdit* FRichDrawEdit;
	Types::TRect FCopyToRect;
	int FHorzSpaceToBreak;
	int FVertSpaceToBreak;
	int FPageColumns;
	Graphics::TBitmap* FBackBmp;
	Graphics::TBitmap* FBackGround;
	int FTitleColumns;
	int FFooterColumns;
	int FVersion;
	bool FDirectToPrinter;
	TPrintPageEvent FOnBeforePrintPage;
	TPrintPageEvent FOnAfterPrintPage;
	int FPrintZoom;
	TPrintCellData* FCellData;
	TPrintCellData* FTempCellData;
	TPrintCellData* FCellDataGet;
	unsigned FHandle;
	bool __fastcall PrecedingCol3D(int ARow, int ACol);
	bool __fastcall PrecedingRow3D(int ARow, int ACol);
	void __fastcall BeforeModal(System::TObject* Sender);
	void __fastcall AssignFont(Graphics::TCanvas* Canvas, Graphics::TFont* Font, TPrintCellData* AData = (TPrintCellData*)(0x0));
	void __fastcall ClearPages(void);
	void __fastcall ClearTitleList(void);
	void __fastcall ClearFooterList(void);
	void __fastcall ClearTitleColumnList(void);
	void __fastcall ClearFooterColumnList(void);
	int __fastcall GetTitleHeight(void);
	int __fastcall GetPageHeaderHeight(void);
	int __fastcall GetPageFooterHeight(void);
	int __fastcall GetFooterHeight(void);
	int __fastcall GetSummayHeight(void);
	int __fastcall GetPageCount(void);
	int __fastcall RightCellIndex(int Row, int Col);
	int __fastcall LeftCellIndex(int Row, int Col);
	int __fastcall TopCellIndex(int Row, int Col);
	int __fastcall GetTextHeight(const System::WideString AText, Graphics::TFont* AFont);
	void __fastcall SetFooter(const Reportobj::TFooterParams* Value);
	void __fastcall SetPageFooter(const Reportobj::TFooterParams* Value);
	void __fastcall SetPageHeader(const Reportobj::TPageHeaderParams* Value);
	void __fastcall SetPageMargins(const Reportobj::TPageMargins* Value);
	void __fastcall SetTitle(const Reportobj::TTitleParams* Value);
	void __fastcall SetSummary(const Reportobj::TFooterParams* Value);
	void __fastcall SetAnyGrid(const Anygrids::TCustomAnyGrid* Value);
	void __fastcall AddPassWord(Anygrids::TCellInfo* ACell, System::WideString &Text);
	int __fastcall GetAnyGridPages(Objlist::TObjList* List, const Types::TRect &PrintArea);
	void __fastcall AddThousandSept(Anygrids::TCellInfo* ACell, System::WideString &Text);
	void __fastcall DrawCurrenyCell(bool PrintLine, Graphics::TCanvas* Canvas, int CanvasOffx, int CanvasOffy, double AScalx, double AScaly, const Types::TRect &CellRect, const Types::TRect &Rect, int Top, Graphics::TColor Color1, Graphics::TColor Color2, const System::AnsiString CurrencySymbol, const System::WideString Text, double Value, char PasswordChar, bool ChineseCurrency);
	void __fastcall AddEmptyCellThousandSept(int Row, int Col, Anygrids::TAnyColumn* AColumn, System::WideString &Text);
	void __fastcall AddEmptyCellPassWord(Anygrids::TAnyColumn* AColumn, System::WideString &Text);
	void __fastcall DrawVerticalText(int Space, Graphics::TCanvas* ACanvas, Anygrids::TCellInfo* Cell, const Types::TRect &R, const System::WideString Text, const Classes::TAlignment TextAlign, const Anygrids::TVerAlignment VerAlign, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly);
	void __fastcall DrawEmptyCellVerticalText(int Space, Graphics::TCanvas* ACanvas, const Types::TRect &R, const System::WideString Text, const Classes::TAlignment TextAlign, const Anygrids::TVerAlignment VerAlign, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly);
	bool __fastcall DrawGraphic(Graphics::TCanvas* Canvas, Anygrids::TCellInfo* Cell, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly);
	void __fastcall Rectangle(Graphics::TCanvas* ACanvas, const Types::TRect &R, int Row, int Col, int Offx, int Offy, int CanvasOffx, int CanvasOffy, double AScalx, double AScaly, bool OnlyText);
	void __fastcall RectangleEmptyCell(Graphics::TCanvas* ACanvas, const Types::TRect &R, int Row, int Col, int Offx, int Offy, int CanvasOffx, int CanvasOffy, double AScalx, double AScaly, bool OnlyText, bool DrawTopLine, bool DrawBottomLine);
	Types::TRect __fastcall GetDrawRect(const Types::TRect &R, int W, int H, Classes::TAlignment HAlign, Anygrids::TVerAlignment VAlign);
	Types::TRect __fastcall GetTextRect(Graphics::TCanvas* ACanvas, const System::WideString Text, const Types::TRect &R, Classes::TAlignment HAlign, Anygrids::TVerAlignment VAlign, int FontAngle);
	void __fastcall DrawAutoText(Graphics::TCanvas* Canvas, Anygrids::TCellInfo* ACell, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly);
	void __fastcall DrawEmptyCellAutoText(Graphics::TCanvas* Canvas, int Row, int Col, Anygrids::TAnyColumn* AColumn, const System::WideString Text, const Types::TRect &CellRect, Classes::TAlignment Align, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly);
	void __fastcall DrawCell(Graphics::TCanvas* ACanvas, Anygrids::TCellInfo* Cell, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly, const bool OnlyText = false);
	void __fastcall DrawCellFrame(Graphics::TCanvas* ACanvas, Anygrids::TCellInfo* Cell, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly, const bool OnlyText = false);
	void __fastcall CopyRect(Graphics::TCanvas* Canvas, const Types::TRect &DestRect, const Types::TRect &SourceRect, int PageIndex);
	void __fastcall DrawPrn(Graphics::TCanvas* ACanvas, const int AWidth, const int AHeight, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly, const bool OnlyDrawText);
	Types::TRect __fastcall CalPrintViewRegion(const int AWidth, const int AHeight, const int Offx, const int Offy);
	int __fastcall GetColByIndex(int Index);
	int __fastcall GetRowByIndex(int Index);
	Anygrids::TCellInfo* __fastcall GetCell(int Index);
	void __fastcall LineTo(Graphics::TCanvas* Canvas, const Types::TPoint &PointFrom, const Types::TPoint &PointTo, int Dir, int CanvasOffx, int CanvasOffy, double AScalx, double AScaly, int L, int T, int R, int B);
	Anygrids::TCellInfo* __fastcall GetBottomCell(Anygrids::TCellInfo* Cell)/* overload */;
	Anygrids::TCellInfo* __fastcall GetBottomCell(int Row, int Col)/* overload */;
	Anygrids::TCellInfo* __fastcall GetRightCell(Anygrids::TCellInfo* Cell)/* overload */;
	Anygrids::TCellInfo* __fastcall GetRightCell(int Row, int Col)/* overload */;
	Anygrids::TCellInfo* __fastcall GetLeftCell(Anygrids::TCellInfo* Cell)/* overload */;
	Anygrids::TCellInfo* __fastcall GetLeftCell(int Row, int Col)/* overload */;
	Anygrids::TCellInfo* __fastcall GetTopCell(Anygrids::TCellInfo* Cell)/* overload */;
	Anygrids::TCellInfo* __fastcall GetTopCell(int Row, int Col)/* overload */;
	int __fastcall BottomCellIndex(int Row, int Col);
	System::WideString __fastcall ReplaceText(const System::WideString Text, int PageNo, int RecPageCount, int RecPageNo);
	void __fastcall TerminateShow(void);
	void __fastcall DrawRadioButton(const Graphics::TCanvas* Canvas, const Types::TRect &Rect, Anygrids::TAnyStrings* Items, int ItemIndex, const double AScalx, const double AScaly);
	void __fastcall DrawEmptyCell(Graphics::TCanvas* ACanvas, int Row, int Col, int Offx = 0x0, int Offy = 0x0, int CanvasOffx = 0x0, int CanvasOffy = 0x0, double AScalx = 0.000000E+00, double AScaly = 0.000000E+00, bool OnlyText = false);
	void __fastcall DrawEmptyCellFrame(Graphics::TCanvas* ACanvas, int Row, int Col, int Offx = 0x0, int Offy = 0x0, int CanvasOffx = 0x0, int CanvasOffy = 0x0, double AScalx = 0.000000E+00, double AScaly = 0.000000E+00, bool OnlyText = false);
	void __fastcall DrawColumnTitles(Graphics::TCanvas* ACanvas, const Types::TRect &Rect, int Offx);
	Anygrids::TCellType __fastcall DrawEmptyCellGraphic(Graphics::TCanvas* Canvas, int Row, int Col, const int Offx, const int Offy, const int CanvasOffx, const int CanvasOffy, const double AScalx, const double AScaly, bool &GraphicDBCell);
	void __fastcall SetVersion(const int Value);
	Graphics::TColor __fastcall GetCellDrawColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall Delta(double ScaleX);
	int __fastcall ZoomValue(int Value);
	Classes::TAlignment __fastcall CellHorAlignment(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Anygrids::TVerAlignment __fastcall CellVerAlignment(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellBackColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellWordWrap(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellBiasColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellTopLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellLeftLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellBottomLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellRightLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellDigits(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellThousandSeparators(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellLeftFrame(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellTopFrame(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellRightFrame(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellBottomFrame(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellTileGraphic(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellStretch(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellStretchFine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellVerticalText(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellLeftFrameWidth(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellTopFrameWidth(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellRightFrameWidth(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellBottomFrameWidth(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellLeftFrameColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellTopFrameColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellRightFrameColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellBottomFrameColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TPenStyle __fastcall CellLeftFrameStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TPenStyle __fastcall CellTopFrameStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TPenStyle __fastcall CellRightFrameStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TPenStyle __fastcall CellBottomFrameStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Anygrids::TBiasDirection __fastcall CellBiasDirection(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellBiasWidth(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TPenStyle __fastcall CellBiasStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TColor __fastcall CellTransparentColor(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellTransparent(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellTextLMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellTextTMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellTextRMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellTextBMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Classes::TAlignment __fastcall CellGraphicHorAlign(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Anygrids::TVerAlignment __fastcall CellGraphicVerAlign(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellGraphicLMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellGraphicRMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellGraphicTMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellGraphicBMargin(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellCtl3D(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	Graphics::TBrushStyle __fastcall CellBrushStyle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellTrimZero(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellFontAngle(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellShrinkToFit(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellPrintable(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellPrintCurrencyLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall CellVerticalTextSpace(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall CellShowCurrencyLine(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	void __fastcall WndProc(Messages::TMessage &Message);
	void __fastcall _PrintReport(void);
	void __fastcall _ShowReport(void);
	void __fastcall InitRecord(int &PageNo, int &OwnerPageCount);
	int __fastcall Cross_LeftOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_TopOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_RightOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_BottomOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall LeftLine_TopOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall LeftLine_BottomOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall TopLine_LeftOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall TopLine_RightOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall RightLine_TopOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall RightLine_BottomOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall BottomLine_LeftOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	int __fastcall BottomLine_RightOff(int Row, int Col, TPrintCellData* AData = (TPrintCellData*)(0x0));
	bool __fastcall ErrorRowCol(const int ARow, const int ACol);
	bool __fastcall ErrorRow(const int ARow);
	bool __fastcall ErrorCol(const int ACol);
	int __fastcall CalPenWidth(int AWidth);
	int __fastcall CalPenHeight(int AWidth);
	double __fastcall Line_Scale(double A);
	
protected:
	double ScaleX;
	double ScaleY;
	int SaveZoom;
	void __fastcall DrawPage(int PageNo, Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	bool __fastcall InternalPrint(bool Init = true);
	void __fastcall GetSettings(void);
	void __fastcall SetPrinter(int Index);
	void __fastcall PrintPage(int PageNo, bool NewPage);
	void __fastcall GetPagesRect(Objlist::TObjList* RectList);
	
public:
	bool Terminated;
	__fastcall virtual TAnyPrint(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyPrint(void);
	void __fastcall SettingPrinter(void);
	virtual void __fastcall PrintReport(void);
	virtual void __fastcall ShowReport(void);
	void __fastcall PrepareReport(void);
	void __fastcall Init(void);
	void __fastcall SaveToStream(Classes::TStream* Stream);
	void __fastcall LoadFromStream(Classes::TStream* Stream);
	void __fastcall SaveToFile(System::WideString FileName);
	void __fastcall LoadFromFile(System::WideString FileName);
	__property int PageCount = {read=GetPageCount, nodefault};
	__property short Bin = {read=FBin, write=FBin, nodefault};
	__property int Copies = {read=FCopies, write=FCopies, nodefault};
	__property bool Collate = {read=FCollate, write=FCollate, nodefault};
	__property System::WideString PageNumbers = {read=FPageNumbers, write=FPageNumbers};
	__property TPrintPages PrintPages = {read=FPrintPages, write=FPrintPages, nodefault};
	__property int Version = {read=FVersion, write=SetVersion, nodefault};
	__property int PageScreenWidth = {read=GetPageScreenWidth, nodefault};
	__property int PageScreenHeight = {read=GetPageScreenHeight, nodefault};
	
__published:
	__property Anygrids::TCustomAnyGrid* AnyGrid = {read=FAnyGrid, write=SetAnyGrid};
	__property int PageSize = {read=FpgSize, write=FpgSize, nodefault};
	__property int PageWidth = {read=FpgWidth, write=FpgWidth, nodefault};
	__property int PageHeight = {read=FpgHeight, write=FpgHeight, nodefault};
	__property Reportobj::TPageMargins* PageMargins = {read=FPageMargins, write=SetPageMargins};
	__property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=FOrientation, default=0};
	__property Reportobj::TTitleParams* ReportTitle = {read=FTitle, write=SetTitle};
	__property Reportobj::TPageHeaderParams* PageHeader = {read=FPageHeader, write=SetPageHeader};
	__property Reportobj::TFooterParams* PageFooter = {read=FPageFooter, write=SetPageFooter};
	__property Reportobj::TFooterParams* Footer = {read=FFooter, write=SetFooter};
	__property Reportobj::TFooterParams* Summary = {read=FSummary, write=SetSummary};
	__property int TitleRows = {read=FTitleRows, write=FTitleRows, default=0};
	__property int FooterRows = {read=FFooterRows, write=FFooterRows, default=0};
	__property bool HorzAutoCenter = {read=FHorzAutoCenter, write=FHorzAutoCenter, default=1};
	__property bool VertAutoCenter = {read=FVertAutoCenter, write=FVertAutoCenter, default=0};
	__property bool ColorPrinter = {read=FColorPrinter, write=FColorPrinter, default=1};
	__property System::WideString DocumentName = {read=FDocumentName, write=FDocumentName};
	__property TPrintTextEvent OnPrintText = {read=FOnPrintText, write=FOnPrintText};
	__property bool ShowProgress = {read=FShowProgress, write=FShowProgress, nodefault};
	__property bool ModalPreview = {read=FModalPreview, write=FModalPreview, nodefault};
	__property bool DisablePrint = {read=FDisablePrint, write=FDisablePrint, default=0};
	__property TPrintUserControlEvent OnPrintUserControl = {read=FOnPrintUserControl, write=FOnPrintUserControl};
	__property int VertSpaceToBreak = {read=FVertSpaceToBreak, write=FVertSpaceToBreak, default=200};
	__property int HorzSpaceToBreak = {read=FHorzSpaceToBreak, write=FHorzSpaceToBreak, default=200};
	__property int PageColumns = {read=FPageColumns, write=FPageColumns, default=1};
	__property int TitleColumns = {read=FTitleColumns, write=FTitleColumns, default=0};
	__property int FooterColumns = {read=FFooterColumns, write=FFooterColumns, default=0};
	__property bool DirectToPrinter = {read=FDirectToPrinter, write=SetDirectToPrinter, nodefault};
	__property int PrintZoom = {read=GetPrintZoom, write=SetPrintZoom, default=100};
	__property bool PrintGridLine = {read=FDrawGridLine, write=FDrawGridLine, default=1};
	__property TPrintPageEvent OnBeforePrintPage = {read=FOnBeforePrintPage, write=FOnBeforePrintPage};
	__property TPrintPageEvent OnAfterPrintPage = {read=FOnAfterPrintPage, write=FOnAfterPrintPage};
	__property TPrintCellEvent OnPrintCell = {read=FOnPrintCell, write=FOnPrintCell};
	__property TGetRecordCountEvent OnGetRecordCount = {read=FOnGetRecordCount, write=FOnGetRecordCount};
	__property TPrintRecordEvent OnPrintRecord = {read=FOnPrintRecord, write=FOnPrintRecord};
	__property Classes::TNotifyEvent OnPrintFinish = {read=FOnFinish, write=FOnFinish};
	__property TDrawTextBandEvent OnDrawTextBand = {read=FOnDrawTextBand, write=FOnDrawTextBand};
	__property Classes::TNotifyEvent OnPrintReport = {read=FOnPrintReport, write=FOnPrintReport};
};


class DELPHICLASS TAnyCompositePrint;
class PASCALIMPLEMENTATION TAnyCompositePrint : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	Objlist::TObjList* FReportList;
	System::WideString FDocumentName;
	bool FTerminated;
	TAnyPrint* PrintingReport;
	bool FShowProgress;
	bool FModalPreview;
	bool FDisablePrint;
	unsigned FHandle;
	void __fastcall BeforeModal(System::TObject* Sender);
	int __fastcall GetPageCount(void);
	TAnyPrint* __fastcall GetPrint(int Index);
	TAnyPrint* __fastcall GetAnyPrints(int PageNo);
	int __fastcall GetReportCount(void);
	void __fastcall SetTerminated(const bool Value);
	void __fastcall WndProc(Messages::TMessage &Message);
	void __fastcall _PrintReport(void);
	void __fastcall _ShowReport(void);
	
protected:
	void __fastcall DrawPage(int PageNo, Graphics::TCanvas* Canvas, const Types::TRect &ARect, double AScale);
	
public:
	__fastcall virtual TAnyCompositePrint(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyCompositePrint(void);
	void __fastcall AddReport(TAnyPrint* Report);
	void __fastcall RemoveReport(TAnyPrint* Report);
	void __fastcall ClearReport(void);
	void __fastcall PrintReport(void);
	void __fastcall ShowReport(void);
	__property int PageCount = {read=GetPageCount, nodefault};
	__property TAnyPrint* Reports[int Index] = {read=GetPrint};
	__property TAnyPrint* ReportsByPageNo[int PageNo] = {read=GetAnyPrints};
	__property int ReportCount = {read=GetReportCount, nodefault};
	__property System::WideString DocumentName = {read=FDocumentName, write=FDocumentName};
	__property bool Terminated = {read=FTerminated, write=SetTerminated, nodefault};
	__property bool ShowProgress = {read=FShowProgress, write=FShowProgress, nodefault};
	__property bool ModalPreview = {read=FModalPreview, write=FModalPreview, nodefault};
	__property bool DisablePrint = {read=FDisablePrint, write=FDisablePrint, default=0};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE double __fastcall PixelToXmm(int Pixel);
extern PACKAGE double __fastcall PixelToYmm(int Pixel);
extern PACKAGE double __fastcall PixelToXInch(int Pixel);
extern PACKAGE double __fastcall PixelToYInch(int Pixel);
extern PACKAGE int __fastcall XmmToPixel(double mm);
extern PACKAGE int __fastcall YmmToPixel(double mm);
extern PACKAGE int __fastcall XInchToPixel(double Inch);
extern PACKAGE int __fastcall YInchToPixel(double Inch);
extern PACKAGE int __fastcall PrinterHeight(void);
extern PACKAGE int __fastcall PrinterWidth(void);
extern PACKAGE int __fastcall VPointsPerInch(HDC DC);
extern PACKAGE int __fastcall HPointsPerInch(HDC DC);
extern PACKAGE Types::TPoint __fastcall GetPhicalPaperMM(void);
extern PACKAGE int __fastcall ConvertDC(void);
extern PACKAGE double __fastcall ScalX(HDC DC);
extern PACKAGE double __fastcall ScalY(HDC DC);
extern PACKAGE HFONT __fastcall CreateZoomFont(Graphics::TCanvas* Canvas, Graphics::TFont* Font, int Zoom);

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

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