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

#ifndef FormMainH
#define FormMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "GR32_Image.hpp"
#include <ComCtrls.hpp>
#include <Dialogs.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include <ToolWin.hpp>
#include "OSCABoard.h"
//---------------------------------------------------------------------------
using Types::TRect;

class TMainForm : public TForm
{
	private:
		int	fExtraHeight;
		int	fExtraWidth;

__published:	// IDE-managed Components
	TImageList *ToolImages;
	TOpenDialog *OpenDialog;
	TMainMenu *MainMenu;
	TMenuItem *MenuFile;
	TMenuItem *MenuFileExit;
	TMenuItem *MenuControl;
	TMenuItem *IPLColdBoot1;
	TMenuItem *NMIWarmBoot1;
	TMenuItem *N1;
	TMenuItem *MenuControlOptions;
	TMenuItem *MenuDebug;
	TMenuItem *MenuDebugDebugger;
	TMenuItem *MenuDebugIOMonitor;
	TMenuItem *MenuHelp;
	TMenuItem *MenuHelpAbout;
	TStatusBar *StatusBar;
	TMenuItem *N3;
	TMenuItem *PauseEmulation1;
	TMenuItem *ResumeEmulation1;
	TMenuItem *MenuFileLoad;
	TMenuItem *N2;
	TMenuItem *MenuFileLoadOSF;
	TMenuItem *MenuFileLoadRaw;
	TPaintBox32 *Screen;
	void __fastcall MenuControlOptionsClick(TObject *Sender);
	void __fastcall MenuHelpAboutClick(TObject *Sender);
	void __fastcall MenuFileExitClick(TObject *Sender);
	void __fastcall MenuDebugDebuggerClick(TObject *Sender);
	void __fastcall MenuDebugIOMonitorClick(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall IPLColdBoot1Click(TObject *Sender);
	void __fastcall NMIWarmBoot1Click(TObject *Sender);
	void __fastcall FormCanResize(TObject *Sender, int &NewWidth, int &NewHeight, bool &Resize);
	void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
	void __fastcall MenuFileLoadOSFClick(TObject *Sender);
	void __fastcall MenuFileLoadRawClick(TObject *Sender);
	void __fastcall StatusBarDrawPanel(TStatusBar *StatusBar, TStatusPanel *Panel, const Types::TRect &Rect);
	void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);




protected:	// User declarations
      void __fastcall CMDialogKey(TCMDialogKey &Message);

      BEGIN_MESSAGE_MAP
        VCL_MESSAGE_HANDLER( CM_DIALOGKEY, TCMDialogKey, CMDialogKey)
      END_MESSAGE_MAP(TForm)
public:		// User declarations

	__fastcall TMainForm(TComponent* Owner);
	__fastcall ~TMainForm();
};
//---------------------------------------------------------------------------

extern PACKAGE TMainForm *MainForm;
extern TOSCABoard *z80emu;

//---------------------------------------------------------------------------
#endif
