mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:19:19 +02:00
MG: reduced size+move messages between lcl and interface
git-svn-id: trunk@1522 -
This commit is contained in:
parent
cda51ae148
commit
f118ad2dcb
@ -319,6 +319,7 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] no type : found -> ignore pr
|
|||||||
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
||||||
CurPos.EndPos-CurPos.StartPos) then
|
CurPos.EndPos-CurPos.StartPos) then
|
||||||
RaiseException('default parameter expected, but '+GetAtom+' found');
|
RaiseException('default parameter expected, but '+GetAtom+' found');
|
||||||
|
ReadConstant(true,false,[]);
|
||||||
Parts[ppDefault].StartPos:=CurPos.StartPos;
|
Parts[ppDefault].StartPos:=CurPos.StartPos;
|
||||||
if not ReadConstant(true,false,[]) then exit;
|
if not ReadConstant(true,false,[]) then exit;
|
||||||
Parts[ppDefault].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
Parts[ppDefault].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||||
|
@ -38,7 +38,8 @@ uses classes, controls, vclglobals, sysutils, GraphType, Graphics, Menus,
|
|||||||
LCLLinux, LCLType, LMessages;
|
LCLLinux, LCLType, LMessages;
|
||||||
|
|
||||||
type
|
type
|
||||||
TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);
|
TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly,
|
||||||
|
poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);
|
||||||
|
|
||||||
TWindowState = (wsNormal, wsMinimized, wsMaximized);
|
TWindowState = (wsNormal, wsMinimized, wsMaximized);
|
||||||
TCloseAction = (caNone, caHide, caFree, caMinimize);
|
TCloseAction = (caNone, caHide, caFree, caMinimize);
|
||||||
|
@ -167,10 +167,10 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
Procedure TCustomForm.SetFocus;
|
Procedure TCustomForm.SetFocus;
|
||||||
Begin
|
Begin
|
||||||
writeln('[TCustomForm.SetFocus] A ',Classname);
|
//writeln('[TCustomForm.SetFocus] A ',Classname);
|
||||||
//if not(Visible and Enabled) then Exit;
|
//if not(Visible and Enabled) then Exit;
|
||||||
CNSendMessage(LM_SETFOCUS,Self,nil);
|
CNSendMessage(LM_SETFOCUS,Self,nil);
|
||||||
writeln('[TCustomForm.SetFocus] END ',Classname);
|
//writeln('[TCustomForm.SetFocus] END ',Classname);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
@ -300,7 +300,9 @@ End;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomForm.DoCreate;
|
procedure TCustomForm.DoCreate;
|
||||||
begin
|
begin
|
||||||
|
BeginUpdateBounds;
|
||||||
if Assigned(FOnCreate) then FOnCreate(Self);
|
if Assigned(FOnCreate) then FOnCreate(Self);
|
||||||
|
EndUpdateBounds;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -971,6 +973,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.36 2002/03/16 21:40:55 lazarus
|
||||||
|
MG: reduced size+move messages between lcl and interface
|
||||||
|
|
||||||
Revision 1.35 2002/03/13 22:48:16 lazarus
|
Revision 1.35 2002/03/13 22:48:16 lazarus
|
||||||
Constraints implementation (first cut) and sizig - moving system rework to
|
Constraints implementation (first cut) and sizig - moving system rework to
|
||||||
better match Delphi/Kylix way of doing things (the existing implementation
|
better match Delphi/Kylix way of doing things (the existing implementation
|
||||||
|
@ -826,6 +826,8 @@ var
|
|||||||
Dummy: TPoint;
|
Dummy: TPoint;
|
||||||
OldLeft, OldTop, OldWidth, OldHeight: integer;
|
OldLeft, OldTop, OldWidth, OldHeight: integer;
|
||||||
TopLeftChanged, WidthHeightChanged: boolean;
|
TopLeftChanged, WidthHeightChanged: boolean;
|
||||||
|
|
||||||
|
DummyW, DummyH, DummyD: integer;
|
||||||
begin
|
begin
|
||||||
EventTrace('size-allocate', data);
|
EventTrace('size-allocate', data);
|
||||||
|
|
||||||
@ -856,14 +858,33 @@ begin
|
|||||||
if TObject(data) is TWinControl then begin
|
if TObject(data) is TWinControl then begin
|
||||||
hWnd := TWinControl(data).Handle;
|
hWnd := TWinControl(data).Handle;
|
||||||
if TObject(data) is TCustomForm then begin
|
if TObject(data) is TCustomForm then begin
|
||||||
//writeln('[gtksize_allocateCB] CUSTOMFORM ************'
|
{ writeln('[gtksize_allocateCB] CUSTOMFORM AAA1 ************ ',
|
||||||
// ,TControl(Data).Left,',',TControl(Data).Top,' ',Size^.X,',',Size^.Y);
|
TCustomForm(Data).Name,' Widget=',HexStr(Cardinal(Widget),8),
|
||||||
|
' ',TControl(Data).Left,',',TControl(Data).Top,' ',Size^.X,',',Size^.Y);}
|
||||||
Dummy.X:=TControl(Data).Left;
|
Dummy.X:=TControl(Data).Left;
|
||||||
Dummy.Y:=TControl(Data).Top;
|
Dummy.Y:=TControl(Data).Top;
|
||||||
if widget^.window<>nil then
|
if widget^.window<>nil then
|
||||||
gdk_window_get_root_origin(widget^.window, @Dummy.X, @Dummy.Y);
|
try
|
||||||
|
gdk_window_get_root_origin(widget^.window, @Dummy.X, @Dummy.Y);
|
||||||
|
except
|
||||||
|
on E: Exception do writeln('This was gdk_window_get_root_origin: ',E.Message);
|
||||||
|
end;
|
||||||
Size^.X:=Dummy.X;
|
Size^.X:=Dummy.X;
|
||||||
Size^.Y:=Dummy.Y;
|
Size^.Y:=Dummy.Y;
|
||||||
|
{ writeln('[gtksize_allocateCB] CUSTOMFORM AAA2 ************ ',
|
||||||
|
TCustomForm(Data).Name,' Widget=',HexStr(Cardinal(Widget),8),
|
||||||
|
' ',TControl(Data).Left,',',TControl(Data).Top,' ',Size^.X,',',Size^.Y);}
|
||||||
|
{if widget^.window<>nil then begin
|
||||||
|
gdk_window_get_Position(widget^.window, @Dummy.X, @Dummy.Y);
|
||||||
|
writeln(' Position=',Dummy.X,',',Dummy.Y);
|
||||||
|
gdk_window_get_geometry(widget^.window, @Dummy.X, @Dummy.Y, @DummyW, @DummyH, @DummyD);
|
||||||
|
writeln(' Geometry=',Dummy.X,',',Dummy.Y,',',DummyW,',',DummyH,',',DummyD);
|
||||||
|
gdk_window_get_origin(widget^.window, @Dummy.X, @Dummy.Y);
|
||||||
|
writeln(' Origin=',Dummy.X,',',Dummy.Y);
|
||||||
|
gdk_window_get_deskrelative_origin(widget^.window, @Dummy.X, @Dummy.Y);
|
||||||
|
writeln(' deskrelative_Origin=',Dummy.X,',',Dummy.Y);
|
||||||
|
end;}
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
hWnd := 0;
|
hWnd := 0;
|
||||||
@ -888,14 +909,13 @@ begin
|
|||||||
{ If the message is not handled. A LM_SIZE and LM_MOVE should be sent
|
{ If the message is not handled. A LM_SIZE and LM_MOVE should be sent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (PosMsg.Result = 0) then
|
if (PosMsg.Result = 0) then
|
||||||
begin
|
begin
|
||||||
if WidthHeightChanged then begin
|
if WidthHeightChanged then begin
|
||||||
with SizeMsg do
|
with SizeMsg do
|
||||||
begin
|
begin
|
||||||
Msg := LM_SIZE;
|
Msg := LM_SIZE;
|
||||||
SizeType := 6; // force ReAlign
|
SizeType := Size_SourceIsInterface;
|
||||||
Width := Size^.Width;
|
Width := Size^.Width;
|
||||||
Height := Size^.Height;
|
Height := Size^.Height;
|
||||||
end;
|
end;
|
||||||
@ -907,7 +927,7 @@ begin
|
|||||||
with MoveMsg do
|
with MoveMsg do
|
||||||
begin
|
begin
|
||||||
Msg := LM_MOVE;
|
Msg := LM_MOVE;
|
||||||
MoveType := 1; // force RequestAlign
|
MoveType := Move_SourceIsInterface;
|
||||||
XPos := Size^.X;
|
XPos := Size^.X;
|
||||||
YPos := Size^.Y;
|
YPos := Size^.Y;
|
||||||
end;
|
end;
|
||||||
@ -1571,6 +1591,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.62 2002/03/16 21:40:55 lazarus
|
||||||
|
MG: reduced size+move messages between lcl and interface
|
||||||
|
|
||||||
Revision 1.61 2002/03/14 18:12:46 lazarus
|
Revision 1.61 2002/03/14 18:12:46 lazarus
|
||||||
Mouse events fixes.
|
Mouse events fixes.
|
||||||
|
|
||||||
|
@ -48,9 +48,10 @@ initialization
|
|||||||
InterfaceObject := TgtkObject.Create;
|
InterfaceObject := TgtkObject.Create;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
|
Application.Free;
|
||||||
FreeandNil(Application);
|
Application:=nil;
|
||||||
FreeAllClipBoards;
|
FreeAllClipBoards;
|
||||||
FreeAndNil(InterfaceObject);
|
InterfaceObject.Free;
|
||||||
|
InterfaceObject:=nil;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -436,7 +436,8 @@ TLMMouseMove = TLMMOuse;
|
|||||||
|
|
||||||
TLMMove = record
|
TLMMove = record
|
||||||
Msg: Cardinal;
|
Msg: Cardinal;
|
||||||
MoveType: Integer; // 0 = update, 1 = force RequestAlign
|
MoveType: Integer; // 0 = update, 1 = force RequestAlign,
|
||||||
|
// 128 = Source is Interface (Widget has moved)
|
||||||
case Integer of
|
case Integer of
|
||||||
0: (
|
0: (
|
||||||
XPos: Smallint;
|
XPos: Smallint;
|
||||||
@ -655,7 +656,7 @@ end;
|
|||||||
|
|
||||||
TLMSize = packed record
|
TLMSize = packed record
|
||||||
Msg: Cardinal;
|
Msg: Cardinal;
|
||||||
SizeType: LongInt; // 0 = update, 1 = force realign
|
SizeType: LongInt; // see LCLType.pp (e.g. Size_Restored)
|
||||||
Width : Word;
|
Width : Word;
|
||||||
Height : Word;
|
Height : Word;
|
||||||
Result : LongInt;
|
Result : LongInt;
|
||||||
@ -799,6 +800,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.22 2002/03/16 21:40:54 lazarus
|
||||||
|
MG: reduced size+move messages between lcl and interface
|
||||||
|
|
||||||
Revision 1.21 2002/03/13 22:48:16 lazarus
|
Revision 1.21 2002/03/13 22:48:16 lazarus
|
||||||
Constraints implementation (first cut) and sizig - moving system rework to
|
Constraints implementation (first cut) and sizig - moving system rework to
|
||||||
better match Delphi/Kylix way of doing things (the existing implementation
|
better match Delphi/Kylix way of doing things (the existing implementation
|
||||||
|
Loading…
Reference in New Issue
Block a user