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

// (DO NOT EDIT: machine generated header) 'XSSIEPaginate.pas' rev: 28.00 (Windows)

#ifndef XssiepaginateHPP
#define XssiepaginateHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Contnrs.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <XSSIEDefs.hpp>	// Pascal unit
#include <XSSIEUtils.hpp>	// Pascal unit
#include <XSSIEDocProps.hpp>	// Pascal unit
#include <XSSIECharRun.hpp>	// Pascal unit
#include <XSSIEPhyRow.hpp>	// Pascal unit
#include <XSSIELogParas.hpp>	// Pascal unit
#include <XSSIEGDIText.hpp>	// Pascal unit
#include <XBookPaintGDI2.hpp>	// Pascal unit

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

namespace Xssiepaginate
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAXWWordDataNewCharRunEvent)(int &CRIndex, Xssiecharrun::TAXWCharRun* &CR);

class DELPHICLASS TAXWParaObjSize;
class PASCALIMPLEMENTATION TAXWParaObjSize : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	double FWidth;
	double FHeight;
	double FCurrHeight;
	bool FAlignRight;
	
public:
	__property double Width = {read=FWidth, write=FWidth};
	__property double Height = {read=FHeight, write=FHeight};
	__property double CurrHeight = {read=FCurrHeight, write=FCurrHeight};
	__property bool AlignRigth = {read=FAlignRight, write=FAlignRight, nodefault};
public:
	/* TObject.Create */ inline __fastcall TAXWParaObjSize(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TAXWParaObjSize(void) { }
	
};


class DELPHICLASS TAXWParaObjSizes;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWParaObjSizes : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
private:
	TAXWParaObjSize* __fastcall GetItems(int Index);
	double __fastcall GetWidth(void);
	double __fastcall GetXOffset(void);
	
public:
	HIDESBASE void __fastcall Add(const int AWidth, const int AHeight, bool AAlignRigth);
	void __fastcall Dec(const double AHeight);
	__property double Width = {read=GetWidth};
	__property double XOffset = {read=GetXOffset};
	__property TAXWParaObjSize* Items[int Index] = {read=GetItems};
public:
	/* TObjectList.Create */ inline __fastcall TAXWParaObjSizes(void)/* overload */ : System::Contnrs::TObjectList() { }
	/* TObjectList.Create */ inline __fastcall TAXWParaObjSizes(bool AOwnsObjects)/* overload */ : System::Contnrs::TObjectList(AOwnsObjects) { }
	
public:
	/* TList.Destroy */ inline __fastcall virtual ~TAXWParaObjSizes(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TAXWWordData;
class PASCALIMPLEMENTATION TAXWWordData : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	typedef System::DynamicArray<Xssieutils::TBreakCharData> _TAXWWordData__1;
	
	
private:
	void __fastcall SetBreakChar(const System::WideChar Value);
	
protected:
	Xssielogparas::TAXWLogPara* FPara;
	Xssieutils::TAXWClientArea* FArea;
	Xssiegditext::TAXWTextPrint* FPrint;
	Xssiecharrun::TAXWCharRun* FCR1;
	Xssiecharrun::TAXWCharRun* FCR2;
	int FCRPos1;
	int FCRPos2;
	int FLeadingSpaceCount;
	double FLeadingSpaceWidth;
	int FCharCount;
	double FWidth;
	int FTrailingSpaceCount;
	double FTrailingSpaceWidth;
	bool FHasLineBreak;
	bool FCollectBreakChar;
	System::WideChar FBreakChar;
	double FBreakCharWidth;
	_TAXWWordData__1 FLeadingBreakChars;
	_TAXWWordData__1 FTrailingBreakChars;
	int FLeadingBreakCharsCount;
	int FTrailingBreakCharsCount;
	TAXWWordDataNewCharRunEvent FNewCharRunEvent;
	Xssiedocprops::TAXWTabStop* FTabStop;
	double __fastcall TextWidth(const System::UnicodeString AText);
	void __fastcall AddLeadingBC(void);
	void __fastcall AddTrailingBC(void);
	bool __fastcall CharIsWhitespaceLeading(System::WideChar C);
	bool __fastcall CharIsWhitespaceTrailing(System::WideChar C);
	
public:
	__fastcall TAXWWordData(Xssiegditext::TAXWTextPrint* Print, Xssieutils::TAXWClientArea* Area);
	void __fastcall Clear(int ACRPos);
	double __fastcall TotWidth(void);
	double __fastcall WidthBeginning(void);
	double __fastcall WidthEnd(void);
	int __fastcall TotCharCount(void);
	bool __fastcall NextWord(Xssiecharrun::TAXWCharRun* &CR, System::UnicodeString &Source, int &CRIndex);
	__property Xssielogparas::TAXWLogPara* Para = {read=FPara, write=FPara};
	__property Xssiecharrun::TAXWCharRun* CR1 = {read=FCR1};
	__property Xssiecharrun::TAXWCharRun* CR2 = {read=FCR2};
	__property int CRPos1 = {read=FCRPos1, nodefault};
	__property int CRPos2 = {read=FCRPos2, nodefault};
	__property int LeadingSpaceCount = {read=FLeadingSpaceCount, nodefault};
	__property double LeadingSpaceWidth = {read=FLeadingSpaceWidth};
	__property int CharCount = {read=FCharCount, nodefault};
	__property double Width = {read=FWidth};
	__property int TrailingSpaceCount = {read=FTrailingSpaceCount, nodefault};
	__property double TrailingSpaceWidth = {read=FTrailingSpaceWidth};
	__property bool HasLineBreak = {read=FHasLineBreak, nodefault};
	__property bool CollectBreakChar = {read=FCollectBreakChar, write=FCollectBreakChar, nodefault};
	__property System::WideChar BreakChar = {read=FBreakChar, write=SetBreakChar, nodefault};
	__property int LeadingBreakCharsCount = {read=FLeadingBreakCharsCount, nodefault};
	__property int TrailingBreakCharsCount = {read=FTrailingBreakCharsCount, nodefault};
	__property TAXWWordDataNewCharRunEvent OnNewCharRun = {read=FNewCharRunEvent, write=FNewCharRunEvent};
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TAXWWordData(void) { }
	
};


class DELPHICLASS TAXWRowPaginateStack;
class PASCALIMPLEMENTATION TAXWRowPaginateStack : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	typedef System::DynamicArray<Xssieutils::TBreakCharData> _TAXWRowPaginateStack__1;
	
	
protected:
	Xbookpaintgdi2::TAXWGDI* FGDI;
	Xssieutils::TAXWClientArea* FArea;
	TAXWWordData* FWordData;
	Xssielogparas::TAXWLogPara* FPara;
	Xssiephyrow::TAXWPhyRow* FRow;
	double FRowWidth;
	int FRowIndex;
	int FLogPos;
	int FDeltaChars;
	double FMaxAscent;
	double FMaxDescent;
	_TAXWRowPaginateStack__1 FBreakChars;
	int FBreakCharsCount;
	double FLastTrailingWidth;
	int FLastTrailingBreakCharsCount;
	bool FKeepTrailingSpaces;
	TAXWParaObjSizes* FParaWidth;
	void __fastcall AddBreakChars(Xssieutils::TBreakCharData *Chars, const int Chars_High, int CharCount);
	
public:
	__fastcall TAXWRowPaginateStack(Xssiegditext::TAXWTextPrint* Print, Xssieutils::TAXWClientArea* Area);
	__fastcall virtual ~TAXWRowPaginateStack(void);
	void __fastcall Clear(Xssielogparas::TAXWLogPara* Para);
	void __fastcall Push(void);
	void __fastcall BeginRow(Xssiecharrun::TAXWCharRun* CR, int CRPos, bool ANewPara = false);
	void __fastcall UpdateRow(Xssiecharrun::TAXWCharRun* CR, int CRPos);
	void __fastcall EndRow(void)/* overload */;
	void __fastcall EndRow(Xssiecharrun::TAXWCharRun* CR, int CRPos)/* overload */;
	void __fastcall NewCharRun(void);
	void __fastcall Cleanup(void);
	__property Xssielogparas::TAXWLogPara* Para = {read=FPara};
	__property Xssiephyrow::TAXWPhyRow* Row = {read=FRow};
	__property TAXWWordData* Curr = {read=FWordData};
	__property double MaxAscent = {read=FMaxAscent, write=FMaxAscent};
	__property double MaxDescent = {read=FMaxDescent, write=FMaxDescent};
	__property int DeltaChars = {read=FDeltaChars, write=FDeltaChars, nodefault};
};


class DELPHICLASS TAXWPaginator;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWPaginator : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	typedef System::DynamicArray<int> _TAXWPaginator__1;
	
	
private:
	bool __fastcall GetKeepTrailingSpaces(void);
	void __fastcall SetKeepTrailingSpaces(const bool Value);
	
protected:
	Xssiegditext::TAXWTextPrint* FPrint;
	Xssieutils::TAXWClientArea* FArea;
	System::UnicodeString FText;
	TAXWRowPaginateStack* FRowStack;
	_TAXWPaginator__1 FSpaceWidths;
	int FSpaceWidthsCount;
	Xssiecharrun::TAXWCharRun* __fastcall BeginCharRun(int Index);
	void __fastcall Cleanup(void);
	void __fastcall WordDataNewCharRun(int &CRIndex, Xssiecharrun::TAXWCharRun* &CR);
	
public:
	__fastcall TAXWPaginator(Xssiegditext::TAXWTextPrint* Print, Xssieutils::TAXWClientArea* Area);
	__fastcall virtual ~TAXWPaginator(void);
	void __fastcall Clear(void);
	void __fastcall Paginate(Xssielogparas::TAXWLogPara* Para);
	__property bool KeepTrailingSpaces = {read=GetKeepTrailingSpaces, write=SetKeepTrailingSpaces, nodefault};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
}	/* namespace Xssiepaginate */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XSSIEPAGINATE)
using namespace Xssiepaginate;
#endif
#pragma pack(pop)
#pragma option pop

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