// CodeGear C++Builder
// Copyright (c) 1995, 2014 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'FMX.TMSHotSpotImageEditor.pas' rev: 27.00 (Windows)

#ifndef Fmx_TmshotspotimageeditorHPP
#define Fmx_TmshotspotimageeditorHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.UITypes.hpp>	// Pascal unit
#include <FMX.Controls.hpp>	// Pascal unit
#include <System.Types.hpp>	// Pascal unit
#include <FMX.Types.hpp>	// Pascal unit
#include <FMX.Forms.hpp>	// Pascal unit
#include <FMX.Objects.hpp>	// Pascal unit
#include <FMX.TMSHotSpotImage.hpp>	// Pascal unit
#include <FMX.TMSBitmapContainer.hpp>	// Pascal unit
#include <FMX.Layouts.hpp>	// Pascal unit
#include <FMX.TMSSpeedButton.hpp>	// Pascal unit
#include <FMX.ListBox.hpp>	// Pascal unit
#include <FMX.Dialogs.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <FMX.Menus.hpp>	// Pascal unit
#include <FMX.Edit.hpp>	// Pascal unit
#include <FMX.TabControl.hpp>	// Pascal unit
#include <FMX.Ani.hpp>	// Pascal unit
#include <FMX.Colors.hpp>	// Pascal unit
#include <FMX.Platform.hpp>	// Pascal unit
#include <FMX.TMSBitmap.hpp>	// Pascal unit
#include <FMX.TMSBaseControl.hpp>	// Pascal unit
#include <FMX.StdCtrls.hpp>	// Pascal unit
#include <System.UIConsts.hpp>	// Pascal unit
#include <FMX.Styles.hpp>	// Pascal unit
#include <FMX.Graphics.hpp>	// Pascal unit

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

namespace Fmx
{
namespace Tmshotspotimageeditor
{
//-- type declarations -------------------------------------------------------
struct DECLSPEC_DRECORD tagRGBTRIPLE
{
public:
	System::Byte rgbtBlue;
	System::Byte rgbtGreen;
	System::Byte rgbtRed;
};


typedef tagRGBTRIPLE TRGBTriple;

enum DECLSPEC_DENUM TStatus : unsigned char { stNormal, stDrawing, stDrawPoly, stMovePoint, stMoveLine, stMove, stScaleEllipse, stWand };

typedef System::DynamicArray<bool> Fmx_Tmshotspotimageeditor__1;

typedef System::DynamicArray<System::DynamicArray<bool> > TBool2DArray;

typedef System::StaticArray<tagRGBTRIPLE, 30001> TRGBTripleRow;

typedef TRGBTripleRow *pRGBTripleRow;

class DELPHICLASS TTMSFMXHotSpotImageEditorForm;
class PASCALIMPLEMENTATION TTMSFMXHotSpotImageEditorForm : public Fmx::Forms::TForm
{
	typedef Fmx::Forms::TForm inherited;
	
__published:
	Fmx::Stdctrls::TLabel* lbNPoints;
	Fmx::Stdctrls::TLabel* lbnX;
	Fmx::Stdctrls::TLabel* lbnY;
	Fmx::Stdctrls::TLabel* lbPozX;
	Fmx::Stdctrls::TLabel* lbPozY;
	Fmx::Stdctrls::TToolBar* ToolBar1;
	Fmx::Stdctrls::TPanel* Panel1;
	Fmx::Stdctrls::TButton* Button1;
	Fmx::Stdctrls::TButton* Button2;
	Fmx::Layouts::TScrollBox* ScrollBox1;
	Fmx::Stdctrls::TPanel* pnBackground;
	Fmx::Stdctrls::TPanel* pnContainer;
	Fmx::Stdctrls::TSplitter* Splitter1;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btNormal;
	Fmx::Tmsbitmapcontainer::TTMSFMXBitmapContainer* TMSFMXBitmapContainer1;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btRect;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btZoomRST;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btZoomOut;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btZoomIn;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* TMSFMXSpeedButton6;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btDelLine;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btDelPoint;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btAddPoint;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btDelete;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btWand;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btPoly;
	Fmx::Tmsspeedbutton::TTMSFMXSpeedButton* btEllipse;
	Fmx::Objects::TPaintBox* PB;
	Fmx::Stdctrls::TPanel* pnLoadBack;
	Fmx::Stdctrls::TButton* btBackImage;
	Fmx::Dialogs::TOpenDialog* OPD;
	Fmx::Stdctrls::TTrackBar* trTol;
	Fmx::Stdctrls::TLabel* lbWTolerance;
	Fmx::Stdctrls::TLabel* lbWDensity;
	Fmx::Stdctrls::TTrackBar* trDensity;
	Fmx::Menus::TPopupMenu* pmHotSpot;
	Fmx::Menus::TMenuItem* miDelete;
	Fmx::Menus::TMenuItem* miSaveHSImage;
	Fmx::Dialogs::TSaveDialog* SPD;
	Fmx::Stdctrls::TLabel* Label3;
	Fmx::Edit::TSpinBox* seZoomRatio;
	Fmx::Stdctrls::TPanel* pnProperties;
	Fmx::Stdctrls::TLabel* pnlTitle;
	Fmx::Tabcontrol::TTabControl* TabControl1;
	Fmx::Tabcontrol::TTabItem* TabItem1;
	Fmx::Stdctrls::TButton* btLoadClick;
	Fmx::Stdctrls::TButton* btClearClick;
	Fmx::Stdctrls::TImageControl* imgClick;
	Fmx::Listbox::TComboBox* cmb_ClickImgIndex;
	Fmx::Stdctrls::TLabel* Label10;
	Fmx::Stdctrls::TLabel* Label11;
	Fmx::Stdctrls::TButton* bt_ClearClickColor;
	Fmx::Colors::TColorPanel* ColorPanel1;
	Fmx::Tabcontrol::TTabItem* TabItem2;
	Fmx::Stdctrls::TButton* btLoadHover;
	Fmx::Stdctrls::TButton* btClearHover;
	Fmx::Stdctrls::TButton* btClearHoverColor;
	Fmx::Listbox::TComboBox* cmb_HoverImgIndex;
	Fmx::Colors::TColorPanel* ColorPanel2;
	Fmx::Stdctrls::TImageControl* ImgHover;
	Fmx::Stdctrls::TLabel* Label12;
	Fmx::Stdctrls::TLabel* Label13;
	Fmx::Tabcontrol::TTabItem* TabItem3;
	Fmx::Stdctrls::TButton* Btn_Selected;
	Fmx::Stdctrls::TButton* btClearSelected;
	Fmx::Stdctrls::TButton* btClearSelectedColor;
	Fmx::Listbox::TComboBox* cmb_SelectImgIndex;
	Fmx::Colors::TColorPanel* ColorPanel3;
	Fmx::Stdctrls::TImageControl* Img_Selected;
	Fmx::Stdctrls::TLabel* Label14;
	Fmx::Stdctrls::TLabel* Label15;
	Fmx::Tabcontrol::TTabItem* TabItem4;
	Fmx::Stdctrls::TButton* Btn_Blink;
	Fmx::Stdctrls::TButton* btClearBlink;
	Fmx::Stdctrls::TButton* bt_ClearBlinkColor;
	Fmx::Listbox::TComboBox* cmb_BlinkImgIndex;
	Fmx::Colors::TColorPanel* ColorPanel4;
	Fmx::Stdctrls::TImageControl* Img_Blink;
	Fmx::Stdctrls::TLabel* Label16;
	Fmx::Stdctrls::TLabel* Label17;
	Fmx::Stdctrls::TButton* Button3;
	Fmx::Colors::TColorPanel* ColorPanel5;
	Fmx::Stdctrls::TLabel* Label1;
	Fmx::Stdctrls::TButton* Button4;
	Fmx::Colors::TColorPanel* ColorPanel6;
	Fmx::Stdctrls::TLabel* Label2;
	Fmx::Stdctrls::TButton* Button5;
	Fmx::Colors::TColorPanel* ColorPanel7;
	Fmx::Stdctrls::TLabel* Label4;
	Fmx::Stdctrls::TButton* Button6;
	Fmx::Colors::TColorPanel* ColorPanel8;
	Fmx::Stdctrls::TLabel* Label18;
	Fmx::Stdctrls::TPanel* Panel2;
	Fmx::Stdctrls::TLabel* Label5;
	Fmx::Edit::TEdit* edtName;
	Fmx::Stdctrls::TLabel* Label6;
	Fmx::Edit::TEdit* edtID;
	Fmx::Stdctrls::TLabel* Label7;
	Fmx::Edit::TSpinBox* spAngle;
	Fmx::Stdctrls::TCheckBox* chk_Blink;
	Fmx::Stdctrls::TLabel* Label8;
	Fmx::Stdctrls::TLabel* Label9;
	Fmx::Edit::TSpinBox* se_OffsetX;
	Fmx::Edit::TSpinBox* se_OffsetY;
	Fmx::Stdctrls::TCheckBox* ckClip;
	Fmx::Stdctrls::TCheckBox* ckSelectable;
	void __fastcall PBMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall PBMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall PBMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	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 miSaveHSImageClick(System::TObject* Sender);
	void __fastcall btBackImageClick(System::TObject* Sender);
	void __fastcall btEllipseClick(System::TObject* Sender);
	void __fastcall btDeleteClick(System::TObject* Sender);
	void __fastcall edtNameMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall edtIDMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall btPolyClick(System::TObject* Sender);
	void __fastcall spAngleChange(System::TObject* Sender);
	void __fastcall btNormalClick(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);
	void __fastcall Btn_SelectedClick(System::TObject* Sender);
	void __fastcall Btn_BlinkClick(System::TObject* Sender);
	void __fastcall se_OffsetXChange(System::TObject* Sender);
	void __fastcall se_OffsetYChange(System::TObject* Sender);
	void __fastcall cmb_ClickImgIndexChange(System::TObject* Sender);
	void __fastcall cmb_HoverImgIndexChange(System::TObject* Sender);
	void __fastcall cmb_SelectImgIndexChange(System::TObject* Sender);
	void __fastcall cmb_BlinkImgIndexChange(System::TObject* Sender);
	void __fastcall SpeedButton1Click(System::TObject* Sender);
	void __fastcall btClearClickClick(System::TObject* Sender);
	void __fastcall btClearHoverClick(System::TObject* Sender);
	void __fastcall btClearSelectedClick(System::TObject* Sender);
	void __fastcall btClearBlinkClick(System::TObject* Sender);
	void __fastcall bt_ClearClickColorClick(System::TObject* Sender);
	void __fastcall bt_ClearBlinkColorClick(System::TObject* Sender);
	void __fastcall PBPaint(System::TObject* Sender, Fmx::Graphics::TCanvas* Canvas);
	void __fastcall FormKeyDown(System::TObject* Sender, System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
	void __fastcall edtIDKeyDown(System::TObject* Sender, System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
	void __fastcall ckClipChange(System::TObject* Sender);
	void __fastcall chk_BlinkChange(System::TObject* Sender);
	void __fastcall ckSelectableChange(System::TObject* Sender);
	void __fastcall trDensityChange(System::TObject* Sender);
	void __fastcall btClearHoverColorClick(System::TObject* Sender);
	void __fastcall btClearSelectedColorClick(System::TObject* Sender);
	void __fastcall Button2Click(System::TObject* Sender);
	void __fastcall Button3Click(System::TObject* Sender);
	void __fastcall Button4Click(System::TObject* Sender);
	void __fastcall Button5Click(System::TObject* Sender);
	void __fastcall Button6Click(System::TObject* Sender);
	
private:
	int __fastcall getHoverBorderItem(void);
	void __fastcall SetHoverBorderItem(const int Value);
	void __fastcall DrawHotSpotImage(Fmx::Tmshotspotimage::TTMSFMXHotSpot* HotSpot, Fmx::Graphics::TCanvas* Canvas);
	float FX;
	float FY;
	Fmx::Tmshotspotimage::TBorderPoly FBorderPoly;
	Fmx::Tmshotspotimage::THoverPosition FHoverPos;
	int FHoverBorderItem;
	int FHoverItem;
	int FSelectedItem;
	System::Types::TPointF PStart;
	System::Types::TPointF PCurrent;
	TStatus FStatus;
	float CurrentDelta;
	void __fastcall disablePolyTools(void);
	void __fastcall enablePolyTools(void);
	void __fastcall disableWandTools(void);
	void __fastcall enableWandTools(void);
	void __fastcall DoMagicWand(float X, float Y);
	float __fastcall RestrictX(float X);
	float __fastcall RestrictY(float Y);
	void __fastcall SetSelectedItem(const int Value);
	int __fastcall GetSelectedItem(void);
	bool __fastcall SavePoly(void);
	void __fastcall lProperties(bool doEnabled);
	void __fastcall SwapHotSpots(void);
	System::UnicodeString __fastcall GetImageName(Fmx::Listbox::TComboBox* cmb);
	void __fastcall SetImageName(Fmx::Listbox::TComboBox* cmb, System::UnicodeString ImageName);
	void __fastcall LoadAllImageComboboxes(void);
	__property int HoverBorderItem = {read=getHoverBorderItem, write=SetHoverBorderItem, nodefault};
	
public:
	void __fastcall LoadSettings(System::Sysutils::TFileName inifile);
	void __fastcall SaveSettings(System::Sysutils::TFileName inifile);
	__property int SelectedItem = {read=GetSelectedItem, write=SetSelectedItem, nodefault};
public:
	/* TCustomForm.Create */ inline __fastcall virtual TTMSFMXHotSpotImageEditorForm(System::Classes::TComponent* AOwner) : Fmx::Forms::TForm(AOwner) { }
	/* TCustomForm.CreateNew */ inline __fastcall virtual TTMSFMXHotSpotImageEditorForm(System::Classes::TComponent* AOwner, NativeInt Dummy) : Fmx::Forms::TForm(AOwner, Dummy) { }
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TTMSFMXHotSpotImageEditorForm(void) { }
	
};


class DELPHICLASS TTMSFMXHotSpotImageEditorDialog;
class PASCALIMPLEMENTATION TTMSFMXHotSpotImageEditorDialog : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	Fmx::Tmshotspotimage::TTMSFMXHotSpotImage* FHotSpotImage;
	
protected:
	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation AOperation);
	
public:
	bool __fastcall Execute(void);
	
__published:
	__property Fmx::Tmshotspotimage::TTMSFMXHotSpotImage* HotSpotImage = {read=FHotSpotImage, write=FHotSpotImage};
public:
	/* TComponent.Create */ inline __fastcall virtual TTMSFMXHotSpotImageEditorDialog(System::Classes::TComponent* AOwner) : System::Classes::TComponent(AOwner) { }
	/* TComponent.Destroy */ inline __fastcall virtual ~TTMSFMXHotSpotImageEditorDialog(void) { }
	
};


//-- var, const, procedure ---------------------------------------------------
static const System::Int8 BordRectSz = System::Int8(0x2);
extern DELPHI_PACKAGE TTMSFMXHotSpotImageEditorForm* TMSFMXHotSpotImageEditorForm;
extern DELPHI_PACKAGE Fmx::Tmshotspotimage::TTMSFMXHotSpots* FHotSpots_org;
extern DELPHI_PACKAGE Fmx::Tmshotspotimage::TTMSFMXHotSpots* FHotSpots;
extern DELPHI_PACKAGE Fmx::Tmsbitmapcontainer::TTMSFMXBitmapContainer* BitmapContainer;
extern DELPHI_PACKAGE bool HotSpotsChanged;
extern DELPHI_PACKAGE Fmx::Graphics::TBitmap* FPicture;
extern DELPHI_PACKAGE System::Math::Vectors::TPolygon tmPoints;
extern DELPHI_PACKAGE int FPoint1;
extern DELPHI_PACKAGE int FPoint2;
extern DELPHI_PACKAGE System::Types::TPoint svMove;
}	/* namespace Tmshotspotimageeditor */
}	/* namespace Fmx */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX_TMSHOTSPOTIMAGEEDITOR)
using namespace Fmx::Tmshotspotimageeditor;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX)
using namespace Fmx;
#endif
#pragma pack(pop)
#pragma option pop

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