mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 16:38:17 +02:00
fixed script cross building binutils
git-svn-id: trunk@9622 -
This commit is contained in:
parent
f0b0ae7a39
commit
3744d96407
@ -2,55 +2,59 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
||||
Caption = 'Watch Properties'
|
||||
ClientHeight = 206
|
||||
ClientWidth = 420
|
||||
PixelsPerInch = 95
|
||||
Position = poScreenCenter
|
||||
HorzScrollBar.Page = 421
|
||||
VertScrollBar.Page = 207
|
||||
HorzScrollBar.Page = 419
|
||||
VertScrollBar.Page = 205
|
||||
Left = 358
|
||||
Height = 206
|
||||
Top = 238
|
||||
Width = 420
|
||||
object lblExpression: TLabel
|
||||
Caption = 'Expression:'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
Left = 16
|
||||
Height = 17
|
||||
Height = 13
|
||||
Top = 14
|
||||
Width = 65
|
||||
end
|
||||
object lblRepCount: TLabel
|
||||
Caption = 'Repeat Count:'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
Left = 15
|
||||
Height = 13
|
||||
Top = 45
|
||||
Width = 80
|
||||
end
|
||||
object lblDigits: TLabel
|
||||
Caption = 'Digits:'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
Left = 176
|
||||
Height = 13
|
||||
Top = 45
|
||||
Width = 35
|
||||
end
|
||||
object txtExpression: TEdit
|
||||
TabOrder = 2
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
Left = 105
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 300
|
||||
end
|
||||
object lblRepCount: TLabel
|
||||
Caption = 'Repeat Count:'
|
||||
Left = 15
|
||||
Height = 17
|
||||
Top = 45
|
||||
Width = 80
|
||||
end
|
||||
object txtRepCount: TEdit
|
||||
TabOrder = 4
|
||||
TabOrder = 2
|
||||
Text = '0'
|
||||
TabOrder = 4
|
||||
Left = 105
|
||||
Height = 23
|
||||
Top = 39
|
||||
Width = 60
|
||||
end
|
||||
object lblDigits: TLabel
|
||||
Caption = 'Digits:'
|
||||
Left = 176
|
||||
Height = 17
|
||||
Top = 45
|
||||
Width = 40
|
||||
end
|
||||
object txtDigits: TEdit
|
||||
TabOrder = 6
|
||||
TabOrder = 5
|
||||
Text = '0'
|
||||
TabOrder = 6
|
||||
Left = 225
|
||||
Height = 23
|
||||
Top = 39
|
||||
@ -58,28 +62,33 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
||||
end
|
||||
object chkEnabled: TCheckBox
|
||||
AllowGrayed = True
|
||||
AutoSize = True
|
||||
Caption = 'Enabled'
|
||||
DragCursor = 65524
|
||||
TabOrder = 7
|
||||
Left = 15
|
||||
Height = 20
|
||||
Top = 65
|
||||
Width = 84
|
||||
Width = 73
|
||||
end
|
||||
object chkAllowFunc: TCheckBox
|
||||
AllowGrayed = True
|
||||
AutoSize = True
|
||||
Caption = 'Allow Function Calls'
|
||||
DragCursor = 65524
|
||||
TabOrder = 0
|
||||
Left = 105
|
||||
Height = 20
|
||||
Top = 65
|
||||
Width = 1
|
||||
Width = 143
|
||||
end
|
||||
object rgStyle: TRadioGroup
|
||||
AutoFill = True
|
||||
Caption = 'Style'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
Columns = 3
|
||||
ItemIndex = 7
|
||||
Items.Strings = (
|
||||
@ -93,36 +102,40 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
||||
'Default'
|
||||
'Memory Dump'
|
||||
)
|
||||
ParentColor = True
|
||||
TabOrder = 3
|
||||
Left = 15
|
||||
Height = 78
|
||||
Top = 90
|
||||
Width = 390
|
||||
end
|
||||
object btnOK: TButton
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
OnClick = btnOKClick
|
||||
TabOrder = 9
|
||||
TabOrder = 4
|
||||
Left = 170
|
||||
Height = 25
|
||||
Top = 176
|
||||
Width = 75
|
||||
end
|
||||
object btnCancel: TButton
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 10
|
||||
TabOrder = 6
|
||||
Left = 250
|
||||
Height = 25
|
||||
Top = 176
|
||||
Width = 75
|
||||
end
|
||||
object btnHelp: TButton
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'Help'
|
||||
TabOrder = 11
|
||||
OnClick = btnHelpClick
|
||||
TabOrder = 8
|
||||
Left = 330
|
||||
Height = 25
|
||||
Top = 176
|
||||
|
@ -1,32 +1,41 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TWatchPropertyDlg','FORMDATA',[
|
||||
'TPF0'#17'TWatchPropertyDlg'#16'WatchPropertyDlg'#7'Caption'#6#16'Watch Prope'
|
||||
+'rties'#12'ClientHeight'#3#206#0#11'ClientWidth'#3#164#1#8'Position'#7#14'po'
|
||||
+'ScreenCenter'#18'HorzScrollBar.Page'#3#165#1#18'VertScrollBar.Page'#3#207#0
|
||||
+#4'Left'#3'f'#1#6'Height'#3#206#0#3'Top'#3#238#0#5'Width'#3#164#1#0#6'TLabel'
|
||||
+#13'lblExpression'#7'Caption'#6#11'Expression:'#4'Left'#2#16#6'Height'#2#17#3
|
||||
+'Top'#2#14#5'Width'#2'A'#0#0#5'TEdit'#13'txtExpression'#8'TabOrder'#2#2#8'Ta'
|
||||
+'bOrder'#2#2#4'Left'#2'i'#6'Height'#2#23#3'Top'#2#8#5'Width'#3','#1#0#0#6'TL'
|
||||
+'abel'#11'lblRepCount'#7'Caption'#6#13'Repeat Count:'#4'Left'#2#15#6'Height'
|
||||
+#2#17#3'Top'#2'-'#5'Width'#2'P'#0#0#5'TEdit'#11'txtRepCount'#8'TabOrder'#2#4
|
||||
+#4'Text'#6#1'0'#8'TabOrder'#2#4#4'Left'#2'i'#6'Height'#2#23#3'Top'#2''''#5'W'
|
||||
+'idth'#2'<'#0#0#6'TLabel'#9'lblDigits'#7'Caption'#6#7'Digits:'#4'Left'#3#176
|
||||
+#0#6'Height'#2#17#3'Top'#2'-'#5'Width'#2'('#0#0#5'TEdit'#9'txtDigits'#8'TabO'
|
||||
+'rder'#2#6#4'Text'#6#1'0'#8'TabOrder'#2#6#4'Left'#3#225#0#6'Height'#2#23#3'T'
|
||||
+'op'#2''''#5'Width'#3#180#0#0#0#9'TCheckBox'#10'chkEnabled'#11'AllowGrayed'#9
|
||||
+#8'AutoSize'#9#7'Caption'#6#7'Enabled'#10'DragCursor'#4#244#255#0#0#8'TabOrd'
|
||||
+'er'#2#7#4'Left'#2#15#6'Height'#2#20#3'Top'#2'A'#5'Width'#2'T'#0#0#9'TCheckB'
|
||||
+'ox'#12'chkAllowFunc'#11'AllowGrayed'#9#8'AutoSize'#9#7'Caption'#6#20'Allow '
|
||||
+'Function Calls'#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#0#4'Left'#2'i'#6
|
||||
+'Height'#2#20#3'Top'#2'A'#5'Width'#2#1#0#0#11'TRadioGroup'#7'rgStyle'#7'Capt'
|
||||
+'ion'#6#5'Style'#7'Columns'#2#3#9'ItemIndex'#2#7#13'Items.Strings'#1#6#9'Cha'
|
||||
+'racter'#6#6'String'#6#7'Decimal'#6#11'Hexadecimal'#6#14'Floating Point'#6#7
|
||||
+'Pointer'#6#16'Record/Structure'#6#7'Default'#6#11'Memory Dump'#0#11'ParentC'
|
||||
+'olor'#9#4'Left'#2#15#6'Height'#2'N'#3'Top'#2'Z'#5'Width'#3#134#1#0#0#7'TBut'
|
||||
+'ton'#5'btnOK'#7'Caption'#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#7'OnClick'
|
||||
+#7#10'btnOKClick'#8'TabOrder'#2#9#4'Left'#3#170#0#6'Height'#2#25#3'Top'#3#176
|
||||
+#0#5'Width'#2'K'#0#0#7'TButton'#9'btnCancel'#6'Cancel'#9#7'Caption'#6#6'Canc'
|
||||
+'el'#11'ModalResult'#2#2#8'TabOrder'#2#10#4'Left'#3#250#0#6'Height'#2#25#3'T'
|
||||
+'op'#3#176#0#5'Width'#2'K'#0#0#7'TButton'#7'btnHelp'#7'Caption'#6#4'Help'#8
|
||||
+'TabOrder'#2#11#4'Left'#3'J'#1#6'Height'#2#25#3'Top'#3#176#0#5'Width'#2'K'#0
|
||||
+#0#0
|
||||
+'rties'#12'ClientHeight'#3#206#0#11'ClientWidth'#3#164#1#13'PixelsPerInch'#2
|
||||
+'_'#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#163#1#18'VertS'
|
||||
+'crollBar.Page'#3#205#0#4'Left'#3'f'#1#6'Height'#3#206#0#3'Top'#3#238#0#5'Wi'
|
||||
+'dth'#3#164#1#0#6'TLabel'#13'lblExpression'#7'Caption'#6#11'Expression:'#5'C'
|
||||
+'olor'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#16#6'Height'#2#13#3'Top'#2#14
|
||||
+#5'Width'#2'A'#0#0#6'TLabel'#11'lblRepCount'#7'Caption'#6#13'Repeat Count:'#5
|
||||
+'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#15#6'Height'#2#13#3'Top'#2'-'
|
||||
+#5'Width'#2'P'#0#0#6'TLabel'#9'lblDigits'#7'Caption'#6#7'Digits:'#5'Color'#7
|
||||
+#6'clNone'#11'ParentColor'#8#4'Left'#3#176#0#6'Height'#2#13#3'Top'#2'-'#5'Wi'
|
||||
+'dth'#2'#'#0#0#5'TEdit'#13'txtExpression'#8'TabOrder'#2#1#4'Left'#2'i'#6'Hei'
|
||||
+'ght'#2#23#3'Top'#2#8#5'Width'#3','#1#0#0#5'TEdit'#11'txtRepCount'#8'TabOrde'
|
||||
+'r'#2#2#4'Text'#6#1'0'#4'Left'#2'i'#6'Height'#2#23#3'Top'#2''''#5'Width'#2'<'
|
||||
+#0#0#5'TEdit'#9'txtDigits'#8'TabOrder'#2#5#4'Text'#6#1'0'#4'Left'#3#225#0#6
|
||||
+'Height'#2#23#3'Top'#2''''#5'Width'#3#180#0#0#0#9'TCheckBox'#10'chkEnabled'
|
||||
+#11'AllowGrayed'#9#7'Caption'#6#7'Enabled'#8'TabOrder'#2#7#4'Left'#2#15#6'He'
|
||||
+'ight'#2#20#3'Top'#2'A'#5'Width'#2'I'#0#0#9'TCheckBox'#12'chkAllowFunc'#11'A'
|
||||
+'llowGrayed'#9#7'Caption'#6#20'Allow Function Calls'#8'TabOrder'#2#0#4'Left'
|
||||
+#2'i'#6'Height'#2#20#3'Top'#2'A'#5'Width'#3#143#0#0#0#11'TRadioGroup'#7'rgSt'
|
||||
+'yle'#8'AutoFill'#9#7'Caption'#6#5'Style'#28'ChildSizing.LeftRightSpacing'#2
|
||||
+#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
|
||||
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
|
||||
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
|
||||
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
|
||||
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#3#7'Column'
|
||||
+'s'#2#3#9'ItemIndex'#2#7#13'Items.Strings'#1#6#9'Character'#6#6'String'#6#7
|
||||
+'Decimal'#6#11'Hexadecimal'#6#14'Floating Point'#6#7'Pointer'#6#16'Record/St'
|
||||
+'ructure'#6#7'Default'#6#11'Memory Dump'#0#8'TabOrder'#2#3#4'Left'#2#15#6'He'
|
||||
+'ight'#2'N'#3'Top'#2'Z'#5'Width'#3#134#1#0#0#7'TButton'#5'btnOK'#25'BorderSp'
|
||||
+'acing.InnerBorder'#2#4#7'Caption'#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#7
|
||||
+'OnClick'#7#10'btnOKClick'#8'TabOrder'#2#4#4'Left'#3#170#0#6'Height'#2#25#3
|
||||
+'Top'#3#176#0#5'Width'#2'K'#0#0#7'TButton'#9'btnCancel'#25'BorderSpacing.Inn'
|
||||
+'erBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabO'
|
||||
+'rder'#2#6#4'Left'#3#250#0#6'Height'#2#25#3'Top'#3#176#0#5'Width'#2'K'#0#0#7
|
||||
+'TButton'#7'btnHelp'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Help'#7
|
||||
+'OnClick'#7#12'btnHelpClick'#8'TabOrder'#2#8#4'Left'#3'J'#1#6'Height'#2#25#3
|
||||
+'Top'#3#176#0#5'Width'#2'K'#0#0#0
|
||||
]);
|
||||
|
@ -40,10 +40,13 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LResources, StdCtrls,
|
||||
Buttons, Extctrls, Debugger, BaseDebugManager, Menus;
|
||||
Buttons, Extctrls, Menus,
|
||||
IDEContextHelpEdit, Debugger, BaseDebugManager;
|
||||
|
||||
type
|
||||
|
||||
{ TWatchPropertyDlg }
|
||||
|
||||
TWatchPropertyDlg = class(TForm)
|
||||
lblExpression: TLabel;
|
||||
lblRepCount: TLabel;
|
||||
@ -57,6 +60,7 @@ type
|
||||
txtExpression: TEdit;
|
||||
txtRepCount: TEdit;
|
||||
txtDigits: TEdit;
|
||||
procedure btnHelpClick(Sender: TObject);
|
||||
procedure btnOKClick(Sender: TObject);
|
||||
private
|
||||
FWatch: TIDEWatch;
|
||||
@ -82,6 +86,11 @@ begin
|
||||
FWatch.Enabled := chkEnabled.Checked;
|
||||
end;
|
||||
|
||||
procedure TWatchPropertyDlg.btnHelpClick(Sender: TObject);
|
||||
begin
|
||||
ShowContextHelpForIDE(btnHelp);
|
||||
end;
|
||||
|
||||
constructor TWatchPropertyDlg.Create(AOwner: TComponent; const AWatch: TIDEWatch);
|
||||
begin
|
||||
FWatch := AWatch;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG Name="IDE windows and dialogs" Path="IDE_Window:_" ChildCount="47">
|
||||
<CONFIG Name="IDE windows and dialogs" Path="IDE_Window:_" ChildCount="48">
|
||||
<Node1 Name="TObjectInspector" Path="Object_Inspector" HasHelp="True"/>
|
||||
<Node2 Name="TfrmCompilerOptions" Path="Compiler_Options" HasHelp="True" ChildCount="1">
|
||||
<Node1 Name="MainNotebook" ChildCount="7">
|
||||
@ -90,4 +90,5 @@
|
||||
<Node45 Name="TCodeToolsOptsDlg" Path="Codetools_Options" HasHelp="True"/>
|
||||
<Node46 Name="TCodeToolsDefinesEditor" Path="Codetools_Defines_Editor" HasHelp="True"/>
|
||||
<Node47 Name="THelpOptionsDialog" Path="Help_Options" HasHelp="True"/>
|
||||
<Node48 Name="TWatchPropertyDlg" Path="Watch_Properties" HasHelp="True"/>
|
||||
</CONFIG>
|
||||
|
@ -56,7 +56,8 @@ type
|
||||
TLDConfigNodeType = (
|
||||
ldcntControl,
|
||||
ldcntForm,
|
||||
ldcntSplitter,
|
||||
ldcntSplitterLeftRight,
|
||||
ldcntSplitterUpDown,
|
||||
ldcntPages,
|
||||
ldcntPage
|
||||
);
|
||||
@ -65,7 +66,8 @@ const
|
||||
LDConfigNodeTypeNames: array[TLDConfigNodeType] of string = (
|
||||
'Control',
|
||||
'Form',
|
||||
'Splitter',
|
||||
'SplitterLeftRight',
|
||||
'SplitterUpDown',
|
||||
'Pages',
|
||||
'Page'
|
||||
);
|
||||
@ -94,9 +96,12 @@ type
|
||||
procedure DoAdd(ChildNode: TLazDockConfigNode);
|
||||
procedure DoRemove(ChildNode: TLazDockConfigNode);
|
||||
public
|
||||
constructor Create(ParentNode: TLazDockConfigNode);
|
||||
constructor Create(ParentNode: TLazDockConfigNode; const AName: string);
|
||||
destructor Destroy; override;
|
||||
procedure Clear;
|
||||
procedure RemoveFromParentAndFree;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
function FindByName(const AName: string; Recursive: boolean = false;
|
||||
WithRoot: boolean = true): TLazDockConfigNode;
|
||||
function GetScreenBounds: TRect;
|
||||
@ -161,6 +166,8 @@ type
|
||||
procedure ClearConfigs;
|
||||
function GetConfigWithDockerName(const DockerName: string
|
||||
): TLazDockerConfig;
|
||||
function CreateLayout(const DockerName: string; VisibleControl: TControl
|
||||
): TLazDockConfigNode;
|
||||
public
|
||||
property Manager: TAnchoredDockManager read FManager;
|
||||
property DockerCount: Integer read GetDockerCount;
|
||||
@ -485,9 +492,12 @@ function TCustomLazControlDocker.GetLayoutFromControl: TLazDockConfigNode;
|
||||
Result:=TLazDockConfigNode.Create(ParentNode,GetControlName(AControl));
|
||||
|
||||
// The Type
|
||||
if AControl is TLazDockSplitter then
|
||||
Result.FTheType:=ldcntSplitter
|
||||
else if AControl is TLazDockForm then
|
||||
if AControl is TLazDockSplitter then begin
|
||||
if TLazDockSplitter(AControl).ResizeAnchor in [akLeft,akRight] then
|
||||
Result.FTheType:=ldcntSplitterLeftRight
|
||||
else
|
||||
Result.FTheType:=ldcntSplitterUpDown;
|
||||
end else if AControl is TLazDockForm then
|
||||
Result.FTheType:=ldcntForm
|
||||
else if AControl is TLazDockPages then
|
||||
Result.FTheType:=ldcntPages
|
||||
@ -737,40 +747,66 @@ procedure TCustomLazControlDocker.RestoreLayout;
|
||||
|+---+#+-----------------+|
|
||||
+-------------------------+
|
||||
}
|
||||
type
|
||||
TSiblingDistance = (
|
||||
sdUnknown,
|
||||
sdThreeSides, // sibling shares 3 sides
|
||||
sdOneSide, // sibling shares 1 side
|
||||
sdSplitterThreeSides,// splitter, then sibling shares 3 sides
|
||||
sdSplitterOneSide // splitter, then sibling shares 1 side
|
||||
);
|
||||
var
|
||||
Layout: TLazDockerConfig;
|
||||
SelfNode: TLazDockConfigNode;
|
||||
|
||||
{ function FindControl(Node: TLazDockConfigNode): TControl;
|
||||
begin
|
||||
if Node.TheType=ldcntControl then
|
||||
Result:=Manager.FindDockerByName(Node.Name)
|
||||
else
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
procedure RaiseLayoutInconsistency(Node: TLazDockConfigNode);
|
||||
begin
|
||||
raise Exception.Create('TCustomLazControlDocker.RestoreLayout'
|
||||
+' DockerName="'+DockerName+'"'
|
||||
+' Control='+DbgSName(Control)
|
||||
+' Node='+Node.Name);
|
||||
end;
|
||||
|
||||
procedure FindSibling(Node: TLazDockConfigNode; Side: TAnchorKind;
|
||||
out Sibling: TControl; out SiblingNode: TLazDockConfigNode;
|
||||
out Distance: integer);
|
||||
out Distance: TSiblingDistance);
|
||||
// find the nearest visible sibling control at Side
|
||||
var
|
||||
SiblingName: string;
|
||||
begin
|
||||
Sibling:=nil;
|
||||
SiblingNode:=nil;
|
||||
Distance:=10000;
|
||||
Distance:=sdUnknown;
|
||||
if Node=nil then exit;
|
||||
SiblingName:=Node.Sides[Side];
|
||||
if SiblingName<>'' then begin
|
||||
SiblingNode:=Layout.Root.FindByName(SiblingName,true,true);
|
||||
Sibling:=FindControl(SiblingNode);
|
||||
SiblingNode:=Layout.Root.FindByName(SiblingName,true);
|
||||
if SiblingNode=nil then
|
||||
RaiseLayoutInconsistency(Node);
|
||||
case SiblingNode.TheType of
|
||||
ldcntSplitterLeftRight,ldcntSplitterUpDown:
|
||||
begin
|
||||
FindSibling(SiblingNode,Side,Sibling,SiblingNode,Distance);
|
||||
if Distance=sdOneSide then
|
||||
Distance:=sdSplitterOneSide;
|
||||
if Distance=sdThreeSides then
|
||||
Distance:=sdSplitterThreeSides;
|
||||
if Distance=sdSplitterThreeSides then begin
|
||||
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
// TODO
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
var
|
||||
NewBounds: TRect;
|
||||
begin
|
||||
DebugLn(['TCustomLazControlDocker.RestoreLayout A ',DockerName]);
|
||||
DebugLn(['TCustomLazControlDocker.RestoreLayout A ',DockerName,' Control=',DbgSName(Control)]);
|
||||
if (Manager=nil) or (Control=nil) then exit;
|
||||
Layout:=Manager.GetConfigWithDockerName(DockerName);
|
||||
if (Layout=nil) or (Layout.Root=nil) then exit;
|
||||
@ -780,12 +816,20 @@ begin
|
||||
|
||||
if SelfNode.Parent<>nil then begin
|
||||
// this control was docked
|
||||
if SelfNode.Parent.TheType=ldcntPage then begin
|
||||
// this control was docked as child of a page
|
||||
DebugLn(['TCustomLazControlDocker.RestoreLayout TODO restore page']);
|
||||
end else begin
|
||||
// this control was docked on a form as child
|
||||
//FindSibling(SelfNode,akLeft,LeftSibling,LeftSiblingDistance);
|
||||
case SelfNode.Parent.TheType of
|
||||
ldcntPage:
|
||||
begin
|
||||
// this control was docked as child of a page
|
||||
DebugLn(['TCustomLazControlDocker.RestoreLayout TODO restore page']);
|
||||
end;
|
||||
ldcntControl,ldcntForm:
|
||||
begin
|
||||
// this control was docked on a form as child
|
||||
DebugLn(['TCustomLazControlDocker.RestoreLayout TODO restore splitter']);
|
||||
//FindSibling(SelfNode,akLeft,LeftSibling,LeftSiblingDistance);
|
||||
end;
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1067,6 +1111,69 @@ begin
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TCustomLazDockingManager.CreateLayout(const DockerName: string;
|
||||
VisibleControl: TControl): TLazDockConfigNode;
|
||||
// create a usable config
|
||||
// This means: search a config, create a copy
|
||||
// and remove all nodes without visible controls.
|
||||
|
||||
procedure RemoveEmptyNodes(Node: TLazDockConfigNode);
|
||||
var
|
||||
i: Integer;
|
||||
Docker: TCustomLazControlDocker;
|
||||
Child: TLazDockConfigNode;
|
||||
begin
|
||||
if Node=nil then exit;
|
||||
// remove empty childs
|
||||
for i:=Node.ChildCount-1 downto 0 do
|
||||
RemoveEmptyNodes(Node.Childs[i]);
|
||||
// remove unneeded splitters
|
||||
for i:=Node.ChildCount-1 downto 0 do begin
|
||||
Child:=Node.Childs[i];
|
||||
// a splitter is needed, if it has none splitters on both sides
|
||||
if Child.TheType=ldcntSplitterLeftRight then begin
|
||||
|
||||
end else if Child.TheType=ldcntSplitterUpDown then begin
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
case Node.TheType of
|
||||
ldcntControl:
|
||||
begin
|
||||
Docker:=FindDockerByName(Node.Name);
|
||||
// if the associated control does not exist or is not visible,
|
||||
// then delete the node
|
||||
if (Docker=nil)
|
||||
or (Docker.Control=nil)
|
||||
or ((not Docker.Control.Visible) and (Docker.Control<>VisibleControl))
|
||||
then
|
||||
Node.RemoveFromParentAndFree;
|
||||
end;
|
||||
ldcntForm,ldcntPage,ldcntPages:
|
||||
// these are auto created parent nodes. If they have no childs: delete
|
||||
if Node.ChildCount=0 then
|
||||
Node.RemoveFromParentAndFree;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
Config: TLazDockerConfig;
|
||||
begin
|
||||
Result:=nil;
|
||||
Config:=GetConfigWithDockerName(DockerName);
|
||||
if (Config=nil) or (Config.Root=nil)
|
||||
or (Config.Root.FindByName(DockerName)=nil) then begin
|
||||
// no good config found
|
||||
exit;
|
||||
end;
|
||||
// create a copy of the config
|
||||
Result:=TLazDockConfigNode.Create(nil);
|
||||
Result.Assign(Config.Root);
|
||||
// clean up
|
||||
RemoveEmptyNodes(Result);
|
||||
end;
|
||||
|
||||
{ TLazDockConfigNode }
|
||||
|
||||
function TLazDockConfigNode.GetSides(Side: TAnchorKind): string;
|
||||
@ -1138,12 +1245,17 @@ begin
|
||||
FChilds.Remove(ChildNode);
|
||||
end;
|
||||
|
||||
constructor TLazDockConfigNode.Create(ParentNode: TLazDockConfigNode);
|
||||
begin
|
||||
FTheType:=ldcntControl;
|
||||
Parent:=ParentNode;
|
||||
end;
|
||||
|
||||
constructor TLazDockConfigNode.Create(ParentNode: TLazDockConfigNode;
|
||||
const AName: string);
|
||||
begin
|
||||
FName:=AName;
|
||||
FTheType:=ldcntControl;
|
||||
Parent:=ParentNode;
|
||||
Create(ParentNode,AName);
|
||||
end;
|
||||
|
||||
destructor TLazDockConfigNode.Destroy;
|
||||
@ -1163,6 +1275,39 @@ begin
|
||||
FChilds.Clear;
|
||||
end;
|
||||
|
||||
procedure TLazDockConfigNode.RemoveFromParentAndFree;
|
||||
begin
|
||||
if Parent<>nil then Parent.FChilds.Remove(Self);
|
||||
Free;
|
||||
end;
|
||||
|
||||
procedure TLazDockConfigNode.Assign(Source: TPersistent);
|
||||
var
|
||||
Src: TLazDockConfigNode;
|
||||
i: Integer;
|
||||
SrcChild: TLazDockConfigNode;
|
||||
NewChild: TLazDockConfigNode;
|
||||
a: TAnchorKind;
|
||||
begin
|
||||
if Source is TLazDockConfigNode then begin
|
||||
Clear;
|
||||
Src:=TLazDockConfigNode(Source);
|
||||
FBounds:=Src.FBounds;
|
||||
FClientBounds:=Src.FClientBounds;
|
||||
FName:=Src.FName;
|
||||
for a:=Low(TAnchorKind) to High(TAnchorKind) do
|
||||
FSides[a]:=Src.FSides[a];
|
||||
FTheType:=Src.FTheType;
|
||||
for i:=0 to Src.FChilds.Count-1 do begin
|
||||
SrcChild:=Src.Childs[i];
|
||||
NewChild:=TLazDockConfigNode.Create(Self);
|
||||
NewChild.Assign(SrcChild);
|
||||
FChilds.Add(NewChild);
|
||||
end;
|
||||
end else
|
||||
inherited Assign(Source);
|
||||
end;
|
||||
|
||||
function TLazDockConfigNode.FindByName(const AName: string;
|
||||
Recursive: boolean; WithRoot: boolean): TLazDockConfigNode;
|
||||
var
|
||||
@ -1241,6 +1386,7 @@ var
|
||||
SubPath: String;
|
||||
begin
|
||||
Clear;
|
||||
// Note: 'Name' is stored for information, but not restored on load
|
||||
TheType:=LDConfigNodeTypeNameToType(Config.GetValue(Path+'Type/Value',
|
||||
LDConfigNodeTypeNames[ldcntControl]));
|
||||
Config.GetValue(Path+'Bounds/',FBounds,Rect(0,0,0,0));
|
||||
|
@ -84,7 +84,7 @@ fi
|
||||
if [ "x$Params" != "x" ]; then
|
||||
Params="$Params targets=i386-win32"
|
||||
echo "calling update_cross_fpc.sh $Params ..."
|
||||
./update_cross_fpc.sh $Params
|
||||
./update_cross_fpc.sh $Params || exit
|
||||
fi
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ for p in $Params; do
|
||||
BuildRoot=$(echo $p | sed -e 's#^buildroot=##')
|
||||
;;
|
||||
targets=*)
|
||||
Targets=$p
|
||||
Targets=$(echo $p | sed -e 's#^targets=##')
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $p"
|
||||
@ -182,22 +182,22 @@ fi
|
||||
|
||||
if [ $DownloadFPC = "yes" ]; then
|
||||
cd $BuildRoot
|
||||
if [ -f fpc ]; then
|
||||
if [ -d fpc ]; then
|
||||
cd fpc
|
||||
echo "SVN update for FPC ..."
|
||||
svn cleanup
|
||||
svn up
|
||||
else
|
||||
echo "SVN checkout for FPC ..."
|
||||
echo "SVN checkout for FPC 2.0 ..."
|
||||
svn co http://svn.freepascal.org/svn/fpc/branches/fixes_2_0 fpc
|
||||
fi
|
||||
if [ -f install ]; then
|
||||
if [ -d install ]; then
|
||||
cd install
|
||||
echo "SVN update for FPC install ..."
|
||||
svn cleanup
|
||||
svn up
|
||||
else
|
||||
echo "SVN checkout for FPC install ..."
|
||||
echo "SVN checkout for FPC 2.0 install ..."
|
||||
svn co http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_0/install install
|
||||
fi
|
||||
fi
|
||||
@ -206,6 +206,10 @@ fi
|
||||
# setup some variables
|
||||
# retrieve the version information
|
||||
VersionFile="$BuildRoot/fpc/compiler/version.pas"
|
||||
if [ ! -f $VersionFile ]; then
|
||||
echo No FPC sources found. To download them call ./update_cross_fpc.sh DownloadFPC
|
||||
exit
|
||||
fi
|
||||
CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]//g'`
|
||||
CompilerRelease=`cat $VersionFile | grep ' *release_nr *=.*;' | sed -e 's/[^0-9]//g'`
|
||||
CompilerPatch=`cat $VersionFile | grep ' *patch_nr *=.*;' | sed -e 's/[^0-9]//g'`
|
||||
@ -215,7 +219,12 @@ CompilerVersionStr="$CompilerVersion.$CompilerRelease.$CompilerPatch"
|
||||
# build binutils
|
||||
if [ $BuildBinutils = "yes" ]; then
|
||||
# create custom version of buildcrossbinutils
|
||||
echo "building cross binutils ..."
|
||||
echo "building cross binutils for targets:"
|
||||
echo " WIN=$TARGETS_WIN"
|
||||
echo " I386=$TARGETS_I386"
|
||||
echo " POWERPC=$TARGETS_POWERPC"
|
||||
echo " SPARC=$TARGETS_SPARC"
|
||||
echo " M68K=$TARGETS_M68K"
|
||||
cd $BuildRoot/install/cross/
|
||||
cat buildcrossbinutils | \
|
||||
sed -e 's#^BASE=.*$#BASE='"$BuildRoot"'/binutils#' \
|
||||
@ -233,10 +242,18 @@ if [ $BuildBinutils = "yes" ]; then
|
||||
#debugging: head -n 50 buildcrossbinutils.sh
|
||||
|
||||
# build the cross binutils
|
||||
echo "HINT: when something goes wrong see the log files in $BuildRoot/bintuils/logs/"
|
||||
echo "HINT: when something goes wrong see the log files in $BuildRoot/binutils/logs/"
|
||||
rm -rf $BuildRoot/binutils
|
||||
sh buildcrossbinutils.sh
|
||||
|
||||
Command=$BuildRoot/install/cross/buildcrossbinutils.sh
|
||||
echo "calling $Command ..."
|
||||
Result=$(sh buildcrossbinutils.sh)
|
||||
FailResult=$(echo "$Result" | grep -i failes || true)
|
||||
if [ -n "$FailResult" ]; then
|
||||
echo $Result
|
||||
echo "HINT: see the log files in $BuildRoot/binutils/logs/"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# link binaries into the bin directory, so that FPC can find them
|
||||
mkdir -p $BinDir
|
||||
for Target in $Targets; do
|
||||
|
Loading…
Reference in New Issue
Block a user