//----------------------------------------------------------------------------
// RVStyle.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: RVStyle.pas
//----------------------------------------------------------------------------
#ifndef RVStyleHPP
#define RVStyleHPP
//----------------------------------------------------------------------------
#include <Registry.hpp>
#include <IniFiles.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
namespace Rvstyle
{
//-- type declarations -------------------------------------------------------
enum TRVFontStyle { rvfsOverline };

typedef Set<TRVFontStyle, rvfsOverline, rvfsOverline>  TRVFontStyles;

enum TRVAlignment { rvaLeft, rvaRight, rvaCenter, rvaJustify };


class __declspec(delphiclass) TFontInfo;
class __declspec(pascalimplementation) TFontInfo : public Classes::TCollectionItem
{
	typedef Classes::TCollectionItem inherited;
	
private:
	bool FJump;
	Controls::TCursor FJumpCursor;
	System::AnsiString FName;
	Graphics::TFontName FFontName;
	int FSize;
	Graphics::TColor FColor;
	Graphics::TColor FBackColor;
	Graphics::TColor FHoverColor;
	Graphics::TColor FHoverBackColor;
	Graphics::TFontStyles FStyle;
	TRVFontStyles FStyleEx;
	bool FSingleSymbols;
	int FVShift;
	int FNextStyleNo;
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs, bool JumpByDefault, Controls::TCursor DefJumpCursor);
	
public:
	__fastcall virtual TFontInfo(Classes::TCollection* Collection);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	
__published:
	__property Graphics::TFontName FontName = {read=FFontName, write=FFontName};
	__property int Size = {read=FSize, write=FSize, default=10};
	__property Graphics::TFontStyles Style = {read=FStyle, write=FStyle, default=0};
	__property int VShift = {read=FVShift, write=FVShift, default=0};
	__property System::AnsiString StyleName = {read=FName, write=FName, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=-2147483640};
	__property Graphics::TColor BackColor = {read=FBackColor, write=FBackColor, default=536870911};
	__property Graphics::TColor HoverBackColor = {read=FHoverBackColor, write=FHoverBackColor, default=536870911
		};
	__property Graphics::TColor HoverColor = {read=FHoverColor, write=FHoverColor, default=536870911};
	__property TRVFontStyles StyleEx = {read=FStyleEx, write=FStyleEx, default=0};
	__property bool Jump = {read=FJump, write=FJump, default=0};
	__property Controls::TCursor JumpCursor = {read=FJumpCursor, write=FJumpCursor, default=101};
	__property bool SingleSymbols = {read=FSingleSymbols, write=FSingleSymbols, default=0};
	__property int NextStyleNo = {read=FNextStyleNo, write=FNextStyleNo, default=-1};
public:
	/* TCollectionItem.Destroy */ __fastcall virtual ~TFontInfo(void) { }
	
};

class __declspec(delphiclass) TFontInfos;
class __declspec(pascalimplementation) TFontInfos : public Classes::TCollection
{
	typedef Classes::TCollection inherited;
	
private:
	Classes::TPersistent* FOwner;
	HIDESBASE TFontInfo* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TFontInfo* Value);
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, Controls::TCursor 
		DefJumpCursor);
	
public:
	__fastcall TFontInfos(Classes::TPersistent* Owner);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	HIDESBASE TFontInfo* __fastcall Add(void);
	void __fastcall Delete(int Index);
	TFontInfo* __fastcall AddFont( Graphics::TFontName &Name, int Size, Graphics::TColor Color, Graphics::TColor 
		BackColor, Graphics::TFontStyles Style);
	__property TFontInfo* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TCollection.Destroy */ __fastcall virtual ~TFontInfos(void) { }
	
};

struct TScreenAndDevice
{
	int ppixScreen;
	int ppiyScreen;
	int ppixDevice;
	int ppiyDevice;
	int LeftMargin;
	int RightMargin;
} ;

class __declspec(delphiclass) TRVRect;
class __declspec(pascalimplementation) TRVRect : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	int FTop;
	int FLeft;
	int FRight;
	int FBottom;
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	
public:
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall InflateRect(Windows::TRect &Rect);
	void __fastcall InflateRectSaD(Windows::TRect &Rect, const TScreenAndDevice &sad);
	void __fastcall AssignToRect(Windows::TRect &Rect);
	void __fastcall AssignToRectIfGreater(Windows::TRect &Rect);
	
__published:
	__property int Left = {read=FLeft, write=FLeft, default=0};
	__property int Right = {read=FRight, write=FRight, default=0};
	__property int Top = {read=FTop, write=FTop, default=0};
	__property int Bottom = {read=FBottom, write=FBottom, default=0};
public:
	/* TObject.Create */ __fastcall TRVRect(void) : Classes::TPersistent() { }
	/* TObject.Destroy */ __fastcall virtual ~TRVRect(void) { }
	
};

class __declspec(delphiclass) TRVBooleanRect;
class __declspec(pascalimplementation) TRVBooleanRect : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FTop;
	bool FLeft;
	bool FRight;
	bool FBottom;
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	
public:
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property bool Left = {read=FLeft, write=FLeft, default=1};
	__property bool Right = {read=FRight, write=FRight, default=1};
	__property bool Top = {read=FTop, write=FTop, default=1};
	__property bool Bottom = {read=FBottom, write=FBottom, default=1};
public:
	/* TObject.Create */ __fastcall TRVBooleanRect(void) : Classes::TPersistent() { }
	/* TObject.Destroy */ __fastcall virtual ~TRVBooleanRect(void) { }
	
};

enum TRVBorderStyle { rvbNone, rvbSingle, rvbDouble, rvbTriple, rvbThickInside, rvbThickOutside };

class __declspec(delphiclass) TRVBorder;
class __declspec(pascalimplementation) TRVBorder : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	Graphics::TColor FColor;
	TRVBorderStyle FStyle;
	int FWidth;
	int FInternalWidth;
	TRVBooleanRect* FVisibleBorders;
	TRVRect* FBorderOffsets;
	void __fastcall SetBorderOffsets(TRVRect* const Value);
	void __fastcall SetVisibleBorders(TRVBooleanRect* const Value);
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall DoDraw(const Windows::TRect &Rect, Graphics::TCanvas* Canvas, int Width, int InternalWidth
		, int OnePixelWidth);
	
public:
	__fastcall TRVBorder(void);
	__fastcall virtual ~TRVBorder(void);
	void __fastcall Draw(const Windows::TRect &Rect, Graphics::TCanvas* Canvas);
	void __fastcall DrawSaD(const Windows::TRect &Rect, Graphics::TCanvas* Canvas, const TScreenAndDevice 
		&sad);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property int Width = {read=FWidth, write=FWidth, default=1};
	__property int InternalWidth = {read=FInternalWidth, write=FInternalWidth, default=1};
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=-2147483640};
	__property TRVBorderStyle Style = {read=FStyle, write=FStyle, default=0};
	__property TRVBooleanRect* VisibleBorders = {read=FVisibleBorders, write=SetVisibleBorders, nodefault
		};
	__property TRVRect* BorderOffsets = {read=FBorderOffsets, write=SetBorderOffsets, nodefault};
};

class __declspec(delphiclass) TRVBackgroundRect;
class __declspec(pascalimplementation) TRVBackgroundRect : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	TRVRect* FBorderOffsets;
	Graphics::TColor FColor;
	void __fastcall SetBorderOffsets(TRVRect* const Value);
	void __fastcall DoDraw(const Windows::TRect &Rect, Graphics::TCanvas* Canvas);
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	
public:
	__fastcall TRVBackgroundRect(void);
	__fastcall virtual ~TRVBackgroundRect(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall Draw(const Windows::TRect &Rect, Graphics::TCanvas* Canvas);
	void __fastcall DrawSaD(const Windows::TRect &Rect, Graphics::TCanvas* Canvas, const TScreenAndDevice 
		&sad);
	
__published:
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=536870911};
	__property TRVRect* BorderOffsets = {read=FBorderOffsets, write=SetBorderOffsets, nodefault};
};

class __declspec(delphiclass) TParaInfo;
class __declspec(pascalimplementation) TParaInfo : public Classes::TCollectionItem
{
	typedef Classes::TCollectionItem inherited;
	
private:
	int FFirstIndent;
	int FLeftIndent;
	int FRightIndent;
	int FSpaceBefore;
	int FSpaceAfter;
	TRVAlignment FAlignment;
	System::AnsiString FName;
	TRVBorder* FBorder;
	TRVBackgroundRect* FBackground;
	void __fastcall SetBorder(TRVBorder* const Value);
	void __fastcall SetBackground(TRVBackgroundRect* const Value);
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section, const System::AnsiString 
		fs);
	
public:
	__fastcall virtual TParaInfo(Classes::TCollection* Collection);
	__fastcall virtual ~TParaInfo(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property int FirstIndent = {read=FFirstIndent, write=FFirstIndent, default=0};
	__property int LeftIndent = {read=FLeftIndent, write=FLeftIndent, default=0};
	__property int RightIndent = {read=FRightIndent, write=FRightIndent, default=0};
	__property int SpaceBefore = {read=FSpaceBefore, write=FSpaceBefore, default=0};
	__property int SpaceAfter = {read=FSpaceAfter, write=FSpaceAfter, default=0};
	__property TRVAlignment Alignment = {read=FAlignment, write=FAlignment, default=0};
	__property TRVBorder* Border = {read=FBorder, write=SetBorder, nodefault};
	__property TRVBackgroundRect* Background = {read=FBackground, write=SetBackground, nodefault};
	__property System::AnsiString StyleName = {read=FName, write=FName, nodefault};
};

class __declspec(delphiclass) TParaInfos;
class __declspec(pascalimplementation) TParaInfos : public Classes::TCollection
{
	typedef Classes::TCollection inherited;
	
private:
	Classes::TPersistent* FOwner;
	HIDESBASE TParaInfo* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TParaInfo* Value);
	
protected:
	void __fastcall SaveToINI(Inifiles::TIniFile* ini, const System::AnsiString Section);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini, const System::AnsiString Section);
	
public:
	__fastcall TParaInfos(Classes::TPersistent* Owner);
	HIDESBASE TParaInfo* __fastcall Add(void);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	__property TParaInfo* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TCollection.Destroy */ __fastcall virtual ~TParaInfos(void) { }
	
};

class __declspec(delphiclass) TRVStyle;
class __declspec(pascalimplementation) TRVStyle : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	Graphics::TColor FColor;
	Graphics::TColor FHoverColor;
	Graphics::TColor FSelColor;
	Graphics::TColor FSelTextColor;
	Graphics::TColor FCheckpointColor;
	Graphics::TColor FCheckpointEvColor;
	Controls::TCursor FCursor;
	TFontInfos* FTextStyles;
	TParaInfos* FParaStyles;
	bool FFullRedraw;
	short FSpacesInTab;
	Graphics::TColor FPageBreakColor;
	void __fastcall SetTextStyles(TFontInfos* ATextStyles);
	void __fastcall SetParaStyles(TParaInfos* Value);
	
protected:
	void __fastcall ResetTextStyles(void);
	void __fastcall ResetParaStyles(void);
	void __fastcall SaveToINI(Inifiles::TIniFile* ini,  System::AnsiString Section);
	void __fastcall LoadFromINI(Inifiles::TIniFile* ini,  System::AnsiString Section);
	
public:
	__fastcall virtual TRVStyle(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVStyle(void);
	int __fastcall AddTextStyle(void);
	void __fastcall DeleteTextStyle(int Index);
	void __fastcall SaveINI(const System::AnsiString FileName, const System::AnsiString Section);
	void __fastcall LoadINI(const System::AnsiString FileName, const System::AnsiString Section);
	void __fastcall SaveCSSToStream(Classes::TStream* Stream);
	bool __fastcall SaveCSS(const System::AnsiString FileName);
	
__published:
	__property short SpacesInTab = {read=FSpacesInTab, write=FSpacesInTab, default=8};
	__property TFontInfos* TextStyles = {read=FTextStyles, write=SetTextStyles, nodefault};
	__property TParaInfos* ParaStyles = {read=FParaStyles, write=SetParaStyles, nodefault};
	__property Controls::TCursor JumpCursor = {read=FCursor, write=FCursor, default=101};
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=-2147483643};
	__property Graphics::TColor HoverColor = {read=FHoverColor, write=FHoverColor, default=536870911};
	__property bool FullRedraw = {read=FFullRedraw, write=FFullRedraw, default=0};
	__property Graphics::TColor SelColor = {read=FSelColor, write=FSelColor, default=-2147483635};
	__property Graphics::TColor SelTextColor = {read=FSelTextColor, write=FSelTextColor, default=-2147483634
		};
	__property Graphics::TColor CheckpointColor = {read=FCheckpointColor, write=FCheckpointColor, default=32768
		};
	__property Graphics::TColor CheckpointEvColor = {read=FCheckpointEvColor, write=FCheckpointEvColor, 
		default=65280};
	__property Graphics::TColor PageBreakColor = {read=FPageBreakColor, write=FPageBreakColor, nodefault
		};
};

//-- var, const, procedure ---------------------------------------------------
#define crJump (Byte)(101)
#define rvsNormal (Byte)(0)
#define rvsHeading (Byte)(1)
#define rvsSubheading (Byte)(2)
#define rvsKeyword (Byte)(3)
#define rvsJump1 (Byte)(4)
#define rvsJump2 (Byte)(5)
#define LAST_DEFAULT_STYLE_NO (Byte)(5)
extern void __fastcall RVWrite(Classes::TStream* Stream, const System::AnsiString s);
extern void __fastcall RVWriteLn(Classes::TStream* Stream, const System::AnsiString s);
extern void __fastcall Register(void);
//-- template instantiations -------------------------------------------------
template class Graphics::TFontStyles ;
template class TRVFontStyles ;

}	/* namespace Rvstyle */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvstyle;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// RVStyle
