mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 02:39:26 +02:00
LCL: TControl.ClientToScreen(TRect) overload - Delphi compatibility
This commit is contained in:
parent
d93d5c3e08
commit
f05922b05d
@ -1663,7 +1663,8 @@ type
|
|||||||
procedure SetTextBuf(Buffer: PChar); virtual;
|
procedure SetTextBuf(Buffer: PChar); virtual;
|
||||||
function Perform(Msg: Cardinal; WParam: WParam; LParam: LParam): LRESULT;
|
function Perform(Msg: Cardinal; WParam: WParam; LParam: LParam): LRESULT;
|
||||||
function ScreenToClient(const APoint: TPoint): TPoint; virtual;
|
function ScreenToClient(const APoint: TPoint): TPoint; virtual;
|
||||||
function ClientToScreen(const APoint: TPoint): TPoint; virtual;
|
function ClientToScreen(const APoint: TPoint): TPoint; overload; virtual;
|
||||||
|
function ClientToScreen(const ARect: TRect): TRect; overload;
|
||||||
function ScreenToControl(const APoint: TPoint): TPoint;
|
function ScreenToControl(const APoint: TPoint): TPoint;
|
||||||
function ControlToScreen(const APoint: TPoint): TPoint;
|
function ControlToScreen(const APoint: TPoint): TPoint;
|
||||||
function ClientToParent(const Point: TPoint; AParent: TWinControl = nil): TPoint;
|
function ClientToParent(const Point: TPoint; AParent: TWinControl = nil): TPoint;
|
||||||
|
@ -1654,6 +1654,15 @@ begin
|
|||||||
Result.Y := APoint.Y + P.Y;
|
Result.Y := APoint.Y + P.Y;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TControl.ClientToScreen(const ARect: TRect): TRect;
|
||||||
|
var
|
||||||
|
P : TPoint;
|
||||||
|
begin
|
||||||
|
P := ClientToScreen(Point(0, 0));
|
||||||
|
Result := ARect;
|
||||||
|
Result.Offset(P);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
function TControl.ScreenToControl(const APoint: TPoint): TPoint;
|
function TControl.ScreenToControl(const APoint: TPoint): TPoint;
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user