mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +02:00
disabled inline for 2.0.0
git-svn-id: trunk@8134 -
This commit is contained in:
parent
bb35225370
commit
e958469de0
@ -1691,7 +1691,7 @@ var
|
||||
CharLen: integer;
|
||||
|
||||
// Copies from SourceStart to Source to Dest and updates Dest
|
||||
procedure CopyPart; inline;
|
||||
procedure CopyPart; {$IFNDEF VER2_0_0}inline;{$ENDIF}
|
||||
var
|
||||
CopyLength: SizeInt;
|
||||
begin
|
||||
|
@ -141,6 +141,7 @@ type
|
||||
protected
|
||||
procedure DeleteSideSplitter(Splitter: TLazDockSplitter; Side: TAnchorKind;
|
||||
NewAnchorControl: TControl);
|
||||
procedure CombineSpiralSplitterPair(Splitter1, Splitter2: TLazDockSplitter);
|
||||
public
|
||||
constructor Create;
|
||||
procedure BeginUpdate; override;
|
||||
@ -713,6 +714,36 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAnchoredDockManager.CombineSpiralSplitterPair(Splitter1,
|
||||
Splitter2: TLazDockSplitter);
|
||||
{ Four spiral splitters:
|
||||
|
||||
Before:
|
||||
|
|
||||
A |
|
||||
---------|
|
||||
| +--+ | C
|
||||
B | | | |
|
||||
| +--+ |
|
||||
| ----------
|
||||
| D
|
||||
|
||||
The left and right splitter will be combined to one.
|
||||
|
||||
After:
|
||||
|
|
||||
A |
|
||||
-------|
|
||||
| C
|
||||
B |
|
||||
|
|
||||
|------
|
||||
| D
|
||||
}
|
||||
begin
|
||||
RaiseGDBException('TAnchoredDockManager.CombineSpiralSplitterPair TODO');
|
||||
end;
|
||||
|
||||
constructor TAnchoredDockManager.Create;
|
||||
begin
|
||||
FSplitterSize:=5;
|
||||
@ -1019,6 +1050,7 @@ var
|
||||
OldAnchorControls: array[TAnchorKind] of TControl;
|
||||
IsSpiralSplitter: Boolean;
|
||||
ParentControl: TWinControl;
|
||||
Done: Boolean;
|
||||
begin
|
||||
if Control.Parent=nil then begin
|
||||
// already undocked
|
||||
@ -1036,6 +1068,9 @@ begin
|
||||
end;
|
||||
Control.Anchors:=[akLeft,akTop];
|
||||
|
||||
Done:=false;
|
||||
|
||||
if not Done then begin
|
||||
// check if their is a splitter, that has a side with only Control anchored
|
||||
// to it.
|
||||
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||
@ -1053,13 +1088,15 @@ begin
|
||||
end;
|
||||
if i<0 then begin
|
||||
// this splitter is not needed anymore
|
||||
RaiseGDBException('');
|
||||
DeleteSideSplitter(AnchorSplitter,OppositeAnchor[a],
|
||||
OldAnchorControls[OppositeAnchor[a]]);
|
||||
Done:=true;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if not Done then begin
|
||||
// check if there are four spiral splitters around Control
|
||||
IsSpiralSplitter:=true;
|
||||
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||
@ -1070,20 +1107,31 @@ begin
|
||||
end;
|
||||
end;
|
||||
if IsSpiralSplitter then begin
|
||||
RaiseGDBException('TODO');
|
||||
CombineSpiralSplitterPair(OldAnchorControls[akLeft] as TLazDockSplitter,
|
||||
OldAnchorControls[akRight] as TLazDockSplitter);
|
||||
Done:=true;
|
||||
end;
|
||||
end;
|
||||
|
||||
if not Done then begin
|
||||
// check if Control is the only child of a TLazDockPage
|
||||
if (Control.Parent.ControlCount=1)
|
||||
and (Control.Parent is TLazDockPage) then begin
|
||||
RaiseGDBException('TODO');
|
||||
end;
|
||||
end;
|
||||
|
||||
if not Done then begin
|
||||
// check if Control is the only child of a TLazDockForm
|
||||
if (Control.Parent.ControlCount=1)
|
||||
and (Control.Parent is TLazDockForm) then begin
|
||||
RaiseGDBException('TODO');
|
||||
end;
|
||||
end;
|
||||
|
||||
if not Done then begin
|
||||
// otherwise: keep
|
||||
end;
|
||||
|
||||
finally
|
||||
if ParentControl<>nil then
|
||||
|
Loading…
Reference in New Issue
Block a user