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

#ifndef fnt_crt_mainH
#define fnt_crt_mainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <ExtDlgs.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>

//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TMainMenu *MainMenu1;
        TMenuItem *File1;
        TMenuItem *LoadBitmap1;
        TMenuItem *SaveBitmap1;
        TMenuItem *ExportFnt1;
        TMenuItem *Exit1;
        TOpenPictureDialog *OpenPictureDialog1;
        TSaveDialog *SaveDialog1;
        TMenuItem *New1;
        TFontDialog *FontDialog1;
        TMemo *Memo1;
        TImage *Image1;
        TStatusBar *StatusBar1;
        TSaveDialog *SaveDialog2;
        TMenuItem *Help1;
        TMenuItem *About1;
        void __fastcall LoadBitmap1Click(TObject *Sender);
        void __fastcall SaveBitmap1Click(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall New1Click(TObject *Sender);
        void __fastcall Exit1Click(TObject *Sender);
        void __fastcall ExportFnt1Click(TObject *Sender);
        void __fastcall About1Click(TObject *Sender);

private:	// User declarations
        void     __fastcall convChar(int left, int top, int w, int h);
        void     __fastcall Convert(void);
        void     __fastcall Save();
        unsigned __fastcall imagesize(int w, int h);

        char    opt_asciilow;
        AnsiString    opt_fontfile;
        char    numChars;

        typedef struct {
          short  w;
          short  h;
          char   bmBits[1024];
        } FontChar;
        FontChar font[256];


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