mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 03:51:32 +01:00
MG: fixed window positions
git-svn-id: trunk@234 -
This commit is contained in:
parent
7d3a2d32ad
commit
567eee5674
@ -188,8 +188,8 @@ begin
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
Sender.Dispatch(Message);
|
Sender.Dispatch(Message);
|
||||||
if (ControlSelection.IsSelected(Sender)) then begin
|
if (ControlSelection.IsSelected(Sender)) then begin
|
||||||
// writeln('*** LM_Size ',Sender.Name,':',Sender.ClassName,' Type=',Message.SizeType
|
writeln('*** LM_Size ',Sender.Name,':',Sender.ClassName,' Type=',Message.SizeType
|
||||||
// ,' ',Message.Width,',',Message.Height);
|
,' ',Message.Width,',',Message.Height,' Pos=',Sender.Left,',',Sender.Top);
|
||||||
ControlSelection.AdjustSize;
|
ControlSelection.AdjustSize;
|
||||||
if Assigned(FOnPropertiesChanged) then
|
if Assigned(FOnPropertiesChanged) then
|
||||||
FOnPropertiesChanged(Self);
|
FOnPropertiesChanged(Self);
|
||||||
|
|||||||
@ -584,7 +584,7 @@ begin
|
|||||||
ObjectInspector1.SetBounds(Left,Top,Width,Height);
|
ObjectInspector1.SetBounds(Left,Top,Width,Height);
|
||||||
end else begin
|
end else begin
|
||||||
ObjectInspector1.SetBounds(
|
ObjectInspector1.SetBounds(
|
||||||
0,Top+Height+30,230,Max(Screen.Height-Top-Height-100,50));
|
0,Top+Height+30,230,Max(Screen.Height-Top-Height-120,50));
|
||||||
end;
|
end;
|
||||||
ObjectInspector1.OnAddAvailComponent:=@OIOnAddAvailableComponent;
|
ObjectInspector1.OnAddAvailComponent:=@OIOnAddAvailableComponent;
|
||||||
ObjectInspector1.OnSelectComponentInOI:=@OIOnSelectComponent;
|
ObjectInspector1.OnSelectComponentInOI:=@OIOnSelectComponent;
|
||||||
@ -1582,8 +1582,7 @@ writeln('TMainIDE.DoNewEditorUnit 1');
|
|||||||
// create jitform
|
// create jitform
|
||||||
CInterface := TComponentInterface(
|
CInterface := TComponentInterface(
|
||||||
FormEditor1.CreateComponent(nil,TForm,
|
FormEditor1.CreateComponent(nil,TForm,
|
||||||
ObjectInspector1.Left+ObjectInspector1.Width+15,ObjectInspector1.Top+15,
|
ObjectInspector1.Left+ObjectInspector1.Width+40,Top+Height+50,400,300));
|
||||||
400,300));
|
|
||||||
TempForm:=TForm(CInterface.Control);
|
TempForm:=TForm(CInterface.Control);
|
||||||
NewUnitInfo.Form:=TempForm;
|
NewUnitInfo.Form:=TempForm;
|
||||||
SetDefaultsForForm(TempForm);
|
SetDefaultsForForm(TempForm);
|
||||||
@ -2949,8 +2948,8 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.78 2001/03/21 14:25:59 lazarus
|
Revision 1.79 2001/03/21 23:48:28 lazarus
|
||||||
MG: Bugfixes + changed ide closing
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.75 2001/03/19 14:00:46 lazarus
|
Revision 1.75 2001/03/19 14:00:46 lazarus
|
||||||
MG: fixed many unreleased DC and GDIObj bugs
|
MG: fixed many unreleased DC and GDIObj bugs
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
procedure TControl.Adjustsize;
|
procedure TControl.Adjustsize;
|
||||||
begin
|
begin
|
||||||
|
//writeln('[TControl.Adjustsize] ',Name,':',ClassName);
|
||||||
if not (csLoading in ComponentState) then SetBounds(Left, Top, Width, Height);
|
if not (csLoading in ComponentState) then SetBounds(Left, Top, Width, Height);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -677,6 +678,7 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
Procedure TControl.SetBoundsRect(const Rect : TRect);
|
Procedure TControl.SetBoundsRect(const Rect : TRect);
|
||||||
Begin
|
Begin
|
||||||
|
//writeln('[TControl.SetBoundsRect] ',Name,':',ClassName);
|
||||||
with Rect do
|
with Rect do
|
||||||
SetBounds(Left,Top,Right - Left, Bottom - Top);
|
SetBounds(Left,Top,Right - Left, Bottom - Top);
|
||||||
end;
|
end;
|
||||||
@ -718,7 +720,7 @@ const
|
|||||||
BOOLTXT: array[Boolean] of String = ('False', 'True');
|
BOOLTXT: array[Boolean] of String = ('False', 'True');
|
||||||
begin
|
begin
|
||||||
|
|
||||||
Writeln('SetMOuseCapture '+Self.Classname);
|
Writeln('SetMouseCapture '+Self.Classname);
|
||||||
if MouseCapture <> Value
|
if MouseCapture <> Value
|
||||||
then begin
|
then begin
|
||||||
if Value
|
if Value
|
||||||
@ -857,7 +859,8 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
procedure TControl.SetBounds(ALeft, ATop, AWidth, AHeight : integer);
|
procedure TControl.SetBounds(ALeft, ATop, AWidth, AHeight : integer);
|
||||||
begin
|
begin
|
||||||
if (ALeft = Left) and (ATop = Top) and (AWidth = Width) and (AHeight = Height) then Exit;
|
if (ALeft = Left) and (ATop = Top) and (AWidth = Width) and (AHeight = Height)
|
||||||
|
then Exit;
|
||||||
IsResizing := True;
|
IsResizing := True;
|
||||||
try
|
try
|
||||||
FLeft := ALeft;
|
FLeft := ALeft;
|
||||||
@ -1198,9 +1201,12 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
destructor TControl.Destroy;
|
destructor TControl.Destroy;
|
||||||
begin
|
begin
|
||||||
|
//writeln('[TControl.Destroy] A ',Name,':',ClassName);
|
||||||
SetParent(nil);
|
SetParent(nil);
|
||||||
FFont.Free;
|
FFont.Free;
|
||||||
|
//writeln('[TControl.Destroy] B ',Name,':',ClassName);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
//writeln('[TControl.Destroy] END ',Name,':',ClassName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1296,6 +1302,9 @@ end;
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.17 2001/03/21 23:48:29 lazarus
|
||||||
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.16 2001/03/19 14:00:50 lazarus
|
Revision 1.16 2001/03/19 14:00:50 lazarus
|
||||||
MG: fixed many unreleased DC and GDIObj bugs
|
MG: fixed many unreleased DC and GDIObj bugs
|
||||||
|
|
||||||
|
|||||||
@ -560,11 +560,13 @@ begin
|
|||||||
Result := DeliverMessage(Data, Mess) = 0;
|
Result := DeliverMessage(Data, Mess) = 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function gtksize_allocateCB( widget: PGtkWidget; size :pGtkAllocation; data: gPointer) : GBoolean; cdecl;
|
function gtksize_allocateCB( widget: PGtkWidget; size :pGtkAllocation;
|
||||||
|
data: gPointer) : GBoolean; cdecl;
|
||||||
var
|
var
|
||||||
PosMsg : TLMWindowPosChanged;
|
PosMsg : TLMWindowPosChanged;
|
||||||
SizeMsg: TLMSize;
|
SizeMsg: TLMSize;
|
||||||
MoveMsg: TLMMove;
|
MoveMsg: TLMMove;
|
||||||
|
Dummy: TPoint;
|
||||||
begin
|
begin
|
||||||
EventTrace('size-allocate', data);
|
EventTrace('size-allocate', data);
|
||||||
|
|
||||||
@ -579,9 +581,19 @@ begin
|
|||||||
try
|
try
|
||||||
with PosMsg.WindowPos^ do
|
with PosMsg.WindowPos^ do
|
||||||
begin
|
begin
|
||||||
if TObject(data) is TWinControl
|
if TObject(data) is TWinControl then begin
|
||||||
then hWnd := TWinControl(data).Handle
|
hWnd := TWinControl(data).Handle;
|
||||||
else hWnd := 0;
|
if TObject(data) is TCustomForm then begin
|
||||||
|
//writeln('[gtksize_allocateCB] CUSTOMFORM ************'
|
||||||
|
// ,TControl(Data).Left,',',TControl(Data).Top,' ',Size^.X,',',Size^.Y);
|
||||||
|
Dummy.X:=TControl(Data).Left;
|
||||||
|
Dummy.Y:=TControl(Data).Top;
|
||||||
|
gdk_window_get_root_origin(widget^.window, @Dummy.X, @Dummy.Y);
|
||||||
|
Size^.X:=Dummy.X;
|
||||||
|
Size^.Y:=Dummy.Y;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
hWnd := 0;
|
||||||
hWndInsertAfter := 0;
|
hWndInsertAfter := 0;
|
||||||
x := Size^.X;
|
x := Size^.X;
|
||||||
y := Size^.Y;
|
y := Size^.Y;
|
||||||
@ -617,6 +629,7 @@ Writeln('***********************');
|
|||||||
Height := Size^.Height;
|
Height := Size^.Height;
|
||||||
end;
|
end;
|
||||||
Assert(False, 'Trace:[gtksize_allocateCB] DeliverMessage LM_SIZE');
|
Assert(False, 'Trace:[gtksize_allocateCB] DeliverMessage LM_SIZE');
|
||||||
|
|
||||||
Result := DeliverPostMessage(Data, SizeMsg) or Result;
|
Result := DeliverPostMessage(Data, SizeMsg) or Result;
|
||||||
|
|
||||||
with MoveMsg do
|
with MoveMsg do
|
||||||
@ -1091,6 +1104,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.27 2001/03/21 23:48:29 lazarus
|
||||||
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.26 2001/03/19 14:44:22 lazarus
|
Revision 1.26 2001/03/19 14:44:22 lazarus
|
||||||
MG: fixed many unreleased DC and GDIObj bugs
|
MG: fixed many unreleased DC and GDIObj bugs
|
||||||
|
|
||||||
|
|||||||
@ -557,7 +557,8 @@ activate_time : the time at which the activation event occurred.
|
|||||||
LM_SetSize :
|
LM_SetSize :
|
||||||
begin
|
begin
|
||||||
Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> LM_SetSize(%d, %d, %d, %d)', [Sender.ClassNAme, PRect(Data)^.Left,PRect(Data)^.Top,PRect(Data)^.Right,PRect(Data)^.Bottom]));
|
Assert(False, Format('Trace: [TgtkObject.IntSendMessage3] %s --> LM_SetSize(%d, %d, %d, %d)', [Sender.ClassNAme, PRect(Data)^.Left,PRect(Data)^.Top,PRect(Data)^.Right,PRect(Data)^.Bottom]));
|
||||||
ResizeChild(Sender,PRect(Data)^.Left,PRect(Data)^.Top,PRect(Data)^.Right,PRect(Data)^.Bottom);
|
ResizeChild(Sender,PRect(Data)^.Left,PRect(Data)^.Top,
|
||||||
|
PRect(Data)^.Right,PRect(Data)^.Bottom);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LM_ShowModal :
|
LM_ShowModal :
|
||||||
@ -2757,8 +2758,8 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.38 2001/03/21 14:26:00 lazarus
|
Revision 1.39 2001/03/21 23:48:29 lazarus
|
||||||
MG: Bugfixes + changed ide closing
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.36 2001/03/19 18:51:57 lazarus
|
Revision 1.36 2001/03/19 18:51:57 lazarus
|
||||||
MG: added dynhasharray and renamed tsynautocompletion
|
MG: added dynhasharray and renamed tsynautocompletion
|
||||||
|
|||||||
@ -725,8 +725,8 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2001/03/21 14:26:00 lazarus
|
Revision 1.14 2001/03/21 23:48:29 lazarus
|
||||||
MG: Bugfixes + changed ide closing
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.12 2001/03/19 14:44:22 lazarus
|
Revision 1.12 2001/03/19 14:44:22 lazarus
|
||||||
MG: fixed many unreleased DC and GDIObj bugs
|
MG: fixed many unreleased DC and GDIObj bugs
|
||||||
|
|||||||
@ -2120,6 +2120,7 @@ begin
|
|||||||
Begin
|
Begin
|
||||||
gdk_window_get_origin(Widget^.Window, @X, @Y);
|
gdk_window_get_origin(Widget^.Window, @X, @Y);
|
||||||
gdk_window_get_size(Widget^.Window, @W, @H);
|
gdk_window_get_size(Widget^.Window, @W, @H);
|
||||||
|
writeln('[TgtkObject.GetWindowRect] ',x,',',y,',',w,',',h);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Begin
|
Begin
|
||||||
@ -2684,6 +2685,7 @@ Begin
|
|||||||
gdk_window_get_origin(Widget^.Window, @X, @Y);
|
gdk_window_get_origin(Widget^.Window, @X, @Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
writeln('[TGTKObject.ScreenToClient] ',x,',',y,' P=',P.X,',',P.Y);
|
||||||
dec(P.X, X);
|
dec(P.X, X);
|
||||||
dec(P.Y, Y);
|
dec(P.Y, Y);
|
||||||
Result := -1;
|
Result := -1;
|
||||||
@ -3423,8 +3425,8 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.29 2001/03/21 14:26:00 lazarus
|
Revision 1.30 2001/03/21 23:48:29 lazarus
|
||||||
MG: Bugfixes + changed ide closing
|
MG: fixed window positions
|
||||||
|
|
||||||
Revision 1.26 2001/03/19 18:51:57 lazarus
|
Revision 1.26 2001/03/19 18:51:57 lazarus
|
||||||
MG: added dynhasharray and renamed tsynautocompletion
|
MG: added dynhasharray and renamed tsynautocompletion
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user