//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include "RVEdit.hpp"
#include "RichView.hpp"
#include "RVScroll.hpp"
#include <Menus.hpp>
#include "RVStyle.hpp"
#include "PtblRV.hpp"
#include <Dialogs.hpp>
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
	TPageControl *PageControl1;
	TTabSheet *TabSheet1;
	TRichViewEdit *RichViewEdit1;
	TTabSheet *TabSheet2;
	TRichViewEdit *RichViewEdit2;
	TTabSheet *TabSheet3;
	TRichViewEdit *RichViewEdit3;
	TTabSheet *TabSheet4;
	TGroupBox *GroupBox1;
	TLabel *Label1;
	TLabel *Label2;
	TLabel *Label3;
	TLabel *Label4;
	TEdit *txtLeft;
	TEdit *txtRight;
	TEdit *txtTop;
	TEdit *txtBottom;
	TGroupBox *GroupBox2;
	TLabel *Label5;
	TLabel *Label6;
	TEdit *txtHeader;
	TEdit *txtFooter;
	TMainMenu *MainMenu1;
	TMenuItem *File1;
	TMenuItem *New1;
	TMenuItem *Open1;
	TMenuItem *N1;
	TMenuItem *PrintPreview1;
	TMenuItem *Print1;
	TMenuItem *N2;
	TMenuItem *Exit1;
	TRVStyle *RVStyle1;
	TRVStyle *RVStyle2;
	TRVStyle *RVStyle3;
	TRVPrint *RVPrint1;
	TOpenDialog *OpenDialog1;
    TPrinterSetupDialog *psd;
	void __fastcall New1Click(TObject *Sender);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall Open1Click(TObject *Sender);
	void __fastcall PrintPreview1Click(TObject *Sender);
	void __fastcall Print1Click(TObject *Sender);
	void __fastcall Exit1Click(TObject *Sender);
private:	// User declarations
    bool IsEmpty(TCustomRichViewEdit* rve);
    void PreparePrinting();
    void OpenFile(const UnicodeString FileName);
public:		// User declarations
	__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 