mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 05:59:19 +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
|
type
|
||||||
TCustomFormAccess = class(TCustomForm);
|
TCustomFormAccess = class(TCustomForm);
|
||||||
|
TControlAccess = class(TControl);
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
mk_lbutton = 1;
|
mk_lbutton = 1;
|
||||||
@ -1628,6 +1630,15 @@ begin
|
|||||||
DebugLn(', No CTRL down');
|
DebugLn(', No CTRL down');
|
||||||
{$ENDIF}
|
{$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
|
if Mediator<>nil then begin
|
||||||
Handled:=false;
|
Handled:=false;
|
||||||
Mediator.MouseDown(Button,Shift,MouseDownPos,Handled);
|
Mediator.MouseDown(Button,Shift,MouseDownPos,Handled);
|
||||||
@ -1963,6 +1974,15 @@ begin
|
|||||||
DebugLn('');
|
DebugLn('');
|
||||||
{$ENDIF}
|
{$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
|
if Mediator<>nil then
|
||||||
begin
|
begin
|
||||||
Handled:=false;
|
Handled:=false;
|
||||||
@ -2061,6 +2081,15 @@ begin
|
|||||||
if (OldMouseMovePos.X = LastMouseMovePos.X) and (OldMouseMovePos.Y = LastMouseMovePos.Y) then
|
if (OldMouseMovePos.X = LastMouseMovePos.X) and (OldMouseMovePos.Y = LastMouseMovePos.Y) then
|
||||||
Exit;
|
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
|
if Mediator <> nil then
|
||||||
begin
|
begin
|
||||||
Handled := False;
|
Handled := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user