designer: formatting

git-svn-id: trunk@21863 -
This commit is contained in:
paul 2009-09-25 14:43:46 +00:00
parent d24238d791
commit 376507bffe

View File

@ -150,10 +150,10 @@ type
LastPaintSender: TControl; LastPaintSender: TControl;
// event handlers for designed components // event handlers for designed components
function PaintControl(Sender: TControl; TheMessage: TLMPaint):boolean; function PaintControl(Sender: TControl; TheMessage: TLMPaint): Boolean;
function SizeControl(Sender: TControl; TheMessage: TLMSize):boolean; function SizeControl(Sender: TControl; TheMessage: TLMSize): Boolean;
function MoveControl(Sender: TControl; TheMessage: TLMMove):boolean; function MoveControl(Sender: TControl; TheMessage: TLMMove): Boolean;
procedure MouseDownOnControl(Sender: TControl; var TheMessage : TLMMouse); procedure MouseDownOnControl(Sender: TControl; var TheMessage: TLMMouse);
procedure MouseMoveOnControl(Sender: TControl; var TheMessage: TLMMouse); procedure MouseMoveOnControl(Sender: TControl; var TheMessage: TLMMouse);
procedure MouseUpOnControl(Sender: TControl; var TheMessage:TLMMouse); procedure MouseUpOnControl(Sender: TControl; var TheMessage:TLMMouse);
procedure KeyDown(Sender: TControl; var TheMessage: TLMKEY); procedure KeyDown(Sender: TControl; var TheMessage: TLMKEY);
@ -1371,7 +1371,7 @@ begin
Form.Invalidate; Form.Invalidate;
end; end;
function TDesigner.PaintControl(Sender: TControl; TheMessage: TLMPaint):boolean; function TDesigner.PaintControl(Sender: TControl; TheMessage: TLMPaint): Boolean;
var var
OldDuringPaintControl: boolean; OldDuringPaintControl: boolean;
begin begin
@ -1536,24 +1536,26 @@ begin
end; end;
end; end;
function TDesigner.SizeControl(Sender: TControl; TheMessage: TLMSize):boolean; function TDesigner.SizeControl(Sender: TControl; TheMessage: TLMSize): Boolean;
begin begin
Result:=true; Result := True;
Sender.Dispatch(TheMessage); Sender.Dispatch(TheMessage);
if ControlSelection.SelectionForm=Form then begin if ControlSelection.SelectionForm = Form then
ControlSelection.CheckForLCLChanges(true); begin
ControlSelection.CheckForLCLChanges(True);
end; end;
end; end;
function TDesigner.MoveControl(Sender: TControl; TheMessage: TLMMove):boolean; function TDesigner.MoveControl(Sender: TControl; TheMessage: TLMMove): Boolean;
begin begin
Result:=true; Result := True;
Sender.Dispatch(TheMessage); Sender.Dispatch(TheMessage);
//debugln('*** TDesigner.MoveControl A ',Sender.Name,':',Sender.ClassName,' ',ControlSelection.SelectionForm=Form,' ',not ControlSelection.IsResizing,' ',ControlSelection.IsSelected(Sender)); //debugln('*** TDesigner.MoveControl A ',Sender.Name,':',Sender.ClassName,' ',ControlSelection.SelectionForm=Form,' ',not ControlSelection.IsResizing,' ',ControlSelection.IsSelected(Sender));
if ControlSelection.SelectionForm=Form then begin if ControlSelection.SelectionForm = Form then
if (not ControlSelection.CheckForLCLChanges(true)) begin
and (Sender=Form) if not ControlSelection.CheckForLCLChanges(True) and (Sender = Form) and
and ControlSelection.LookupRootSelected then begin ControlSelection.LookupRootSelected then
begin
// the selected form was moved (nothing else has changed) // the selected form was moved (nothing else has changed)
// ControlSelection does not need an update, but properties like // ControlSelection does not need an update, but properties like
// Form.Left/Top have to be updated in the OI // Form.Left/Top have to be updated in the OI