// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'MRDsgn5.pas' rev: 5.00

#ifndef MRDsgn5HPP
#define MRDsgn5HPP

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

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

namespace Mrdsgn5
{
//-- type declarations -------------------------------------------------------
struct TMRInfoData;
typedef TMRInfoData *PMRInfoData;

#pragma pack(push, 1)
struct TMRInfoData
{
	char ReportName[101];
} ;
#pragma pack(pop)

class DELPHICLASS EDLLLoadError;
class PASCALIMPLEMENTATION EDLLLoadError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EDLLLoadError(const AnsiString Msg) : Sysutils::Exception(
		Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EDLLLoadError(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EDLLLoadError(int Ident)/* overload */ : Sysutils::Exception(
		Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EDLLLoadError(int Ident, const System::TVarRec * Args
		, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EDLLLoadError(const AnsiString Msg, int AHelpContext) : 
		Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EDLLLoadError(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EDLLLoadError(int Ident, int AHelpContext)/* overload */
		 : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EDLLLoadError(System::PResStringRec ResStringRec
		, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
		ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EDLLLoadError(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TGetReportData)(AnsiString ReportName, Classes::TStrings* &ReportData
	, bool &AcceptData);

typedef void __fastcall (__closure *TSaveReportData)(AnsiString ReportName, Classes::TStrings* &ReportData
	);

typedef void __fastcall (__closure *TOnPreviewReport)(AnsiString ReportName, Classes::TStrings* ReportData
	);

#pragma option push -b-
enum TExecuteFromType { exFromFile, exFromMem };
#pragma option pop

typedef AnsiString TCommandLine;

class DELPHICLASS TMarshalDesigner;
class PASCALIMPLEMENTATION TMarshalDesigner : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	Classes::TStringList* SLPreviewData;
	TGetReportData FGetReportData;
	TSaveReportData FSaveReportData;
	unsigned LibHandle;
	TMRInfoData *GlobalInfo;
	char *GlobalData;
	AnsiString FReportDesignerPath;
	Graphics::TBitmap* FBitmapDsgn;
	Mrviewer::TMRViewer* FPreviewViewer;
	TExecuteFromType FExecuteFrom;
	AnsiString FExecuteName;
	TOnPreviewReport FOnPreviewReport;
	void __fastcall SetGetReportData(const TGetReportData Value);
	void __fastcall SetSaveReportData(const TSaveReportData Value);
	MESSAGE void __fastcall SaveReport(Messages::TMessage &Msg);
	MESSAGE void __fastcall PreviewReport(Messages::TMessage &Msg);
	void __fastcall SetReportDesignerPath(const AnsiString Value);
	void __fastcall SetPreviewViewer(const Mrviewer::TMRViewer* Value);
	void __fastcall LoadPreviewReport(AnsiString ReportFile, AnsiString &ReportName, Classes::TStringList* 
		ReportDefinition, bool &Accept);
	void __fastcall SetOnPreviewReport(const TOnPreviewReport Value);
	
protected:
	virtual void __fastcall Paint(void);
	bool __fastcall DoGetReportData(AnsiString ReportName, char * &ReportData);
	void __fastcall DoSaveReportData(AnsiString ReportName, char * &ReportData);
	void __fastcall DoPreviewReport(char * &ReportData);
	
public:
	__fastcall virtual TMarshalDesigner(Classes::TComponent* AOwner);
	__fastcall virtual ~TMarshalDesigner(void);
	void __fastcall Execute(AnsiString Name);
	void __fastcall ExecuteFromFile(AnsiString FileName);
	
__published:
	__property AnsiString ReportDesignerPath = {read=FReportDesignerPath, write=SetReportDesignerPath};
		
	__property TGetReportData GetReportData = {read=FGetReportData, write=SetGetReportData};
	__property TSaveReportData SaveReportData = {read=FSaveReportData, write=SetSaveReportData};
	__property Mrviewer::TMRViewer* PreviewViewer = {read=FPreviewViewer, write=SetPreviewViewer};
	__property TOnPreviewReport OnPreviewReport = {read=FOnPreviewReport, write=SetOnPreviewReport};
public:
		
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TMarshalDesigner(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word WM_MRSAVE = 0x709;
static const Word WM_MRPREVIEW = 0x70a;
extern PACKAGE void __fastcall Register(void);

}	/* namespace Mrdsgn5 */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Mrdsgn5;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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