mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 07:46:03 +02:00
Remove LCLProc.OffsetRect(). Move some functions from LCLProc to GraphMath (LazUtils).
This commit is contained in:
parent
ccef4f2a79
commit
1475336c8c
@ -106,10 +106,13 @@ unit AnchorDocking;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, Classes, SysUtils, types, fgl,
|
Types, Classes, SysUtils, Math, fgl,
|
||||||
LCLType, LCLIntf, LCLProc,
|
// LCL
|
||||||
|
LCLType, LCLIntf,
|
||||||
Controls, Forms, ExtCtrls, ComCtrls, Graphics, Themes, Menus, Buttons,
|
Controls, Forms, ExtCtrls, ComCtrls, Graphics, Themes, Menus, Buttons,
|
||||||
LazConfigStorage, Laz2_XMLCfg, LazFileCache, LazUTF8,
|
// LazUtils
|
||||||
|
LazLoggerBase, LazTracer, LazConfigStorage, Laz2_XMLCfg, LazFileCache, LazUTF8,
|
||||||
|
// AnchorDocking
|
||||||
AnchorDockStr, AnchorDockStorage, AnchorDockPanel;
|
AnchorDockStr, AnchorDockStorage, AnchorDockPanel;
|
||||||
|
|
||||||
{$IFDEF DebugDisableAutoSizing}
|
{$IFDEF DebugDisableAutoSizing}
|
||||||
|
@ -7,7 +7,7 @@ Unit AnchorDockStorage;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math,
|
Types, Classes, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, ExtCtrls, ComCtrls, Forms, Controls,
|
LCLProc, ExtCtrls, ComCtrls, Forms, Controls,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
|
@ -5,8 +5,13 @@ unit ADLayoutViewer;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, types, math, Controls, Graphics, ComCtrls, LCLType,
|
Types, Classes, SysUtils, Math,
|
||||||
LMessages, LCLIntf, AnchorDockStorage, LazLoggerBase;
|
// LCL
|
||||||
|
Controls, Graphics, ComCtrls, LCLType, LMessages, LCLIntf,
|
||||||
|
// LazUtils
|
||||||
|
LazLoggerBase,
|
||||||
|
// AnchorDocking
|
||||||
|
AnchorDockStorage;
|
||||||
|
|
||||||
type
|
type
|
||||||
TADLTVMonitor = class
|
TADLTVMonitor = class
|
||||||
|
@ -5,8 +5,12 @@ unit Unit1;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, PrintersDlgs, Forms, Controls, Graphics, Dialogs,
|
Types, Classes, SysUtils,
|
||||||
StdCtrls, ExtCtrls, CairoPrinter;
|
// LCL
|
||||||
|
Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
|
||||||
|
// LazUtils
|
||||||
|
FileUtil,
|
||||||
|
PrintersDlgs, CairoPrinter;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -20,8 +20,11 @@ unit fpreportdesignctrl;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, controls, fpreport, graphics, lmessages, fpreportlclexport, lcltype, menus,
|
Types, Classes, SysUtils,
|
||||||
fpreportdesignobjectlist, fpreportdrawruler, graphutil, ClipBrd, types;
|
// LCL
|
||||||
|
Controls, Graphics, LMessages, LCLType, Menus, GraphUtil, ClipBrd,
|
||||||
|
// fcl-report
|
||||||
|
fpreport, fpreportdesignobjectlist, fpreportdrawruler, fpreportlclexport;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
clGrid = TColor($E0E0E0); // Default color for guide grid
|
clGrid = TColor($E0E0E0); // Default color for guide grid
|
||||||
|
@ -21,7 +21,11 @@ unit fpreportdesignobjectlist;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, graphics, lclintf, fpreportlclexport, fpreport, controls;
|
Types, Classes, SysUtils,
|
||||||
|
// LCL
|
||||||
|
Graphics, Controls,
|
||||||
|
// fcl-report
|
||||||
|
fpreport, fpreportlclexport;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
clResizeHandleSingle = clBlack; // Pen color to draw selection resize handle
|
clResizeHandleSingle = clBlack; // Pen color to draw selection resize handle
|
||||||
|
@ -16,11 +16,11 @@ unit GraphPropEdits;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, TypInfo, SysUtils, Math,
|
Types, Classes, TypInfo, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLIntf, LCLType, Forms, Graphics, Buttons, Menus, Dialogs, Grids, ImgList, EditBtn,
|
LCLType, Forms, Graphics, Buttons, Menus, Dialogs, Grids, ImgList, EditBtn,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType, UITypes, LazFileUtils,
|
GraphType, LazFileUtils, UITypes,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
PropEdits, GraphicPropEdit; // defines TGraphicPropertyEditorForm
|
PropEdits, GraphicPropEdit; // defines TGraphicPropertyEditorForm
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ unit IDEImagesIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math,
|
Types, Classes, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLType, LResources, ImgList, Controls, Graphics, Buttons;
|
LCLType, LResources, ImgList, Controls, Graphics, Buttons;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ unit IDEWindowIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, Classes, SysUtils,
|
Types, Classes, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLIntf, LCLType, Forms, Controls,
|
LCLIntf, LCLType, Forms, Controls,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
|
@ -18,7 +18,7 @@ uses
|
|||||||
{$if defined(UNIX) and not defined(OPENBSD)}
|
{$if defined(UNIX) and not defined(OPENBSD)}
|
||||||
CLocale,
|
CLocale,
|
||||||
{$endif}
|
{$endif}
|
||||||
Classes, TypInfo, SysUtils, Math, StrUtils, DateUtils,
|
Types, Classes, TypInfo, SysUtils, Math, StrUtils, DateUtils,
|
||||||
MaskUtils, Variants, DB, DOM, XMLWrite, XMLRead, XMLConf,
|
MaskUtils, Variants, DB, DOM, XMLWrite, XMLRead, XMLConf,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, LCLIntf, Controls, Forms, Dialogs, Menus, Graphics, Printers,
|
LCLType, LCLIntf, Controls, Forms, Dialogs, Menus, Graphics, Printers,
|
||||||
|
@ -15,13 +15,14 @@ interface
|
|||||||
{$I LR_Vers.inc}
|
{$I LR_Vers.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources,LMessages,Messages,
|
Types, Classes, SysUtils,
|
||||||
Forms, Controls, Graphics, Dialogs,
|
// LCL
|
||||||
ExtCtrls, Buttons, StdCtrls,Menus,comctrls,
|
LCLType, LCLIntf, LResources, LMessages, Messages, Forms, Controls, Graphics,
|
||||||
|
Dialogs, ExtCtrls, Buttons, StdCtrls, Menus, ComCtrls,
|
||||||
LR_Fpc,
|
// LazUtils
|
||||||
|
GraphType,
|
||||||
GraphType,LCLType,LCLIntf;
|
// LazReport
|
||||||
|
LR_Fpc;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrButtonState = (fbsUp, fbsDisabled, fbsDown, fbsExclusive, fbsInactive);
|
TfrButtonState = (fbsUp, fbsDisabled, fbsDown, fbsExclusive, fbsInactive);
|
||||||
|
@ -18,14 +18,16 @@ interface
|
|||||||
{$define sbod} // status bar owner draw
|
{$define sbod} // status bar owner draw
|
||||||
{$define ppaint}
|
{$define ppaint}
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Types, LazFileUtils, LazUTF8, LMessages,
|
Classes, SysUtils, Types,
|
||||||
Forms, Controls, Graphics, Dialogs, ComCtrls,
|
// LCL
|
||||||
|
LMessages, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||||
ExtCtrls, Buttons, StdCtrls, Menus,
|
ExtCtrls, Buttons, StdCtrls, Menus,
|
||||||
|
LCLType, LCLIntf, LCLProc, Printers, ActnList,
|
||||||
LCLType,LCLIntf,LCLProc,GraphType,Printers, ActnList,
|
// LazUtils
|
||||||
|
LazUtilities, LazFileUtils, LazUTF8, GraphType,
|
||||||
|
// IdeIntf
|
||||||
ObjectInspector, PropEdits, GraphPropEdits,
|
ObjectInspector, PropEdits, GraphPropEdits,
|
||||||
|
// LazReport
|
||||||
LR_Class, LR_Color,LR_Edit;
|
LR_Class, LR_Color,LR_Edit;
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,9 +15,11 @@ interface
|
|||||||
{$I LR_Vers.inc}
|
{$I LR_Vers.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources,
|
Types, Classes, SysUtils,
|
||||||
Forms, Controls, Graphics, Dialogs,
|
// LCL
|
||||||
Buttons, StdCtrls,LCLIntf,ExtCtrls, Spin,
|
LCLIntf, LResources,
|
||||||
|
Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls, ExtCtrls, Spin,
|
||||||
|
// Printers
|
||||||
PrintersDlgs;
|
PrintersDlgs;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -15,9 +15,16 @@ interface
|
|||||||
{$I LR_Vers.inc}
|
{$I LR_Vers.inc}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, LMessages, Forms, Controls, Graphics, Dialogs,
|
Types, Classes, SysUtils,
|
||||||
ExtCtrls, Buttons, StdCtrls, Menus, GraphType, LCLType, LCLProc, LCLIntf, LazUTF8,
|
// LCL
|
||||||
LR_Const, PrintersDlgs;
|
LCLType, LCLIntf, LResources, LMessages, Forms, Controls, Graphics, Dialogs,
|
||||||
|
ExtCtrls, Buttons, StdCtrls, Menus,
|
||||||
|
// LazUtils
|
||||||
|
LazUTF8,
|
||||||
|
// LazReport
|
||||||
|
LR_Const,
|
||||||
|
// Printers
|
||||||
|
PrintersDlgs;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrPreviewForm = class;
|
TfrPreviewForm = class;
|
||||||
|
@ -60,6 +60,9 @@ procedure BezierArcPoints(X, Y, Width, Height : Longint; Angle1, Angle2,
|
|||||||
|
|
||||||
function BezierMidPoint(const Bezier : TBezier) : TFloatPoint; inline;
|
function BezierMidPoint(const Bezier : TBezier) : TFloatPoint; inline;
|
||||||
|
|
||||||
|
procedure CalculateLeftTopWidthHeight(X1,Y1,X2,Y2: integer;
|
||||||
|
out Left,Top,Width,Height: integer);
|
||||||
|
|
||||||
procedure Coords2Angles(X, Y, Width, Height : Integer; SX, SY,
|
procedure Coords2Angles(X, Y, Width, Height : Integer; SX, SY,
|
||||||
EX, EY : Integer; var Angle1, Angle2 : Extended);
|
EX, EY : Integer; var Angle1, Angle2 : Extended);
|
||||||
|
|
||||||
@ -74,6 +77,11 @@ function FloatPoint(AX,AY : Extended): TFloatPoint; inline;
|
|||||||
|
|
||||||
function LineEndPoint(const StartPoint : TPoint; Angle, Length : Extended) : TPoint;
|
function LineEndPoint(const StartPoint : TPoint; Angle, Length : Extended) : TPoint;
|
||||||
|
|
||||||
|
procedure MakeMinMax(var i1, i2: integer);
|
||||||
|
|
||||||
|
procedure MoveRect(var ARect: TRect; x, y: Integer);
|
||||||
|
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
|
||||||
|
|
||||||
procedure PolyBezier2Polyline(Beziers: Array of TBezier;
|
procedure PolyBezier2Polyline(Beziers: Array of TBezier;
|
||||||
var Points : PPoint; var Count : Longint); Overload;
|
var Points : PPoint; var Count : Longint); Overload;
|
||||||
procedure PolyBezier2Polyline(Beziers : Array of TPoint;
|
procedure PolyBezier2Polyline(Beziers : Array of TPoint;
|
||||||
@ -592,6 +600,31 @@ begin
|
|||||||
Result := (Bezier[0] + 3*Bezier[1] + 3*Bezier[2] + Bezier[3]) / 8;
|
Result := (Bezier[0] + 3*Bezier[1] + 3*Bezier[2] + Bezier[3]) / 8;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure CalculateLeftTopWidthHeight(X1, Y1, X2, Y2: integer;
|
||||||
|
out Left, Top, Width, Height: integer);
|
||||||
|
begin
|
||||||
|
if X1 <= X2 then
|
||||||
|
begin
|
||||||
|
Left := X1;
|
||||||
|
Width := X2 - X1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Left := X2;
|
||||||
|
Width := X1 - X2;
|
||||||
|
end;
|
||||||
|
if Y1 <= Y2 then
|
||||||
|
begin
|
||||||
|
Top := Y1;
|
||||||
|
Height := Y2 - Y1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Top := Y2;
|
||||||
|
Height := Y1 - Y2;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: Coords2Angles
|
Method: Coords2Angles
|
||||||
Params: x,y,width,height,sx,sy,ex,ey, angle1,angle2
|
Params: x,y,width,height,sx,sy,ex,ey, angle1,angle2
|
||||||
@ -794,6 +827,50 @@ begin
|
|||||||
Result.X := StartPoint.X + Round(Length*cosAngle);
|
Result.X := StartPoint.X + Round(Length*cosAngle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure MakeMinMax(var i1, i2: integer);
|
||||||
|
var
|
||||||
|
h: Integer;
|
||||||
|
begin
|
||||||
|
if i1>i2 then begin
|
||||||
|
h:=i1;
|
||||||
|
i1:=i2;
|
||||||
|
i2:=h;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure MoveRect(var ARect: TRect; x, y: Integer);
|
||||||
|
begin
|
||||||
|
inc(ARect.Right,x-ARect.Left);
|
||||||
|
inc(ARect.Bottom,y-ARect.Top);
|
||||||
|
ARect.Left:=x;
|
||||||
|
ARect.Top:=y;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
|
||||||
|
// move ARect, so it fits into MaxRect
|
||||||
|
// if MaxRect is too small, ARect is resized.
|
||||||
|
begin
|
||||||
|
if ARect.Left<MaxRect.Left then begin
|
||||||
|
// move rectangle right
|
||||||
|
ARect.Right:=Min(ARect.Right+MaxRect.Left-ARect.Left,MaxRect.Right);
|
||||||
|
ARect.Left:=MaxRect.Left;
|
||||||
|
end;
|
||||||
|
if ARect.Top<MaxRect.Top then begin
|
||||||
|
// move rectangle down
|
||||||
|
ARect.Bottom:=Min(ARect.Bottom+MaxRect.Top-ARect.Top,MaxRect.Bottom);
|
||||||
|
ARect.Top:=MaxRect.Top;
|
||||||
|
end;
|
||||||
|
if ARect.Right>MaxRect.Right then begin
|
||||||
|
// move rectangle left
|
||||||
|
ARect.Left:=Max(ARect.Left-ARect.Right+MaxRect.Right,MaxRect.Left);
|
||||||
|
ARect.Right:=MaxRect.Right;
|
||||||
|
end;
|
||||||
|
if ARect.Bottom>MaxRect.Bottom then begin
|
||||||
|
// move rectangle left
|
||||||
|
ARect.Top:=Max(ARect.Top-ARect.Bottom+MaxRect.Bottom,MaxRect.Top);
|
||||||
|
ARect.Bottom:=MaxRect.Bottom;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: PolyBezier2Polyline
|
Method: PolyBezier2Polyline
|
||||||
|
@ -5,8 +5,10 @@ unit HeapTrcView;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, XMLConf, DOM, contnrs, Clipbrd, LCLProc, LCLType,
|
Types, Classes, SysUtils, XMLConf, DOM, contnrs,
|
||||||
LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, ExtCtrls,
|
// LCL
|
||||||
|
LCLType, Clipbrd, LResources,
|
||||||
|
Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, ExtCtrls,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FileUtil, LazFileUtils,
|
FileUtil, LazFileUtils,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
|
@ -24,9 +24,15 @@ unit RTTICtrls;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, TypInfo, LResources, LCLProc, LCLType, LCLIntf, Forms,
|
Classes, SysUtils, TypInfo,
|
||||||
|
// LCL
|
||||||
|
LResources, LCLType, LCLIntf, Forms,
|
||||||
Controls, Graphics, MaskEdit, Calendar, Spin, Dialogs, CheckLst, ComCtrls,
|
Controls, Graphics, MaskEdit, Calendar, Spin, Dialogs, CheckLst, ComCtrls,
|
||||||
StdCtrls, Buttons, ExtCtrls, GraphPropEdits, PropEdits;
|
StdCtrls, Buttons, ExtCtrls,
|
||||||
|
// LazUtils
|
||||||
|
LazUtilities,
|
||||||
|
// IdeIntf
|
||||||
|
GraphPropEdits, PropEdits;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TAliasStrings }
|
{ TAliasStrings }
|
||||||
|
@ -27,9 +27,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, TypInfo,
|
Classes, SysUtils, TypInfo,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLType, Controls, Grids,
|
LCLType, Controls, Grids,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazLoggerBase, LazUTF8,
|
LazUtilities, LazLoggerBase, LazUTF8,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
ObjectInspector, PropEdits,
|
ObjectInspector, PropEdits,
|
||||||
RTTICtrls;
|
RTTICtrls;
|
||||||
|
@ -27,7 +27,7 @@ uses
|
|||||||
// LCL
|
// LCL
|
||||||
Graphics, LCLProc,
|
Graphics, LCLProc,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazClasses, LazLoggerBase, LazMethodList,
|
LazUtilities, LazClasses, LazLoggerBase, LazMethodList,
|
||||||
// SynEdit
|
// SynEdit
|
||||||
SynEditMiscClasses, SynHighlighterPas, SynEditMarkupHighAll,
|
SynEditMiscClasses, SynHighlighterPas, SynEditMarkupHighAll,
|
||||||
SynEditHighlighterFoldBase, SynEditFoldedView, LazSynEditText, SynEditMiscProcs,
|
SynEditHighlighterFoldBase, SynEditFoldedView, LazSynEditText, SynEditMiscProcs,
|
||||||
|
@ -524,7 +524,8 @@ implementation
|
|||||||
{$R tagraph.res}
|
{$R tagraph.res}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Clipbrd, Dialogs, {GraphMath,} LCLProc, LResources, Math, Types,
|
Math, Types,
|
||||||
|
Clipbrd, Dialogs, LResources,
|
||||||
TADrawerCanvas, TAGeometry, TAMath, TAStyles;
|
TADrawerCanvas, TAGeometry, TAMath, TAStyles;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -51,10 +51,10 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
//MemCheck,
|
//MemCheck,
|
||||||
Types, contnrs,
|
Types, contnrs, SysUtils, Classes, TypInfo,
|
||||||
LCLType, LCLProc, LCLIntf, LResources, LMessages, LCLMemManager,
|
// LCL
|
||||||
LazStringUtils, LConvEncoding, LazUTF8, AvgLvlTree,
|
LCLType, LCLIntf, LResources, LMessages, Messages, LCLMemManager,
|
||||||
Messages, SysUtils, Classes, Graphics, TypInfo,
|
Graphics, Controls, StdCtrls, ExtCtrls, Buttons, Forms, ClipBrd, Dialogs,
|
||||||
{$IFDEF UseGifImageUnit} //TODO all of this units not exists
|
{$IFDEF UseGifImageUnit} //TODO all of this units not exists
|
||||||
GifImage,
|
GifImage,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -69,8 +69,10 @@ uses
|
|||||||
{$IFDEF UsePNGGraphic}
|
{$IFDEF UsePNGGraphic}
|
||||||
IpPNGImg,
|
IpPNGImg,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Controls, StdCtrls, ExtCtrls, Buttons, Forms, ClipBrd, Dialogs,
|
// LazUtils
|
||||||
IpConst, IpUtils, IpHtmlTypes, IpHtmlClasses, IpHtmlProp, IpMsg,
|
LazStringUtils, LConvEncoding, LazUTF8, LazLoggerBase, AvgLvlTree,
|
||||||
|
// TurboPower_ipro
|
||||||
|
IpConst, IpUtils, IpHtmlTypes, IpHtmlClasses, IpHtmlProp, IpMsg,
|
||||||
IpCSS, IpHtmlUtils, IpHtmlTabList;
|
IpCSS, IpHtmlUtils, IpHtmlTabList;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -1408,7 +1410,7 @@ uses
|
|||||||
{$IFDEF Html_Print}
|
{$IFDEF Html_Print}
|
||||||
Printers, PrintersDlgs, IpHtmlPv,
|
Printers, PrintersDlgs, IpHtmlPv,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
ipHtmlNodes, ipHtmlParser, ipHtmlBlockLayout, ipHtmlTableLayout;
|
ipHtmlNodes, ipHtmlParser;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
@ -6,7 +6,10 @@ unit ipHtmlBlockLayout;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
types, Classes, SysUtils, LCLPRoc, LCLIntf, Graphics,
|
Types, Classes, SysUtils,
|
||||||
|
// LCL
|
||||||
|
LCLIntf, Graphics,
|
||||||
|
// TurboPower_ipro
|
||||||
IpUtils, IpHtmlTypes, IpHtmlProp, IpHtmlUtils, IpHtml, IpHtmlNodes;
|
IpUtils, IpHtmlTypes, IpHtmlProp, IpHtmlUtils, IpHtml, IpHtmlNodes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -6,9 +6,12 @@ unit IpHtmlNodes;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Graphics, GraphUtil, LCLIntf, LCLType, Types,
|
Types, Classes, SysUtils,
|
||||||
|
// LCL
|
||||||
|
Graphics, GraphUtil, LCLIntf, LCLType,
|
||||||
Controls, StdCtrls, ExtCtrls, Buttons, Dialogs,
|
Controls, StdCtrls, ExtCtrls, Buttons, Dialogs,
|
||||||
IpConst, IpCSS, IpHtmlTypes, IpHtmlClasses, IpHtmlProp,
|
// TurboPower_ipro
|
||||||
|
IpConst, IpCSS, IpHtmlTypes, IpHtmlClasses, IpHtmlProp,
|
||||||
IpHtmlUtils, IpMsg, IpHtml;
|
IpHtmlUtils, IpMsg, IpHtml;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -39,12 +39,12 @@ unit IpHtmlPv;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLType,
|
Types, Classes, SysUtils,
|
||||||
GraphType,
|
// LCL
|
||||||
LCLIntf,
|
LCLType, LCLIntf, GraphType, Buttons, Messages, Graphics, Controls, Forms,
|
||||||
Buttons,
|
Dialogs, StdCtrls, ExtCtrls, Spin,
|
||||||
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
// TurboPower_ipro
|
||||||
StdCtrls, ExtCtrls, Spin, IpHtml, IpConst, IpHtmlTypes;
|
IpHtml, IpConst, IpHtmlTypes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ unit MenuTemplates;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, types, fgl,
|
Classes, SysUtils, Types, fgl,
|
||||||
// LCL
|
// LCL
|
||||||
Buttons, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
Buttons, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
||||||
ComCtrls, Forms, Graphics, Themes, LCLType, LCLIntf, LCLProc,
|
ComCtrls, Forms, Graphics, Themes, LCLType, LCLProc,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils, Laz2_XMLCfg,
|
LazFileUtils, Laz2_XMLCfg,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
|
@ -5,8 +5,10 @@ unit imgMain;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Grids,
|
Types, Classes, SysUtils,
|
||||||
ExtCtrls, StdCtrls, LMessages, Spin, ComCtrls;
|
LCLIntf, LMessages, Forms, Controls, Graphics, Dialogs, Grids, ExtCtrls,
|
||||||
|
StdCtrls, Spin, ComCtrls,
|
||||||
|
FileUtil;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TImageData is stored in the list FImageList of the modified string grid and
|
{ TImageData is stored in the list FImageList of the modified string grid and
|
||||||
@ -94,9 +96,6 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
|
||||||
Types, LCLIntf;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
//JPEG_FILE = '../../../images/splash_source/cheetah.jpg';
|
//JPEG_FILE = '../../../images/splash_source/cheetah.jpg';
|
||||||
//PNG_FILE1 = '../../../images/codetoolsdefines/da_block.png';
|
//PNG_FILE1 = '../../../images/codetoolsdefines/da_block.png';
|
||||||
|
@ -20,8 +20,10 @@ uses
|
|||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
Windows,
|
Windows,
|
||||||
{$endif}
|
{$endif}
|
||||||
LCLIntf, delphicompat, LCLType, SysUtils, Classes, ComCtrls, Graphics, Controls, Forms, Dialogs,
|
Types, SysUtils, Classes,
|
||||||
Laz.VirtualTrees, StdCtrls, shlobjext, LResources;
|
LCLIntf, LCLType, LResources, ComCtrls, Graphics, Controls, Forms, Dialogs, StdCtrls,
|
||||||
|
Laz.VirtualTrees, shlobjext, delphicompat,
|
||||||
|
LazFileUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
TDrawTreeForm = class(TForm)
|
TDrawTreeForm = class(TForm)
|
||||||
@ -70,7 +72,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LazFileUtils, States;
|
States;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -42,14 +42,14 @@ uses
|
|||||||
// RTL + FCL
|
// RTL + FCL
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, Forms, Controls, Dialogs,
|
Forms, Controls, Dialogs,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
CodeAtom, CodeTree, CodeToolManager, FindDeclarationTool, BasicCodeTools,
|
CodeAtom, CodeTree, CodeToolManager, FindDeclarationTool, BasicCodeTools,
|
||||||
KeywordFuncLists, PascalParserTool, CodeCache, CacheCodeTools, CustomCodeTool,
|
KeywordFuncLists, PascalParserTool, CodeCache, CacheCodeTools, CustomCodeTool,
|
||||||
FileProcs, DefineTemplates,
|
FileProcs, DefineTemplates,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
AvgLvlTree, FileUtil, LazFileUtils, LazUTF8, LazFileCache, LazMethodList,
|
AvgLvlTree, FileUtil, LazFileUtils, LazUTF8, LazFileCache, LazMethodList,
|
||||||
LazLoggerBase, Laz2_DOM, Laz2_XMLRead, Laz2_XMLWrite,
|
LazUtilities, LazLoggerBase, LazTracer, Laz2_DOM, Laz2_XMLRead, Laz2_XMLWrite,
|
||||||
// SynEdit
|
// SynEdit
|
||||||
SynHighlighterPas,
|
SynHighlighterPas,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
|
@ -35,10 +35,10 @@ uses
|
|||||||
// RTL + FCL
|
// RTL + FCL
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLIntf, LCLType, FileProcs, Forms, Controls, ComCtrls, StdCtrls,
|
LCLIntf, LCLType, FileProcs, Forms, Controls, ComCtrls, StdCtrls,
|
||||||
Dialogs, Graphics, Buttons, ButtonPanel, LazHelpHTML, HelpIntfs,
|
Dialogs, Graphics, Buttons, ButtonPanel, LazHelpHTML, HelpIntfs,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LConvEncoding, LazFileUtils, HTML2TextRender,
|
LConvEncoding, LazUtilities, LazFileUtils, HTML2TextRender,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
BasicCodeTools, CodeToolManager, CodeCache, CustomCodeTool, CodeTree,
|
BasicCodeTools, CodeToolManager, CodeCache, CustomCodeTool, CodeTree,
|
||||||
PascalParserTool, FindDeclarationTool,
|
PascalParserTool, FindDeclarationTool,
|
||||||
|
@ -369,6 +369,7 @@
|
|||||||
<ComponentName Value="HelpSelectorDialog"/>
|
<ComponentName Value="HelpSelectorDialog"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="IDEHelpManager"/>
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit>
|
<Unit>
|
||||||
<Filename Value="../designer/askcompnamedlg.pas"/>
|
<Filename Value="../designer/askcompnamedlg.pas"/>
|
||||||
@ -760,7 +761,9 @@
|
|||||||
<Unit>
|
<Unit>
|
||||||
<Filename Value="unitdependencies.pas"/>
|
<Filename Value="unitdependencies.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="UnitDependenciesWindow"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="UnitDependencies"/>
|
<UnitName Value="UnitDependencies"/>
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit>
|
<Unit>
|
||||||
|
@ -56,7 +56,7 @@ uses
|
|||||||
SysUtils,
|
SysUtils,
|
||||||
Interfaces,
|
Interfaces,
|
||||||
IDEInstances,//keep IDEInstances up so that it will be initialized soon
|
IDEInstances,//keep IDEInstances up so that it will be initialized soon
|
||||||
Forms, LCLProc,
|
Forms, LazUtilities, LazLoggerBase,
|
||||||
IDEOptionsIntf,
|
IDEOptionsIntf,
|
||||||
LazConf, IDEGuiCmdLine,
|
LazConf, IDEGuiCmdLine,
|
||||||
Splash,
|
Splash,
|
||||||
|
@ -58,9 +58,9 @@ uses
|
|||||||
// RTL + FCL
|
// RTL + FCL
|
||||||
Classes, SysUtils, Types, Math,
|
Classes, SysUtils, Types, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, Buttons, Menus, ComCtrls, Controls, Graphics, Dialogs, Forms, ImgList,
|
Buttons, Menus, ComCtrls, Controls, Graphics, Dialogs, Forms, ImgList,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils, LazUTF8,
|
LazUtilities, LazFileUtils, LazLoggerBase, LazTracer, LazUTF8,
|
||||||
// Codetools
|
// Codetools
|
||||||
CodeToolManager,
|
CodeToolManager,
|
||||||
// SynEdit
|
// SynEdit
|
||||||
|
@ -39,12 +39,12 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math, StrUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Math, StrUtils, Laz_AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLType, LCLIntf, Forms, Controls, Graphics, ComCtrls, Menus, Clipbrd,
|
LCLProc, LCLType, Forms, Controls, Graphics, ComCtrls, Menus, Clipbrd,
|
||||||
ActnList, ExtCtrls, StdCtrls, Dialogs,
|
ActnList, ExtCtrls, StdCtrls, Dialogs,
|
||||||
// LazControls
|
// LazControls
|
||||||
TreeFilterEdit, ExtendedNotebook,
|
TreeFilterEdit, ExtendedNotebook,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8, LazFileUtils, LazLoggerBase, LazStringUtils,
|
LazUTF8, LazUtilities, LazFileUtils, LazLoggerBase, LazStringUtils,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
IDEImagesIntf, IDECommands,
|
IDEImagesIntf, IDECommands,
|
||||||
// IDE
|
// IDE
|
||||||
|
@ -32,11 +32,11 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, LCLProc, Forms, Controls, StdCtrls, ExtCtrls, ButtonPanel, Dialogs, Graphics,
|
LCLType, Forms, Controls, StdCtrls, ExtCtrls, ButtonPanel, Dialogs, Graphics,
|
||||||
// LazControls
|
// LazControls
|
||||||
ListFilterEdit,
|
ListFilterEdit,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8, LazFileUtils,
|
LazUTF8, LazFileUtils, LazUtilities,
|
||||||
// Codetools
|
// Codetools
|
||||||
FileProcs, LinkScanner, CodeCache, CodeTree, CodeToolManager, IdentCompletionTool,
|
FileProcs, LinkScanner, CodeCache, CodeTree, CodeToolManager, IdentCompletionTool,
|
||||||
// BuildIntf
|
// BuildIntf
|
||||||
|
@ -50,7 +50,7 @@ uses
|
|||||||
LCLStrConsts, LCLType, LCLProc, Graphics, LMessages, LCLIntf, InterfaceBase,
|
LCLStrConsts, LCLType, LCLProc, Graphics, LMessages, LCLIntf, InterfaceBase,
|
||||||
ImgList, PropertyStorage, Menus, ActnList, LCLClasses, LResources, LCLPlatformDef,
|
ImgList, PropertyStorage, Menus, ActnList, LCLClasses, LResources, LCLPlatformDef,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType, LazMethodList, LazLoggerBase, LazTracer, LazUtilities;
|
GraphType, GraphMath, LazMethodList, LazLoggerBase, LazTracer, LazUtilities;
|
||||||
|
|
||||||
{$I controlconsts.inc}
|
{$I controlconsts.inc}
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ begin
|
|||||||
ARect:=Rect(0,0,Width,Height);
|
ARect:=Rect(0,0,Width,Height);
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
LCLProc.MoveRectToFit(ARect, NewDockSite.GetLogicalClientRect);
|
MoveRectToFit(ARect, NewDockSite.GetLogicalClientRect);
|
||||||
// consider Align to increase chance the width/height is kept
|
// consider Align to increase chance the width/height is kept
|
||||||
case Align of
|
case Align of
|
||||||
alLeft: OffsetRect(ARect,-ARect.Left,0);
|
alLeft: OffsetRect(ARect,-ARect.Left,0);
|
||||||
|
@ -1516,20 +1516,6 @@ begin
|
|||||||
Result := MakeLong(l, h);
|
Result := MakeLong(l, h);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Function: OffSetRect
|
|
||||||
Params: Rect: points to structure that moves.
|
|
||||||
dx : amount to move the rect to left or right. Must be negative to move to left.
|
|
||||||
dy : amount to move the rect up or down. Mmust be negative to move up.
|
|
||||||
Returns: True if succesful
|
|
||||||
|
|
||||||
Moves the rectangle up or down, left or right.
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
function OffSetRect(var Rect: TRect; dx,dy: Integer): Boolean; inline;
|
|
||||||
begin
|
|
||||||
Result:=LCLProc.OffsetRect(Rect,dx,dy);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: PointtoSmallPoint
|
Function: PointtoSmallPoint
|
||||||
Params:
|
Params:
|
||||||
|
@ -336,8 +336,6 @@ function MakeWParam(l, h: Word): WPARAM; inline;
|
|||||||
function MakeLParam(l, h: Word): LPARAM; inline;
|
function MakeLParam(l, h: Word): LPARAM; inline;
|
||||||
function MakeLResult(l, h: Word): LRESULT; inline;
|
function MakeLResult(l, h: Word): LRESULT; inline;
|
||||||
|
|
||||||
function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; inline;
|
|
||||||
|
|
||||||
function PtInRect(const Rect : TRect; const Point : TPoint) : Boolean; inline;
|
function PtInRect(const Rect : TRect; const Point : TPoint) : Boolean; inline;
|
||||||
function PointToSmallPoint(const P : TPoint) : TSmallPoint; inline;
|
function PointToSmallPoint(const P : TPoint) : TSmallPoint; inline;
|
||||||
function PointToSmallPointNoChecks(const P : TPoint) : TSmallPoint; inline;
|
function PointToSmallPointNoChecks(const P : TPoint) : TSmallPoint; inline;
|
||||||
|
@ -24,7 +24,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
// libs
|
// libs
|
||||||
MacOSAll, Classes, SysUtils,
|
MacOSAll, Types, Classes, SysUtils,
|
||||||
// LCL
|
// LCL
|
||||||
Forms, Controls, Graphics, LCLType, LCLProc, LCLIntf,
|
Forms, Controls, Graphics, LCLType, LCLProc, LCLIntf,
|
||||||
// widgetset
|
// widgetset
|
||||||
|
@ -1507,7 +1507,7 @@ end;
|
|||||||
function LCLViewExtension.lclClientFrame: TRect;
|
function LCLViewExtension.lclClientFrame: TRect;
|
||||||
begin
|
begin
|
||||||
Result := lclFrame;
|
Result := lclFrame;
|
||||||
Types.OffsetRect(Result, -Result.Left, -Result.Top);
|
OffsetRect(Result, -Result.Left, -Result.Top);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function LCLViewExtension.lclContentView: NSView;
|
function LCLViewExtension.lclContentView: NSView;
|
||||||
|
@ -1696,7 +1696,7 @@ begin
|
|||||||
// (however, one should be careful and take layout offsets into account!)
|
// (however, one should be careful and take layout offsets into account!)
|
||||||
// on the other hand, "cells" themselves are being deprecated...
|
// on the other hand, "cells" themselves are being deprecated...
|
||||||
dr := lclFrame;
|
dr := lclFrame;
|
||||||
Types.OffsetRect(dr, -dr.Left, -dr.Top);
|
OffsetRect(dr, -dr.Left, -dr.Top);
|
||||||
SubLayoutFromFrame( lclGetFrameToLayoutDelta, dr);
|
SubLayoutFromFrame( lclGetFrameToLayoutDelta, dr);
|
||||||
|
|
||||||
// magic offsets are based on the macOS 10.13.6 visual style
|
// magic offsets are based on the macOS 10.13.6 visual style
|
||||||
|
@ -22,7 +22,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
// RTL, FCL, libs
|
// RTL, FCL, libs
|
||||||
Math, Sysutils, Classes, GLib2, Gtk2, Gdk2, Gdk2pixbuf,
|
Types, Classes, Sysutils, Math, GLib2, Gtk2, Gdk2, Gdk2pixbuf,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazTracer,
|
LazTracer,
|
||||||
// LCL
|
// LCL
|
||||||
|
@ -23,9 +23,13 @@ interface
|
|||||||
uses
|
uses
|
||||||
// libs
|
// libs
|
||||||
LazGtk3, LazGdk3, LazGlib2,
|
LazGtk3, LazGdk3, LazGlib2,
|
||||||
// RTL, FCL, LCL
|
// RTL, FCL
|
||||||
ComCtrls, Classes, LCLType, LMessages, Controls, Graphics, StdCtrls, Forms,
|
Types, Classes, Math, Sysutils, ctypes,
|
||||||
LCLProc, LCLIntf, ImgList, Math, Sysutils, ctypes, InterfaceBase,
|
// LCL
|
||||||
|
LCLType, LMessages, Controls, Graphics, StdCtrls, ComCtrls, Forms,
|
||||||
|
ImgList, InterfaceBase,
|
||||||
|
// LazUtils
|
||||||
|
LazLoggerBase,
|
||||||
// widgetset
|
// widgetset
|
||||||
WSComCtrls, WSLCLClasses, WSControls, WSProc,
|
WSComCtrls, WSLCLClasses, WSControls, WSProc,
|
||||||
Gtk3WSControls, Gtk3Int, gtk3widgets;
|
Gtk3WSControls, Gtk3Int, gtk3widgets;
|
||||||
|
@ -34,7 +34,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// Bindings - qt5 must come first to avoid type redefinition problems
|
// Bindings - qt5 must come first to avoid type redefinition problems
|
||||||
qt5,
|
qt5,
|
||||||
// FPC
|
// RTL
|
||||||
Classes, SysUtils, Math, Types,
|
Classes, SysUtils, Math, Types,
|
||||||
// LCL
|
// LCL
|
||||||
InterfaceBase, LCLPlatformDef, LCLProc, LCLType, LMessages,
|
InterfaceBase, LCLPlatformDef, LCLProc, LCLType, LMessages,
|
||||||
|
@ -25,8 +25,10 @@ uses
|
|||||||
// Bindings
|
// Bindings
|
||||||
qt5,
|
qt5,
|
||||||
qtwidgets, qtobjects, qtproc,
|
qtwidgets, qtobjects, qtproc,
|
||||||
|
// RTL
|
||||||
|
SysUtils, Classes, Types,
|
||||||
// LCL
|
// LCL
|
||||||
SysUtils, Classes, Types, ComCtrls, Controls, LCLType, Graphics, StdCtrls,
|
ComCtrls, Controls, LCLType, Graphics, StdCtrls,
|
||||||
LCLProc, LCLIntf, Forms, ImgList,
|
LCLProc, LCLIntf, Forms, ImgList,
|
||||||
// Widgetset
|
// Widgetset
|
||||||
WSProc, WSComCtrls, WSLCLClasses;
|
WSProc, WSComCtrls, WSLCLClasses;
|
||||||
|
@ -25,8 +25,10 @@ uses
|
|||||||
// Bindings
|
// Bindings
|
||||||
qt5,
|
qt5,
|
||||||
qtwidgets, qtobjects, qtproc, qtint,
|
qtwidgets, qtobjects, qtproc, qtint,
|
||||||
|
// RTL
|
||||||
|
SysUtils, Classes, Types,
|
||||||
// LCL
|
// LCL
|
||||||
SysUtils, Classes, Types, Controls, LCLType, LazUTF8, Forms, Graphics,
|
Controls, LCLType, LazUTF8, Forms, Graphics,
|
||||||
// Widgetset
|
// Widgetset
|
||||||
InterfaceBase, WSProc, WSControls, WSLCLClasses;
|
InterfaceBase, WSProc, WSControls, WSLCLClasses;
|
||||||
|
|
||||||
|
@ -25,8 +25,10 @@ uses
|
|||||||
// Bindings
|
// Bindings
|
||||||
qt5,
|
qt5,
|
||||||
qtobjects, qtwidgets, qtproc,
|
qtobjects, qtwidgets, qtproc,
|
||||||
|
// RTL
|
||||||
|
SysUtils, Classes, Types,
|
||||||
// LCL
|
// LCL
|
||||||
SysUtils, Classes, types, Controls, LCLType, Forms,
|
Controls, LCLType, Forms,
|
||||||
// Widgetset
|
// Widgetset
|
||||||
WSForms, WSProc, WSLCLClasses;
|
WSForms, WSProc, WSLCLClasses;
|
||||||
|
|
||||||
|
@ -52,9 +52,10 @@ uses
|
|||||||
{$IFDEF Darwin}MacOSAll, CocoaAll,{$ENDIF}
|
{$IFDEF Darwin}MacOSAll, CocoaAll,{$ENDIF}
|
||||||
Math, Classes, SysUtils, Types,
|
Math, Classes, SysUtils, Types,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, LCLProc, LMessages, LCLStrConsts, InterfaceBase,
|
LCLType, LMessages, LCLStrConsts, InterfaceBase,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType, FileUtil, LazFileUtils, UTF8Process, LazUTF8, LazSysUtils, Maps;
|
GraphType, GraphMath, FileUtil, LazFileUtils, UTF8Process, LazUTF8,
|
||||||
|
LazSysUtils, LazLoggerBase, Maps;
|
||||||
|
|
||||||
{$ifdef Trace}
|
{$ifdef Trace}
|
||||||
{$ASSERTIONS ON}
|
{$ASSERTIONS ON}
|
||||||
|
@ -109,7 +109,6 @@ 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);
|
||||||
procedure FreeThenNil(var obj); inline;
|
|
||||||
|
|
||||||
{ 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
|
||||||
@ -119,13 +118,6 @@ procedure CallInterfaceInitializationHandlers;
|
|||||||
procedure RegisterInterfaceFinalizationHandler(p: TProcedure);
|
procedure RegisterInterfaceFinalizationHandler(p: TProcedure);
|
||||||
procedure CallInterfaceFinalizationHandlers;
|
procedure CallInterfaceFinalizationHandlers;
|
||||||
|
|
||||||
function OffsetRect(var ARect: TRect; dx, dy: Integer): Boolean;
|
|
||||||
procedure MoveRect(var ARect: TRect; x, y: Integer);
|
|
||||||
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
|
|
||||||
procedure MakeMinMax(var i1, i2: integer);
|
|
||||||
procedure CalculateLeftTopWidthHeight(X1,Y1,X2,Y2: integer;
|
|
||||||
out Left,Top,Width,Height: integer);
|
|
||||||
|
|
||||||
// Ampersands
|
// Ampersands
|
||||||
function DeleteAmpersands(var Str : String) : Integer;
|
function DeleteAmpersands(var Str : String) : Integer;
|
||||||
function RemoveAmpersands(const ASource: String): String;
|
function RemoveAmpersands(const ASource: String): String;
|
||||||
@ -836,23 +828,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function OffSetRect(var ARect: TRect; dx,dy: Integer): Boolean;
|
|
||||||
Begin
|
|
||||||
with ARect do
|
|
||||||
begin
|
|
||||||
Left := Left + dx;
|
|
||||||
Right := Right + dx;
|
|
||||||
Top := Top + dy;
|
|
||||||
Bottom := Bottom + dy;
|
|
||||||
end;
|
|
||||||
Result := (ARect.Left >= 0) and (ARect.Top >= 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure FreeThenNil(var obj);
|
|
||||||
begin
|
|
||||||
LazUtilities.FreeThenNil(obj);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure RegisterInterfaceInitializationHandler(p: TProcedure);
|
procedure RegisterInterfaceInitializationHandler(p: TProcedure);
|
||||||
begin
|
begin
|
||||||
InterfaceInitializationHandlers.Add(p);
|
InterfaceInitializationHandlers.Add(p);
|
||||||
@ -879,76 +854,6 @@ begin
|
|||||||
TProcedure(InterfaceFinalizationHandlers[i])();
|
TProcedure(InterfaceFinalizationHandlers[i])();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure MoveRect(var ARect: TRect; x, y: Integer);
|
|
||||||
begin
|
|
||||||
inc(ARect.Right,x-ARect.Left);
|
|
||||||
inc(ARect.Bottom,y-ARect.Top);
|
|
||||||
ARect.Left:=x;
|
|
||||||
ARect.Top:=y;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
|
|
||||||
// move ARect, so it fits into MaxRect
|
|
||||||
// if MaxRect is too small, ARect is resized.
|
|
||||||
begin
|
|
||||||
if ARect.Left<MaxRect.Left then begin
|
|
||||||
// move rectangle right
|
|
||||||
ARect.Right:=Min(ARect.Right+MaxRect.Left-ARect.Left,MaxRect.Right);
|
|
||||||
ARect.Left:=MaxRect.Left;
|
|
||||||
end;
|
|
||||||
if ARect.Top<MaxRect.Top then begin
|
|
||||||
// move rectangle down
|
|
||||||
ARect.Bottom:=Min(ARect.Bottom+MaxRect.Top-ARect.Top,MaxRect.Bottom);
|
|
||||||
ARect.Top:=MaxRect.Top;
|
|
||||||
end;
|
|
||||||
if ARect.Right>MaxRect.Right then begin
|
|
||||||
// move rectangle left
|
|
||||||
ARect.Left:=Max(ARect.Left-ARect.Right+MaxRect.Right,MaxRect.Left);
|
|
||||||
ARect.Right:=MaxRect.Right;
|
|
||||||
end;
|
|
||||||
if ARect.Bottom>MaxRect.Bottom then begin
|
|
||||||
// move rectangle left
|
|
||||||
ARect.Top:=Max(ARect.Top-ARect.Bottom+MaxRect.Bottom,MaxRect.Top);
|
|
||||||
ARect.Bottom:=MaxRect.Bottom;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure MakeMinMax(var i1, i2: integer);
|
|
||||||
var
|
|
||||||
h: Integer;
|
|
||||||
begin
|
|
||||||
if i1>i2 then begin
|
|
||||||
h:=i1;
|
|
||||||
i1:=i2;
|
|
||||||
i2:=h;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure CalculateLeftTopWidthHeight(X1, Y1, X2, Y2: integer;
|
|
||||||
out Left, Top, Width, Height: integer);
|
|
||||||
begin
|
|
||||||
if X1 <= X2 then
|
|
||||||
begin
|
|
||||||
Left := X1;
|
|
||||||
Width := X2 - X1;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Left := X2;
|
|
||||||
Width := X1 - X2;
|
|
||||||
end;
|
|
||||||
if Y1 <= Y2 then
|
|
||||||
begin
|
|
||||||
Top := Y1;
|
|
||||||
Height := Y2 - Y1;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Top := Y2;
|
|
||||||
Height := Y1 - Y2;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function CompareHandles(h1, h2: THandle): integer;
|
function CompareHandles(h1, h2: THandle): integer;
|
||||||
begin
|
begin
|
||||||
if h1>h2 then
|
if h1>h2 then
|
||||||
|
@ -2909,24 +2909,24 @@ begin
|
|||||||
taRightJustify:
|
taRightJustify:
|
||||||
begin
|
begin
|
||||||
Offset := ARect.Right - fRect.Right;
|
Offset := ARect.Right - fRect.Right;
|
||||||
LCLIntf.OffsetRect(fRect, Offset, 0);
|
OffsetRect(fRect, Offset, 0);
|
||||||
end;
|
end;
|
||||||
taCenter:
|
taCenter:
|
||||||
begin
|
begin
|
||||||
Offset := (ARect.Right - fRect.Right) div 2;
|
Offset := (ARect.Right - fRect.Right) div 2;
|
||||||
LCLIntf.OffsetRect(fRect, offset, 0);
|
OffsetRect(fRect, offset, 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
case Style.Layout of
|
case Style.Layout of
|
||||||
tlCenter:
|
tlCenter:
|
||||||
begin
|
begin
|
||||||
Offset := ((ARect.Bottom - ARect.Top) - (fRect.Bottom - fRect.Top)) div 2;
|
Offset := ((ARect.Bottom - ARect.Top) - (fRect.Bottom - fRect.Top)) div 2;
|
||||||
LCLIntf.OffsetRect(fRect, 0, offset);
|
OffsetRect(fRect, 0, offset);
|
||||||
end;
|
end;
|
||||||
tlBottom:
|
tlBottom:
|
||||||
begin
|
begin
|
||||||
Offset := ARect.Bottom - fRect.Bottom;
|
Offset := ARect.Bottom - fRect.Bottom;
|
||||||
LCLIntf.OffsetRect(fRect, 0, offset);
|
OffsetRect(fRect, 0, offset);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -48,7 +48,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Types, Math,
|
Classes, SysUtils, Types, Math,
|
||||||
// LCL - Controls cannot be used here to prevent circular references
|
// LCL - Controls cannot be used here to prevent circular references
|
||||||
LCLProc, LCLType, Graphics, TmSchema,
|
LCLType, Graphics, TmSchema,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType;
|
GraphType;
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLType, Forms, Controls, Buttons, ExtDlgs, StdCtrls, ExtCtrls,
|
LCLType, Forms, Controls, Buttons, ExtDlgs, StdCtrls, ExtCtrls,
|
||||||
Dialogs, ComCtrls, ButtonPanel,
|
Dialogs, ComCtrls, ButtonPanel,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FileUtil, LazFileUtils, LazUTF8,
|
FileUtil, LazFileUtils, LazUtilities, LazUTF8,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
NewItemIntf, PackageIntf, FormEditingIntf, IDEWindowIntf, ComponentReg,
|
NewItemIntf, PackageIntf, FormEditingIntf, IDEWindowIntf, ComponentReg,
|
||||||
IDEDialogs,
|
IDEDialogs,
|
||||||
|
Loading…
Reference in New Issue
Block a user