mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
designer: implementation of CM_DESIGNHITTEST by Eugene Kryukov (issue #0015123)
git-svn-id: trunk@22714 -
This commit is contained in:
parent
18f393ac31
commit
f90c5c0b2f
@ -379,6 +379,8 @@ implementation
|
||||
|
||||
type
|
||||
TCustomFormAccess = class(TCustomForm);
|
||||
TControlAccess = class(TControl);
|
||||
|
||||
|
||||
const
|
||||
mk_lbutton = 1;
|
||||
@ -1628,6 +1630,15 @@ begin
|
||||
DebugLn(', No CTRL down');
|
||||
{$ENDIF}
|
||||
|
||||
if (MouseDownComponent <> nil) and (MouseDownComponent is TControl) then
|
||||
begin
|
||||
if TControl(MouseDownComponent).Perform(CM_DESIGNHITTEST, 0, Longint(SmallPoint(MouseDownPos.X, MouseDownPos.Y))) > 0 then
|
||||
begin
|
||||
TControlAccess(MouseDownComponent).MouseDown(Button, Shift, MouseDownPos.X, MouseDownPos.Y);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Mediator<>nil then begin
|
||||
Handled:=false;
|
||||
Mediator.MouseDown(Button,Shift,MouseDownPos,Handled);
|
||||
@ -1963,6 +1974,15 @@ begin
|
||||
DebugLn('');
|
||||
{$ENDIF}
|
||||
|
||||
if (MouseDownComponent <> nil) and (MouseDownComponent is TControl) then
|
||||
begin
|
||||
if TControl(MouseDownComponent).Perform(CM_DESIGNHITTEST, 0, Longint(SmallPoint(MouseUpPos.X, MouseUpPos.Y))) > 0 then
|
||||
begin
|
||||
TControlAccess(MouseDownComponent).MouseUp(Button, Shift, MouseUpPos.X, MouseUpPos.Y);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Mediator<>nil then
|
||||
begin
|
||||
Handled:=false;
|
||||
@ -2061,6 +2081,15 @@ begin
|
||||
if (OldMouseMovePos.X = LastMouseMovePos.X) and (OldMouseMovePos.Y = LastMouseMovePos.Y) then
|
||||
Exit;
|
||||
|
||||
if (MouseDownComponent <> nil) and (MouseDownComponent is TControl) then
|
||||
begin
|
||||
if TControl(MouseDownComponent).Perform(CM_DESIGNHITTEST, 0, Longint(SmallPoint(LastMouseMovePos.X, LastMouseMovePos.Y))) > 0 then
|
||||
begin
|
||||
TControlAccess(MouseDownComponent).MouseMove(Shift, LastMouseMovePos.X, LastMouseMovePos.Y);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Mediator <> nil then
|
||||
begin
|
||||
Handled := False;
|
||||
|
Loading…
Reference in New Issue
Block a user