// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'FormSave.pas' rev: 6.00

#ifndef FormSaveHPP
#define FormSaveHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Formsave
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TFormReader;
class DELPHICLASS TCustomFormSaver;
#pragma option push -b-
enum TDataFormat { dfText, dfBinary };
#pragma option pop

class PASCALIMPLEMENTATION TCustomFormSaver : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	bool FAutoClear;
	TDataFormat FDataFormat;
	Classes::TReaderError FOnReadError;
	
protected:
	__property bool AutoClear = {read=FAutoClear, write=FAutoClear, nodefault};
	__property TDataFormat DataFormat = {read=FDataFormat, write=FDataFormat, nodefault};
	__property Classes::TReaderError OnReadError = {read=FOnReadError, write=FOnReadError};
	
public:
	void __fastcall RegisterTypes(void);
	void __fastcall ClearForm(void);
	void __fastcall SaveToDFM(const AnsiString FileName);
	void __fastcall LoadFromDFM(const AnsiString FileName);
	void __fastcall SaveToStream(Classes::TStream* S);
	void __fastcall LoadFromStream(Classes::TStream* S);
	void __fastcall SaveToFile(const AnsiString FileName);
	void __fastcall LoadFromFile(const AnsiString FileName);
	void __fastcall SaveComponentToStream(Classes::TStream* S, Classes::TComponent* AComponent);
	Classes::TComponent* __fastcall LoadComponentFromStream(Classes::TStream* S, Classes::TComponent* AComponent);
	void __fastcall SaveComponentToFile(const AnsiString FileName, Classes::TComponent* AComponent);
	Classes::TComponent* __fastcall LoadComponentFromFile(const AnsiString FileName, Classes::TComponent* AComponent);
public:
	#pragma option push -w-inl
	/* TComponent.Create */ inline __fastcall virtual TCustomFormSaver(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TCustomFormSaver(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TFormReader : public Classes::TReader 
{
	typedef Classes::TReader inherited;
	
private:
	TCustomFormSaver* FFormSaver;
	
protected:
	virtual bool __fastcall Error(const AnsiString Message);
	virtual void __fastcall SetName(Classes::TComponent* Component, AnsiString &Name);
	
public:
	__fastcall TFormReader(Classes::TStream* AStream, TCustomFormSaver* AFormSaver);
public:
	#pragma option push -w-inl
	/* TReader.Destroy */ inline __fastcall virtual ~TFormReader(void) { }
	#pragma option pop
	
};


class DELPHICLASS TFormSaver;
class PASCALIMPLEMENTATION TFormSaver : public TCustomFormSaver 
{
	typedef TCustomFormSaver inherited;
	
__published:
	__property DataFormat ;
	__property AutoClear ;
	__property OnReadError ;
public:
	#pragma option push -w-inl
	/* TComponent.Create */ inline __fastcall virtual TFormSaver(Classes::TComponent* AOwner) : TCustomFormSaver(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TFormSaver(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);

}	/* namespace Formsave */
using namespace Formsave;
#pragma option pop	// -w-
#pragma option pop	// -Vx

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