//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ComCtrls.hpp>
#include "RVEdit.hpp"
#include "RichView.hpp"
#include "RVScroll.hpp"
#include <vcl\Menus.hpp>
#include "RVStyle.hpp"
#include "PtblRV.hpp"
#include <vcl\Dialogs.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 AnsiString FileName);
public:		// User declarations
	__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 