LCL: Add deprecated wrappers for moved procedures in LCLProc.

This commit is contained in:
Juha 2023-06-05 22:12:05 +03:00
parent d9637b02d4
commit 517830dafe

View File

@ -29,6 +29,7 @@ uses
Classes, SysUtils, Math, Types, Laz_AVL_Tree, Classes, SysUtils, Math, Types, Laz_AVL_Tree,
// LazUtils // LazUtils
LazFileUtils, LazUtilities, LazMethodList, LazUTF8, LazLoggerBase, LazTracer, LazFileUtils, LazUtilities, LazMethodList, LazUTF8, LazLoggerBase, LazTracer,
GraphMath,
// LCL // LCL
LCLStrConsts, LCLType; LCLStrConsts, LCLType;
@ -109,8 +110,14 @@ var
function SendApplicationMessage(Msg: Cardinal; WParam: WParam; LParam: LParam):Longint; function SendApplicationMessage(Msg: Cardinal; WParam: WParam; LParam: LParam):Longint;
procedure OwnerFormDesignerModified(AComponent: TComponent); procedure OwnerFormDesignerModified(AComponent: TComponent);
// Deprecated in version 2.3, 2023-06. // Deprecated in version 2.3, 2023-06.
procedure FreeThenNil(var obj); deprecated 'Use LazUtilities.FreeThenNil instead'; procedure FreeThenNil(var obj); deprecated 'Use LazUtilities.FreeThenNil instead';
procedure MoveRect(var ARect: TRect; x, y: Integer); deprecated 'Use GraphMath.MoveRect instead';
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect); deprecated 'Use GraphMath.MoveRectToFit instead';
procedure MakeMinMax(var i1, i2: integer); deprecated 'Use GraphMath.MakeMinMax instead';
procedure CalculateLeftTopWidthHeight(X1,Y1,X2,Y2: integer;
out Left,Top,Width,Height: integer); deprecated 'Use GraphMath.CalculateLeftTopWidthHeight instead';
{ the LCL interfaces finalization sections are called before the finalization { the LCL interfaces finalization sections are called before the finalization
sections of the LCL. Those parts, that should be finalized after the LCL, can sections of the LCL. Those parts, that should be finalized after the LCL, can
@ -835,6 +842,27 @@ begin
LazUtilities.FreeThenNil(obj); LazUtilities.FreeThenNil(obj);
end; end;
procedure MoveRect(var ARect: TRect; x, y: Integer);
begin
GraphMath.MoveRect(ARect, x, y);
end;
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
begin
GraphMath.MoveRectToFit(ARect, MaxRect);
end;
procedure MakeMinMax(var i1, i2: integer);
begin
GraphMath.MakeMinMax(i1, i2);
end;
procedure CalculateLeftTopWidthHeight(X1, Y1, X2, Y2: integer;
out Left, Top, Width, Height: integer);
begin
GraphMath.CalculateLeftTopWidthHeight(X1, Y1, X2, Y2, Left, Top, Width, Height);
end;
procedure RegisterInterfaceInitializationHandler(p: TProcedure); procedure RegisterInterfaceInitializationHandler(p: TProcedure);
begin begin
InterfaceInitializationHandlers.Add(p); InterfaceInitializationHandlers.Add(p);