type
TMouseGesture = class(TObject)
private
- FHook: Integer;
+ FHook: Cardinal;
FHandle: THandle;
FGestureItemList: TStringList;
FBeginGesture: Boolean;
function CheckAction(Message: Integer; x, y: Integer): Boolean;
procedure AddAction(sx, sy: Integer);
function AddGesture(Item: string): Integer;
- procedure ClearGesture;
function Get(Index: integer): string;
procedure Put(Index: integer; Item: string);
public
property GestureCount: Integer read GetGestureCount;
property Margin: Integer read FMargin write FMargin;
function GetGestureStr: string;
+ procedure Clear;
property OnGestureStart: TNotifyEvent read FOnGestureStart write FOnGestureStart;
property OnGestureMove: TNotifyEvent read FOnGestureMove write FOnGestureMove;
property OnGestureEnd: TNotifyEvent read FOnGestureEnd write FOnGestureEnd;
destructor TMouseGesture.Destroy;
begin
UnHook;
- ClearGesture;
+ Clear;
FGestureItemList.Free;
inherited;
end;
FBeginGesture := False;
ReleaseCapture;
if FGestureItemList.Count <> 0 then begin
- if Assigned(FOnGestureEnd) then
+ if Assigned(FOnGestureEnd) then begin
FOnGestureEnd(Self);
- ClearGesture;
+ end else begin
+ Clear;
+ end;
end else begin
FCancelMode := True;
//\83W\83F\83X\83`\83\83\81[\82¶\82á\82È\82©\82Á\82½\8fê\8d\87\81A\83}\83E\83XDOWN,UP\82ð\83G\83~\83\85\83\8c\81[\83g
end;
//\83W\83F\83X\83`\83\83\81[\82ð\83N\83\8a\83A\82·\82é
-procedure TMouseGesture.ClearGesture;
+procedure TMouseGesture.Clear;
begin
FGestureItemList.Clear;
end;