mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 20:37:43 +02:00
Fix spelling from Childs to Children around Lazarus source. Patch from Mazen NEIFER
git-svn-id: trunk@30657 -
This commit is contained in:
parent
8e156d3fca
commit
fdc466d76d
@ -174,7 +174,7 @@ type
|
|||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function GetComponents(RootComponent: TComponent; AddRoot: boolean = true): TFPList;
|
function GetComponents(RootComponent: TComponent; AddRoot: boolean = true): TFPList;
|
||||||
property Childs: TFPList read FChilds;
|
property Children: TFPList read FChilds;
|
||||||
property Root: TComponent read FRoot;
|
property Root: TComponent read FRoot;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -784,7 +784,7 @@ var
|
|||||||
OldRoot: TComponent;
|
OldRoot: TComponent;
|
||||||
begin
|
begin
|
||||||
//debugln(['TComponentChildCollector.AddChildComponent ',DbgSName(Child)]);
|
//debugln(['TComponentChildCollector.AddChildComponent ',DbgSName(Child)]);
|
||||||
Childs.Add(Child);
|
Children.Add(Child);
|
||||||
OldRoot := Root;
|
OldRoot := Root;
|
||||||
try
|
try
|
||||||
if csInline in Child.ComponentState then
|
if csInline in Child.ComponentState then
|
||||||
@ -809,12 +809,12 @@ end;
|
|||||||
function TComponentChildCollector.GetComponents(RootComponent: TComponent;
|
function TComponentChildCollector.GetComponents(RootComponent: TComponent;
|
||||||
AddRoot: boolean): TFPList;
|
AddRoot: boolean): TFPList;
|
||||||
begin
|
begin
|
||||||
Childs.Clear;
|
Children.Clear;
|
||||||
if AddRoot then
|
if AddRoot then
|
||||||
Childs.Add(RootComponent);
|
Children.Add(RootComponent);
|
||||||
FRoot:=RootComponent;
|
FRoot:=RootComponent;
|
||||||
TCTComponentAccess(RootComponent).GetChildren(@AddChildComponent,FRoot);
|
TCTComponentAccess(RootComponent).GetChildren(@AddChildComponent,FRoot);
|
||||||
Result:=Childs;
|
Result:=Children;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -140,7 +140,7 @@ type
|
|||||||
property NextSibling: TEduOptionsNode read FNextSibling;
|
property NextSibling: TEduOptionsNode read FNextSibling;
|
||||||
property PrevSibling: TEduOptionsNode read FPrevSibling;
|
property PrevSibling: TEduOptionsNode read FPrevSibling;
|
||||||
property ChildCount: integer read GetChildCount;
|
property ChildCount: integer read GetChildCount;
|
||||||
property Childs[Index: integer]: TEduOptionsNode read GetChilds; default;
|
property Children[Index: integer]: TEduOptionsNode read GetChilds; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEduOptsRootNode }
|
{ TEduOptsRootNode }
|
||||||
@ -232,7 +232,7 @@ procedure TEduOptionsNode.Delete(Index: integer);
|
|||||||
var
|
var
|
||||||
Child: TEduOptionsNode;
|
Child: TEduOptionsNode;
|
||||||
begin
|
begin
|
||||||
Child:=Childs[Index];
|
Child:=Children[Index];
|
||||||
Remove(Index);
|
Remove(Index);
|
||||||
Child.Free;
|
Child.Free;
|
||||||
end;
|
end;
|
||||||
@ -241,7 +241,7 @@ procedure TEduOptionsNode.Remove(Index: integer);
|
|||||||
var
|
var
|
||||||
Child: TEduOptionsNode;
|
Child: TEduOptionsNode;
|
||||||
begin
|
begin
|
||||||
Child:=Childs[Index];
|
Child:=Children[Index];
|
||||||
fChilds.Delete(Index);
|
fChilds.Delete(Index);
|
||||||
Child.FParent:=nil;
|
Child.FParent:=nil;
|
||||||
Child.Unbind;
|
Child.Unbind;
|
||||||
@ -258,11 +258,11 @@ begin
|
|||||||
FChilds.Insert(Index,Node);
|
FChilds.Insert(Index,Node);
|
||||||
Node.FParent:=Self;
|
Node.FParent:=Self;
|
||||||
if Index>0 then begin
|
if Index>0 then begin
|
||||||
Node.FPrevSibling:=Childs[Index-1];
|
Node.FPrevSibling:=Children[Index-1];
|
||||||
Node.FPrevSibling.FNextSibling:=Node;
|
Node.FPrevSibling.FNextSibling:=Node;
|
||||||
end;
|
end;
|
||||||
if Index+1<ChildCount then begin
|
if Index+1<ChildCount then begin
|
||||||
Node.FNextSibling:=Childs[Index+1];
|
Node.FNextSibling:=Children[Index+1];
|
||||||
Node.FNextSibling.FPrevSibling:=Node;
|
Node.FNextSibling.FPrevSibling:=Node;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -286,7 +286,7 @@ var
|
|||||||
Child: TEduOptionsNode;
|
Child: TEduOptionsNode;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ChildCount-1 do 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;
|
if (Child.Name='') or (not IsValidIdent(Child.Name)) then continue;
|
||||||
Config.AppendBasePath(Child.Name);
|
Config.AppendBasePath(Child.Name);
|
||||||
try
|
try
|
||||||
@ -305,7 +305,7 @@ var
|
|||||||
Child: TEduOptionsNode;
|
Child: TEduOptionsNode;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ChildCount-1 do 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;
|
if (Child.Name='') or (not IsValidIdent(Child.Name)) then continue;
|
||||||
Config.AppendBasePath(Child.Name);
|
Config.AppendBasePath(Child.Name);
|
||||||
try
|
try
|
||||||
@ -328,7 +328,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ChildCount-1 do
|
for i:=0 to ChildCount-1 do
|
||||||
Childs[i].Apply(Enable);
|
Children[i].Apply(Enable);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEduOptions }
|
{ TEduOptions }
|
||||||
|
@ -50,36 +50,36 @@
|
|||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IgnoreBinaries Value="False"/>
|
<IgnoreBinaries Value="False"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<CustomOptions Childs="ExternHelp">
|
<CustomOptions Children="ExternHelp">
|
||||||
<_ExternHelp Childs="Count/Item1/Item2/Item3">
|
<_ExternHelp Children="Count/Item1/Item2/Item3">
|
||||||
<_Count Value="3"/>
|
<_Count Value="3"/>
|
||||||
<_Item1 Childs="Filename/Name/URL">
|
<_Item1 Children="Filename/Name/URL">
|
||||||
<_Filename Childs="Value">
|
<_Filename Children="Value">
|
||||||
<_Value Value="$(FPCSrcDir)/rtl/win32/windows.pp"/>
|
<_Value Value="$(FPCSrcDir)/rtl/win32/windows.pp"/>
|
||||||
</_Filename>
|
</_Filename>
|
||||||
<_Name Value="Windows"/>
|
<_Name Value="Windows"/>
|
||||||
<_URL Childs="Value">
|
<_URL Children="Value">
|
||||||
<_Value Value="http://social.msdn.microsoft.com/Search/en-us?query=$(Identifier)"/>
|
<_Value Value="http://social.msdn.microsoft.com/Search/en-us?query=$(Identifier)"/>
|
||||||
</_URL>
|
</_URL>
|
||||||
</_Item1>
|
</_Item1>
|
||||||
<_Item2 Childs="Filename/Name/URL">
|
<_Item2 Children="Filename/Name/URL">
|
||||||
<_Filename Childs="Value">
|
<_Filename Children="Value">
|
||||||
<_Value Value="$(FPCSrcDir)/packages/postgres/src/"/>
|
<_Value Value="$(FPCSrcDir)/packages/postgres/src/"/>
|
||||||
</_Filename>
|
</_Filename>
|
||||||
<_Name Value="PostgreSQL"/>
|
<_Name Value="PostgreSQL"/>
|
||||||
<_URL Childs="Value">
|
<_URL Children="Value">
|
||||||
<_Value Value="http://search.postgresql.org/search?q=$(Identifier)"/>
|
<_Value Value="http://search.postgresql.org/search?q=$(Identifier)"/>
|
||||||
</_URL>
|
</_URL>
|
||||||
</_Item2>
|
</_Item2>
|
||||||
<_Item3 Childs="Filename/Name/URL/WithSubDirectories">
|
<_Item3 Children="Filename/Name/URL/WithSubDirectories">
|
||||||
<_Filename Childs="Value">
|
<_Filename Children="Value">
|
||||||
<_Value Value="$(FPCSrcDir)/packages/gtk2/"/>
|
<_Value Value="$(FPCSrcDir)/packages/gtk2/"/>
|
||||||
</_Filename>
|
</_Filename>
|
||||||
<_Name Value="Gtk2"/>
|
<_Name Value="Gtk2"/>
|
||||||
<_URL Childs="Value">
|
<_URL Children="Value">
|
||||||
<_Value Value="http://www.google.com/custom?domains=library.gnome.org&sitesearch=library.gnome.org&q=$(Identifier)"/>
|
<_Value Value="http://www.google.com/custom?domains=library.gnome.org&sitesearch=library.gnome.org&q=$(Identifier)"/>
|
||||||
</_URL>
|
</_URL>
|
||||||
<_WithSubDirectories Childs="Value">
|
<_WithSubDirectories Children="Value">
|
||||||
<_Value Value="True"/>
|
<_Value Value="True"/>
|
||||||
</_WithSubDirectories>
|
</_WithSubDirectories>
|
||||||
</_Item3>
|
</_Item3>
|
||||||
|
@ -124,7 +124,7 @@ type
|
|||||||
property URL: string read FURL write SetURL;
|
property URL: string read FURL write SetURL;
|
||||||
property StoreIn: string read FStoreIn write SetStoreIn;
|
property StoreIn: string read FStoreIn write SetStoreIn;
|
||||||
property ChildCount: integer read GetChildCount;
|
property ChildCount: integer read GetChildCount;
|
||||||
property Childs[Index: integer]: TExternHelpItem read GetChilds;
|
property Children[Index: integer]: TExternHelpItem read GetChilds;
|
||||||
property ChangeStep: integer read FChangeStep;
|
property ChangeStep: integer read FChangeStep;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ begin
|
|||||||
Config.SetDeleteValue(Path+'URL/Value',Node.URL,'');
|
Config.SetDeleteValue(Path+'URL/Value',Node.URL,'');
|
||||||
Config.SetDeleteValue(Path+'ChildCount',Node.ChildCount,0);
|
Config.SetDeleteValue(Path+'ChildCount',Node.ChildCount,0);
|
||||||
for i:=1 to Node.ChildCount do
|
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;
|
end;
|
||||||
|
|
||||||
constructor TExternHelpOptions.Create;
|
constructor TExternHelpOptions.Create;
|
||||||
@ -371,7 +371,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if RootItem<>nil then begin
|
if RootItem<>nil then begin
|
||||||
for i:=RootItem.ChildCount-1 downto 0 do begin
|
for i:=RootItem.ChildCount-1 downto 0 do begin
|
||||||
Item:=RootItem.Childs[i];
|
Item:=RootItem.Children[i];
|
||||||
if (Item.StoreIn='') then
|
if (Item.StoreIn='') then
|
||||||
Item.Free;
|
Item.Free;
|
||||||
end;
|
end;
|
||||||
@ -386,7 +386,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if Parent<>nil then begin
|
if Parent<>nil then begin
|
||||||
for i:=Parent.ChildCount-1 downto 0 do begin
|
for i:=Parent.ChildCount-1 downto 0 do begin
|
||||||
Item:=Parent.Childs[i];
|
Item:=Parent.Children[i];
|
||||||
if (Item.StoreIn<>'')
|
if (Item.StoreIn<>'')
|
||||||
and (Name='*') or (SysUtils.CompareText(Item.StoreIn,Name)=0) then
|
and (Name='*') or (SysUtils.CompareText(Item.StoreIn,Name)=0) then
|
||||||
Item.Free;
|
Item.Free;
|
||||||
@ -444,10 +444,10 @@ begin
|
|||||||
Changed:=false;
|
Changed:=false;
|
||||||
Cnt:=0;
|
Cnt:=0;
|
||||||
for i:=0 to RootItem.ChildCount-1 do begin
|
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 SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue;
|
||||||
if (Cnt=TmpRoot.ChildCount)
|
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;
|
Changed:=true;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
@ -466,7 +466,7 @@ begin
|
|||||||
Path:=Path+'/';
|
Path:=Path+'/';
|
||||||
Cnt:=0;
|
Cnt:=0;
|
||||||
for i:=0 to RootItem.ChildCount-1 do begin
|
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]);
|
//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;
|
if SysUtils.CompareText(Item.StoreIn,Pkg.Name)<>0 then continue;
|
||||||
inc(Cnt);
|
inc(Cnt);
|
||||||
@ -525,7 +525,7 @@ begin
|
|||||||
Path:='ExternHelp/';
|
Path:='ExternHelp/';
|
||||||
Cnt:=0;
|
Cnt:=0;
|
||||||
for i:=1 to RootItem.ChildCount do begin
|
for i:=1 to RootItem.ChildCount do begin
|
||||||
Item:=RootItem.Childs[i-1];
|
Item:=RootItem.Children[i-1];
|
||||||
if Item.StoreIn<>'' then continue;
|
if Item.StoreIn<>'' then continue;
|
||||||
inc(Cnt);
|
inc(Cnt);
|
||||||
SaveNode(Config,Path+'Items/Item'+IntToStr(Cnt)+'/',Item);
|
SaveNode(Config,Path+'Items/Item'+IntToStr(Cnt)+'/',Item);
|
||||||
@ -627,7 +627,7 @@ procedure TExternHelpOptions.UpdateHelpDB;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
for i:=0 to Item.ChildCount-1 do
|
for i:=0 to Item.ChildCount-1 do
|
||||||
RegisterItem(Item.Childs[i]);
|
RegisterItem(Item.Children[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -976,7 +976,7 @@ procedure TExternHelpGeneralOptsFrame.FillItemsTreeView;
|
|||||||
TVNode: TTreeNode;
|
TVNode: TTreeNode;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ParentItem.ChildCount-1 do 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);
|
TVNode:=ItemsTreeView.Items.AddChildObject(ParentTVNode,Item.Name,Item);
|
||||||
Add(Item,TVNode);
|
Add(Item,TVNode);
|
||||||
TVNode.Expanded:=true;
|
TVNode.Expanded:=true;
|
||||||
@ -1267,7 +1267,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if (ChildCount=0) and (URL='') and (Filename='') and (StoreIn='') then exit;
|
if (ChildCount=0) and (URL='') and (Filename='') and (StoreIn='') then exit;
|
||||||
for i:=fChilds.Count-1 downto 0 do begin
|
for i:=fChilds.Count-1 downto 0 do begin
|
||||||
Child:=Childs[i];
|
Child:=Children[i];
|
||||||
Child.Parent:=nil;
|
Child.Parent:=nil;
|
||||||
Child.Free;
|
Child.Free;
|
||||||
end;
|
end;
|
||||||
@ -1295,14 +1295,14 @@ end;
|
|||||||
|
|
||||||
procedure TExternHelpItem.RemoveChild(Index: integer);
|
procedure TExternHelpItem.RemoveChild(Index: integer);
|
||||||
begin
|
begin
|
||||||
Childs[Index].Parent:=nil;
|
Children[Index].Parent:=nil;
|
||||||
fChilds.Delete(Index);
|
fChilds.Delete(Index);
|
||||||
IncreaseChangeStep;
|
IncreaseChangeStep;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TExternHelpItem.DeleteChild(Index: integer);
|
procedure TExternHelpItem.DeleteChild(Index: integer);
|
||||||
begin
|
begin
|
||||||
Childs[Index].Free;
|
Children[Index].Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TExternHelpItem.DeleteChild(Child: TExternHelpItem);
|
procedure TExternHelpItem.DeleteChild(Child: TExternHelpItem);
|
||||||
@ -1328,7 +1328,7 @@ begin
|
|||||||
and (ChildCount=Item.ChildCount);
|
and (ChildCount=Item.ChildCount);
|
||||||
if Result then begin
|
if Result then begin
|
||||||
for i:=0 to ChildCount-1 do
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1353,9 +1353,9 @@ begin
|
|||||||
AddChild(Item);
|
AddChild(Item);
|
||||||
IncreaseChangeStep;
|
IncreaseChangeStep;
|
||||||
end else begin
|
end else begin
|
||||||
Item:=Childs[i];
|
Item:=Children[i];
|
||||||
end;
|
end;
|
||||||
Item.Assign(Src.Childs[i],true);
|
Item.Assign(Src.Children[i],true);
|
||||||
end;
|
end;
|
||||||
while ChildCount>Src.ChildCount do begin
|
while ChildCount>Src.ChildCount do begin
|
||||||
DeleteChild(ChildCount-1);
|
DeleteChild(ChildCount-1);
|
||||||
|
@ -67,8 +67,8 @@
|
|||||||
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
|
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
|
||||||
<IgnoreBinaries Value="False"/>
|
<IgnoreBinaries Value="False"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<CustomOptions Childs="ExternHelp">
|
<CustomOptions Children="ExternHelp">
|
||||||
<_ExternHelp Childs="Count"/>
|
<_ExternHelp Children="Count"/>
|
||||||
</CustomOptions>
|
</CustomOptions>
|
||||||
</Package>
|
</Package>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -76,8 +76,8 @@
|
|||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IgnoreBinaries Value="False"/>
|
<IgnoreBinaries Value="False"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<CustomOptions Childs="ExternHelp">
|
<CustomOptions Children="ExternHelp">
|
||||||
<_ExternHelp Childs="Count"/>
|
<_ExternHelp Children="Count"/>
|
||||||
</CustomOptions>
|
</CustomOptions>
|
||||||
</Package>
|
</Package>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -301,7 +301,7 @@
|
|||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<!-- variable Visibility: default -->
|
<!-- variable Visibility: default -->
|
||||||
<element name="TOctreeQNode.Childs">
|
<element name="TOctreeQNode.Children">
|
||||||
<short/>
|
<short/>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
|
@ -16480,9 +16480,9 @@ the comparision is case sensitive.
|
|||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<!-- variable Visibility: default -->
|
<!-- variable Visibility: default -->
|
||||||
<element name="TTreeNodeExpandedState.Childs">
|
<element name="TTreeNodeExpandedState.Children">
|
||||||
<short>
|
<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/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
@ -1392,7 +1392,7 @@
|
|||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<!-- variable Visibility: public -->
|
<!-- variable Visibility: public -->
|
||||||
<element name="TArrayNode.Childs">
|
<element name="TArrayNode.Children">
|
||||||
<short/>
|
<short/>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
|
@ -572,9 +572,9 @@
|
|||||||
<short>
|
<short>
|
||||||
<var>ChildCount</var> - the number of child nodes</short>
|
<var>ChildCount</var> - the number of child nodes</short>
|
||||||
</element>
|
</element>
|
||||||
<element name="TLazDockConfigNode.Childs">
|
<element name="TLazDockConfigNode.Children">
|
||||||
<short>
|
<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>
|
||||||
<element name="TLazDockConfigNode.TheType">
|
<element name="TLazDockConfigNode.TheType">
|
||||||
<short>
|
<short>
|
||||||
|
@ -196,7 +196,7 @@ procedure TMyWidgetMediator.Paint;
|
|||||||
then begin
|
then begin
|
||||||
for i:=0 to AWidget.ChildCount-1 do begin
|
for i:=0 to AWidget.ChildCount-1 do begin
|
||||||
SaveHandleState;
|
SaveHandleState;
|
||||||
Child:=AWidget.Childs[i];
|
Child:=AWidget.Children[i];
|
||||||
// clip child area
|
// clip child area
|
||||||
MoveWindowOrgEx(Handle,Child.Left,Child.Top);
|
MoveWindowOrgEx(Handle,Child.Left,Child.Top);
|
||||||
if IntersectClipRect(Handle,0,0,Child.Width,Child.Height)<>NullRegion then
|
if IntersectClipRect(Handle,0,0,Child.Width,Child.Height)<>NullRegion then
|
||||||
|
@ -88,7 +88,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property Parent: TMyWidget read FParent write SetParent;
|
property Parent: TMyWidget read FParent write SetParent;
|
||||||
function ChildCount: integer;
|
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 SetBounds(NewLeft, NewTop, NewWidth, NewHeight: integer); virtual;
|
||||||
procedure InvalidateRect(ARect: TRect; Erase: boolean);
|
procedure InvalidateRect(ARect: TRect; Erase: boolean);
|
||||||
procedure Invalidate;
|
procedure Invalidate;
|
||||||
@ -250,8 +250,8 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ChildCount-1 do
|
for i:=0 to ChildCount-1 do
|
||||||
if Childs[i].Owner=Root then
|
if Children[i].Owner=Root then
|
||||||
Proc(Childs[i]);
|
Proc(Children[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TMyWidget.Create(AOwner: TComponent);
|
constructor TMyWidget.Create(AOwner: TComponent);
|
||||||
@ -268,7 +268,7 @@ end;
|
|||||||
destructor TMyWidget.Destroy;
|
destructor TMyWidget.Destroy;
|
||||||
begin
|
begin
|
||||||
Parent:=nil;
|
Parent:=nil;
|
||||||
while ChildCount>0 do Childs[ChildCount-1].Free;
|
while ChildCount>0 do Children[ChildCount-1].Free;
|
||||||
FreeAndNil(FChilds);
|
FreeAndNil(FChilds);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
@ -71,7 +71,7 @@ type
|
|||||||
property Path: string read FPath write SetPath;
|
property Path: string read FPath write SetPath;
|
||||||
property Parent: TIWHelpNode read FParent;
|
property Parent: TIWHelpNode read FParent;
|
||||||
property Count: integer read GetCount;
|
property Count: integer read GetCount;
|
||||||
property Childs[Index: integer]: TIWHelpNode read GetChilds; default;
|
property Children[Index: integer]: TIWHelpNode read GetChilds; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIWHelpTree }
|
{ TIWHelpTree }
|
||||||
@ -229,7 +229,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if FItems<>nil then begin
|
if FItems<>nil then begin
|
||||||
for i:=FItems.Count-1 downto 0 do begin
|
for i:=FItems.Count-1 downto 0 do begin
|
||||||
CurChild:=Childs[i];
|
CurChild:=Children[i];
|
||||||
CurChild.FParent:=nil;
|
CurChild.FParent:=nil;
|
||||||
CurChild.Free;
|
CurChild.Free;
|
||||||
end;
|
end;
|
||||||
@ -298,7 +298,7 @@ begin
|
|||||||
Config.SetDeleteValue(CfgPath+'IsRoot',IsRoot,false);
|
Config.SetDeleteValue(CfgPath+'IsRoot',IsRoot,false);
|
||||||
Config.SetDeleteValue(CfgPath+'ChildCount',Count,0);
|
Config.SetDeleteValue(CfgPath+'ChildCount',Count,0);
|
||||||
for i:=0 to Count-1 do
|
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;
|
end;
|
||||||
|
|
||||||
function TIWHelpNode.FindByName(const ChildName: string): TIWHelpNode;
|
function TIWHelpNode.FindByName(const ChildName: string): TIWHelpNode;
|
||||||
@ -306,7 +306,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to Count-1 do begin
|
for i := 0 to Count-1 do begin
|
||||||
Result:=Childs[i];
|
Result:=Children[i];
|
||||||
if CompareText(Result.Name,ChildName)=0 then exit;
|
if CompareText(Result.Name,ChildName)=0 then exit;
|
||||||
end;
|
end;
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
@ -318,7 +318,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i:=Count-1 downto 0 do begin
|
for i:=Count-1 downto 0 do begin
|
||||||
CurChild:=Childs[i];
|
CurChild:=Children[i];
|
||||||
CurChild.DeleteLeavesWithoutHelp;
|
CurChild.DeleteLeavesWithoutHelp;
|
||||||
if (CurChild.Count=0) and (not CurChild.HasHelp) then
|
if (CurChild.Count=0) and (not CurChild.HasHelp) then
|
||||||
CurChild.Free;
|
CurChild.Free;
|
||||||
|
@ -446,7 +446,7 @@ var
|
|||||||
ScrollOffset: TPoint;
|
ScrollOffset: TPoint;
|
||||||
ChildBounds: TRect;
|
ChildBounds: TRect;
|
||||||
Found: Boolean;
|
Found: Boolean;
|
||||||
Childs: TFPList;
|
Children: TFPList;
|
||||||
Offset: TPoint;
|
Offset: TPoint;
|
||||||
begin
|
begin
|
||||||
Result:=Root;
|
Result:=Root;
|
||||||
@ -455,14 +455,14 @@ begin
|
|||||||
Offset:=GetComponentOriginOnForm(Result);
|
Offset:=GetComponentOriginOnForm(Result);
|
||||||
//DebugLn(['TDesignerMediator.ComponentAtPos Parent=',DbgSName(Result),' Offset=',dbgs(Offset)]);
|
//DebugLn(['TDesignerMediator.ComponentAtPos Parent=',DbgSName(Result),' Offset=',dbgs(Offset)]);
|
||||||
OffsetRect(ClientArea,Offset.X,Offset.Y);
|
OffsetRect(ClientArea,Offset.X,Offset.Y);
|
||||||
Childs:=TFPList.Create;
|
Children:=TFPList.Create;
|
||||||
try
|
try
|
||||||
GetChilds(Result,Childs);
|
GetChilds(Result,Children);
|
||||||
//DebugLn(['TDesignerMediator.ComponentAtPos Result=',DbgSName(Result),' ChildCount=',children.Count,' ClientArea=',dbgs(ClientArea)]);
|
//DebugLn(['TDesignerMediator.ComponentAtPos Result=',DbgSName(Result),' ChildCount=',children.Count,' ClientArea=',dbgs(ClientArea)]);
|
||||||
Found:=false;
|
Found:=false;
|
||||||
// iterate backwards (z-order)
|
// iterate backwards (z-order)
|
||||||
for i:=Childs.Count-1 downto 0 do begin
|
for i:=Children.Count-1 downto 0 do begin
|
||||||
Child:=TComponent(Childs[i]);
|
Child:=TComponent(Children[i]);
|
||||||
//DebugLn(['TDesignerMediator.ComponentAtPos Child ',DbgSName(Child)]);
|
//DebugLn(['TDesignerMediator.ComponentAtPos Child ',DbgSName(Child)]);
|
||||||
if (MinClass<>nil) and (not Child.InheritsFrom(MinClass)) then
|
if (MinClass<>nil) and (not Child.InheritsFrom(MinClass)) then
|
||||||
continue;
|
continue;
|
||||||
@ -483,7 +483,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if not Found then exit;
|
if not Found then exit;
|
||||||
finally
|
finally
|
||||||
Childs.Free;
|
Children.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1115,7 +1115,7 @@ begin
|
|||||||
else
|
else
|
||||||
ContainerMenuIndex:=GetContainerIndex(false);
|
ContainerMenuIndex:=GetContainerIndex(false);
|
||||||
{$IFDEF VerboseMenuIntf}
|
{$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}
|
{$ENDIF}
|
||||||
|
|
||||||
// update TopSeparator
|
// update TopSeparator
|
||||||
|
@ -2832,7 +2832,7 @@ type
|
|||||||
|
|
||||||
TTreeNodeExpandedState = class
|
TTreeNodeExpandedState = class
|
||||||
NodeText: string;
|
NodeText: string;
|
||||||
Childs: TAvgLvlTree;
|
Children: TAvgLvlTree;
|
||||||
constructor Create(FirstTreeNode: TTreeNode);
|
constructor Create(FirstTreeNode: TTreeNode);
|
||||||
constructor Create(TreeView: TCustomTreeView);
|
constructor Create(TreeView: TCustomTreeView);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
@ -1514,7 +1514,7 @@ type
|
|||||||
|
|
||||||
cesScaleChilds, cssScaleChilds
|
cesScaleChilds, cssScaleChilds
|
||||||
Scale children, keep space between them fixed.
|
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
|
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
|
fill the space. You can set maximum Constraints. Then the other children
|
||||||
are scaled more.
|
are scaled more.
|
||||||
@ -1528,7 +1528,7 @@ type
|
|||||||
|
|
||||||
cesHomogenousChildGrowth, cssHomogenousChildDecrease
|
cesHomogenousChildGrowth, cssHomogenousChildDecrease
|
||||||
Enlarge children equally.
|
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
|
left in the client area of the parent, then the remaining space is
|
||||||
distributed equally to each child.
|
distributed equally to each child.
|
||||||
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and
|
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and
|
||||||
@ -1541,7 +1541,7 @@ type
|
|||||||
|
|
||||||
cesHomogenousSpaceGrowth
|
cesHomogenousSpaceGrowth
|
||||||
Enlarge space between children equally.
|
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
|
left in the client area of the parent, then the space between the children
|
||||||
is expanded.
|
is expanded.
|
||||||
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and
|
For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and
|
||||||
|
@ -195,9 +195,9 @@ end;
|
|||||||
|
|
||||||
procedure TTreeNodeExpandedState.Clear;
|
procedure TTreeNodeExpandedState.Clear;
|
||||||
begin
|
begin
|
||||||
if Childs<>nil then begin
|
if Children<>nil then begin
|
||||||
Childs.FreeAndClear;
|
Children.FreeAndClear;
|
||||||
FreeThenNil(Childs);
|
FreeThenNil(Children);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -214,9 +214,9 @@ begin
|
|||||||
ChildNode:=FirstTreeNode;
|
ChildNode:=FirstTreeNode;
|
||||||
while ChildNode<>nil do begin
|
while ChildNode<>nil do begin
|
||||||
if ChildNode.Expanded then 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);
|
NewExpandedNode:=TTreeNodeExpandedState.Create(ChildNode.GetFirstChild);
|
||||||
Childs.Add(NewExpandedNode);
|
Children.Add(NewExpandedNode);
|
||||||
end;
|
end;
|
||||||
ChildNode:=ChildNode.GetNextSibling;
|
ChildNode:=ChildNode.GetNextSibling;
|
||||||
end;
|
end;
|
||||||
@ -228,11 +228,11 @@ var
|
|||||||
ANode: TAvgLvlTreeNode;
|
ANode: TAvgLvlTreeNode;
|
||||||
ChildNodeText: String;
|
ChildNodeText: String;
|
||||||
begin
|
begin
|
||||||
if Childs=nil then exit;
|
if Children=nil then exit;
|
||||||
ChildNode:=FirstTreeNode;
|
ChildNode:=FirstTreeNode;
|
||||||
while ChildNode<>nil do begin
|
while ChildNode<>nil do begin
|
||||||
ChildNodeText:=ChildNode.Text;
|
ChildNodeText:=ChildNode.Text;
|
||||||
ANode:=Childs.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode);
|
ANode:=Children.FindKey(PChar(ChildNodeText),@CompareTextWithExpandedNode);
|
||||||
ChildNode.Expanded:=ANode<>nil;
|
ChildNode.Expanded:=ANode<>nil;
|
||||||
if ANode<>nil then
|
if ANode<>nil then
|
||||||
TTreeNodeExpandedState(ANode.Data).Apply(ChildNode.GetFirstChild);
|
TTreeNodeExpandedState(ANode.Data).Apply(ChildNode.GetFirstChild);
|
||||||
|
@ -70,8 +70,8 @@ type
|
|||||||
A TAutoSizeBox is a node in a tree.
|
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
|
A TAutoSizeBox can be a cell. Then it is a leaf in the tree and can have a
|
||||||
Control.
|
Control.
|
||||||
A TAutoSizeBox can be a row or column. Then it has only one Childs array.
|
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 Childs arrays.
|
A TAutoSizeBox can be a table. Then it has both Children arrays.
|
||||||
}
|
}
|
||||||
|
|
||||||
TAutoSizeBox = class
|
TAutoSizeBox = class
|
||||||
@ -86,7 +86,7 @@ type
|
|||||||
Parent: array[TAutoSizeBoxOrientation] of TAutoSizeBox;
|
Parent: array[TAutoSizeBoxOrientation] of TAutoSizeBox;
|
||||||
Index: array[TAutoSizeBoxOrientation] of Integer; // index in parent or grandparent
|
Index: array[TAutoSizeBoxOrientation] of Integer; // index in parent or grandparent
|
||||||
ChildCount: array[TAutoSizeBoxOrientation] of Integer;
|
ChildCount: array[TAutoSizeBoxOrientation] of Integer;
|
||||||
Childs: array[TAutoSizeBoxOrientation] of PAutoSizeBox;
|
Children: array[TAutoSizeBoxOrientation] of PAutoSizeBox;
|
||||||
NewControlBounds: TRect;
|
NewControlBounds: TRect;
|
||||||
|
|
||||||
// for nodes
|
// for nodes
|
||||||
@ -936,9 +936,9 @@ begin
|
|||||||
//Box.WriteDebugReport('TAutoSizeCtrlData.SetupNonAlignedChilds');
|
//Box.WriteDebugReport('TAutoSizeCtrlData.SetupNonAlignedChilds');
|
||||||
// transfer the coords of the layout
|
// transfer the coords of the layout
|
||||||
for y:=0 to Box.ChildCount[asboVertical]-1 do begin
|
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
|
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
|
||||||
ControlBox:=RowBox.Childs[asboHorizontal][x];
|
ControlBox:=RowBox.Children[asboHorizontal][x];
|
||||||
Child:=ControlBox.Control;
|
Child:=ControlBox.Control;
|
||||||
if Child=nil then continue;
|
if Child=nil then continue;
|
||||||
NewBounds:=ControlBox.NewControlBounds;
|
NewBounds:=ControlBox.NewControlBounds;
|
||||||
@ -1425,9 +1425,9 @@ var
|
|||||||
Size: Integer;
|
Size: Integer;
|
||||||
begin
|
begin
|
||||||
Size:=NewChildCount*SizeOf(Pointer);
|
Size:=NewChildCount*SizeOf(Pointer);
|
||||||
ReallocMem(Childs[Orientation],Size);
|
ReallocMem(Children[Orientation],Size);
|
||||||
if Size>0 then
|
if Size>0 then
|
||||||
FillChar(Childs[Orientation][0],Size,0);
|
FillChar(Children[Orientation][0],Size,0);
|
||||||
ChildCount[Orientation]:=NewChildCount;
|
ChildCount[Orientation]:=NewChildCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1457,7 +1457,7 @@ begin
|
|||||||
// create columns
|
// create columns
|
||||||
for x:=0 to ColCount-1 do begin
|
for x:=0 to ColCount-1 do begin
|
||||||
ColBox:=TAutoSizeBox.Create;
|
ColBox:=TAutoSizeBox.Create;
|
||||||
Childs[asboHorizontal][x]:=ColBox;
|
Children[asboHorizontal][x]:=ColBox;
|
||||||
ColBox.AllocateChildsArray(asboVertical,RowCount);
|
ColBox.AllocateChildsArray(asboVertical,RowCount);
|
||||||
ColBox.Parent[asboHorizontal]:=Self;
|
ColBox.Parent[asboHorizontal]:=Self;
|
||||||
ColBox.Index[asboHorizontal]:=x;
|
ColBox.Index[asboHorizontal]:=x;
|
||||||
@ -1466,7 +1466,7 @@ begin
|
|||||||
// create rows
|
// create rows
|
||||||
for y:=0 to RowCount-1 do begin
|
for y:=0 to RowCount-1 do begin
|
||||||
RowBox:=TAutoSizeBox.Create;
|
RowBox:=TAutoSizeBox.Create;
|
||||||
Childs[asboVertical][y]:=RowBox;
|
Children[asboVertical][y]:=RowBox;
|
||||||
RowBox.AllocateChildsArray(asboHorizontal,ColCount);
|
RowBox.AllocateChildsArray(asboHorizontal,ColCount);
|
||||||
RowBox.Parent[asboVertical]:=Self;
|
RowBox.Parent[asboVertical]:=Self;
|
||||||
RowBox.Index[asboHorizontal]:=-1;
|
RowBox.Index[asboHorizontal]:=-1;
|
||||||
@ -1474,12 +1474,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
// create cells
|
// create cells
|
||||||
for y:=0 to RowCount-1 do begin
|
for y:=0 to RowCount-1 do begin
|
||||||
RowBox:=Childs[asboVertical][y];
|
RowBox:=Children[asboVertical][y];
|
||||||
for x:=0 to ColCount-1 do begin
|
for x:=0 to ColCount-1 do begin
|
||||||
ColBox:=Childs[asboHorizontal][x];
|
ColBox:=Children[asboHorizontal][x];
|
||||||
CellBox:=TAutoSizeBox.Create;
|
CellBox:=TAutoSizeBox.Create;
|
||||||
RowBox.Childs[asboHorizontal][x]:=CellBox;
|
RowBox.Children[asboHorizontal][x]:=CellBox;
|
||||||
ColBox.Childs[asboVertical][y]:=CellBox;
|
ColBox.Children[asboVertical][y]:=CellBox;
|
||||||
CellBox.Parent[asboHorizontal]:=RowBox;
|
CellBox.Parent[asboHorizontal]:=RowBox;
|
||||||
CellBox.Parent[asboVertical]:=ColBox;
|
CellBox.Parent[asboVertical]:=ColBox;
|
||||||
CellBox.Index[asboHorizontal]:=x;
|
CellBox.Index[asboHorizontal]:=x;
|
||||||
@ -1528,7 +1528,7 @@ begin
|
|||||||
Col:=i mod LineMax;
|
Col:=i mod LineMax;
|
||||||
if (BiDiMode=bdRightToLeft) then
|
if (BiDiMode=bdRightToLeft) then
|
||||||
Col:=LineMax-Col-1;
|
Col:=LineMax-Col-1;
|
||||||
ChildBox:=Childs[asboHorizontal][Col].Childs[asboVertical][Row];
|
ChildBox:=Children[asboHorizontal][Col].Children[asboVertical][Row];
|
||||||
ChildBox.SetControl(ChildControl);
|
ChildBox.SetControl(ChildControl);
|
||||||
ChildBox.ApplyChildsizingBorders(ChildSizing);
|
ChildBox.ApplyChildsizingBorders(ChildSizing);
|
||||||
end;
|
end;
|
||||||
@ -1539,7 +1539,7 @@ begin
|
|||||||
Row:=i mod LineMax;
|
Row:=i mod LineMax;
|
||||||
if (BiDiMode=bdRightToLeft) then
|
if (BiDiMode=bdRightToLeft) then
|
||||||
Col:=LineMax-Col-1;
|
Col:=LineMax-Col-1;
|
||||||
ChildBox:=Childs[asboVertical][Row].Childs[asboHorizontal][Col];
|
ChildBox:=Children[asboVertical][Row].Children[asboHorizontal][Col];
|
||||||
ChildBox.SetControl(ChildControl);
|
ChildBox.SetControl(ChildControl);
|
||||||
ChildBox.ApplyChildsizingBorders(ChildSizing);
|
ChildBox.ApplyChildsizingBorders(ChildSizing);
|
||||||
end;
|
end;
|
||||||
@ -1593,7 +1593,7 @@ procedure TAutoSizeBox.InitSums;
|
|||||||
FirstChild: TAutoSizeBox;
|
FirstChild: TAutoSizeBox;
|
||||||
begin
|
begin
|
||||||
if ChildCount[o]>0 then begin
|
if ChildCount[o]>0 then begin
|
||||||
FirstChild:=Childs[o][0];
|
FirstChild:=Children[o][0];
|
||||||
MaximumSize[o]:=FirstChild.MaximumSize[o];
|
MaximumSize[o]:=FirstChild.MaximumSize[o];
|
||||||
MinimumSize[o]:=FirstChild.MinimumSize[o];
|
MinimumSize[o]:=FirstChild.MinimumSize[o];
|
||||||
PreferredSize[o]:=FirstChild.PreferredSize[o];
|
PreferredSize[o]:=FirstChild.PreferredSize[o];
|
||||||
@ -1632,12 +1632,12 @@ begin
|
|||||||
Orthogonal:=SizeBoxOrthogonal[Orientation];
|
Orthogonal:=SizeBoxOrthogonal[Orientation];
|
||||||
if ChildCount[Orientation]>0 then begin
|
if ChildCount[Orientation]>0 then begin
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
CurChild:=Childs[Orientation][i];
|
CurChild:=Children[Orientation][i];
|
||||||
|
|
||||||
// add border in Orientation
|
// add border in Orientation
|
||||||
CurBorder:=CurChild.BorderLeftTop[Orientation];
|
CurBorder:=CurChild.BorderLeftTop[Orientation];
|
||||||
if i>0 then
|
if i>0 then
|
||||||
CurBorder:=Max(Childs[Orientation][i-1].BorderRightBottom[Orientation],
|
CurBorder:=Max(Children[Orientation][i-1].BorderRightBottom[Orientation],
|
||||||
CurBorder);
|
CurBorder);
|
||||||
if MaximumSize[Orientation]>0 then begin
|
if MaximumSize[Orientation]>0 then begin
|
||||||
inc(MaximumSize[Orientation],CurBorder);
|
inc(MaximumSize[Orientation],CurBorder);
|
||||||
@ -1673,7 +1673,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// last border
|
// last border
|
||||||
LastChild:=Childs[Orientation][ChildCount[Orientation]-1];
|
LastChild:=Children[Orientation][ChildCount[Orientation]-1];
|
||||||
BorderRightBottom[Orientation]:=LastChild.BorderRightBottom[Orientation];
|
BorderRightBottom[Orientation]:=LastChild.BorderRightBottom[Orientation];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1687,12 +1687,12 @@ var
|
|||||||
begin
|
begin
|
||||||
// sum items in rows
|
// sum items in rows
|
||||||
for y:=0 to ChildCount[asboVertical]-1 do begin
|
for y:=0 to ChildCount[asboVertical]-1 do begin
|
||||||
RowBox:=Childs[asboVertical][y];
|
RowBox:=Children[asboVertical][y];
|
||||||
RowBox.SumLine(asboHorizontal,true);
|
RowBox.SumLine(asboHorizontal,true);
|
||||||
end;
|
end;
|
||||||
// sum items in columns
|
// sum items in columns
|
||||||
for x:=0 to ChildCount[asboHorizontal]-1 do begin
|
for x:=0 to ChildCount[asboHorizontal]-1 do begin
|
||||||
ColBox:=Childs[asboHorizontal][x];
|
ColBox:=Children[asboHorizontal][x];
|
||||||
ColBox.SumLine(asboVertical,true);
|
ColBox.SumLine(asboVertical,true);
|
||||||
end;
|
end;
|
||||||
// sum rows
|
// sum rows
|
||||||
@ -1709,7 +1709,7 @@ var
|
|||||||
begin
|
begin
|
||||||
CurLeftTop:=0;
|
CurLeftTop:=0;
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if i=0 then
|
if i=0 then
|
||||||
inc(CurLeftTop,Child.BorderLeftTop[Orientation]);
|
inc(CurLeftTop,Child.BorderLeftTop[Orientation]);
|
||||||
Child.LeftTop[Orientation]:=CurLeftTop;
|
Child.LeftTop[Orientation]:=CurLeftTop;
|
||||||
@ -1738,7 +1738,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if i=0 then
|
if i=0 then
|
||||||
inc(Result,Child.BorderLeftTop[Orientation]);
|
inc(Result,Child.BorderLeftTop[Orientation]);
|
||||||
if Child.PreferredSize[Orientation]<1 then
|
if Child.PreferredSize[Orientation]<1 then
|
||||||
@ -1769,7 +1769,7 @@ var
|
|||||||
crsScaleChilds,crsHomogenousChildResize:
|
crsScaleChilds,crsHomogenousChildResize:
|
||||||
|
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if (Child.MaximumSize[Orientation]>0)
|
if (Child.MaximumSize[Orientation]>0)
|
||||||
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
|
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
|
||||||
then begin
|
then begin
|
||||||
@ -1824,7 +1824,7 @@ var
|
|||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
if TargetSize=CurSize then break;
|
if TargetSize=CurSize then break;
|
||||||
|
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if (Child.MaximumSize[Orientation]<0)
|
if (Child.MaximumSize[Orientation]<0)
|
||||||
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
|
and (Child.PreferredSize[Orientation]>=Child.MaximumSize[Orientation])
|
||||||
then begin
|
then begin
|
||||||
@ -1899,7 +1899,7 @@ var
|
|||||||
|
|
||||||
crsScaleChilds,crsHomogenousChildResize:
|
crsScaleChilds,crsHomogenousChildResize:
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
|
if (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
|
||||||
or (Child.PreferredSize[Orientation]<=1)
|
or (Child.PreferredSize[Orientation]<=1)
|
||||||
then begin
|
then begin
|
||||||
@ -1939,7 +1939,7 @@ var
|
|||||||
|
|
||||||
crsHomogenousSpaceResize:
|
crsHomogenousSpaceResize:
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if i=0 then begin
|
if i=0 then begin
|
||||||
CurScale:=double(TargetSize);
|
CurScale:=double(TargetSize);
|
||||||
CurOffset:=Child.BorderLeftTop[Orientation];
|
CurOffset:=Child.BorderLeftTop[Orientation];
|
||||||
@ -1977,7 +1977,7 @@ var
|
|||||||
OldSize: LongInt;
|
OldSize: LongInt;
|
||||||
begin
|
begin
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if (Child.PreferredSize[Orientation]<=1)
|
if (Child.PreferredSize[Orientation]<=1)
|
||||||
or (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
|
or (Child.PreferredSize[Orientation]<=Child.MinimumSize[Orientation])
|
||||||
then begin
|
then begin
|
||||||
@ -2117,7 +2117,7 @@ procedure TAutoSizeBox.AlignToRight(TargetWidth: integer);
|
|||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
for i:=0 to ChildCount[Orientation]-1 do begin
|
for i:=0 to ChildCount[Orientation]-1 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
if i=0 then
|
if i=0 then
|
||||||
inc(Result,Child.BorderLeftTop[Orientation]);
|
inc(Result,Child.BorderLeftTop[Orientation]);
|
||||||
if Child.PreferredSize[Orientation]<1 then
|
if Child.PreferredSize[Orientation]<1 then
|
||||||
@ -2137,7 +2137,7 @@ begin
|
|||||||
dx:=TargetWidth-GetChildTotalSize(Orientation);
|
dx:=TargetWidth-GetChildTotalSize(Orientation);
|
||||||
|
|
||||||
for i:=ChildCount[Orientation]-1 downto 0 do begin
|
for i:=ChildCount[Orientation]-1 downto 0 do begin
|
||||||
Child:=Childs[Orientation][i];
|
Child:=Children[Orientation][i];
|
||||||
inc(Child.LeftTop[Orientation],dx);
|
inc(Child.LeftTop[Orientation],dx);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2158,9 +2158,9 @@ var
|
|||||||
begin
|
begin
|
||||||
//WriteDebugReport;
|
//WriteDebugReport;
|
||||||
for y:=0 to ChildCount[asboVertical]-1 do begin
|
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
|
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
|
||||||
ControlBox:=RowBox.Childs[asboHorizontal][x];
|
ControlBox:=RowBox.Children[asboHorizontal][x];
|
||||||
ColBox:=ControlBox.Parent[asboVertical];
|
ColBox:=ControlBox.Parent[asboVertical];
|
||||||
CurControl:=ControlBox.Control;
|
CurControl:=ControlBox.Control;
|
||||||
if CurControl=nil then continue;
|
if CurControl=nil then continue;
|
||||||
@ -2237,9 +2237,9 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
//WriteDebugReport;
|
//WriteDebugReport;
|
||||||
for y:=0 to ChildCount[asboVertical]-1 do begin
|
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
|
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
|
||||||
ControlBox:=RowBox.Childs[asboHorizontal][x];
|
ControlBox:=RowBox.Children[asboHorizontal][x];
|
||||||
CurControl:=ControlBox.Control;
|
CurControl:=ControlBox.Control;
|
||||||
if CurControl=nil then continue;
|
if CurControl=nil then continue;
|
||||||
NewBounds:=ControlBox.NewControlBounds;
|
NewBounds:=ControlBox.NewControlBounds;
|
||||||
@ -2286,7 +2286,7 @@ begin
|
|||||||
DebugLn('TAutoSizeBox.WriteDebugReport '+Title
|
DebugLn('TAutoSizeBox.WriteDebugReport '+Title
|
||||||
+' ChildCounts=',dbgs(ChildCount[asboHorizontal]),'x',dbgs(ChildCount[asboVertical]));
|
+' ChildCounts=',dbgs(ChildCount[asboHorizontal]),'x',dbgs(ChildCount[asboVertical]));
|
||||||
for y:=0 to ChildCount[asboVertical]-1 do begin
|
for y:=0 to ChildCount[asboVertical]-1 do begin
|
||||||
RowBox:=Childs[asboVertical][y];
|
RowBox:=Children[asboVertical][y];
|
||||||
DbgOut(' Row='+dbgs(y),
|
DbgOut(' Row='+dbgs(y),
|
||||||
' MinY='+dbgs(RowBox.MinimumSize[asboVertical]),
|
' MinY='+dbgs(RowBox.MinimumSize[asboVertical]),
|
||||||
' MaxY='+dbgs(RowBox.MaximumSize[asboVertical]),
|
' MaxY='+dbgs(RowBox.MaximumSize[asboVertical]),
|
||||||
@ -2294,7 +2294,7 @@ begin
|
|||||||
' BorderTop=',dbgs(RowBox.BorderLeftTop[asboVertical]),
|
' BorderTop=',dbgs(RowBox.BorderLeftTop[asboVertical]),
|
||||||
' #Col='+dbgs(RowBox.ChildCount[asboHorizontal]));
|
' #Col='+dbgs(RowBox.ChildCount[asboHorizontal]));
|
||||||
for x:=0 to RowBox.ChildCount[asboHorizontal]-1 do begin
|
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),
|
DbgOut(' CellControl=',DbgSName(CellBox.Control),
|
||||||
' Min='+dbgs(CellBox.MinimumSize[asboHorizontal])+'x'+dbgs(CellBox.MinimumSize[asboVertical]),
|
' Min='+dbgs(CellBox.MinimumSize[asboHorizontal])+'x'+dbgs(CellBox.MinimumSize[asboVertical]),
|
||||||
' Max='+dbgs(CellBox.MaximumSize[asboHorizontal])+'x'+dbgs(CellBox.MaximumSize[asboVertical]),
|
' Max='+dbgs(CellBox.MaximumSize[asboHorizontal])+'x'+dbgs(CellBox.MaximumSize[asboVertical]),
|
||||||
@ -2306,7 +2306,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
DbgOut(' Columns: ');
|
DbgOut(' Columns: ');
|
||||||
for x:=0 to ChildCount[asboHorizontal]-1 do begin
|
for x:=0 to ChildCount[asboHorizontal]-1 do begin
|
||||||
ColBox:=Childs[asboHorizontal][x];
|
ColBox:=Children[asboHorizontal][x];
|
||||||
DbgOut(' Col='+dbgs(ColBox.Index[asboHorizontal]),
|
DbgOut(' Col='+dbgs(ColBox.Index[asboHorizontal]),
|
||||||
' Min='+dbgs(ColBox.MinimumSize[asboHorizontal]),
|
' Min='+dbgs(ColBox.MinimumSize[asboHorizontal]),
|
||||||
' Max='+dbgs(ColBox.MaximumSize[asboHorizontal]),
|
' Max='+dbgs(ColBox.MaximumSize[asboHorizontal]),
|
||||||
@ -2323,7 +2323,7 @@ begin
|
|||||||
// unlink from parent
|
// unlink from parent
|
||||||
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
||||||
if Parent[o]<>nil then
|
if Parent[o]<>nil then
|
||||||
Parent[o].Childs[o][Index[o]]:=nil;
|
Parent[o].Children[o][Index[o]]:=nil;
|
||||||
Clear;
|
Clear;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
@ -2336,10 +2336,10 @@ begin
|
|||||||
// free all children
|
// free all children
|
||||||
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
||||||
for i:=0 to ChildCount[o]-1 do
|
for i:=0 to ChildCount[o]-1 do
|
||||||
Childs[o][i].Free;
|
Children[o][i].Free;
|
||||||
// free children arrays
|
// free children arrays
|
||||||
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
for o:=Low(TAutoSizeBoxOrientation) to high(TAutoSizeBoxOrientation) do
|
||||||
ReallocMem(Childs[o],0);
|
ReallocMem(Children[o],0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -938,7 +938,7 @@ begin
|
|||||||
if (fpgmsg.Sender is TfpgMenuBar) then begin
|
if (fpgmsg.Sender is TfpgMenuBar) then begin
|
||||||
//Invalidate clientRectCache to force LCL to recalibrate
|
//Invalidate clientRectCache to force LCL to recalibrate
|
||||||
//the available space in the form after a menubar visibility change.
|
//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);
|
FLCLObject.InvalidateClientRectCache(true);
|
||||||
end;
|
end;
|
||||||
Inherited;
|
Inherited;
|
||||||
|
@ -312,7 +312,7 @@ type
|
|||||||
public
|
public
|
||||||
Parent: TArrayNode;
|
Parent: TArrayNode;
|
||||||
Value: integer;
|
Value: integer;
|
||||||
Childs: PArrayNode;
|
Children: PArrayNode;
|
||||||
StartValue: integer;
|
StartValue: integer;
|
||||||
Capacity: integer;
|
Capacity: integer;
|
||||||
Data: Pointer;
|
Data: Pointer;
|
||||||
@ -4498,11 +4498,11 @@ procedure TArrayNode.DeleteChilds;
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if Childs<>nil then begin
|
if Children<>nil then begin
|
||||||
for i:=0 to Capacity-1 do
|
for i:=0 to Capacity-1 do
|
||||||
Childs[i].Free;
|
Children[i].Free;
|
||||||
FreeMem(Childs);
|
FreeMem(Children);
|
||||||
Childs:=nil;
|
Children:=nil;
|
||||||
Capacity:=0;
|
Capacity:=0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -4510,7 +4510,7 @@ end;
|
|||||||
procedure TArrayNode.UnbindFromParent;
|
procedure TArrayNode.UnbindFromParent;
|
||||||
begin
|
begin
|
||||||
if Parent<>nil then begin
|
if Parent<>nil then begin
|
||||||
Parent.Childs[Value-Parent.StartValue]:=nil;
|
Parent.Children[Value-Parent.StartValue]:=nil;
|
||||||
Parent:=nil;
|
Parent:=nil;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -4524,7 +4524,7 @@ begin
|
|||||||
NewNode.Value:=ChildValue;
|
NewNode.Value:=ChildValue;
|
||||||
NewNode.Parent:=Self;
|
NewNode.Parent:=Self;
|
||||||
Index:=ChildValue-StartValue;
|
Index:=ChildValue-StartValue;
|
||||||
Childs[Index]:=NewNode;
|
Children[Index]:=NewNode;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TArrayNode.GetChildNode(ChildValue: integer; CreateIfNotExists: boolean
|
function TArrayNode.GetChildNode(ChildValue: integer; CreateIfNotExists: boolean
|
||||||
@ -4540,10 +4540,10 @@ begin
|
|||||||
Expand(ChildValue);
|
Expand(ChildValue);
|
||||||
Index:=ChildValue-StartValue;
|
Index:=ChildValue-StartValue;
|
||||||
end;
|
end;
|
||||||
Result:=Childs[Index];
|
Result:=Children[Index];
|
||||||
if (Result=nil) and CreateIfNotExists then begin
|
if (Result=nil) and CreateIfNotExists then begin
|
||||||
CreateChildNode(ChildValue);
|
CreateChildNode(ChildValue);
|
||||||
Result:=Childs[Index];
|
Result:=Children[Index];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4558,7 +4558,7 @@ var
|
|||||||
OldSize: Integer;
|
OldSize: Integer;
|
||||||
begin
|
begin
|
||||||
//DebugLn('TArrayNode.Expand A ',ValueToInclude,' Capacity=',Capacity,' StartValue=',StartValue);
|
//DebugLn('TArrayNode.Expand A ',ValueToInclude,' Capacity=',Capacity,' StartValue=',StartValue);
|
||||||
if Childs=nil then begin
|
if Children=nil then begin
|
||||||
NewStartValue:=ValueToInclude;
|
NewStartValue:=ValueToInclude;
|
||||||
NewCapacity:=4;
|
NewCapacity:=4;
|
||||||
end else begin
|
end else begin
|
||||||
@ -4585,12 +4585,12 @@ begin
|
|||||||
NewSize:=SizeOf(Pointer)*NewCapacity;
|
NewSize:=SizeOf(Pointer)*NewCapacity;
|
||||||
GetMem(NewChilds,NewSize);
|
GetMem(NewChilds,NewSize);
|
||||||
FillChar(NewChilds^,NewSize,0);
|
FillChar(NewChilds^,NewSize,0);
|
||||||
if Childs<>nil then begin
|
if Children<>nil then begin
|
||||||
OldSize:=SizeOf(Pointer)*Capacity;
|
OldSize:=SizeOf(Pointer)*Capacity;
|
||||||
System.Move(Childs^,NewChilds[StartValue-NewStartValue],OldSize);
|
System.Move(Children^,NewChilds[StartValue-NewStartValue],OldSize);
|
||||||
FreeMem(Childs);
|
FreeMem(Children);
|
||||||
end;
|
end;
|
||||||
Childs:=NewChilds;
|
Children:=NewChilds;
|
||||||
StartValue:=NewStartValue;
|
StartValue:=NewStartValue;
|
||||||
Capacity:=NewCapacity;
|
Capacity:=NewCapacity;
|
||||||
end;
|
end;
|
||||||
@ -4603,8 +4603,8 @@ begin
|
|||||||
if Parent=nil then exit;
|
if Parent=nil then exit;
|
||||||
i:=Value-Parent.StartValue-1;
|
i:=Value-Parent.StartValue-1;
|
||||||
while (i>=0) do begin
|
while (i>=0) do begin
|
||||||
if Parent.Childs[i]<>nil then begin
|
if Parent.Children[i]<>nil then begin
|
||||||
Result:=Parent.Childs[i];
|
Result:=Parent.Children[i];
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
dec(i);
|
dec(i);
|
||||||
@ -4619,8 +4619,8 @@ begin
|
|||||||
if Parent=nil then exit;
|
if Parent=nil then exit;
|
||||||
i:=Value-Parent.StartValue+1;
|
i:=Value-Parent.StartValue+1;
|
||||||
while (i<Parent.Capacity) do begin
|
while (i<Parent.Capacity) do begin
|
||||||
if Parent.Childs[i]<>nil then begin
|
if Parent.Children[i]<>nil then begin
|
||||||
Result:=Parent.Childs[i];
|
Result:=Parent.Children[i];
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
@ -4659,8 +4659,8 @@ begin
|
|||||||
if Capacity=0 then exit;
|
if Capacity=0 then exit;
|
||||||
i:=0;
|
i:=0;
|
||||||
while i<Capacity do begin
|
while i<Capacity do begin
|
||||||
if Childs[i]<>nil then begin
|
if Children[i]<>nil then begin
|
||||||
Result:=Childs[i];
|
Result:=Children[i];
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
@ -4675,8 +4675,8 @@ begin
|
|||||||
if Capacity=0 then exit;
|
if Capacity=0 then exit;
|
||||||
i:=Capacity-1;
|
i:=Capacity-1;
|
||||||
while i>=0 do begin
|
while i>=0 do begin
|
||||||
if Childs[i]<>nil then begin
|
if Children[i]<>nil then begin
|
||||||
Result:=Childs[i];
|
Result:=Children[i];
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
dec(i);
|
dec(i);
|
||||||
@ -4721,10 +4721,10 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
ChildNode: TArrayNode;
|
ChildNode: TArrayNode;
|
||||||
begin
|
begin
|
||||||
if Childs<>nil then begin
|
if Children<>nil then begin
|
||||||
if Capacity<=0 then R('Capacity too small');
|
if Capacity<=0 then R('Capacity too small');
|
||||||
for i:=0 to Capacity-1 do begin
|
for i:=0 to Capacity-1 do begin
|
||||||
ChildNode:=Childs[i];
|
ChildNode:=Children[i];
|
||||||
if ChildNode<>nil then begin
|
if ChildNode<>nil then begin
|
||||||
if ChildNode.Value<>i+StartValue then
|
if ChildNode.Value<>i+StartValue then
|
||||||
R('Value wrong');
|
R('Value wrong');
|
||||||
|
@ -86,7 +86,7 @@ type
|
|||||||
Name: string;
|
Name: string;
|
||||||
Value: string;
|
Value: string;
|
||||||
Parent: TConfigMemStorageNode;
|
Parent: TConfigMemStorageNode;
|
||||||
Childs: TAvgLvlTree; // tree of TConfigMemStorageNode
|
Children: TAvgLvlTree; // tree of TConfigMemStorageNode
|
||||||
procedure ClearChilds;
|
procedure ClearChilds;
|
||||||
constructor Create(AParent: TConfigMemStorageNode; const AName: string);
|
constructor Create(AParent: TConfigMemStorageNode; const AName: string);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -415,7 +415,7 @@ end;
|
|||||||
|
|
||||||
procedure TConfigMemStorage.CreateChilds(Node: TConfigMemStorageNode);
|
procedure TConfigMemStorage.CreateChilds(Node: TConfigMemStorageNode);
|
||||||
begin
|
begin
|
||||||
Node.Childs:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes);
|
Node.Children:=TAvgLvlTree.Create(@CompareConfigMemStorageNodes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TConfigMemStorage.Modify(const APath: string;
|
procedure TConfigMemStorage.Modify(const APath: string;
|
||||||
@ -448,11 +448,11 @@ begin
|
|||||||
while (not (p^ in ['/',#0])) do inc(p);
|
while (not (p^ in ['/',#0])) do inc(p);
|
||||||
//DebugLn(['TConfigMemStorage.Modify Node="',Node.Name,'" StartPos="',StartPos,'"']);
|
//DebugLn(['TConfigMemStorage.Modify Node="',Node.Name,'" StartPos="',StartPos,'"']);
|
||||||
// child node
|
// child node
|
||||||
if Node.Childs=nil then begin
|
if Node.Children=nil then begin
|
||||||
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
|
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
|
||||||
CreateChilds(Node);
|
CreateChilds(Node);
|
||||||
end;
|
end;
|
||||||
ChildNode:=Node.Childs.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode);
|
ChildNode:=Node.Children.FindKey(StartPos,@ComparePCharWithConfigMemStorageNode);
|
||||||
if ChildNode=nil then begin
|
if ChildNode=nil then begin
|
||||||
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
|
if Mode in [cmsmDelete,cmsmDeleteValue] then exit;
|
||||||
NewName:='';
|
NewName:='';
|
||||||
@ -461,7 +461,7 @@ begin
|
|||||||
System.Move(StartPos^,NewName[1],p-StartPos);
|
System.Move(StartPos^,NewName[1],p-StartPos);
|
||||||
//DebugLn(['TConfigMemStorage.Modify Adding "',NewName,'"']);
|
//DebugLn(['TConfigMemStorage.Modify Adding "',NewName,'"']);
|
||||||
Child:=TConfigMemStorageNode.Create(Node,NewName);
|
Child:=TConfigMemStorageNode.Create(Node,NewName);
|
||||||
Node.Childs.Add(Child);
|
Node.Children.Add(Child);
|
||||||
end else
|
end else
|
||||||
Child:=TConfigMemStorageNode(ChildNode.Data);
|
Child:=TConfigMemStorageNode(ChildNode.Data);
|
||||||
Node:=Child;
|
Node:=Child;
|
||||||
@ -478,7 +478,7 @@ begin
|
|||||||
Node.Value:='';
|
Node.Value:='';
|
||||||
if Mode=cmsmDelete then
|
if Mode=cmsmDelete then
|
||||||
Node.ClearChilds;
|
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
|
do begin
|
||||||
Child:=Node;
|
Child:=Node;
|
||||||
Node:=Node.Parent;
|
Node:=Node.Parent;
|
||||||
@ -627,17 +627,17 @@ procedure TConfigMemStorage.SaveToConfig(Config: TConfigStorage;
|
|||||||
SubPath:=SubPath+'_'+Node.Name+'/';
|
SubPath:=SubPath+'_'+Node.Name+'/';
|
||||||
Config.SetDeleteValue(SubPath+'Value',Node.Value,'');
|
Config.SetDeleteValue(SubPath+'Value',Node.Value,'');
|
||||||
Names:='';
|
Names:='';
|
||||||
if Node.Childs<>nil then begin
|
if Node.Children<>nil then begin
|
||||||
ChildNode:=Node.Childs.FindLowest;
|
ChildNode:=Node.Children.FindLowest;
|
||||||
while ChildNode<>nil do begin
|
while ChildNode<>nil do begin
|
||||||
Child:=TConfigMemStorageNode(ChildNode.Data);
|
Child:=TConfigMemStorageNode(ChildNode.Data);
|
||||||
if Names<>'' then Names:=Names+'/';
|
if Names<>'' then Names:=Names+'/';
|
||||||
Names:=Names+Child.Name;
|
Names:=Names+Child.Name;
|
||||||
Save(Child,SubPath);
|
Save(Child,SubPath);
|
||||||
ChildNode:=Node.Childs.FindSuccessor(ChildNode);
|
ChildNode:=Node.Children.FindSuccessor(ChildNode);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Config.SetDeleteValue(SubPath+'Childs',Names,'');
|
Config.SetDeleteValue(SubPath+'Children',Names,'');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -659,7 +659,7 @@ procedure TConfigMemStorage.LoadFromConfig(Config: TConfigStorage;
|
|||||||
if (Node<>Root) then
|
if (Node<>Root) then
|
||||||
SubPath:=SubPath+'_'+Node.Name+'/';
|
SubPath:=SubPath+'_'+Node.Name+'/';
|
||||||
Node.Value:=Config.GetValue(SubPath+'Value','');
|
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,'"']);
|
//DebugLn(['Load SubPath="',SubPath,'" Value="',Node.Value,'" ChildNames="',ChildNames,'"']);
|
||||||
if ChildNames<>'' then begin
|
if ChildNames<>'' then begin
|
||||||
p:=PChar(ChildNames);
|
p:=PChar(ChildNames);
|
||||||
@ -671,9 +671,9 @@ procedure TConfigMemStorage.LoadFromConfig(Config: TConfigStorage;
|
|||||||
if ChildName<>'' then
|
if ChildName<>'' then
|
||||||
System.Move(StartPos^,ChildName[1],p-StartPos);
|
System.Move(StartPos^,ChildName[1],p-StartPos);
|
||||||
Child:=TConfigMemStorageNode.Create(Node,ChildName);
|
Child:=TConfigMemStorageNode.Create(Node,ChildName);
|
||||||
if Node.Childs=nil then
|
if Node.Children=nil then
|
||||||
CreateChilds(Node);
|
CreateChilds(Node);
|
||||||
Node.Childs.Add(Child);
|
Node.Children.Add(Child);
|
||||||
Load(Child,SubPath);
|
Load(Child,SubPath);
|
||||||
if p^=#0 then break;
|
if p^=#0 then break;
|
||||||
inc(p);
|
inc(p);
|
||||||
@ -697,11 +697,11 @@ procedure TConfigMemStorage.WriteDebugReport;
|
|||||||
begin
|
begin
|
||||||
if Node=nil then exit;
|
if Node=nil then exit;
|
||||||
DebugLn(['TConfigMemStorage.WriteDebugReport ',Prefix,'Name="',Node.Name,'" Value="',Node.Value,'"']);
|
DebugLn(['TConfigMemStorage.WriteDebugReport ',Prefix,'Name="',Node.Name,'" Value="',Node.Value,'"']);
|
||||||
if Node.Childs<>nil then begin
|
if Node.Children<>nil then begin
|
||||||
AVLNode:=Node.Childs.FindLowest;
|
AVLNode:=Node.Children.FindLowest;
|
||||||
while AVLNode<>nil do begin
|
while AVLNode<>nil do begin
|
||||||
w(TConfigMemStorageNode(AVLNode.Data),Prefix+' ');
|
w(TConfigMemStorageNode(AVLNode.Data),Prefix+' ');
|
||||||
AVLNode:=Node.Childs.FindSuccessor(AVLNode);
|
AVLNode:=Node.Children.FindSuccessor(AVLNode);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -717,9 +717,9 @@ procedure TConfigMemStorageNode.ClearChilds;
|
|||||||
var
|
var
|
||||||
OldChilds: TAvgLvlTree;
|
OldChilds: TAvgLvlTree;
|
||||||
begin
|
begin
|
||||||
if Childs<>nil then begin
|
if Children<>nil then begin
|
||||||
OldChilds:=Childs;
|
OldChilds:=Children;
|
||||||
Childs:=nil;
|
Children:=nil;
|
||||||
OldChilds.FreeAndClear;
|
OldChilds.FreeAndClear;
|
||||||
OldChilds.Free;
|
OldChilds.Free;
|
||||||
end;
|
end;
|
||||||
@ -735,8 +735,8 @@ end;
|
|||||||
destructor TConfigMemStorageNode.Destroy;
|
destructor TConfigMemStorageNode.Destroy;
|
||||||
begin
|
begin
|
||||||
ClearChilds;
|
ClearChilds;
|
||||||
if (Parent<>nil) and (Parent.Childs<>nil) then
|
if (Parent<>nil) and (Parent.Children<>nil) then
|
||||||
Parent.Childs.Remove(Self);
|
Parent.Children.Remove(Self);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ type
|
|||||||
property Parent: TLazDockConfigNode read FParent write SetParent;
|
property Parent: TLazDockConfigNode read FParent write SetParent;
|
||||||
property Sides[Side: TAnchorKind]: string read GetSides write SetSides;
|
property Sides[Side: TAnchorKind]: string read GetSides write SetSides;
|
||||||
property ChildCount: Integer read GetChildCount;
|
property ChildCount: Integer read GetChildCount;
|
||||||
property Childs[Index: integer]: TLazDockConfigNode read GetChilds; default;
|
property Children[Index: integer]: TLazDockConfigNode read GetChilds; default;
|
||||||
published
|
published
|
||||||
property TheType: TLDConfigNodeType read FTheType write SetTheType
|
property TheType: TLDConfigNodeType read FTheType write SetTheType
|
||||||
default ldcntControl;
|
default ldcntControl;
|
||||||
@ -1085,9 +1085,9 @@ begin
|
|||||||
PagesNode:=PageNode.Parent;
|
PagesNode:=PageNode.Parent;
|
||||||
PageNodeIndex:=PagesNode.IndexOf(PageNode.Name);
|
PageNodeIndex:=PagesNode.IndexOf(PageNode.Name);
|
||||||
if PageNodeIndex>0 then
|
if PageNodeIndex>0 then
|
||||||
NeighbourNode:=PagesNode.Childs[PageNodeIndex-1].Childs[0]
|
NeighbourNode:=PagesNode.Children[PageNodeIndex-1].Children[0]
|
||||||
else
|
else
|
||||||
NeighbourNode:=PagesNode.Childs[PageNodeIndex+1].Childs[0];
|
NeighbourNode:=PagesNode.Children[PageNodeIndex+1].Children[0];
|
||||||
NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name);
|
NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name);
|
||||||
if NeighbourControl=nil then begin
|
if NeighbourControl=nil then begin
|
||||||
DebugLn(['TCustomLazControlDocker.DockAsPage NeighbourControl not found "',NeighbourNode.Name,'"']);
|
DebugLn(['TCustomLazControlDocker.DockAsPage NeighbourControl not found "',NeighbourNode.Name,'"']);
|
||||||
@ -1853,7 +1853,7 @@ function TCustomLazControlDocker.GetLayoutFromControl: TLazDockConfigNode;
|
|||||||
if AControl is TCustomForm then
|
if AControl is TCustomForm then
|
||||||
Result.WindowState:=TCustomForm(AControl).WindowState;
|
Result.WindowState:=TCustomForm(AControl).WindowState;
|
||||||
|
|
||||||
// Childs
|
// Children
|
||||||
if (AControl is TWinControl) then begin
|
if (AControl is TWinControl) then begin
|
||||||
// check if children need nodes
|
// check if children need nodes
|
||||||
NeedChildNodes:=(AControl is TLazDockPages)
|
NeedChildNodes:=(AControl is TLazDockPages)
|
||||||
@ -2609,7 +2609,7 @@ var
|
|||||||
// anchored to the other side of DeletingNode
|
// anchored to the other side of DeletingNode
|
||||||
OppositeSide:=OppositeAnchor[Side];
|
OppositeSide:=OppositeAnchor[Side];
|
||||||
for i:=0 to DeletingNode.Parent.ChildCount-1 do begin
|
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
|
if CompareText(Sibling.Sides[OppositeSide],SplitterNode.Name)=0 then
|
||||||
Sibling.Sides[OppositeSide]:=DeletingNode.Sides[OppositeSide];
|
Sibling.Sides[OppositeSide]:=DeletingNode.Sides[OppositeSide];
|
||||||
end;
|
end;
|
||||||
@ -2650,7 +2650,7 @@ var
|
|||||||
|
|
||||||
// 2. anchor all siblings using LeftSplitter to now use RightSplitter
|
// 2. anchor all siblings using LeftSplitter to now use RightSplitter
|
||||||
for i:=0 to DeletingNode.Parent.ChildCount-1 do begin
|
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 Sibling=DeletingNode then continue;
|
||||||
if CompareText(Sibling.Sides[akLeft],LeftSplitter.Name)=0 then
|
if CompareText(Sibling.Sides[akLeft],LeftSplitter.Name)=0 then
|
||||||
Sibling.Sides[akLeft]:=RightSplitter.Name;
|
Sibling.Sides[akLeft]:=RightSplitter.Name;
|
||||||
@ -2713,12 +2713,12 @@ var
|
|||||||
if ParentNode=nil then RaiseGDBException('');
|
if ParentNode=nil then RaiseGDBException('');
|
||||||
if (PagesNode.TheType<>ldcntPages) then RaiseGDBException('');
|
if (PagesNode.TheType<>ldcntPages) then RaiseGDBException('');
|
||||||
if PagesNode.ChildCount<>1 then RaiseGDBException('');
|
if PagesNode.ChildCount<>1 then RaiseGDBException('');
|
||||||
PageNode:=PagesNode.Childs[0];
|
PageNode:=PagesNode.Children[0];
|
||||||
PagesBounds:=PagesNode.Bounds;
|
PagesBounds:=PagesNode.Bounds;
|
||||||
OffsetX:=PagesBounds.Left;
|
OffsetX:=PagesBounds.Left;
|
||||||
OffsetY:=PagesBounds.Top;
|
OffsetY:=PagesBounds.Top;
|
||||||
for i:=0 to PageNode.ChildCount-1 do begin
|
for i:=0 to PageNode.ChildCount-1 do begin
|
||||||
Child:=PageNode.Childs[i];
|
Child:=PageNode.Children[i];
|
||||||
// changes parent of child
|
// changes parent of child
|
||||||
Child.Parent:=ParentNode;
|
Child.Parent:=ParentNode;
|
||||||
// move children to place where PagesNode was
|
// move children to place where PagesNode was
|
||||||
@ -2754,7 +2754,7 @@ var
|
|||||||
FormBounds:=FormNode.Bounds;
|
FormBounds:=FormNode.Bounds;
|
||||||
OffsetX:=FormBounds.Left;
|
OffsetX:=FormBounds.Left;
|
||||||
OffsetY:=FormBounds.Top;
|
OffsetY:=FormBounds.Top;
|
||||||
Child:=FormNode.Childs[0];
|
Child:=FormNode.Children[0];
|
||||||
// changes parent of child
|
// changes parent of child
|
||||||
Child.Parent:=FormNode.Parent;
|
Child.Parent:=FormNode.Parent;
|
||||||
Child.WindowState:=FormNode.WindowState;
|
Child.WindowState:=FormNode.WindowState;
|
||||||
@ -2789,7 +2789,7 @@ var
|
|||||||
// remove unneeded children
|
// remove unneeded children
|
||||||
i:=Node.ChildCount-1;
|
i:=Node.ChildCount-1;
|
||||||
while i>=0 do begin
|
while i>=0 do begin
|
||||||
Child:=Node.Childs[i];
|
Child:=Node.Children[i];
|
||||||
RemoveEmptyNodes(Child);// beware: this can delete more than one child
|
RemoveEmptyNodes(Child);// beware: this can delete more than one child
|
||||||
dec(i);
|
dec(i);
|
||||||
if i>=Node.ChildCount then i:=Node.ChildCount-1;
|
if i>=Node.ChildCount then i:=Node.ChildCount-1;
|
||||||
@ -2873,7 +2873,7 @@ var
|
|||||||
end;
|
end;
|
||||||
// check children
|
// check children
|
||||||
for i:=0 to Node.ChildCount-1 do
|
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;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2920,7 +2920,7 @@ var
|
|||||||
begin
|
begin
|
||||||
ParentNode:=Node.Parent;
|
ParentNode:=Node.Parent;
|
||||||
for i:=0 to ParentNode.ChildCount-1 do begin
|
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 CompareText(Result.Name,DockerName)=0 then continue;
|
||||||
if Result.TheType=ldcntControl then
|
if Result.TheType=ldcntControl then
|
||||||
exit;
|
exit;
|
||||||
@ -2949,13 +2949,13 @@ var
|
|||||||
PageIndex:=PagesNode.IndexOf(PageNode.Name);
|
PageIndex:=PagesNode.IndexOf(PageNode.Name);
|
||||||
if (PageIndex>0)
|
if (PageIndex>0)
|
||||||
and (PagesNode[PageIndex-1].ChildCount=1) then begin
|
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;
|
if Result.TheType=ldcntControl then exit;
|
||||||
end;
|
end;
|
||||||
// check if right page has only one control
|
// check if right page has only one control
|
||||||
if (PageIndex<PagesNode.ChildCount-1)
|
if (PageIndex<PagesNode.ChildCount-1)
|
||||||
and (PagesNode[PageIndex+1].ChildCount=1) then begin
|
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;
|
if Result.TheType=ldcntControl then exit;
|
||||||
end;
|
end;
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
@ -2971,7 +2971,7 @@ var
|
|||||||
and (CompareText(Node.Name,DockerName)<>0) then
|
and (CompareText(Node.Name,DockerName)<>0) then
|
||||||
exit(Node);
|
exit(Node);
|
||||||
for i:=0 to Node.ChildCount-1 do begin
|
for i:=0 to Node.ChildCount-1 do begin
|
||||||
Result:=FindOtherNodeWithControl(Node.Childs[i]);
|
Result:=FindOtherNodeWithControl(Node.Children[i]);
|
||||||
if Result<>nil then exit;
|
if Result<>nil then exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -3166,7 +3166,7 @@ function TCustomLazDockingManager.ConfigIsCompatible(
|
|||||||
if Node.Sides[Side1]='' then exit;
|
if Node.Sides[Side1]='' then exit;
|
||||||
if Node.Sides[Side2]='' then exit;
|
if Node.Sides[Side2]='' then exit;
|
||||||
for i:=0 to Node.Parent.ChildCount-1 do begin
|
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 Child=Node then continue;
|
||||||
if (CompareText(Node.Sides[Side1],Child.Sides[Side1])=0)
|
if (CompareText(Node.Sides[Side1],Child.Sides[Side1])=0)
|
||||||
and (CompareText(Node.Sides[Side2],Child.Sides[Side2])=0) then begin
|
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 CheckHasParent then exit;
|
||||||
if not CheckHasChilds then exit;
|
if not CheckHasChilds then exit;
|
||||||
for i:=0 to Node.ChildCount-1 do
|
for i:=0 to Node.ChildCount-1 do
|
||||||
if Node.Childs[i].TheType<>ldcntPage then begin
|
if Node.Children[i].TheType<>ldcntPage then begin
|
||||||
Error('Childs[i].TheType<>ldcntPage');
|
Error('Children[i].TheType<>ldcntPage');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if not CheckAllSidesAnchored then exit;
|
if not CheckAllSidesAnchored then exit;
|
||||||
@ -3269,7 +3269,7 @@ function TCustomLazDockingManager.ConfigIsCompatible(
|
|||||||
|
|
||||||
// check children
|
// check children
|
||||||
for i:=0 to Node.ChildCount-1 do
|
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;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
@ -3380,7 +3380,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if FChilds=nil then exit;
|
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;
|
FChilds.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3403,7 +3403,7 @@ begin
|
|||||||
FSides[a]:=Src.FSides[a];
|
FSides[a]:=Src.FSides[a];
|
||||||
FTheType:=Src.FTheType;
|
FTheType:=Src.FTheType;
|
||||||
for i:=0 to Src.ChildCount-1 do begin
|
for i:=0 to Src.ChildCount-1 do begin
|
||||||
SrcChild:=Src.Childs[i];
|
SrcChild:=Src.Children[i];
|
||||||
NewChild:=TLazDockConfigNode.Create(Self);
|
NewChild:=TLazDockConfigNode.Create(Self);
|
||||||
NewChild.Assign(SrcChild);
|
NewChild.Assign(SrcChild);
|
||||||
end;
|
end;
|
||||||
@ -3419,7 +3419,7 @@ begin
|
|||||||
if WithRoot and (CompareText(Name,AName)=0) then exit(Self);
|
if WithRoot and (CompareText(Name,AName)=0) then exit(Self);
|
||||||
if FChilds<>nil then
|
if FChilds<>nil then
|
||||||
for i:=0 to FChilds.Count-1 do begin
|
for i:=0 to FChilds.Count-1 do begin
|
||||||
Result:=Childs[i];
|
Result:=Children[i];
|
||||||
if CompareText(Result.Name,AName)=0 then exit;
|
if CompareText(Result.Name,AName)=0 then exit;
|
||||||
if Recursive then begin
|
if Recursive then begin
|
||||||
Result:=Result.FindByName(AName,true,false);
|
Result:=Result.FindByName(AName,true,false);
|
||||||
@ -3433,7 +3433,7 @@ function TLazDockConfigNode.IndexOf(const AName: string): Integer;
|
|||||||
begin
|
begin
|
||||||
if FChilds<>nil then begin
|
if FChilds<>nil then begin
|
||||||
Result:=FChilds.Count-1;
|
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);
|
dec(Result);
|
||||||
end else begin
|
end else begin
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
@ -3471,7 +3471,7 @@ begin
|
|||||||
Result:=nil;
|
Result:=nil;
|
||||||
ParentNode:=Parent;
|
ParentNode:=Parent;
|
||||||
for i:=0 to ParentNode.ChildCount-1 do begin
|
for i:=0 to ParentNode.ChildCount-1 do begin
|
||||||
Child:=ParentNode.Childs[i];
|
Child:=ParentNode.Children[i];
|
||||||
if Child=Self then continue;
|
if Child=Self then continue;
|
||||||
if IgnoreSplitters
|
if IgnoreSplitters
|
||||||
and (Child.TheType in [ldcntSplitterLeftRight,ldcntSplitterUpDown]) then
|
and (Child.TheType in [ldcntSplitterLeftRight,ldcntSplitterUpDown]) then
|
||||||
@ -3520,9 +3520,9 @@ begin
|
|||||||
Config.SetDeleteValue(Path+'Sides/'+AnchorNames[a]+'/Name',Sides[a],'');
|
Config.SetDeleteValue(Path+'Sides/'+AnchorNames[a]+'/Name',Sides[a],'');
|
||||||
|
|
||||||
// children
|
// children
|
||||||
Config.SetDeleteValue(Path+'Childs/Count',ChildCount,0);
|
Config.SetDeleteValue(Path+'Children/Count',ChildCount,0);
|
||||||
for i:=0 to ChildCount-1 do begin
|
for i:=0 to ChildCount-1 do begin
|
||||||
Child:=Childs[i];
|
Child:=Children[i];
|
||||||
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
|
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
|
||||||
Child.SaveToConfig(Config,SubPath);
|
Child.SaveToConfig(Config,SubPath);
|
||||||
end;
|
end;
|
||||||
@ -3552,7 +3552,7 @@ begin
|
|||||||
Sides[a]:=Config.GetValue(Path+'Sides/'+AnchorNames[a]+'/Name','');
|
Sides[a]:=Config.GetValue(Path+'Sides/'+AnchorNames[a]+'/Name','');
|
||||||
|
|
||||||
// children
|
// children
|
||||||
NewChildCount:=Config.GetValue(Path+'Childs/Count',0);
|
NewChildCount:=Config.GetValue(Path+'Children/Count',0);
|
||||||
for i:=0 to NewChildCount-1 do begin
|
for i:=0 to NewChildCount-1 do begin
|
||||||
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
|
SubPath:=Path+'Child'+IntToStr(i+1)+'/';
|
||||||
NewChildName:=Config.GetValue(SubPath+'Name/Value','');
|
NewChildName:=Config.GetValue(SubPath+'Name/Value','');
|
||||||
@ -3575,7 +3575,7 @@ procedure TLazDockConfigNode.WriteDebugReport;
|
|||||||
DbgOut(' Type=',GetEnumName(TypeInfo(TLDConfigNodeType),ord(ANode.TheType)));
|
DbgOut(' Type=',GetEnumName(TypeInfo(TLDConfigNodeType),ord(ANode.TheType)));
|
||||||
DbgOut(' Bounds='+dbgs(ANode.Bounds));
|
DbgOut(' Bounds='+dbgs(ANode.Bounds));
|
||||||
DbgOut(' ClientBounds='+dbgs(ANode.ClientBounds));
|
DbgOut(' ClientBounds='+dbgs(ANode.ClientBounds));
|
||||||
DbgOut(' Childs='+dbgs(ANode.ChildCount));
|
DbgOut(' Children='+dbgs(ANode.ChildCount));
|
||||||
DbgOut(' WindowState='+WindowStateToStr(ANode.WindowState));
|
DbgOut(' WindowState='+WindowStateToStr(ANode.WindowState));
|
||||||
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||||
s:=ANode.Sides[a];
|
s:=ANode.Sides[a];
|
||||||
@ -3749,7 +3749,7 @@ var
|
|||||||
end;
|
end;
|
||||||
if Node.Parent<>nil then begin
|
if Node.Parent<>nil then begin
|
||||||
for i:=0 to Node.Parent.ChildCount-1 do 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
|
if CompareText(Sibling.Sides[OppositeAnchor[Side]],Node.Name)=0 then
|
||||||
Improve(Sibling);
|
Improve(Sibling);
|
||||||
end;
|
end;
|
||||||
@ -3783,13 +3783,13 @@ var
|
|||||||
if Node.TheType=ldcntPages then begin
|
if Node.TheType=ldcntPages then begin
|
||||||
// maximum size of all pages
|
// maximum size of all pages
|
||||||
for i:=0 to Node.ChildCount-1 do begin
|
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.X:=Max(Result.X,ChildMinSize.X);
|
||||||
Result.Y:=Max(Result.Y,ChildMinSize.Y);
|
Result.Y:=Max(Result.Y,ChildMinSize.Y);
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
for i:=0 to Node.ChildCount-1 do begin
|
for i:=0 to Node.ChildCount-1 do begin
|
||||||
Child:=Node.Childs[i];
|
Child:=Node.Children[i];
|
||||||
ChildSize:=GetMinSize(Child);
|
ChildSize:=GetMinSize(Child);
|
||||||
Result.X:=Max(Result.X,GetMinPos(Child,akLeft)+ChildSize.X);
|
Result.X:=Max(Result.X,GetMinPos(Child,akLeft)+ChildSize.X);
|
||||||
Result.Y:=Max(Result.Y,GetMinPos(Child,akTop)+ChildSize.Y);
|
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);
|
w(ARect.Left+1,ARect.Top,Node.Name,ARect.Right);
|
||||||
|
|
||||||
for i := 0 to Node.ChildCount-1 do begin
|
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.Left:=ARect.Left+1+GetMinPos(Child,akLeft);
|
||||||
ChildRect.Top:=ARect.Top+1+GetMinPos(Child,akTop);
|
ChildRect.Top:=ARect.Top+1+GetMinPos(Child,akTop);
|
||||||
ChildSize:=GetMinSize(Child);
|
ChildSize:=GetMinSize(Child);
|
||||||
|
Loading…
Reference in New Issue
Block a user