mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 20:50:18 +02:00
lcl: TDockObject: add Dropped property for delphi compatibility (issue #0013427)
git-svn-id: trunk@20067 -
This commit is contained in:
parent
dfb54d7324
commit
4a690c2f5a
@ -340,6 +340,7 @@ type
|
||||
FDragTarget: TControl;
|
||||
FDragTargetPos: TPoint;
|
||||
FAutoCreated: Boolean;
|
||||
FDropped: Boolean;
|
||||
protected
|
||||
procedure EndDrag(Target: TObject; X, Y: Integer); virtual;
|
||||
function GetDragImages: TDragImageList; virtual;
|
||||
@ -357,6 +358,7 @@ type
|
||||
property DragPos: TPoint read FDragPos write FDragPos;
|
||||
property DragTarget: TControl read FDragTarget write FDragTarget;
|
||||
property DragTargetPos: TPoint read FDragTargetPos write FDragTargetPos;
|
||||
property Dropped: Boolean read FDropped;
|
||||
end;
|
||||
|
||||
TDragObjectClass = class of TDragObject;
|
||||
|
@ -229,6 +229,7 @@ begin
|
||||
else
|
||||
TargetPos := ADragObjectCopy.DragPos; //otherwise take the current position
|
||||
Accepted := ADropped and SendCmDragMsg(ADragObjectCopy, dmDragLeave);
|
||||
ADragObjectCopy.FDropped := Accepted;
|
||||
|
||||
if ADragObjectCopy.DragTarget <> nil then
|
||||
begin
|
||||
@ -496,6 +497,8 @@ begin
|
||||
else
|
||||
TargetPos := ADockObjectCopy.DragPos; //otherwise take the current position
|
||||
Accepted := Accepted and (ADockObjectCopy.Floating or SendCmDragMsg(ADockObjectCopy, dmDragLeave)) and ADropped;
|
||||
ADockObjectCopy.FDropped := Accepted;
|
||||
|
||||
if Accepted and ADockObjectCopy.Floating then
|
||||
begin
|
||||
ParentForm := GetParentForm(ADockObjectCopy.Control);
|
||||
|
Loading…
Reference in New Issue
Block a user