lazarus/lcl/include/customdockform.inc
mattias 6eb4930179 fixed references to COPYING.LCL
git-svn-id: trunk@9243 -
2006-05-05 05:52:08 +00:00

64 lines
2.1 KiB
PHP

{%MainUnit ../forms.pp}
{******************************************************************************
TCustomDockForm
******************************************************************************
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
{ TCustomDockForm }
procedure TCustomDockForm.DoAddDockClient(Client: TControl; const ARect: TRect
);
begin
inherited DoAddDockClient(Client, ARect);
Client.Align := alClient;
if ([csLoading,csDestroying]*ComponentState=[]) then
Visible := True;
end;
procedure TCustomDockForm.DoRemoveDockClient(Client: TControl);
begin
inherited DoRemoveDockClient(Client);
if DockClientCount = 0 then Release;
end;
procedure TCustomDockForm.GetSiteInfo(Client: TControl;
var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean);
begin
CanDock := (DockClientCount=0);
end;
procedure TCustomDockForm.Loaded;
var
i: Integer;
begin
// dock child controls after loading
for i:=0 to ControlCount-1 do
Controls[i].Dock(Self,ClientRect);
inherited Loaded;
end;
constructor TCustomDockForm.Create(TheOwner: TComponent);
begin
CreateNew(TheOwner,0);
AutoScroll := False;
BorderStyle := bsSizeToolWin;
DockSite := True;
FormStyle := fsStayOnTop;
end;
// included by forms.pp