//---------------------------------------------------------------------------
#ifndef fMainH
#define fMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <ExtDlgs.hpp>
#include <DXFConv.hpp>
#include <Menus.hpp>
#include <Buttons.hpp>
#include <sgDrawingNavigator.hpp>
#include <ActnList.hpp>
//---------------------------------------------------------------------------
class TfmMain : public TForm
{
__published:	// IDE-managed Components
  TPanel *pnlTop;
  TStatusBar *sbrCoords;
  TOpenPictureDialog *OpenDialog;
  TSavePictureDialog *SaveDialog;
  TMainMenu *mmMain;
  TMenuItem *mmiFile;
  TMenuItem *mmiOpen;
  TMenuItem *miSep;
  TMenuItem *mmiExit;
  TMenuItem *mmiEdit;
  TMenuItem *mmiAddNew;
  TMenuItem *mmiDelLast;
  TMenuItem *mmiSep0;
  TMenuItem *mmiSep1;
  TMenuItem *mmiSaveDXF;
  TMenuItem *mmiView;
  TMenuItem *mmiZoomIn;
  TMenuItem *mmiZoomOut;
  TMenuItem *mmiFitToWindow;
  TSpeedButton *btnOpen;
  TSpeedButton *btnSaveToDXF;
  TSpeedButton *btnZoomIn;
  TSpeedButton *btnZoomOut;
  TSpeedButton *btnNew;
  TSpeedButton *btnDelete;
  TMenuItem *mmiAbout;
  TSpeedButton *btnFitToWindow;
  TSpeedButton *btnDirectExport;
  TMenuItem *mmiExportToDXF;
  TSpeedButton *btnShowLayers;
  TMenuItem *mmiAddBitmap;
  TMenuItem *mmiAssignTsgDXFLine;
  TMenuItem *mmiAssignEntity;
  TMenuItem *mmiAssignTsgDXFSpline;
  TMenuItem *mmiAssignTsgDXFText;
  TMenuItem *N1;
  TMenuItem *mmiAssignAll;
  TMenuItem *N2;
  TMenuItem *mmiPrint;
  TPrintDialog *PrintDialog;
  TSpeedButton *btnPrint;
  TActionList *alMain;
  TAction *actMain;
  TMenuItem *mmiClosePicture;
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall btnOpenClick(TObject *Sender);
  void __fastcall btnZoomInClick(TObject *Sender);
  void __fastcall btnZoomOutClick(TObject *Sender);
  void __fastcall btnNewClick(TObject *Sender);
  void __fastcall btnDeleteClick(TObject *Sender);
  void __fastcall btnSaveToDXFClick(TObject *Sender);
  void __fastcall sgPaintBoxMouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
  void __fastcall mmiExitClick(TObject *Sender);
  void __fastcall mmiFitToWindowClick(TObject *Sender);
  void __fastcall mmiAboutClick(TObject *Sender);
  void __fastcall btnDirectExportClick(TObject *Sender);
  void __fastcall btnShowLayersClick(TObject *Sender);
  void __fastcall mmiAddBitmapClick(TObject *Sender);
  void __fastcall BitBtnClick(TObject * Sender);
  void __fastcall mmiAssignTsgDXFLineClick(TObject *Sender);
  void __fastcall mmiAssignTsgDXFSplineClick(TObject *Sender);
  void __fastcall mmiAssignTsgDXFTextClick(TObject *Sender);
  void __fastcall mmiPrintClick(TObject *Sender);
  void __fastcall mmiAssignAllClick(TObject *Sender);
  void __fastcall FormShow(TObject *Sender);
  void __fastcall actMainUpdate(TObject *Sender);
  void __fastcall mmiClosePictureClick(TObject *Sender);
private:	// User declarations
  TsgDXFEntity *FLastAdded;
  TForm * FfmAddBmpDlg;
  TSGDrawingNavigator *FsgPaintBox;
  bool __fastcall DialogBySetupParamsBitMap(AnsiString * AStr, TFPoint * APoint, TFPoint * AScale);
public:		// User declarations
  __fastcall TfmMain(TComponent* Owner);
  __property TSGDrawingNavigator* sgPaintBox = {read=FsgPaintBox};
};
//---------------------------------------------------------------------------
extern PACKAGE TfmMain *fmMain;
//---------------------------------------------------------------------------
#endif
