MG: reduced size+move messages between lcl and interface

git-svn-id: trunk@879 -
This commit is contained in:
lazarus 2002-02-09 01:47:13 +00:00
parent 3f508c5aea
commit d2f4ed04c4
2 changed files with 108 additions and 89 deletions

View File

@ -114,7 +114,8 @@ begin
// UpdateAnchorRules;
BoundsChanged;
RequestAlign;
if not (csLoading in ComponentState) then Resize;
if (not (csLoading in ComponentState)) then begin
Resize;
Perform(LM_WindowposChanged, 0, 0);
{ TODO : Replace this with LCL functions eventually.
@ -126,8 +127,11 @@ begin
with SizeMsg do begin
Msg:= LM_SIZE;
SizeType:= 6; // force realign
Width:= AWidth;
Height:= AHeight;
Width:= FWidth;
Height:= FHeight;
{$IFDEF CHECK_POSITION}
writeln(' [TControl.ChangeBounds] ',Name,':',ClassName,' SizeMsg Width=',Width,' Height=',Height);
{$ENDIF}
end;
WindowProc(TLMessage(SizeMsg));
end;
@ -136,13 +140,17 @@ begin
with MoveMsg do begin
Msg:= LM_MOVE;
MoveType:= 1;
XPos:= ALeft;
YPos:= ATop;
XPos:= FLeft;
YPos:= FTop;
{$IFDEF CHECK_POSITION}
writeln(' [TControl.ChangeBounds] ',Name,':',ClassName,' MoveMsg XPos=',XPos,' YPos=',YPos);
{$ENDIF}
end;
WindowProc(TLMessage(MoveMsg));
end;
end;
end;
end;
{------------------------------------------------------------------------------}
{ TControl.ChangeScale
@ -1471,7 +1479,7 @@ begin
and (FWidth = Message.Width) and (FHeight = Message.Height) then exit;
{$IFDEF CHECK_POSITION}
writeln('[TWinControl.WMSize] Name=',Name,' Message.Width=',Message.Width,' Message.Height=',Message.Height,' Width=',Width,' Height=',Height);
writeln('[TControl.WMSize] Name=',Name,':',ClassName,' Message.Width=',Message.Width,' Message.Height=',Message.Height,' Width=',Width,' Height=',Height);
{$ENDIF}
Assert(False, Format('Trace:[TWinControl.WMSize] %s', [ClassName]));
@ -1490,9 +1498,11 @@ end;
------------------------------------------------------------------------------}
procedure TControl.WMMove(var Message: TLMMove);
begin
if (Message.MoveType = 0) and (FLeft = Message.XPos) and (FTop = Message.YPos) then Exit;
if (Message.MoveType = 0)
and (FLeft = Message.XPos) and (FTop = Message.YPos) then
Exit;
{$IFDEF CHECK_POSITION}
writeln('[TWinControl.WMMove] Name=',Name,' Message.XPos=',Message.XPos,' Message.YPos=',Message.YPos,' Left=',Left,' Top=',Top);
writeln('[TControl.WMMove] Name=',Name,':',ClassName,' Message.XPos=',Message.XPos,' Message.YPos=',Message.YPos,' OldLeft=',Left,' OldTop=',Top);
{$ENDIF}
{ Just sync the coordinates }
SetBounds(Message.XPos, Message.YPos, Width, Height);
@ -1506,6 +1516,9 @@ end;
{ =============================================================================
$Log$
Revision 1.38 2002/03/16 21:40:54 lazarus
MG: reduced size+move messages between lcl and interface
Revision 1.37 2002/03/14 23:25:52 lazarus
MG: fixed TBevel.Create and TListView.Destroy

View File

@ -469,7 +469,6 @@ Region_Error = Error;
{Scroll bar stuff}
SB_Horz = 0;
SB_Vert = 1;
SB_CTL = 2;
@ -517,12 +516,13 @@ Region_Error = Error;
SWP_NOREDRAW = 4;
SWP_NOACTIVATE = 5;
{ WMSIZE MEssage Constants}
{ WMSIZE Message Constants}
Size_Restored = 0;
Size_Minimized = 1;
Size_Maximized = 2;
Size_MaxShow = 3;
Size_MaxHide = 4;
Size_SourceIsInterface = 128;
SIZENORMAL = Size_Restored;
SIZEICONIC = Size_Minimized;
@ -530,6 +530,9 @@ Region_Error = Error;
SIZEZOOMSHOW = Size_MaxShow;
SIZEZOOMHIDE = Size_MaxHide;
{ WMMove Message Constants }
Move_SourceIsInterface = 128;
{ Window Styles }
WS_OVERLAPPED = 0;
WS_POPUP = DWORD($80000000);
@ -1396,6 +1399,9 @@ end.
{
$Log$
Revision 1.2 2002/03/16 21:40:54 lazarus
MG: reduced size+move messages between lcl and interface
Revision 1.1 2002/02/03 00:24:00 lazarus
TPanel implemented.
Basic graphic primitives split into GraphType package, so that we can