Fix spelling from Childs to Children around Lazarus source. Patch from Mazen NEIFER

git-svn-id: trunk@30657 -
This commit is contained in:
juha 2011-05-10 09:13:38 +00:00
parent 8e156d3fca
commit fdc466d76d
23 changed files with 197 additions and 197 deletions

View File

@ -174,7 +174,7 @@ type
constructor Create;
destructor Destroy; override;
function GetComponents(RootComponent: TComponent; AddRoot: boolean = true): TFPList;
property Childs: TFPList read FChilds;
property Children: TFPList read FChilds;
property Root: TComponent read FRoot;
end;
@ -784,7 +784,7 @@ var
OldRoot: TComponent;
begin
//debugln(['TComponentChildCollector.AddChildComponent ',DbgSName(Child)]);
Childs.Add(Child);
Children.Add(Child);
OldRoot := Root;
try
if csInline in Child.ComponentState then
@ -809,12 +809,12 @@ end;
function TComponentChildCollector.GetComponents(RootComponent: TComponent;
AddRoot: boolean): TFPList;
begin
Childs.Clear;
Children.Clear;
if AddRoot then
Childs.Add(RootComponent);
Children.Add(RootComponent);
FRoot:=RootComponent;
TCTComponentAccess(RootComponent).GetChildren(@AddChildComponent,FRoot);
Result:=Childs;
Result:=Children;
end;
end.

View File

@ -140,7 +140,7 @@ type
property NextSibling: TEduOptionsNode read FNextSibling;
property PrevSibling: TEduOptionsNode read FPrevSibling;
property ChildCount: integer read GetChildCount;
property Childs[Index: integer]: TEduOptionsNode read GetChilds; default;
property Children[Index: integer]: TEduOptionsNode read GetChilds; default;
end;
{ TEduOptsRootNode }
@ -232,7 +232,7 @@ procedure TEduOptionsNode.Delete(Index: integer);
var
Child: TEduOptionsNode;
begin
Child:=Childs[Index];
Child:=Children[Index];
Remove(Index);
Child.Free;
end;
@ -241,7 +241,7 @@ procedure TEduOptionsNode.Remove(Index: integer);
var
Child: TEduOptionsNode;
begin
Child:=Childs[Index];
Child:=Children[Index];
fChilds.Delete(Index);
Child.FParent:=nil;
Child.Unbind;
@ -258,11 +258,11 @@ begin
FChilds.Insert(Index,Node);
Node.FParent:=Self;
if Index>0 then begin
Node.FPrevSibling:=Childs[Index-1];
Node.FPrevSibling:=Children[Index-1];
Node.FPrevSibling.FNextSibling:=Node;
end;
if Index+1<ChildCount then begin
Node.FNextSibling:=Childs[Index+1];
Node.FNextSibling:=Children[Index+1];
Node.FNextSibling.FPrevSibling:=Node;
end;
end;
@ -286,7 +286,7 @@ var
Child: TEduOptionsNode;
begin
for i:=0 to ChildCount-1 do begin
Child:=Childs[i];
Child:=Children[i];
if (Child.Name='') or (not IsValidIdent(Child.Name)) then continue;
Config.AppendBasePath(Child.Name);
try
@ -305,7 +305,7 @@ var
Child: TEduOptionsNode;
begin
for i:=0 to ChildCount-1 do begin
Child:=Childs[i];
Child:=Children[i];
if (Child.Name='') or (not IsValidIdent(Child.Name)) then continue;
Config.AppendBasePath(Child.Name);
try
@ -328,7 +328,7 @@ var
i: Integer;
begin
for i:=0 to ChildCount-1 do
Childs[i].Apply(Enable);
Children[i].Apply(Enable);
end;
{ TEduOptions }

View File

@ -50,36 +50,36 @@
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
<CustomOptions Childs="ExternHelp">
<_ExternHelp Childs="Count/Item1/Item2/Item3">
<CustomOptions Children="ExternHelp">
<_ExternHelp Children="Count/Item1/Item2/Item3">
<_Count Value="3"/>
<_Item1 Childs="Filename/Name/URL">
<_Filename Childs="Value">
<_Item1 Children="Filename/Name/URL">
<_Filename Children="Value">
<_Value Value="$(FPCSrcDir)/rtl/win32/windows.pp"/>
</_Filename>
<_Name Value="Windows"/>
<_URL Childs="Value">
<_URL Children="Value">
<_Value Value="http://social.msdn.microsoft.com/Search/en-us?query=$(Identifier)"/>
</_URL>
</_Item1>
<_Item2 Childs="Filename/Name/URL">
<_Filename Childs="Value">
<_Item2 Children="Filename/Name/URL">
<_Filename Children="Value">
<_Value Value="$(FPCSrcDir)/packages/postgres/src/"/>
</_Filename>
<_Name Value="PostgreSQL"/>
<_URL Childs="Value">
<_URL Children="Value">
<_Value Value="http://search.postgresql.org/search?q=$(Identifier)"/>
</_URL>
</_Item2>
<_Item3 Childs="Filename/Name/URL/WithSubDirectories">
<_Filename Childs="Value">
<_Item3 Children="Filename/Name/URL/WithSubDirectories">
<_Filename Children="Value">
<_Value Value="$(FPCSrcDir)/packages/gtk2/"/>
</_Filename>
<_Name Value="Gtk2"/>
<_URL Childs="Value">
<_URL Children="Value">
<_Value Value="http://www.google.com/custom?domains=library.gnome.org&amp;sitesearch=library.gnome.org&amp;q=$(Identifier)"/>
</_URL>
<_WithSubDirectories Childs="Value">
<_WithSubDirectories Children="Value">
<_Value Value="True"/>
</_WithSubDirectories>
</_Item3>

View File

@ -124,7 +124,7 @@ type
property URL: string read FURL write SetURL;
property StoreIn: string read FStoreIn write SetStoreIn;
property ChildCount: integer read GetChildCount;
property Childs[Index: integer]: TExternHelpItem read GetChilds;
property Children[Index: integer]: TExternHelpItem read GetChilds;
property ChangeStep: integer read FChangeStep;
end;
@ -333,7 +333,7 @@ begin
Config.SetDeleteValue(Path+'URL/Value',Node.URL,'');
Config.SetDeleteValue(Path+'ChildCount',Node.ChildCount,0);
for i:=1 to Node.ChildCount do
SaveNode(Config,Path+'Item'+IntToStr(i)+'/',Node.Childs[i-1]);
SaveNode(Config,Path+'Item'+IntToStr(i)+'/',Node.Children[i-1]);
end;
constructor TExternHelpOptions.Create;
@ -371,7 +371,7 @@ var
begin
if RootItem<>nil then begin
for i:=RootItem.ChildCount-1 downto 0 do begin
Item:=RootItem.Childs[i];
Item:=RootItem.Children[i];
if (Item.StoreIn='') then
Item.Free;
end;
@ -386,7 +386,7 @@ var
begin
if Parent<>nil then begin
for i:=Parent.ChildCount-1 downto 0 do begin
Item:=Parent.Childs[i];
Item:=Parent.Children[i];
if (Item.StoreIn<>'')
and (Name='*') or (SysUtils.CompareText(Item.StoreIn,Name)=0) then
Item.Free;
@ -444,10 +444,10 @@ begin
Changed:=false;
Cnt:=0;
for i:=0 to RootItem.ChildCount-1 do begin
Item:=RootItem.Childs[i];
Item:=RootItem.Children[i];
if SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue;
if (Cnt=TmpRoot.ChildCount)
or (not TmpRoot.Childs[Cnt].IsEqual(Item,true)) then begin
or (not TmpRoot.Children[Cnt].IsEqual(Item,true)) then begin
Changed:=true;
break;
end;
@ -466,7 +466,7 @@ begin
Path:=Path+'/';
Cnt:=0;
for i:=0 to RootItem.ChildCount-1 do begin
Item:=RootItem.Childs[i];
Item:=RootItem.Children[i];
//DebugLn(['TExternHelpOptions.SaveOptionsToPackage ',Item.Name,' StoreIN=',Item.StoreIn,' ',SysUtils.CompareText(Item.StoreIn,Pkg.Name)=0]);
if SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue;
inc(Cnt);
@ -525,7 +525,7 @@ begin
Path:='ExternHelp/';
Cnt:=0;
for i:=1 to RootItem.ChildCount do begin
Item:=RootItem.Childs[i-1];
Item:=RootItem.Children[i-1];
if Item.StoreIn<>'' then continue;
inc(Cnt);
SaveNode(Config,Path+'Items/Item'+IntToStr(Cnt)+'/',Item);
@ -627,7 +627,7 @@ procedure TExternHelpOptions.UpdateHelpDB;
end;
for i:=0 to Item.ChildCount-1 do
RegisterItem(Item.Childs[i]);
RegisterItem(Item.Children[i]);
end;
begin
@ -976,7 +976,7 @@ procedure TExternHelpGeneralOptsFrame.FillItemsTreeView;
TVNode: TTreeNode;
begin
for i:=0 to ParentItem.ChildCount-1 do begin
Item:=ParentItem.Childs[i];
Item:=ParentItem.Children[i];
TVNode:=ItemsTreeView.Items.AddChildObject(ParentTVNode,Item.Name,Item);
Add(Item,TVNode);
TVNode.Expanded:=true;
@ -1267,7 +1267,7 @@ var
begin
if (ChildCount=0) and (URL='') and (Filename='') and (StoreIn='') then exit;
for i:=fChilds.Count-1 downto 0 do begin
Child:=Childs[i];
Child:=Children[i];
Child.Parent:=nil;
Child.Free;
end;
@ -1295,14 +1295,14 @@ end;
procedure TExternHelpItem.RemoveChild(Index: integer);
begin
Childs[Index].Parent:=nil;
Children[Index].Parent:=nil;
fChilds.Delete(Index);
IncreaseChangeStep;
end;
procedure TExternHelpItem.DeleteChild(Index: integer);
begin
Childs[Index].Free;
Children[Index].Free;
end;
procedure TExternHelpItem.DeleteChild(Child: TExternHelpItem);
@ -1328,7 +1328,7 @@ begin
and (ChildCount=Item.ChildCount);
if Result then begin
for i:=0 to ChildCount-1 do
if not (Childs[i].IsEqual(Item.Childs[i],true)) then exit(false);
if not (Children[i].IsEqual(Item.Children[i],true)) then exit(false);
end;
end;
@ -1353,9 +1353,9 @@ begin
AddChild(Item);
IncreaseChangeStep;
end else begin
Item:=Childs[i];
Item:=Children[i];
end;
Item.Assign(Src.Childs[i],true);
Item.Assign(Src.Children[i],true);
end;
while ChildCount>Src.ChildCount do begin
DeleteChild(ChildCount-1);

View File

@ -67,8 +67,8 @@
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
<CustomOptions Childs="ExternHelp">
<_ExternHelp Childs="Count"/>
<CustomOptions Children="ExternHelp">
<_ExternHelp Children="Count"/>
</CustomOptions>
</Package>
</CONFIG>

View File

@ -76,8 +76,8 @@
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
<CustomOptions Childs="ExternHelp">
<_ExternHelp Childs="Count"/>
<CustomOptions Children="ExternHelp">
<_ExternHelp Children="Count"/>
</CustomOptions>
</Package>
</CONFIG>

View File

@ -301,7 +301,7 @@
<seealso/>
</element>
<!-- variable Visibility: default -->
<element name="TOctreeQNode.Childs">
<element name="TOctreeQNode.Children">
<short/>
<descr/>
<seealso/>

View File

@ -16480,9 +16480,9 @@ the comparision is case sensitive.
<seealso/>
</element>
<!-- variable Visibility: default -->
<element name="TTreeNodeExpandedState.Childs">
<element name="TTreeNodeExpandedState.Children">
<short>
<var>Childs</var> - the children of the current node, as an AvgLvlTree</short>
<var>Children</var> - the children of the current node, as an AvgLvlTree</short>
<descr/>
<seealso/>
</element>

View File

@ -1392,7 +1392,7 @@
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TArrayNode.Childs">
<element name="TArrayNode.Children">
<short/>
<descr/>
<seealso/>

View File

@ -572,9 +572,9 @@
<short>
<var>ChildCount</var> - the number of child nodes</short>
</element>
<element name="TLazDockConfigNode.Childs">
<element name="TLazDockConfigNode.Children">
<short>
<var>Childs</var> - the child nodes in an indexed list</short>
<var>Children</var> - the child nodes in an indexed list</short>
</element>
<element name="TLazDockConfigNode.TheType">
<short>

View File

@ -196,7 +196,7 @@ procedure TMyWidgetMediator.Paint;
then begin
for i:=0 to AWidget.ChildCount-1 do begin
SaveHandleState;
Child:=AWidget.Childs[i];
Child:=AWidget.Children[i];
// clip child area
MoveWindowOrgEx(Handle,Child.Left,Child.Top);
if IntersectClipRect(Handle,0,0,Child.Width,Child.Height)<>NullRegion then

View File

@ -88,7 +88,7 @@ type
destructor Destroy; override;
property Parent: TMyWidget read FParent write SetParent;
function ChildCount: integer;
property Childs[Index: integer]: TMyWidget read GetChilds;
property Children[Index: integer]: TMyWidget read GetChilds;
procedure SetBounds(NewLeft, NewTop, NewWidth, NewHeight: integer); virtual;
procedure InvalidateRect(ARect: TRect; Erase: boolean);
procedure Invalidate;
@ -250,8 +250,8 @@ var
i: Integer;
begin
for i:=0 to ChildCount-1 do
if Childs[i].Owner=Root then
Proc(Childs[i]);
if Children[i].Owner=Root then
Proc(Children[i]);
end;
constructor TMyWidget.Create(AOwner: TComponent);
@ -268,7 +268,7 @@ end;
destructor TMyWidget.Destroy;
begin
Parent:=nil;
while ChildCount>0 do Childs[ChildCount-1].Free;
while ChildCount>0 do Children[ChildCount-1].Free;
FreeAndNil(FChilds);
inherited Destroy;
end;

View File

@ -71,7 +71,7 @@ type
property Path: string read FPath write SetPath;
property Parent: TIWHelpNode read FParent;
property Count: integer read GetCount;
property Childs[Index: integer]: TIWHelpNode read GetChilds; default;
property Children[Index: integer]: TIWHelpNode read GetChilds; default;
end;
{ TIWHelpTree }
@ -229,7 +229,7 @@ var
begin
if FItems<>nil then begin
for i:=FItems.Count-1 downto 0 do begin
CurChild:=Childs[i];
CurChild:=Children[i];
CurChild.FParent:=nil;
CurChild.Free;
end;
@ -298,7 +298,7 @@ begin
Config.SetDeleteValue(CfgPath+'IsRoot',IsRoot,false);
Config.SetDeleteValue(CfgPath+'ChildCount',Count,0);
for i:=0 to Count-1 do
Childs[i].Save(Config,CfgPath+'Node'+IntToStr(i+1)+'/');
Children[i].Save(Config,CfgPath+'Node'+IntToStr(i+1)+'/');
end;
function TIWHelpNode.FindByName(const ChildName: string): TIWHelpNode;
@ -306,7 +306,7 @@ var
i: Integer;
begin
for i := 0 to Count-1 do begin
Result:=Childs[i];
Result:=Children[i];
if CompareText(Result.Name,ChildName)=0 then exit;
end;
Result:=nil;
@ -318,7 +318,7 @@ var
i: Integer;
begin
for i:=Count-1 downto 0 do begin
CurChild:=Childs[i];
CurChild:=Children[i];
CurChild.DeleteLeavesWithoutHelp;
if (CurChild.Count=0) and (not CurChild.HasHelp) then
CurChild.Free;

View File

@ -446,7 +446,7 @@ var
ScrollOffset: TPoint;
ChildBounds: TRect;
Found: Boolean;
Childs: TFPList;
Children: TFPList;
Offset: TPoint;
begin
Result:=Root;
@ -455,14 +455,14 @@ begin
Offset:=GetComponentOriginOnForm(Result);
//DebugLn(['TDesignerMediator.ComponentAtPos Parent=',DbgSName(Result),' Offset=',dbgs(Offset)]);
OffsetRect(ClientArea,Offset.X,Offset.Y);
Childs:=TFPList.Create;
Children:=TFPList.Create;
try
GetChilds(Result,Childs);
GetChilds(Result,Children);
//DebugLn(['TDesignerMediator.ComponentAtPos Result=',DbgSName(Result),' ChildCount=',children.Count,' ClientArea=',dbgs(ClientArea)]);
Found:=false;
// iterate backwards (z-order)
for i:=Childs.Count-1 downto 0 do begin
Child:=TComponent(Childs[i]);
for i:=Children.Count-1 downto 0 do begin
Child:=TComponent(Children[i]);
//DebugLn(['TDesignerMediator.ComponentAtPos Child ',DbgSName(Child)]);
if (MinClass<>nil) and (not Child.InheritsFrom(MinClass)) then
continue;
@ -483,7 +483,7 @@ begin
end;
if not Found then exit;
finally
Childs.Free;
Children.Free;
end;
end;
end;

View File

@ -1115,7 +1115,7 @@ begin
else
ContainerMenuIndex:=GetContainerIndex(false);
{$IFDEF VerboseMenuIntf}
debugln('TIDEMenuSection.UpdateMenuStructure Childs Name="',Name,'" Invalid=',dbgs(FInvalidChildStartIndex),'..',dbgs(FInvalidChildEndIndex),' Count=',dbgs(Count));
debugln('TIDEMenuSection.UpdateMenuStructure Children Name="',Name,'" Invalid=',dbgs(FInvalidChildStartIndex),'..',dbgs(FInvalidChildEndIndex),' Count=',dbgs(Count));
{$ENDIF}
// update TopSeparator

View File

@ -2832,7 +2832,7 @@ type
TTreeNodeExpandedState = class
NodeText: string;
Childs: TAvgLvlTree;
Children: TAvgLvlTree;
constructor Create(FirstTreeNode: TTreeNode);
constructor Create(TreeView: TCustomTreeView);
destructor Destroy; override;

View File

@ -1514,7 +1514,7 @@ type
cesScaleChilds, cssScaleChilds
Scale children, keep space between them fixed.
Childs are resized to their normal/adviced size. If there is some space
Children are resized to their normal/adviced size. If there is some space
left in the client area of the parent, then the children are scaled to
fill the space. You can set maximum Constraints. Then the other children
are scaled more.
@ -1528,7 +1528,7 @@ type
cesHomogenousChildGrowth, cssHomogenousChildDecrease
Enlarge children equally.
Childs are resized to their normal/adviced size. If there is some space
Children are resized to their normal/adviced size. If there is some space
left in the client area of the parent, then the remaining space is
distributed equally to each child.
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and
@ -1541,7 +1541,7 @@ type
cesHomogenousSpaceGrowth
Enlarge space between children equally.
Childs are resized to their normal/adviced size. If there is some space
Children are resized to their normal/adviced size. If there is some space
left in the client area of the parent, then the space between the children
is expanded.
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and

View File

@ -195,9 +195,9 @@ end;
procedure TTreeNodeExpandedState.Clear;
begin
if Childs<>nil then begin
Childs.FreeAndClear;
FreeThenNil(Childs);
if Children<>nil then begin
Children.FreeAndClear;
FreeThenNil(Children);
end;
end;
@ -214,9 +214,9 @@ begin
ChildNode:=FirstTreeNode;
while ChildNode<>nil do begin
if ChildNode.Expanded then begin
if Childs=nil then Childs:=TAvgLvlTree.Create(@CompareExpandedNodes);
if Children=nil then Children:=TAvgLvlTree.Create(@CompareExpandedNodes);
NewExpandedNode:=TTreeNodeExpandedState.Create(ChildNode.GetFirstChild);
Childs.Add(NewExpandedNode);
Children.Add(NewExpandedNode);
end;
ChildNode:=ChildNode.GetNextSibling;
end;
@ -228,11 +228,11 @@ var
ANode: TAvgLvlTreeNode;
ChildNodeText: String;
begin
if Childs=nil then exit;
if Children=nil then exit;
ChildNode:=FirstTreeNode;
while ChildNode<>nil do begin
ChildNodeText:=ChildNode.Text;
ANode:=Childs.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode);
ANode:=Children.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode);
ChildNode.Expanded:=ANode<>nil;
if ANode<>nil then
TTreeNodeExpandedState(ANode.Data).Apply(ChildNode.GetFirstChild);

View File

@ -70,8 +70,8 @@ type
A TAutoSizeBox is a node in a tree.
A TAutoSizeBox can be a cell. Then it is a leaf in the tree and can have a
Control.
A TAutoSizeBox can be a row or column. Then it has only one Childs array.
A TAutoSizeBox can be a table. Then it has both Childs arrays.
A TAutoSizeBox can be a row or column. Then it has only one Children array.
A TAutoSizeBox can be a table. Then it has both Children arrays.
}
TAutoSizeBox = class
@ -86,7 +86,7 @@ type
Parent: array[TAutoSizeBoxOrientation] of TAutoSizeBox;
Index: array[TAutoSizeBoxOrientation] of Integer; // index in parent or grandparent
ChildCount: array[TAutoSizeBoxOrientation] of Integer;
Childs: array[TAutoSizeBoxOrientation] of PAutoSizeBox;
Children: array[TAutoSizeBoxOrientation] of PAutoSizeBox;
NewControlBounds: TRect;
// for nodes
@ -936,9 +936,9 @@ begin
//Box.WriteDebugReport('TAutoSizeCtrlData.SetupNonAlignedChilds');
// transfer the coords of the layout
for y:=0 to Box.ChildCount[asboVertical]-1 do begin
RowBox:=Box.Childs[asboVertical][y];
RowBox:=Box.Children[asboVertical][y];
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
ControlBox:=RowBox.Childs[asboHorizontal][x];
ControlBox:=RowBox.Children[asboHorizontal][x];
Child:=ControlBox.Control;
if Child=nil then continue;
NewBounds:=ControlBox.NewControlBounds;
@ -1425,9 +1425,9 @@ var
Size: Integer;
begin
Size:=NewChildCount*SizeOf(Pointer);
ReallocMem(Childs[Orientation],Size);
ReallocMem(Children[Orientation],Size);
if Size>0 then
FillChar(Childs[Orientation][0],Size,0);
FillChar(Children[Orientation][0],Size,0);
ChildCount[Orientation]:=NewChildCount;
end;
@ -1457,7 +1457,7 @@ begin
// create columns
for x:=0 to ColCount-1 do begin
ColBox:=TAutoSizeBox.Create;
Childs[asboHorizontal][x]:=ColBox;
Children[asboHorizontal][x]:=ColBox;
ColBox.AllocateChildsArray(asboVertical,RowCount);
ColBox.Parent[asboHorizontal]:=Self;
ColBox.Index[asboHorizontal]:=x;
@ -1466,7 +1466,7 @@ begin
// create rows
for y:=0 to RowCount-1 do begin
RowBox:=TAutoSizeBox.Create;
Childs[asboVertical][y]:=RowBox;
Children[asboVertical][y]:=RowBox;
RowBox.AllocateChildsArray(asboHorizontal,ColCount);
RowBox.Parent[asboVertical]:=Self;
RowBox.Index[asboHorizontal]:=-1;
@ -1474,12 +1474,12 @@ begin
end;
// create cells
for y:=0 to RowCount-1 do begin
RowBox:=Childs[asboVertical][y];
RowBox:=Children[asboVertical][y];
for x:=0 to ColCount-1 do begin
ColBox:=Childs[asboHorizontal][x];
ColBox:=Children[asboHorizontal][x];
CellBox:=TAutoSizeBox.Create;
RowBox.Childs[asboHorizontal][x]:=CellBox;
ColBox.Childs[asboVertical][y]:=CellBox;
RowBox.Children[asboHorizontal][x]:=CellBox;
ColBox.Children[asboVertical][y]:=CellBox;
CellBox.Parent[asboHorizontal]:=RowBox;
CellBox.Parent[asboVertical]:=ColBox;
CellBox.Index[asboHorizontal]:=x;
@ -1528,7 +1528,7 @@ begin
Col:=i mod LineMax;
if (BiDiMode=bdRightToLeft) then
Col:=LineMax-Col-1;
ChildBox:=Childs[asboHorizontal][Col].Childs[asboVertical][Row];
ChildBox:=Children[asboHorizontal][Col].Children[asboVertical][Row];
ChildBox.SetControl(ChildControl);
ChildBox.ApplyChildsizingBorders(ChildSizing);
end;
@ -1539,7 +1539,7 @@ begin
Row:=i mod LineMax;
if (BiDiMode=bdRightToLeft) then
Col:=LineMax-Col-1;
ChildBox:=Childs[asboVertical][Row].Childs[asboHorizontal][Col];
ChildBox:=Children[asboVertical][Row].Children[asboHorizontal][Col];
ChildBox.SetControl(ChildControl);
ChildBox.ApplyChildsizingBorders(ChildSizing);
end;
@ -1593,7 +1593,7 @@ procedure TAutoSizeBox.InitSums;
FirstChild: TAutoSizeBox;
begin
if ChildCount[o]>0 then begin
FirstChild:=Childs[o][0];
FirstChild:=Children[o][0];
MaximumSize[o]:=FirstChild.MaximumSize[o];
MinimumSize[o]:=FirstChild.MinimumSize[o];
PreferredSize[o]:=FirstChild.PreferredSize[o];
@ -1632,12 +1632,12 @@ begin
Orthogonal:=SizeBoxOrthogonal[Orientation];
if ChildCount[Orientation]>0 then begin
for i:=0 to ChildCount[Orientation]-1 do begin
CurChild:=Childs[Orientation][i];
CurChild:=Children[Orientation][i];
// add border in Orientation
CurBorder:=CurChild.BorderLeftTop[Orientation];
if i>0 then
CurBorder:=Max(Childs[Orientation][i-1].BorderRightBottom[Orientation],
CurBorder:=Max(Children[Orientation][i-1].BorderRightBottom[Orientation],
CurBorder);
if MaximumSize[Orientation]>0 then begin
inc(MaximumSize[Orientation],CurBorder);
@ -1673,7 +1673,7 @@ begin
end;
// last border
LastChild:=Childs[Orientation][ChildCount[Orientation]-1];
LastChild:=Children[Orientation][ChildCount[Orientation]-1];
BorderRightBottom[Orientation]:=LastChild.BorderRightBottom[Orientation];
end;
end;
@ -1687,12 +1687,12 @@ var
begin
// sum items in rows
for y:=0 to ChildCount[asboVertical]-1 do begin
RowBox:=Childs[asboVertical][y];
RowBox:=Children[asboVertical][y];
RowBox.SumLine(asboHorizontal,true);
end;
// sum items in columns
for x:=0 to ChildCount[asboHorizontal]-1 do begin
ColBox:=Childs[asboHorizontal][x];
ColBox:=Children[asboHorizontal][x];
ColBox.SumLine(asboVertical,true);
end;
// sum rows
@ -1709,7 +1709,7 @@ var
begin
CurLeftTop:=0;
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if i=0 then
inc(CurLeftTop,Child.BorderLeftTop[Orientation]);
Child.LeftTop[Orientation]:=CurLeftTop;
@ -1738,7 +1738,7 @@ var
begin
Result:=0;
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if i=0 then
inc(Result,Child.BorderLeftTop[Orientation]);
if Child.PreferredSize[Orientation]<1 then
@ -1769,7 +1769,7 @@ var
crsScaleChilds,crsHomogenousChildResize:
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if (Child.MaximumSize[Orientation]>0)
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
then begin
@ -1824,7 +1824,7 @@ var
for i:=0 to ChildCount[Orientation]-1 do begin
if TargetSize=CurSize then break;
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if (Child.MaximumSize[Orientation]<0)
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
then begin
@ -1899,7 +1899,7 @@ var
crsScaleChilds,crsHomogenousChildResize:
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
or (Child.PreferredSize[Orientation]<=1)
then begin
@ -1939,7 +1939,7 @@ var
crsHomogenousSpaceResize:
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if i=0 then begin
CurScale:=double(TargetSize);
CurOffset:=Child.BorderLeftTop[Orientation];
@ -1977,7 +1977,7 @@ var
OldSize: LongInt;
begin
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if (Child.PreferredSize[Orientation]<=1)
or (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
then begin
@ -2117,7 +2117,7 @@ procedure TAutoSizeBox.AlignToRight(TargetWidth: integer);
begin
Result:=0;
for i:=0 to ChildCount[Orientation]-1 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
if i=0 then
inc(Result,Child.BorderLeftTop[Orientation]);
if Child.PreferredSize[Orientation]<1 then
@ -2137,7 +2137,7 @@ begin
dx:=TargetWidth-GetChildTotalSize(Orientation);
for i:=ChildCount[Orientation]-1 downto 0 do begin
Child:=Childs[Orientation][i];
Child:=Children[Orientation][i];
inc(Child.LeftTop[Orientation],dx);
end;
end;
@ -2158,9 +2158,9 @@ var
begin
//WriteDebugReport;
for y:=0 to ChildCount[asboVertical]-1 do begin
RowBox:=Childs[asboVertical][y];
RowBox:=Children[asboVertical][y];
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
ControlBox:=RowBox.Childs[asboHorizontal][x];
ControlBox:=RowBox.Children[asboHorizontal][x];
ColBox:=ControlBox.Parent[asboVertical];
CurControl:=ControlBox.Control;
if CurControl=nil then continue;
@ -2237,9 +2237,9 @@ begin
Result:=false;
//WriteDebugReport;
for y:=0 to ChildCount[asboVertical]-1 do begin
RowBox:=Childs[asboVertical][y];
RowBox:=Children[asboVertical][y];
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
ControlBox:=RowBox.Childs[asboHorizontal][x];
ControlBox:=RowBox.Children[asboHorizontal][x];
CurControl:=ControlBox.Control;
if CurControl=nil then continue;
NewBounds:=ControlBox.NewControlBounds;
@ -2286,7 +2286,7 @@ begin
DebugLn('TAutoSizeBox.WriteDebugReport '+Title
+' ChildCounts=',dbgs(ChildCount[asboHorizontal]),'x',dbgs(ChildCount[asboVertical]));
for y:=0 to ChildCount[asboVertical]-1 do begin
RowBox:=Childs[asboVertical][y];
RowBox:=Children[asboVertical][y];
DbgOut(' Row='+dbgs(y),
' MinY='+dbgs(RowBox.MinimumSize[asboVertical]),
' MaxY='+dbgs(RowBox.MaximumSize[asboVertical]),
@ -2294,7 +2294,7 @@ begin
' BorderTop=',dbgs(RowBox.BorderLeftTop[asboVertical]),
' #Col='+dbgs(RowBox.ChildCount[asboHorizontal]));
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
CellBox:=RowBox.Childs[asboHorizontal][x];
CellBox:=RowBox.Children[asboHorizontal][x];
DbgOut(' CellControl=',DbgSName(CellBox.Control),
' Min='+dbgs(CellBox.MinimumSize[asboHorizontal])+'x'+dbgs(CellBox.MinimumSize[asboVertical]),
' Max='+dbgs(CellBox.MaximumSize[asboHorizontal])+'x'+dbgs(CellBox.MaximumSize[asboVertical]),
@ -2306,7 +2306,7 @@ begin
end;
DbgOut(' Columns: ');
for x:=0 to ChildCount[asboHorizontal]-1 do begin
ColBox:=Childs[asboHorizontal][x];
ColBox:=Children[asboHorizontal][x];
DbgOut(' Col='+dbgs(ColBox.Index[asboHorizontal]),
' Min='+dbgs(ColBox.MinimumSize[asboHorizontal]),
' Max='+dbgs(ColBox.MaximumSize[asboHorizontal]),
@ -2323,7 +2323,7 @@ begin
// unlink from parent
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
if Parent[o]<>nil then
Parent[o].Childs[o][Index[o]]:=nil;
Parent[o].Children[o][Index[o]]:=nil;
Clear;
inherited Destroy;
end;
@ -2336,10 +2336,10 @@ begin
// free all children
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
for i:=0 to ChildCount[o]-1 do
Childs[o][i].Free;
Children[o][i].Free;
// free children arrays
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
ReallocMem(Childs[o],0);
ReallocMem(Children[o],0);
end;
{------------------------------------------------------------------------------

View File

@ -938,7 +938,7 @@ begin
if (fpgmsg.Sender is TfpgMenuBar) then begin
//Invalidate clientRectCache to force LCL to recalibrate
//the available space in the form after a menubar visibility change.
//Childs are needed to invalidate for TLabel and others custom draw.
//Children are needed to invalidate for TLabel and others custom draw.
FLCLObject.InvalidateClientRectCache(true);
end;
Inherited;

View File

@ -312,7 +312,7 @@ type
public
Parent: TArrayNode;
Value: integer;
Childs: PArrayNode;
Children: PArrayNode;
StartValue: integer;
Capacity: integer;
Data: Pointer;
@ -4498,11 +4498,11 @@ procedure TArrayNode.DeleteChilds;
var
i: Integer;
begin
if Childs<>nil then begin
if Children<>nil then begin
for i:=0 to Capacity-1 do
Childs[i].Free;
FreeMem(Childs);
Childs:=nil;
Children[i].Free;
FreeMem(Children);
Children:=nil;
Capacity:=0;
end;
end;
@ -4510,7 +4510,7 @@ end;
procedure TArrayNode.UnbindFromParent;
begin
if Parent<>nil then begin
Parent.Childs[Value-Parent.StartValue]:=nil;
Parent.Children[Value-Parent.StartValue]:=nil;
Parent:=nil;
end;
end;
@ -4524,7 +4524,7 @@ begin
NewNode.Value:=ChildValue;
NewNode.Parent:=Self;
Index:=ChildValue-StartValue;
Childs[Index]:=NewNode;
Children[Index]:=NewNode;
end;
function TArrayNode.GetChildNode(ChildValue: integer; CreateIfNotExists: boolean
@ -4540,10 +4540,10 @@ begin
Expand(ChildValue);
Index:=ChildValue-StartValue;
end;
Result:=Childs[Index];
Result:=Children[Index];
if (Result=nil) and CreateIfNotExists then begin
CreateChildNode(ChildValue);
Result:=Childs[Index];
Result:=Children[Index];
end;
end;
@ -4558,7 +4558,7 @@ var
OldSize: Integer;
begin
//DebugLn('TArrayNode.Expand A ',ValueToInclude,' Capacity=',Capacity,' StartValue=',StartValue);
if Childs=nil then begin
if Children=nil then begin
NewStartValue:=ValueToInclude;
NewCapacity:=4;
end else begin
@ -4585,12 +4585,12 @@ begin
NewSize:=SizeOf(Pointer)*NewCapacity;
GetMem(NewChilds,NewSize);
FillChar(NewChilds^,NewSize,0);
if Childs<>nil then begin
if Children<>nil then begin
OldSize:=SizeOf(Pointer)*Capacity;
System.Move(Childs^,NewChilds[StartValue-NewStartValue],OldSize);
FreeMem(Childs);
System.Move(Children^,NewChilds[StartValue-NewStartValue],OldSize);
FreeMem(Children);
end;
Childs:=NewChilds;
Children:=NewChilds;
StartValue:=NewStartValue;
Capacity:=NewCapacity;
end;
@ -4603,8 +4603,8 @@ begin
if Parent=nil then exit;
i:=Value-Parent.StartValue-1;
while (i>=0) do begin
if Parent.Childs[i]<>nil then begin
Result:=Parent.Childs[i];
if Parent.Children[i]<>nil then begin
Result:=Parent.Children[i];
exit;
end;
dec(i);
@ -4619,8 +4619,8 @@ begin
if Parent=nil then exit;
i:=Value-Parent.StartValue+1;
while (i<Parent.Capacity) do begin
if Parent.Childs[i]<>nil then begin
Result:=Parent.Childs[i];
if Parent.Children[i]<>nil then begin
Result:=Parent.Children[i];
exit;
end;
inc(i);
@ -4659,8 +4659,8 @@ begin
if Capacity=0 then exit;
i:=0;
while i<Capacity do begin
if Childs[i]<>nil then begin
Result:=Childs[i];
if Children[i]<>nil then begin
Result:=Children[i];
exit;
end;
inc(i);
@ -4675,8 +4675,8 @@ begin
if Capacity=0 then exit;
i:=Capacity-1;
while i>=0 do begin
if Childs[i]<>nil then begin
Result:=Childs[i];
if Children[i]<>nil then begin
Result:=Children[i];
exit;
end;
dec(i);
@ -4721,10 +4721,10 @@ var
i: Integer;
ChildNode: TArrayNode;
begin
if Childs<>nil then begin
if Children<>nil then begin
if Capacity<=0 then R('Capacity too small');
for i:=0 to Capacity-1 do begin
ChildNode:=Childs[i];
ChildNode:=Children[i];
if ChildNode<>nil then begin
if ChildNode.Value<>i+StartValue then
R('Value wrong');

View File

@ -86,7 +86,7 @@ type
Name: string;
Value: string;
Parent: TConfigMemStorageNode;
Childs: TAvgLvlTree; // tree of TConfigMemStorageNode
Children: TAvgLvlTree; // tree of TConfigMemStorageNode
procedure ClearChilds;
constructor Create(AParent: TConfigMemStorageNode; const AName: string);
destructor Destroy; override;
@ -415,7 +415,7 @@ end;
procedure TConfigMemStorage.CreateChilds(Node: TConfigMemStorageNode);
begin
Node.Childs:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes);
Node.Children:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes);
end;
procedure TConfigMemStorage.Modify(const APath: string;
@ -448,11 +448,11 @@ begin
while (not (p^ in ['/',#0])) do inc(p);
//DebugLn(['TConfigMemStorage.Modify Node="',Node.Name,'" StartPos="',StartPos,'"']);
// child node
if Node.Childs=nil then begin
if Node.Children=nil then begin
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
CreateChilds(Node);
end;
ChildNode:=Node.Childs.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode);
ChildNode:=Node.Children.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode);
if ChildNode=nil then begin
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
NewName:='';
@ -461,7 +461,7 @@ begin
System.Move(StartPos^,NewName[1],p-StartPos);
//DebugLn(['TConfigMemStorage.Modify Adding "',NewName,'"']);
Child:=TConfigMemStorageNode.Create(Node,NewName);
Node.Childs.Add(Child);
Node.Children.Add(Child);
end else
Child:=TConfigMemStorageNode(ChildNode.Data);
Node:=Child;
@ -478,7 +478,7 @@ begin
Node.Value:='';
if Mode=cmsmDelete then
Node.ClearChilds;
while (Node<>nil) and ((Node.Childs=nil) or (Node.Childs.Count=0))
while (Node<>nil) and ((Node.Children=nil) or (Node.Children.Count=0))
do begin
Child:=Node;
Node:=Node.Parent;
@ -627,17 +627,17 @@ procedure TConfigMemStorage.SaveToConfig(Config: TConfigStorage;
SubPath:=SubPath+'_'+Node.Name+'/';
Config.SetDeleteValue(SubPath+'Value',Node.Value,'');
Names:='';
if Node.Childs<>nil then begin
ChildNode:=Node.Childs.FindLowest;
if Node.Children<>nil then begin
ChildNode:=Node.Children.FindLowest;
while ChildNode<>nil do begin
Child:=TConfigMemStorageNode(ChildNode.Data);
if Names<>'' then Names:=Names+'/';
Names:=Names+Child.Name;
Save(Child,SubPath);
ChildNode:=Node.Childs.FindSuccessor(ChildNode);
ChildNode:=Node.Children.FindSuccessor(ChildNode);
end;
end;
Config.SetDeleteValue(SubPath+'Childs',Names,'');
Config.SetDeleteValue(SubPath+'Children',Names,'');
end;
begin
@ -659,7 +659,7 @@ procedure TConfigMemStorage.LoadFromConfig(Config: TConfigStorage;
if (Node<>Root) then
SubPath:=SubPath+'_'+Node.Name+'/';
Node.Value:=Config.GetValue(SubPath+'Value','');
ChildNames:=Config.GetValue(SubPath+'Childs','');
ChildNames:=Config.GetValue(SubPath+'Children','');
//DebugLn(['Load SubPath="',SubPath,'" Value="',Node.Value,'" ChildNames="',ChildNames,'"']);
if ChildNames<>'' then begin
p:=PChar(ChildNames);
@ -671,9 +671,9 @@ procedure TConfigMemStorage.LoadFromConfig(Config: TConfigStorage;
if ChildName<>'' then
System.Move(StartPos^,ChildName[1],p-StartPos);
Child:=TConfigMemStorageNode.Create(Node,ChildName);
if Node.Childs=nil then
if Node.Children=nil then
CreateChilds(Node);
Node.Childs.Add(Child);
Node.Children.Add(Child);
Load(Child,SubPath);
if p^=#0 then break;
inc(p);
@ -697,11 +697,11 @@ procedure TConfigMemStorage.WriteDebugReport;
begin
if Node=nil then exit;
DebugLn(['TConfigMemStorage.WriteDebugReport ',Prefix,'Name="',Node.Name,'" Value="',Node.Value,'"']);
if Node.Childs<>nil then begin
AVLNode:=Node.Childs.FindLowest;
if Node.Children<>nil then begin
AVLNode:=Node.Children.FindLowest;
while AVLNode<>nil do begin
w(TConfigMemStorageNode(AVLNode.Data),Prefix+' ');
AVLNode:=Node.Childs.FindSuccessor(AVLNode);
AVLNode:=Node.Children.FindSuccessor(AVLNode);
end;
end;
end;
@ -717,9 +717,9 @@ procedure TConfigMemStorageNode.ClearChilds;
var
OldChilds: TAvgLvlTree;
begin
if Childs<>nil then begin
OldChilds:=Childs;
Childs:=nil;
if Children<>nil then begin
OldChilds:=Children;
Children:=nil;
OldChilds.FreeAndClear;
OldChilds.Free;
end;
@ -735,8 +735,8 @@ end;
destructor TConfigMemStorageNode.Destroy;
begin
ClearChilds;
if (Parent<>nil) and (Parent.Childs<>nil) then
Parent.Childs.Remove(Self);
if (Parent<>nil) and (Parent.Children<>nil) then
Parent.Children.Remove(Self);
inherited Destroy;
end;

View File

@ -127,7 +127,7 @@ type
property Parent: TLazDockConfigNode read FParent write SetParent;
property Sides[Side: TAnchorKind]: string read GetSides write SetSides;
property ChildCount: Integer read GetChildCount;
property Childs[Index: integer]: TLazDockConfigNode read GetChilds; default;
property Children[Index: integer]: TLazDockConfigNode read GetChilds; default;
published
property TheType: TLDConfigNodeType read FTheType write SetTheType
default ldcntControl;
@ -1085,9 +1085,9 @@ begin
PagesNode:=PageNode.Parent;
PageNodeIndex:=PagesNode.IndexOf(PageNode.Name);
if PageNodeIndex>0 then
NeighbourNode:=PagesNode.Childs[PageNodeIndex-1].Childs[0]
NeighbourNode:=PagesNode.Children[PageNodeIndex-1].Children[0]
else
NeighbourNode:=PagesNode.Childs[PageNodeIndex+1].Childs[0];
NeighbourNode:=PagesNode.Children[PageNodeIndex+1].Children[0];
NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name);
if NeighbourControl=nil then begin
DebugLn(['TCustomLazControlDocker.DockAsPage NeighbourControl not found "',NeighbourNode.Name,'"']);
@ -1853,7 +1853,7 @@ function TCustomLazControlDocker.GetLayoutFromControl: TLazDockConfigNode;
if AControl is TCustomForm then
Result.WindowState:=TCustomForm(AControl).WindowState;
// Childs
// Children
if (AControl is TWinControl) then begin
// check if children need nodes
NeedChildNodes:=(AControl is TLazDockPages)
@ -2609,7 +2609,7 @@ var
// anchored to the other side of DeletingNode
OppositeSide:=OppositeAnchor[Side];
for i:=0 to DeletingNode.Parent.ChildCount-1 do begin
Sibling:=DeletingNode.Parent.Childs[i];
Sibling:=DeletingNode.Parent.Children[i];
if CompareText(Sibling.Sides[OppositeSide],SplitterNode.Name)=0 then
Sibling.Sides[OppositeSide]:=DeletingNode.Sides[OppositeSide];
end;
@ -2650,7 +2650,7 @@ var
// 2. anchor all siblings using LeftSplitter to now use RightSplitter
for i:=0 to DeletingNode.Parent.ChildCount-1 do begin
Sibling:=DeletingNode.Parent.Childs[i];
Sibling:=DeletingNode.Parent.Children[i];
if Sibling=DeletingNode then continue;
if CompareText(Sibling.Sides[akLeft],LeftSplitter.Name)=0 then
Sibling.Sides[akLeft]:=RightSplitter.Name;
@ -2713,12 +2713,12 @@ var
if ParentNode=nil then RaiseGDBException('');
if (PagesNode.TheType<>ldcntPages) then RaiseGDBException('');
if PagesNode.ChildCount<>1 then RaiseGDBException('');
PageNode:=PagesNode.Childs[0];
PageNode:=PagesNode.Children[0];
PagesBounds:=PagesNode.Bounds;
OffsetX:=PagesBounds.Left;
OffsetY:=PagesBounds.Top;
for i:=0 to PageNode.ChildCount-1 do begin
Child:=PageNode.Childs[i];
Child:=PageNode.Children[i];
// changes parent of child
Child.Parent:=ParentNode;
// move children to place where PagesNode was
@ -2754,7 +2754,7 @@ var
FormBounds:=FormNode.Bounds;
OffsetX:=FormBounds.Left;
OffsetY:=FormBounds.Top;
Child:=FormNode.Childs[0];
Child:=FormNode.Children[0];
// changes parent of child
Child.Parent:=FormNode.Parent;
Child.WindowState:=FormNode.WindowState;
@ -2789,7 +2789,7 @@ var
// remove unneeded children
i:=Node.ChildCount-1;
while i>=0 do begin
Child:=Node.Childs[i];
Child:=Node.Children[i];
RemoveEmptyNodes(Child);// beware: this can delete more than one child
dec(i);
if i>=Node.ChildCount then i:=Node.ChildCount-1;
@ -2873,7 +2873,7 @@ var
end;
// check children
for i:=0 to Node.ChildCount-1 do
if not Check(Node.Childs[i]) then exit(false);
if not Check(Node.Children[i]) then exit(false);
Result:=true;
end;
@ -2920,7 +2920,7 @@ var
begin
ParentNode:=Node.Parent;
for i:=0 to ParentNode.ChildCount-1 do begin
Result:=ParentNode.Childs[i];
Result:=ParentNode.Children[i];
if CompareText(Result.Name,DockerName)=0 then continue;
if Result.TheType=ldcntControl then
exit;
@ -2949,13 +2949,13 @@ var
PageIndex:=PagesNode.IndexOf(PageNode.Name);
if (PageIndex>0)
and (PagesNode[PageIndex-1].ChildCount=1) then begin
Result:=PagesNode[PageIndex-1].Childs[0];
Result:=PagesNode[PageIndex-1].Children[0];
if Result.TheType=ldcntControl then exit;
end;
// check if right page has only one control
if (PageIndex<PagesNode.ChildCount-1)
and (PagesNode[PageIndex+1].ChildCount=1) then begin
Result:=PagesNode[PageIndex+1].Childs[0];
Result:=PagesNode[PageIndex+1].Children[0];
if Result.TheType=ldcntControl then exit;
end;
Result:=nil;
@ -2971,7 +2971,7 @@ var
and (CompareText(Node.Name,DockerName)<>0) then
exit(Node);
for i:=0 to Node.ChildCount-1 do begin
Result:=FindOtherNodeWithControl(Node.Childs[i]);
Result:=FindOtherNodeWithControl(Node.Children[i]);
if Result<>nil then exit;
end;
end;
@ -3166,7 +3166,7 @@ function TCustomLazDockingManager.ConfigIsCompatible(
if Node.Sides[Side1]='' then exit;
if Node.Sides[Side2]='' then exit;
for i:=0 to Node.Parent.ChildCount-1 do begin
Child:=Node.Parent.Childs[i];
Child:=Node.Parent.Children[i];
if Child=Node then continue;
if (CompareText(Node.Sides[Side1],Child.Sides[Side1])=0)
and (CompareText(Node.Sides[Side2],Child.Sides[Side2])=0) then begin
@ -3217,8 +3217,8 @@ function TCustomLazDockingManager.ConfigIsCompatible(
if not CheckHasParent then exit;
if not CheckHasChilds then exit;
for i:=0 to Node.ChildCount-1 do
if Node.Childs[i].TheType<>ldcntPage then begin
Error('Childs[i].TheType<>ldcntPage');
if Node.Children[i].TheType<>ldcntPage then begin
Error('Children[i].TheType<>ldcntPage');
exit;
end;
if not CheckAllSidesAnchored then exit;
@ -3269,7 +3269,7 @@ function TCustomLazDockingManager.ConfigIsCompatible(
// check children
for i:=0 to Node.ChildCount-1 do
if not CheckNode(Node.Childs[i]) then exit;
if not CheckNode(Node.Children[i]) then exit;
Result:=true;
end;
@ -3380,7 +3380,7 @@ var
i: Integer;
begin
if FChilds=nil then exit;
for i:=ChildCount-1 downto 0 do Childs[i].Free;
for i:=ChildCount-1 downto 0 do Children[i].Free;
FChilds.Clear;
end;
@ -3403,7 +3403,7 @@ begin
FSides[a]:=Src.FSides[a];
FTheType:=Src.FTheType;
for i:=0 to Src.ChildCount-1 do begin
SrcChild:=Src.Childs[i];
SrcChild:=Src.Children[i];
NewChild:=TLazDockConfigNode.Create(Self);
NewChild.Assign(SrcChild);
end;
@ -3419,7 +3419,7 @@ begin
if WithRoot and (CompareText(Name,AName)=0) then exit(Self);
if FChilds<>nil then
for i:=0 to FChilds.Count-1 do begin
Result:=Childs[i];
Result:=Children[i];
if CompareText(Result.Name,AName)=0 then exit;
if Recursive then begin
Result:=Result.FindByName(AName,true,false);
@ -3433,7 +3433,7 @@ function TLazDockConfigNode.IndexOf(const AName: string): Integer;
begin
if FChilds<>nil then begin
Result:=FChilds.Count-1;
while (Result>=0) and (CompareText(Childs[Result].Name,AName)<>0) do
while (Result>=0) and (CompareText(Children[Result].Name,AName)<>0) do
dec(Result);
end else begin
Result:=-1;
@ -3471,7 +3471,7 @@ begin
Result:=nil;
ParentNode:=Parent;
for i:=0 to ParentNode.ChildCount-1 do begin
Child:=ParentNode.Childs[i];
Child:=ParentNode.Children[i];
if Child=Self then continue;
if IgnoreSplitters
and (Child.TheType in [ldcntSplitterLeftRight,ldcntSplitterUpDown]) then
@ -3520,9 +3520,9 @@ begin
Config.SetDeleteValue(Path+'Sides/'+AnchorNames[a]+'/Name',Sides[a],'');
// children
Config.SetDeleteValue(Path+'Childs/Count',ChildCount,0);
Config.SetDeleteValue(Path+'Children/Count',ChildCount,0);
for i:=0 to ChildCount-1 do begin
Child:=Childs[i];
Child:=Children[i];
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
Child.SaveToConfig(Config,SubPath);
end;
@ -3552,7 +3552,7 @@ begin
Sides[a]:=Config.GetValue(Path+'Sides/'+AnchorNames[a]+'/Name','');
// children
NewChildCount:=Config.GetValue(Path+'Childs/Count',0);
NewChildCount:=Config.GetValue(Path+'Children/Count',0);
for i:=0 to NewChildCount-1 do begin
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
NewChildName:=Config.GetValue(SubPath+'Name/Value','');
@ -3575,7 +3575,7 @@ procedure TLazDockConfigNode.WriteDebugReport;
DbgOut(' Type=',GetEnumName(TypeInfo(TLDConfigNodeType),ord(ANode.TheType)));
DbgOut(' Bounds='+dbgs(ANode.Bounds));
DbgOut(' ClientBounds='+dbgs(ANode.ClientBounds));
DbgOut(' Childs='+dbgs(ANode.ChildCount));
DbgOut(' Children='+dbgs(ANode.ChildCount));
DbgOut(' WindowState='+WindowStateToStr(ANode.WindowState));
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
s:=ANode.Sides[a];
@ -3749,7 +3749,7 @@ var
end;
if Node.Parent<>nil then begin
for i:=0 to Node.Parent.ChildCount-1 do begin
Sibling:=Node.Parent.Childs[i];
Sibling:=Node.Parent.Children[i];
if CompareText(Sibling.Sides[OppositeAnchor[Side]],Node.Name)=0 then
Improve(Sibling);
end;
@ -3783,13 +3783,13 @@ var
if Node.TheType=ldcntPages then begin
// maximum size of all pages
for i:=0 to Node.ChildCount-1 do begin
ChildMinSize:=GetMinSize(Node.Childs[i]);
ChildMinSize:=GetMinSize(Node.Children[i]);
Result.X:=Max(Result.X,ChildMinSize.X);
Result.Y:=Max(Result.Y,ChildMinSize.Y);
end;
end else begin
for i:=0 to Node.ChildCount-1 do begin
Child:=Node.Childs[i];
Child:=Node.Children[i];
ChildSize:=GetMinSize(Child);
Result.X:=Max(Result.X,GetMinPos(Child,akLeft)+ChildSize.X);
Result.Y:=Max(Result.Y,GetMinPos(Child,akTop)+ChildSize.Y);
@ -3846,7 +3846,7 @@ var
w(ARect.Left+1,ARect.Top,Node.Name,ARect.Right);
for i := 0 to Node.ChildCount-1 do begin
Child:=Node.Childs[i];
Child:=Node.Children[i];
ChildRect.Left:=ARect.Left+1+GetMinPos(Child,akLeft);
ChildRect.Top:=ARect.Top+1+GetMinPos(Child,akTop);
ChildSize:=GetMinSize(Child);