// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'IEVect.pas' rev: 4.00

#ifndef IEVectHPP
#define IEVectHPP

#pragma delphiheader begin
#pragma option push -w-
#include <hyiedefs.hpp>	// Pascal unit
#include <hyieutils.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <ImageEnView.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ievect
{
//-- type declarations -------------------------------------------------------
typedef AnsiString IEVect__1[8];

#pragma pack(push, 4)
struct TDPoint
{
	double X;
	double y;
} ;
#pragma pack(pop)

typedef TDPoint TDPointArray[67108864];

typedef TDPoint *PDPointArray;

#pragma option push -b-
enum TIEVObjectKind { iekNONE, iekLINE, iekBOX, iekELLIPSE, iekARC, iekBITMAP, iekTEXT, iekRULER };
#pragma option pop

#pragma option push -b-
enum TIEShape { iesNONE, iesINARROW, iesOUTARROW };
#pragma option pop

#pragma option push -b-
enum TIEVRulerType { iertRULER, iertQUOTEBEGIN, iertQUOTECENTER, iertQUOTEEND };
#pragma option pop

#pragma pack(push, 4)
struct TIEVBitmap
{
	Graphics::TBitmap* fBitmap;
	int fRefCount;
} ;
#pragma pack(pop)

typedef TIEVBitmap *PIEVBitmap;

typedef TIEVBitmap TIEVBitmapArray[16777216];

typedef TIEVBitmap *PIEVBitmapArray;

#pragma option push -b-
enum IEVect__2 { ievsSelectable, ievsMoveable, ievsSizeable, ievsVisible };
#pragma option pop

typedef Set<IEVect__2, ievsSelectable, ievsVisible>  TIEVStyle;

struct TIEVObject;
typedef TIEVObject *PIEVObject;

#pragma option push -b-
enum TIEUnits { ieuPIXELS, ieuINCHES, ieuKM, ieuMETERS, ieuCENTIMETERS, ieuMILLIMETERS, ieuMICRONS, 
	ieuNANOMETERS };
#pragma option pop

#pragma pack(push, 4)
struct TIEVObject
{
	int x1;
	int y1;
	int x2;
	int y2;
	TIEVObjectKind Kind;
	TIEShape BeginShape;
	TIEShape EndShape;
	int ShapeWidth;
	int ShapeHeight;
	Graphics::TColor PenColor;
	Graphics::TPenStyle PenStyle;
	int PenWidth;
	Graphics::TColor BrushColor;
	Graphics::TBrushStyle BrushStyle;
	double a1;
	double a2;
	int BitmapIdx;
	char *Text;
	tagLOGFONTA *LogFont;
	Classes::TAlignment TextAlign;
	char *Name;
	int ID;
	TIEVStyle Style;
	TIEUnits RulerUnit;
	TIEVRulerType RulerType;
} ;
#pragma pack(pop)

typedef TIEVObject TIEVObjectArray[16777216];

typedef TIEVObject *PIEVObjectArray;

#pragma option push -b-
enum TIEMouseInteractVtItems { miArea, miLineLen, miPutLine, miPutBox, miPutEllipse, miPutBitmap, miPutText, 
	miObjectSelect, miDragLen, miPutRuler };
#pragma option pop

typedef Set<TIEMouseInteractVtItems, miArea, miPutRuler>  TIEMouseInteractVt;

typedef void __fastcall (__closure *TIEVMeasureHintEvent)(System::TObject* Sender, AnsiString &Text, 
	double Value);

typedef void __fastcall (__closure *TIEVDragLenEndEvent)(System::TObject* Sender, double Value);

typedef void __fastcall (__closure *TIEVNewObject)(System::TObject* Sender, int hobj);

class DELPHICLASS TImageEnVect;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TImageEnVect : public Imageenview::TImageEnView 
{
	typedef Imageenview::TImageEnView inherited;
	
private:
	TIEMouseInteractVt fMouseInteractVt;
	double fScale;
	TIEUnits fMUnit;
	double fCoefX;
	double fCoefY;
	Hyieutils::TIEHint* fWHint;
	int fFloatPrecision;
	int fFloatDigits;
	bool fMeasureTrack;
	int fVMoveX;
	int fVMoveY;
	Classes::TNotifyEvent fOnSelectObject;
	TIEVMeasureHintEvent fOnMeasureHint;
	TIEVDragLenEndEvent fOnDragLenEnd;
	bool fZoomObjectsWidth;
	Classes::TNotifyEvent fOnVectorialChanged;
	double fLastDragLenValue;
	int fMaxSelectionDistance;
	int fObjCount;
	int *fObj;
	TIEVObjectKind fInserting;
	TIEVObject fNewObj;
	int *fSelObj;
	int fSelObjCount;
	int fGripping;
	int fTextEditing;
	Stdctrls::TEdit* fTextEdit;
	TIEVObject *fObjHeap;
	int fObjHeapCount;
	TIEVBitmap *fBitmaps;
	int fBitmapsCount;
	bool fShareBitmaps;
	bool fAllObjectsHidden;
	TIEVNewObject fOnNewObject;
	Hyiedefs::TResampleFilter fBitmapResampleFilter;
	void __fastcall SetAllObjectsHidden(bool Value);
	void __fastcall ShowDragLenHint(const Windows::TPoint &p);
	void __fastcall TextEditKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
	void __fastcall CalcCoef(double &cx, double &cy, TIEUnits mu);
	void __fastcall ShowAreaHint(const Windows::TPoint &p);
	void __fastcall ShowLineLenHint(const Windows::TPoint &p);
	void __fastcall DrawLineInserting(void);
	void __fastcall DrawBoxInserting(void);
	void __fastcall DrawEllipseInserting(void);
	void __fastcall DrawRulerInserting(void);
	void __fastcall DrawRuler(Graphics::TCanvas* wcanvas, int x1, int y1, int x2, int y2, TIEUnits um, 
		Graphics::TColor Color, int PW, TIEVRulerType RulerType, double zz);
	void __fastcall RemoveVObjData(TIEVObject &obj);
	void __fastcall RemoveVObjDataAll(void);
	int __fastcall AddVObject(const TIEVObject &aObj);
	void __fastcall RemoveVObject(int hobj);
	PIEVObject __fastcall GetObj(int hobj);
	void __fastcall DrawObject(Graphics::TCanvas* WCanvas, const TIEVObject &aobj, bool re);
	void __fastcall DrawObjectAll(Graphics::TCanvas* WCanvas, bool re);
	void __fastcall DrawObjectText(Graphics::TCanvas* wcanvas, int x1, int y1, int x2, int y2, const TIEVObject 
		&aobj, double zz);
	void __fastcall DrawObjectGrips(Graphics::TCanvas* Canvas, const TIEVObject &aobj);
	int __fastcall FindNearObj(int x, int y, double &ds);
	double __fastcall CalcDistPtObj(PIEVObject Obj, int x, int y);
	void __fastcall DrawSelGrips(Graphics::TCanvas* Canvas);
	int __fastcall FindSelGrip(int x, int y, int &gr);
	void __fastcall TraslateObject(int o, int ox, int oy);
	void __fastcall ChangeObjectCoor(int o, int ox1, int oy1, int ox2, int oy2);
	void __fastcall SelInRect(int aobj, int xx1, int yy1, int xx2, int yy2);
	void __fastcall DrawLineShape(Graphics::TCanvas* Canvas, int x1, int y1, int x2, int y2, TIEShape Shape
		, int w, int h);
	void __fastcall AddSelObjectNS(int hobj);
	void __fastcall ActiveTextEdit(void);
	void __fastcall RemoveTextEdit(void);
	void __fastcall SaveObj(Classes::TStream* Stream, int hobj);
	void __fastcall ReadObj3_4(Classes::TStream* Stream, AnsiString ver);
	TIEVObjectKind __fastcall GetObjKind(int hobj);
	void __fastcall SetObjKind(int hobj, TIEVObjectKind v);
	Graphics::TColor __fastcall GetObjPenColor(int hobj);
	void __fastcall SetObjPenColor(int hobj, Graphics::TColor v);
	Graphics::TPenStyle __fastcall GetObjPenStyle(int hobj);
	void __fastcall SetObjPenStyle(int hobj, Graphics::TPenStyle v);
	int __fastcall GetObjPenWidth(int hobj);
	void __fastcall SetObjPenWidth(int hobj, int v);
	Graphics::TColor __fastcall GetObjBrushColor(int hobj);
	void __fastcall SetObjBrushColor(int hobj, Graphics::TColor v);
	Graphics::TBrushStyle __fastcall GetObjBrushStyle(int hobj);
	void __fastcall SetObjBrushStyle(int hobj, Graphics::TBrushStyle v);
	Graphics::TBitmap* __fastcall GetObjBitmap(int hobj);
	void __fastcall SetObjBitmap(int hobj, Graphics::TBitmap* v);
	int __fastcall GetSelObjects(int idx);
	void __fastcall SetObjBeginShape(int hobj, TIEShape v);
	TIEShape __fastcall GetObjBeginShape(int hobj);
	void __fastcall SetObjEndShape(int hobj, TIEShape v);
	TIEShape __fastcall GetObjEndShape(int hobj);
	void __fastcall SetObjShapeWidth(int hobj, int v);
	int __fastcall GetObjShapeWidth(int hobj);
	void __fastcall SetObjShapeHeight(int hobj, int v);
	int __fastcall GetObjShapeHeight(int hobj);
	void __fastcall SetObjText(int hobj, AnsiString v);
	AnsiString __fastcall GetObjText(int hobj);
	void __fastcall SetObjName(int hobj, AnsiString v);
	AnsiString __fastcall GetObjName(int hobj);
	void __fastcall SetObjFontAngle(int hobj, double v);
	double __fastcall GetObjFontAngle(int hobj);
	int __fastcall GetObjFontHeight(int hobj);
	void __fastcall SetObjFontHeight(int hobj, int v);
	AnsiString __fastcall GetObjFontName(int hobj);
	void __fastcall SetObjFontName(int hobj, AnsiString v);
	Graphics::TFontStyles __fastcall GetObjFontStyles(int hobj);
	void __fastcall SetObjFontStyles(int hobj, Graphics::TFontStyles v);
	void __fastcall SetObjTextAlign(int hobj, Classes::TAlignment v);
	Classes::TAlignment __fastcall GetObjTextAlign(int hobj);
	void __fastcall SetObjLeft(int hobj, int v);
	int __fastcall GetObjLeft(int hobj);
	void __fastcall SetObjTop(int hobj, int v);
	int __fastcall GetObjTop(int hobj);
	void __fastcall SetObjWidth(int hobj, int v);
	int __fastcall GetObjWidth(int hobj);
	void __fastcall SetObjHeight(int hobj, int v);
	int __fastcall GetObjHeight(int hobj);
	void __fastcall SetObjRulerUnit(int hobj, TIEUnits v);
	TIEUnits __fastcall GetObjRulerUnit(int hobj);
	void __fastcall SetObjRulerType(int hobj, TIEVRulerType v);
	TIEVRulerType __fastcall GetObjRulerType(int hobj);
	void __fastcall SetObjID(int hobj, int v);
	int __fastcall GetObjID(int hobj);
	void __fastcall SetObjStyle(int hobj, TIEVStyle v);
	TIEVStyle __fastcall GetObjStyle(int hobj);
	void __fastcall SetZoomObjectsWidth(bool Value);
	Windows::TRect __fastcall GetObjectsExtents();
	Graphics::TBitmap* __fastcall GetBitmap(int idx);
	void __fastcall FreeBitmap(int idx);
	int __fastcall AllocBitmap(void);
	void __fastcall PackBMP(void);
	int __fastcall FindBitmap(Graphics::TBitmap* SBitmap);
	void __fastcall SetObjBitmapNU(int hobj, Graphics::TBitmap* v);
	void __fastcall SetObjBitmapIdxNU(int hobj, int idx);
	void __fastcall SetBitmapResampleFilter(Hyiedefs::TResampleFilter v);
	void __fastcall VPaintTo(Graphics::TCanvas* Canvas);
	
protected:
	int fVStable;
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	virtual void __fastcall SetMouseInteract(Imageenview::TIEMouseInteract v);
	void __fastcall SetMouseInteractVt(TIEMouseInteractVt v);
	HIDESBASE TIEMouseInteractVt __fastcall GetMouseInteract(void);
	void __fastcall SetMUnit(TIEUnits v);
	void __fastcall SetScale(double v);
	void __fastcall SetFloatDigits(int v);
	void __fastcall SetFloatPrecision(int v);
	void __fastcall UpdateHint(int x, int y);
	virtual void __fastcall ViewChange(int c);
	virtual void __fastcall SubMouseMoveScroll(int scx, int scy);
	int __fastcall GetObjPos(int hobj);
	void __fastcall ReInsertVObject(int hobj, int pos);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	virtual void __fastcall DoVectorialChanged(void);
	
public:
	int ObjDrawed;
	__fastcall virtual TImageEnVect(Classes::TComponent* Owner);
	__fastcall virtual ~TImageEnVect(void);
	virtual void __fastcall Paint(void);
	virtual void __fastcall PaintTo(Graphics::TCanvas* Canvas);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual void __fastcall Update(void);
	__property TIEMouseInteractVt MouseInteractVt = {read=GetMouseInteract, write=SetMouseInteractVt, default=0
		};
	virtual void __fastcall SetDPIX(int dpiX);
	virtual void __fastcall SetDPIY(int dpiY);
	double __fastcall GetSelectionArea(void);
	double __fastcall GetSelectionLen(void);
	Windows::TPoint __fastcall GetSelectionCentroid();
	__property bool MeasureTrack = {read=fMeasureTrack, write=fMeasureTrack, default=1};
	void __fastcall SetScaleFromPixels(int px, double mm);
	__property double ScaleFactor = {read=fScale, write=SetScale};
	void __fastcall SetScaleFromSelectionLen(double mm);
	virtual void __fastcall AddSelPoint(int x, int y);
	virtual void __fastcall Select(int x1, int y1, int x2, int y2, Imageenview::TIESelOp Op);
	void __fastcall CancelInteracts(void);
	__property int ObjectsCount = {read=fObjCount, nodefault};
	__property Windows::TRect ObjectsExtents = {read=GetObjectsExtents};
	__property TIEVObjectKind ObjKind[int hobj] = {read=GetObjKind, write=SetObjKind};
	__property Graphics::TColor ObjPenColor[int hobj] = {read=GetObjPenColor, write=SetObjPenColor};
	__property Graphics::TPenStyle ObjPenStyle[int hobj] = {read=GetObjPenStyle, write=SetObjPenStyle};
		
	__property int ObjPenWidth[int hobj] = {read=GetObjPenWidth, write=SetObjPenWidth};
	__property Graphics::TColor ObjBrushColor[int hobj] = {read=GetObjBrushColor, write=SetObjBrushColor
		};
	__property Graphics::TBrushStyle ObjBrushStyle[int hobj] = {read=GetObjBrushStyle, write=SetObjBrushStyle
		};
	__property Graphics::TBitmap* ObjBitmap[int hobj] = {read=GetObjBitmap, write=SetObjBitmap};
	__property TIEShape ObjBeginShape[int hobj] = {read=GetObjBeginShape, write=SetObjBeginShape};
	__property TIEShape ObjEndShape[int hobj] = {read=GetObjEndShape, write=SetObjEndShape};
	__property int ObjShapeWidth[int hobj] = {read=GetObjShapeWidth, write=SetObjShapeWidth};
	__property int ObjShapeHeight[int hobj] = {read=GetObjShapeHeight, write=SetObjShapeHeight};
	__property AnsiString ObjText[int hobj] = {read=GetObjText, write=SetObjText};
	__property double ObjFontAngle[int hobj] = {read=GetObjFontAngle, write=SetObjFontAngle};
	__property int ObjFontHeight[int hobj] = {read=GetObjFontHeight, write=SetObjFontHeight};
	__property AnsiString ObjFontName[int hobj] = {read=GetObjFontName, write=SetObjFontName};
	__property Graphics::TFontStyles ObjFontStyles[int hobj] = {read=GetObjFontStyles, write=SetObjFontStyles
		};
	__property Classes::TAlignment ObjTextAlign[int hobj] = {read=GetObjTextAlign, write=SetObjTextAlign
		};
	__property int ObjLeft[int hobj] = {read=GetObjLeft, write=SetObjLeft};
	__property int ObjTop[int hobj] = {read=GetObjTop, write=SetObjTop};
	__property int ObjWidth[int hobj] = {read=GetObjWidth, write=SetObjWidth};
	__property int ObjHeight[int hobj] = {read=GetObjHeight, write=SetObjHeight};
	__property AnsiString ObjName[int hobj] = {read=GetObjName, write=SetObjName};
	__property int ObjID[int hobj] = {read=GetObjID, write=SetObjID};
	__property TIEVStyle ObjStyle[int hobj] = {read=GetObjStyle, write=SetObjStyle};
	__property TIEUnits ObjRulerUnit[int hobj] = {read=GetObjRulerUnit, write=SetObjRulerUnit};
	__property TIEVRulerType ObjRulerType[int hobj] = {read=GetObjRulerType, write=SetObjRulerType};
	void __fastcall GetObjRect(int hobj, Windows::TRect &Rect);
	void __fastcall SetObjRect(int hobj, const Windows::TRect &Rect);
	__property bool AllObjectsHidden = {read=fAllObjectsHidden, write=SetAllObjectsHidden, nodefault};
	void __fastcall SetObjFont(int hobj, Graphics::TFont* v);
	void __fastcall SetObjBitmapICO(int hobj, int ico, int iwidth, int iheight);
	void __fastcall SetObjFrontOf(int hobj, int refobj);
	void __fastcall SetObjBackTo(int hobj, int refobj);
	bool __fastcall IsSelObject(int hobj);
	void __fastcall UnSelObject(int hobj);
	void __fastcall AddSelObject(int hobj);
	void __fastcall UnSelAllObjects(void);
	void __fastcall SelAllObjects(void);
	__property int MaxSelectionDistance = {read=fMaxSelectionDistance, write=fMaxSelectionDistance, nodefault
		};
	void __fastcall RemoveAllObjects(void);
	void __fastcall RemoveObject(int hobj);
	int __fastcall AddNewObject(void);
	__property int SelObjects[int idx] = {read=GetSelObjects};
	__property int SelObjectsCount = {read=fSelObjCount, nodefault};
	void __fastcall CopyObjectsToBack(void);
	int __fastcall GetObjFromName(const AnsiString oName);
	int __fastcall GetObjFromID(int oID);
	void __fastcall CopyObjectTo(int hobj, TImageEnVect* Dest);
	void __fastcall CopyAllObjectsTo(TImageEnVect* Dest);
	void __fastcall CopySelectedObjectsTo(TImageEnVect* Dest);
	void __fastcall SaveToFileIEV(const AnsiString nf);
	void __fastcall SaveToStreamIEV(Classes::TStream* Stream);
	bool __fastcall LoadFromFileIEV(const AnsiString nf);
	bool __fastcall LoadFromStreamIEV(Classes::TStream* Stream);
	bool __fastcall ImportDXF(const AnsiString nf);
	
__published:
	__property TIEUnits MUnit = {read=fMUnit, write=SetMUnit, default=0};
	__property int FloatDigits = {read=fFloatDigits, write=SetFloatDigits, default=2};
	__property int FloatPrecision = {read=fFloatPrecision, write=SetFloatPrecision, default=15};
	__property bool ShareBitmaps = {read=fShareBitmaps, write=fShareBitmaps, default=1};
	__property Classes::TNotifyEvent OnSelectObject = {read=fOnSelectObject, write=fOnSelectObject};
	__property TIEVMeasureHintEvent OnMeasureHint = {read=fOnMeasureHint, write=fOnMeasureHint};
	__property bool ZoomObjectsWidth = {read=fZoomObjectsWidth, write=SetZoomObjectsWidth, default=1};
	__property Classes::TNotifyEvent OnVectorialChanged = {read=fOnVectorialChanged, write=fOnVectorialChanged
		};
	__property TIEVDragLenEndEvent OnDragLenEnd = {read=fOnDragLenEnd, write=fOnDragLenEnd};
	__property TIEVNewObject OnNewObject = {read=fOnNewObject, write=fOnNewObject};
	__property Hyiedefs::TResampleFilter BitmapResampleFilter = {read=fBitmapResampleFilter, write=SetBitmapResampleFilter
		, default=0};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TImageEnVect(HWND ParentWindow) : Imageenview::TImageEnView(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE AnsiString strunits[8];
static const Shortint GRIPDIM = 0x4;
static const Shortint NULLOBJ = 0xfffffffc;
static const Shortint DEFWIDTH = 0x40;
static const Shortint DEFHEIGHT = 0x40;

}	/* namespace Ievect */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ievect;
#endif
#pragma option pop	// -w-

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