//---------------------------------------------------------------------------

#ifndef FGUIH
#define FGUIH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <FileCtrl.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
#include <ExtDlgs.hpp>
//---------------------------------------------------------------------------
class TGUI : public TForm
{
__published:	// IDE-managed Components
	TMemo *mem_Entry;
	TButton *bt_Publish;
	TButton *bt_NewEntry;
	TFileListBox *flb_Entries;
	TDirectoryListBox *dlb_Directory;
	TDriveComboBox *DriveComboBox1;
	TMainMenu *MainMenu1;
	TMenuItem *File1;
	TMenuItem *LoadProject1;
	TMenuItem *SetupProjectOptions1;
	TMenuItem *N1;
	TMenuItem *Quit1;
	TOpenDialog *dlg_Open;
	TSaveDialog *dlg_Save;
	TPopupMenu *popup_Directory;
	TMenuItem *CreateDirectory1;
	TMenuItem *RenameDirectory1;
	TMenuItem *DeleteDirectory1;
	TPopupMenu *popup_Files;
	TMenuItem *DeleteFile1;
	TPopupMenu *popup_Entry;
	TMenuItem *InsertImage1;
	TMenuItem *InsertLink1;
	TOpenPictureDialog *dlg_LoadImage;
	TOpenDialog *dlg_InsertImage;
	TMenuItem *InsertImageToLink1;
	TMenuItem *PreviewPage1;
	TMenuItem *RebuildPage1;
	TMenuItem *N2;
	TMenuItem *ViewPageSource1;
	TMenuItem *RenameFile1;
	TMenuItem *N3;
	TMenuItem *SelectAll1;
	TCheckBox *cb_IncludeEntryDate;
	TMenuItem *InsertDate1;
	TMenuItem *N4;
	TMenuItem *N5;
	TMenuItem *Copy1;
	TMenuItem *Paste1;
	TMenuItem *Cut1;
	TMenuItem *Undo1;
	void __fastcall bt_NewEntryClick(TObject *Sender);
	void __fastcall flb_EntriesChange(TObject *Sender);
	void __fastcall bt_PublishClick(TObject *Sender);
	void __fastcall SetupProjectOptions1Click(TObject *Sender);
	void __fastcall LoadProject1Click(TObject *Sender);
	void __fastcall DeleteFile1Click(TObject *Sender);
	void __fastcall CreateDirectory1Click(TObject *Sender);
	void __fastcall RenameDirectory1Click(TObject *Sender);
	void __fastcall DeleteDirectory1Click(TObject *Sender);
	void __fastcall Quit1Click(TObject *Sender);
	void __fastcall mem_EntryKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall dlb_DirectoryChange(TObject *Sender);
    void __fastcall InsertStringIntoEntry(AnsiString _asString);
	void __fastcall InsertLink1Click(TObject *Sender);
	void __fastcall InsertImage1Click(TObject *Sender);
	void __fastcall InsertImageToLink1Click(TObject *Sender);
	void __fastcall PreviewPage1Click(TObject *Sender);
	void __fastcall RebuildPage1Click(TObject *Sender);
	void __fastcall ViewPageSource1Click(TObject *Sender);
	void __fastcall RenameFile1Click(TObject *Sender);
	void __fastcall FormConstrainedResize(TObject *Sender, int &MinWidth,
          int &MinHeight, int &MaxWidth, int &MaxHeight);
	void __fastcall SelectAll1Click(TObject *Sender);
	void __fastcall cb_IncludeEntryDateClick(TObject *Sender);
	void __fastcall InsertDate1Click(TObject *Sender);
	void __fastcall N2Click(TObject *Sender);
	void __fastcall Copy1Click(TObject *Sender);
	void __fastcall Paste1Click(TObject *Sender);
	void __fastcall Cut1Click(TObject *Sender);
	void __fastcall Undo1Click(TObject *Sender);



private:	// User declarations
	AnsiString __fastcall asSelectedDirectory();

	void __fastcall SelectFile(AnsiString _asFilename);
    void __fastcall SaveEntry(AnsiString _asFilename);

    void __fastcall LoadProject(AnsiString _asFilename);
	void __fastcall SaveProject(AnsiString _asFilename);

	void __fastcall LoadPageOptions();
	void __fastcall SavePageOptions();

	void __fastcall RebuildRecursively(AnsiString _asDir);

public:		// User declarations
	__fastcall TGUI(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TGUI *GUI;
//---------------------------------------------------------------------------
#endif
