Class THotImage (unit HotImage)

Inherits from

TImage

Constructors


constructor Create(AOwner: TComponent);

Public declarations

* THotImage



Functions

function CopyPointArray(PointBuffer: PPoints; Spot: TSpot): boolean;


function CreateRgnByID(ASpotID: integer): HRgn;

if BufferSize>0

function CreateRgnHandle(Spot: TSpot): HRgn;


destructor Destroy;

"hand" cursor was defined since Delphi 3's VCL

procedure ResetSelection;

if (Spot<>FCapturedSpot) or (Down<>FDown

function ScaleInfo: TScaleInfo;


function SpotFromPos(X, Y: Integer): TSpot;


procedure Click;


procedure CMEnabledChanged(var Message: TMessage);

ScaleInfo.

procedure CMHintShow(var Message: TMessage);

Protected declarations

procedure CMHitTest(var Message: TCMHitTest);

The main cause of having CM_HITTEST handler - its' the only place where Cursor and HintText normaly can be handled

procedure CMMouseLeave(var Message: TMessage);


procedure DblClick;


procedure Paint;


procedure WMLButtonDown(var Message: TWMLButtonDown);


procedure WMLButtonUp(var Message: TWMLButtonUp);


procedure WMMouseMove(var Message: TWMMouseMove);


function GetCanvas: TCanvas;

hack method to get native TControlCanvas

function GetPictureCanvas: TCanvas;


function GetSpotIndex: Integer;

Added 7.

function GetTransparent: Boolean;


procedure SetCommonCursor(Value: TCursor);


procedure SetCommonHint(const Value: String);

Added 26.

procedure SetHotSpots(AHotSpots: THotSpots);


procedure SetMaskPicture(Value: TPicture);


procedure SetSelectedSpot(Value: TSpot);


procedure SetSpotPicture(Spot: TSpot; Down: Boolean);


procedure SetTransparent(Value: Boolean);


Properties

property Cursor : TCursor

hides original TControl.

property Hint :


property HotAreasOnly : Boolean


property HotCursor : TCursor


property HotSpots : THotSpots

Published declarations

property MaskPicture : TPicture


property Transparent : Boolean


property Canvas : TCanvas


property CapturedSpot : TSpot


property PictureCanvas : TCanvas


property SelectedSpot : TSpot


property SpotIndex : Integer


Events

event OnGetHintText : TGetHintTextEvent


event OnPaint : TNotifyEvent

Events

Variables

FCapturedSpot : TSpot;


FCommonCursor : TCursor;


FCommonHint : String;


FDown : Boolean;


FDragging : Boolean;


FHotAreas : Boolean;


FHotCursor : TCursor;


FHotSpots : THotSpots;

Private declarations

FMaskPicture : TPicture;


FMaskValid : Boolean;

in source coordinates

FOldPoint : TSmallPoint;


FOnGetHintText : TGetHintTextEvent;


FOnPaint : TNotifyEvent;


FPaintBmp : TBitMap;


FPaintTopLeft : TPoint;


FSelectedSpot : TSpot;



Constructors


constructor Create(AOwner: TComponent);

Public declarations

* THotImage


Functions


function CopyPointArray(PointBuffer: PPoints; Spot: TSpot): boolean;


function CreateRgnByID(ASpotID: integer): HRgn;

if BufferSize>0


function CreateRgnHandle(Spot: TSpot): HRgn;


destructor Destroy;

"hand" cursor was defined since Delphi 3's VCL


procedure ResetSelection;

if (Spot<>FCapturedSpot) or (Down<>FDown


function ScaleInfo: TScaleInfo;


function SpotFromPos(X, Y: Integer): TSpot;


procedure Click;


procedure CMEnabledChanged(var Message: TMessage);

ScaleInfo.SrcOffset always zero


procedure CMHintShow(var Message: TMessage);

Protected declarations


procedure CMHitTest(var Message: TCMHitTest);

The main cause of having CM_HITTEST handler - its' the only place where Cursor and HintText normaly can be handled


procedure CMMouseLeave(var Message: TMessage);


procedure DblClick;


procedure Paint;


procedure WMLButtonDown(var Message: TWMLButtonDown);


procedure WMLButtonUp(var Message: TWMLButtonUp);


procedure WMMouseMove(var Message: TWMMouseMove);


function GetCanvas: TCanvas;

hack method to get native TControlCanvas


function GetPictureCanvas: TCanvas;


function GetSpotIndex: Integer;

Added 7.03.98


function GetTransparent: Boolean;


procedure SetCommonCursor(Value: TCursor);


procedure SetCommonHint(const Value: String);

Added 26.02.98


procedure SetHotSpots(AHotSpots: THotSpots);


procedure SetMaskPicture(Value: TPicture);


procedure SetSelectedSpot(Value: TSpot);


procedure SetSpotPicture(Spot: TSpot; Down: Boolean);


procedure SetTransparent(Value: Boolean);


Properties


property Cursor : TCursor

hides original TControl.Hint


property Hint :


property HotAreasOnly : Boolean


property HotCursor : TCursor


property HotSpots : THotSpots

Published declarations


property MaskPicture : TPicture


property Transparent : Boolean


property Canvas : TCanvas


property CapturedSpot : TSpot


property PictureCanvas : TCanvas


property SelectedSpot : TSpot


property SpotIndex : Integer


Events


event OnGetHintText : TGetHintTextEvent


event OnPaint : TNotifyEvent

Events


Variables


FCapturedSpot : TSpot;


FCommonCursor : TCursor;


FCommonHint : String;


FDown : Boolean;


FDragging : Boolean;


FHotAreas : Boolean;


FHotCursor : TCursor;


FHotSpots : THotSpots;

Private declarations


FMaskPicture : TPicture;


FMaskValid : Boolean;

in source coordinates


FOldPoint : TSmallPoint;


FOnGetHintText : TGetHintTextEvent;


FOnPaint : TNotifyEvent;


FPaintBmp : TBitMap;


FPaintTopLeft : TPoint;


FSelectedSpot : TSpot;