/*
 * Author:       Simon Dexter
 * Source:       Unit1.cpp
 * Project:      Vladimir Arnold's Cat Map
 * Name:         Unit 1 header file
 * Description:  Main header file
 * Date started: 04/07/08
 * Date modified:
 *               01/14/09 11:54 pm
 *
*/
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Dialogs.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------

// custom class designed for storage of point coordinates and color
class MapPoint{
        public : long double x, y;
        public : TColor color;
};
//---------------------------------------------------------------------------
// this class is responsible for providing drawing/plotting facilities
class CartesianPlane {
        public : int height, length;                    // real height and length of the canvas
        public : double xmin, xmax, ymin, ymax;         // specified minimal coordinates
        public : void drawPoint (double x, double y);   // subroutine draws point on the canvas
        public : CartesianPlane (TCanvas * ,int, int, int, int, int, int);      //constructor which takes reference to the canvas
        private : TCanvas * canvas;                     // reference to the canvas which will do the drawing on
        public : void clear(void);                      // subroutine which clears any drawing from the canvas

};
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TBevel *Bevel1;
        TImage *Image1;
        TBitBtn *BitBtn1;
        TBitBtn *BitBtn3;
        TEdit *Edit1;
        TOpenDialog *OpenDialog1;
        TSaveDialog *SaveDialog1;
        TLabel *Label1;
        TButton *Button1;
        TLabel *Label2;
        TLabel *Label3;
        TLabel *Label4;
        TLabel *Label5;
        TProgressBar *ProgressBar1;
        void __fastcall BitBtn1Click(TObject *Sender);
        void __fastcall BitBtn3Click(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);

private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        MapPoint *** pointArray; // 2d array of points on the canvas
        CartesianPlane * cartesianPlane; // pointer to instance of cartesian plane object
};


//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
