IDE: clean up

git-svn-id: trunk@26101 -
This commit is contained in:
mattias 2010-06-14 07:30:12 +00:00
parent 55d0d47616
commit e08543719c
3 changed files with 30 additions and 33 deletions

View File

@ -69,7 +69,6 @@
ToDo:
- popup menu
- shrink side left, top, right, bottom
- fpdoc
- simple way to make forms dockable at designtime
- minimize button and Hide => show in header
- on close button: save a default layout

View File

@ -191,33 +191,29 @@ begin
RadioButton.Enabled := True;
RadioButton.Checked := (APlacement = Layout.WindowPlacement);
if APlacement = iwpCustomPosition then
begin
// custom window position
if Layout.CustomCoordinatesAreValid then
begin
LeftEdit.Value := Layout.Left;
TopEdit.Value := Layout.Top;
WidthEdit.Value := Layout.Width;
HeightEdit.Value := Layout.Height;
end
else
if Layout.Form <> nil then
begin
LeftEdit.Value := Layout.Form.Left;
TopEdit.Value := Layout.Form.Top;
WidthEdit.Value := Layout.Form.Width;
HeightEdit.Value := Layout.Form.Height;
end
else
begin
LeftEdit.Value := 0;
TopEdit.Value := 0;
WidthEdit.Value := 0;
HeightEdit.Value := 0;
end;
end;
end;
// custom window position
if Layout.CustomCoordinatesAreValid then
begin
LeftEdit.Value := Layout.Left;
TopEdit.Value := Layout.Top;
WidthEdit.Value := Layout.Width;
HeightEdit.Value := Layout.Height;
end
else
if Layout.Form <> nil then
begin
LeftEdit.Value := Layout.Form.Left;
TopEdit.Value := Layout.Form.Top;
WidthEdit.Value := Layout.Form.Width;
HeightEdit.Value := Layout.Form.Height;
end
else
begin
LeftEdit.Value := 0;
TopEdit.Value := 0;
WidthEdit.Value := 0;
HeightEdit.Value := 0;
end;
GetWindowPositionButton.Enabled := (Layout.Form <> nil);

View File

@ -504,20 +504,22 @@ end;
procedure TSimpleWindowLayout.SetForm(const AValue: TCustomForm);
begin
if fForm=AValue then exit;
if (Form<>nil) then
RemoveFreeNotification(Form);
fForm:=AValue;
if (Form<>nil) then begin
fFormID := FForm.Name;
FFormCaption := fForm.Caption;
FreeNotification(fForm);
fFormID := Form.Name;
FFormCaption := Form.Caption;
FreeNotification(Form);
end;
end;
function TSimpleWindowLayout.GetFormID: string;
begin
if FForm=nil then
if Form=nil then
Result:=fFormID
else
Result:=FForm.Name;
Result:=Form.Name;
end;
function TSimpleWindowLayout.GetXMLFormID: string;