// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Hotspoteditor.pas' rev: 10.00

#ifndef HotspoteditorHPP
#define HotspoteditorHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Math.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <Toolwin.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Jpeg.hpp>	// Pascal unit
#include <Extdlgs.hpp>	// Pascal unit
#include <Hotspotimage.hpp>	// Pascal unit
#include <Linelibrary.hpp>	// Pascal unit
#include <Spin.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Hotspoteditor
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TStatus { stNormal, stDrawing, stDrawPoly, stMovePoint, stMoveLine, stMove, stScaleEllipse, stWand };
#pragma option pop

typedef DynamicArray<bool >  HotSpotEditor__1;

typedef DynamicArray<DynamicArray<bool > >  TBool2DArray;

typedef tagRGBTRIPLE TRGBTripleRow[30001];

typedef tagRGBTRIPLE *pRGBTripleRow;

class DELPHICLASS TfrmHSIEditor;
class PASCALIMPLEMENTATION TfrmHSIEditor : public Forms::TForm 
{
	typedef Forms::TForm inherited;
	
__published:
	Comctrls::TToolBar* ToolBar1;
	Buttons::TSpeedButton* btRect;
	Buttons::TSpeedButton* btNormal;
	Extctrls::TPanel* pnImage;
	Menus::TPopupMenu* pmHotSpot;
	Menus::TMenuItem* miDelete;
	Extctrls::TShape* shapeSep;
	Extdlgs::TOpenPictureDialog* OPD;
	Extctrls::TPanel* pnButtons;
	Stdctrls::TButton* btOk;
	Stdctrls::TButton* btCancel;
	Menus::TPopupMenu* pmClickImage;
	Menus::TMenuItem* miClearClickImage;
	Menus::TPopupMenu* pmHoverImage;
	Menus::TMenuItem* miClearHoverImage;
	Menus::TMenuItem* N1;
	Menus::TMenuItem* miSaveHSImage;
	Extdlgs::TSavePictureDialog* SPD;
	Extctrls::TSplitter* Splitter;
	Extctrls::TPanel* pnContainer;
	Extctrls::TPanel* pnProperties;
	Stdctrls::TLabel* lblHint;
	Extctrls::TPanel* pnTitle;
	Stdctrls::TMemo* txtHint;
	Extctrls::TPanel* pnHover;
	Stdctrls::TLabel* lbHover;
	Extctrls::TPanel* pnHoverImage;
	Extctrls::TImage* imgHover;
	Stdctrls::TButton* btLoadHover;
	Extctrls::TPanel* pnClick;
	Stdctrls::TLabel* lblClick;
	Extctrls::TPanel* pnClickImage;
	Extctrls::TImage* imgClick;
	Stdctrls::TButton* btLoadClick;
	Extctrls::TPanel* pnBackground;
	Stdctrls::TButton* btBackImage;
	Buttons::TSpeedButton* btEllipse;
	Stdctrls::TLabel* lblName;
	Stdctrls::TLabel* lblID;
	Stdctrls::TEdit* edtName;
	Buttons::TSpeedButton* btDelete;
	Extctrls::TPanel* pnLoadBack;
	Stdctrls::TEdit* edtID;
	Buttons::TSpeedButton* btPoly;
	Extctrls::TBevel* BevelSep;
	Buttons::TSpeedButton* btAddPoint;
	Buttons::TSpeedButton* btDelPoint;
	Stdctrls::TLabel* lbPozx;
	Stdctrls::TLabel* lbPozy;
	Buttons::TSpeedButton* btDelLine;
	Spin::TSpinEdit* spAngle;
	Stdctrls::TLabel* lbAngle;
	Buttons::TSpeedButton* btCopyToClipBoard;
	Stdctrls::TLabel* lbnX;
	Stdctrls::TLabel* lbnY;
	Stdctrls::TCheckBox* ckClip;
	Buttons::TSpeedButton* btWand;
	Comctrls::TTrackBar* trTol;
	Stdctrls::TLabel* lbWTolerance;
	Comctrls::TTrackBar* trDensity;
	Stdctrls::TLabel* lbWDensity;
	Stdctrls::TLabel* lbNPoints;
	Comctrls::TToolButton* ToolButton1;
	Buttons::TSpeedButton* btZoomIn;
	Buttons::TSpeedButton* btZoomOut;
	Forms::TScrollBox* sbPicture;
	Extctrls::TPaintBox* PB;
	Buttons::TSpeedButton* btZoomRST;
	Spin::TSpinEdit* seZoomRatio;
	Stdctrls::TLabel* lbZoomRatio;
	void __fastcall PBMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall PBMouseMove(System::TObject* Sender, Classes::TShiftState Shift, int X, int Y);
	void __fastcall PBMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall PBPaint(System::TObject* Sender);
	void __fastcall FormCreate(System::TObject* Sender);
	void __fastcall miDeleteClick(System::TObject* Sender);
	void __fastcall btLoadClickClick(System::TObject* Sender);
	void __fastcall btLoadHoverClick(System::TObject* Sender);
	void __fastcall btRectClick(System::TObject* Sender);
	void __fastcall btOkClick(System::TObject* Sender);
	void __fastcall miClearClickImageClick(System::TObject* Sender);
	void __fastcall miClearHoverImageClick(System::TObject* Sender);
	void __fastcall miSaveHSImageClick(System::TObject* Sender);
	void __fastcall FormResize(System::TObject* Sender);
	void __fastcall btBackImageClick(System::TObject* Sender);
	void __fastcall btEllipseClick(System::TObject* Sender);
	void __fastcall FormKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
	void __fastcall btDeleteClick(System::TObject* Sender);
	void __fastcall edtIDKeyPress(System::TObject* Sender, char &Key);
	void __fastcall edtNameMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall edtIDMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall btPolyClick(System::TObject* Sender);
	void __fastcall spAngleChange(System::TObject* Sender);
	void __fastcall btCopyToClipBoardClick(System::TObject* Sender);
	void __fastcall btNormalClick(System::TObject* Sender);
	void __fastcall ckClipClick(System::TObject* Sender);
	void __fastcall btWandClick(System::TObject* Sender);
	void __fastcall trTolChange(System::TObject* Sender);
	void __fastcall btZoomInClick(System::TObject* Sender);
	void __fastcall btZoomOutClick(System::TObject* Sender);
	void __fastcall btZoomRSTClick(System::TObject* Sender);
	
private:
	int __fastcall getHoverBorderItem(void);
	void __fastcall SetHoverBorderItem(const int Value);
	Hotspotimage::TBorderPoly FBorderPoly;
	Hotspotimage::THoverPosition FHoverPos;
	int FHoverBorderItem;
	int FHoverItem;
	int FSelectedItem;
	#pragma pack(push,1)
	Types::TPoint PStart;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TPoint PCurrent;
	#pragma pack(pop)
	TStatus FStatus;
	int CurrentDelta;
	void __fastcall disablePolyTools(void);
	void __fastcall enablePolyTools(void);
	void __fastcall calcWandPoly(Graphics::TBitmap* &bitmap1, TBool2DArray &mask);
	void __fastcall MagicWand(int X, int Y, double tolerance);
	void __fastcall disableWandTools(void);
	void __fastcall enableWandTools(void);
	int __fastcall RestrictX(int X);
	int __fastcall RestrictY(int Y);
	void __fastcall SetSelectedItem(const int Value);
	int __fastcall GetSelectedItem(void);
	bool __fastcall SavePoly(void);
	void __fastcall lProperties(bool doEnabled);
	void __fastcall SwapHotSpots(void);
	__property int HoverBorderItem = {read=getHoverBorderItem, write=SetHoverBorderItem, nodefault};
	
public:
	void __fastcall LoadSettings(AnsiString inifile);
	void __fastcall SaveSettings(AnsiString inifile);
	__property int SelectedItem = {read=GetSelectedItem, write=SetSelectedItem, nodefault};
public:
	#pragma option push -w-inl
	/* TCustomForm.Create */ inline __fastcall virtual TfrmHSIEditor(Classes::TComponent* AOwner) : Forms::TForm(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomForm.CreateNew */ inline __fastcall virtual TfrmHSIEditor(Classes::TComponent* AOwner, int Dummy) : Forms::TForm(AOwner, Dummy) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TfrmHSIEditor(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TfrmHSIEditor(HWND ParentWindow) : Forms::TForm(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint BordRectSz = 0x2;
extern PACKAGE TfrmHSIEditor* frmHSIEditor;
extern PACKAGE Hotspotimage::THotSpots* FHotSpots_org;
extern PACKAGE Hotspotimage::THotSpots* FHotSpots;
extern PACKAGE bool HotSpotsChanged;
extern PACKAGE Graphics::TPicture* FPicture;
extern PACKAGE DynamicArray<Hotspotimage::TRealPoint >  tmPoints;
extern PACKAGE int FPoint1;
extern PACKAGE int FPoint2;
extern PACKAGE Types::TPoint svMove;

}	/* namespace Hotspoteditor */
using namespace Hotspoteditor;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Hotspoteditor
