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

#ifndef ImgCopperFormUnitH
#define ImgCopperFormUnitH
//---------------------------------------------------------------------------
#include "ImgCopperExUnit.h"
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Imaging.jpeg.hpp>
#include <Vcl.Imaging.pngimage.hpp>
#include <Vcl.Graphics.hpp>
#include "PNGButton.hpp"
#include "TransSkinScrollBar.h"
#include "GeneralDialogPanel.h"
#include "TextButton.h"
//---------------------------------------------------------------------------
class TImgCopperForm : public TForm
{
__published:	// IDE-managed Components
	TGeneralDialogPanel *m_pPanelBKG;
	TTextButton *m_pBtnOk;
	TTextButton *m_pBtnCancel;
	TPaintBox *m_pPaintBoxSrc;
	TTextButton *m_btnChoose;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall m_pPaintBoxSrcMouseMove(TObject *Sender, TShiftState Shift, int X,
          int Y);
	void __fastcall m_pPaintBoxSrcMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift,
          int X, int Y);
	void __fastcall m_pPaintBoxSrcMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
          int X, int Y);
	void __fastcall m_pPaintBoxSrcPaint(TObject *Sender);
	void __fastcall m_pBtnOkClick(TObject *Sender);
	void __fastcall FormResize(TObject *Sender);
	void __fastcall m_btnChooseClick(TObject *Sender);


private:	// User declarations

	TRect    m_rtBKG;
	TRect    m_rtCopper;
	TRect    m_rtCopperEdge;

	TBitmap  *m_pTBitmapLine;

	TPicture *m_pPicSrc;
	TRect     m_rtSrc;
	TRect     m_rtSrcBac;
	TRect     m_rtSrcMove;
	bool	  m_bPicDown;
	TPoint    m_ptDown;
	int 	  m_nResize;
	TTransSkinScollBar *m_pTransSkinScollBar;
	void __fastcall SizeChange(TObject *Sender);

	bool __fastcall SetSrcPic(String fileName);
	void __fastcall SetSrcPicRect();

	MESSAGE void __fastcall WMDRopFiles (TMessage& Msg);

	BEGIN_MESSAGE_MAP
		MESSAGE_HANDLER(WM_DROPFILES, TMessage, WMDRopFiles)
	END_MESSAGE_MAP(TForm)

public:		// User declarations

	__fastcall TImgCopperForm(TComponent* Owner, TRect rtCopper, TPicture *pPicSrc);

	String m_strCopperPath;
	void __fastcall SetCaption(String strCaption);
};
//---------------------------------------------------------------------------
extern PACKAGE TImgCopperForm *ImgCopperForm;
//---------------------------------------------------------------------------
#endif
