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

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

#ifndef ImouseHPP
#define ImouseHPP

#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 <Controls.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit

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

namespace Imouse
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TPanDirection { pdUp, pdDown, pdLeft, pdRight };
#pragma option pop

typedef Set<TPanDirection, pdUp, pdRight>  TPanDirections;

#pragma option push -b-
enum TPanOption { poVertical, poHorizontal };
#pragma option pop

typedef Set<TPanOption, poVertical, poHorizontal>  TPanOptions;

typedef void __fastcall (__closure *TUpdateEvent)(System::TObject* Sender, Types::TPoint &Delta, TPanDirections &CursorDirection);

class DELPHICLASS TPanningWindow;
class PASCALIMPLEMENTATION TPanningWindow : public Controls::TCustomPanningWindow 
{
	typedef Controls::TCustomPanningWindow inherited;
	
private:
	Extctrls::TTimer* FTimer;
	#pragma pack(push,1)
	Types::TPoint FOrg;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TPoint FLastPos;
	#pragma pack(pop)
	TPanOptions FPanOptions;
	bool FPanning;
	Graphics::TIcon* FImg;
	Controls::TCursor FOldCursor;
	TPanDirections FDirection;
	int FImgWidth;
	int FImgHeight;
	TUpdateEvent FOnUpdate;
	Controls::TControl* FPanControl;
	void __fastcall DoWheelTimer(System::TObject* Sender);
	void __fastcall MakeImageRegion(void);
	void __fastcall UpdateCursor(Types::TPoint &Pt);
	int __fastcall GetPanInterval(void);
	void __fastcall SetPanInterval(const int Value);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall DoUpdate(Types::TPoint &Delta, TPanDirections &CursorDirection);
	virtual TPanOptions __fastcall GetPanOptions(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	virtual void __fastcall Paint(void);
	virtual void __fastcall SetPanCursor(TPanDirections ADirection);
	virtual void __fastcall UpdateScroll(const Types::TPoint &Pt);
	virtual void __fastcall WndProc(Messages::TMessage &Msg);
	
public:
	__fastcall virtual TPanningWindow(Classes::TComponent* AOwner);
	__fastcall virtual ~TPanningWindow(void);
	virtual bool __fastcall GetIsPanning(void);
	virtual bool __fastcall StartPanning(unsigned AHandle, Controls::TControl* AControl);
	virtual void __fastcall StopPanning(void);
	__property bool IsPanning = {read=GetIsPanning, nodefault};
	__property Controls::TControl* PanControl = {read=FPanControl};
	__property int PanInterval = {read=GetPanInterval, write=SetPanInterval, nodefault};
	__property TPanOptions PanOptions = {read=GetPanOptions, nodefault};
	__property TUpdateEvent OnUpdate = {read=FOnUpdate, write=FOnUpdate};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TPanningWindow(HWND ParentWindow) : Controls::TCustomPanningWindow(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Controls::TCursor crPanAll = -50;
static const Controls::TCursor crPanDown = -51;
static const Controls::TCursor crPanDownLeft = -52;
static const Controls::TCursor crPanDownRight = -53;
static const Controls::TCursor crPanLeft = -54;
static const Controls::TCursor crPanLeftRight = -55;
static const Controls::TCursor crPanRight = -56;
static const Controls::TCursor crPanUp = -57;
static const Controls::TCursor crPanUpDown = -58;
static const Controls::TCursor crPanUpLeft = -59;
static const Controls::TCursor crPanUpRight = -60;
extern PACKAGE bool __fastcall StartPan(unsigned WndHandle, Controls::TControl* AControl);

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

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