mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 19:08:03 +02:00
added Sender to Application OnKeyDownHandler
git-svn-id: trunk@4043 -
This commit is contained in:
parent
36bdb823f4
commit
cd0c2a7936
@ -683,7 +683,8 @@ type
|
||||
procedure ShowException(E: Exception);
|
||||
procedure Terminate;
|
||||
procedure NotifyUserInputHandler(Msg: Cardinal);
|
||||
procedure NotifyKeyDownHandler(var Key : Word; Shift : TShiftState);
|
||||
procedure NotifyKeyDownHandler(Sender: TObject;
|
||||
var Key : Word; Shift : TShiftState);
|
||||
procedure AddOnIdleHandler(AnOnIdleHandler: TNotifyEvent);
|
||||
procedure RemoveOnIdleHandler(AnOnIdleHandler: TNotifyEvent);
|
||||
procedure AddOnIdleEndHandler(AnOnIdleEndHandler: TNotifyEvent);
|
||||
|
@ -859,14 +859,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TApplication.NotifyKeyDownHandler(var Key: Word; Shift: TShiftState);
|
||||
procedure TApplication.NotifyKeyDownHandler(Sender: TObject;
|
||||
var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if FOnKeyDownHandler=nil then exit;
|
||||
i:=FOnKeyDownHandler.Count-1;
|
||||
while (i>=0) and (FOnKeyDownHandler<>nil) and (Key<>VK_UNKNOWN) do begin
|
||||
TKeyEvent(FOnKeyDownHandler[i])(Self,Key,Shift);
|
||||
TKeyEvent(FOnKeyDownHandler[i])(Sender,Key,Shift);
|
||||
dec(i);
|
||||
if (FOnKeyDownHandler<>nil) and (i>FOnKeyDownHandler.Count-1) then
|
||||
i:=FOnKeyDownHandler.Count-1;
|
||||
@ -991,6 +992,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.50 2003/04/11 10:31:57 mattias
|
||||
added Sender to Application OnKeyDownHandler
|
||||
|
||||
Revision 1.49 2003/04/11 10:23:23 mattias
|
||||
added Application OnKeyDownHandler
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user