mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 04:49:29 +02:00
Improved hints with overlapping windows.
Shane git-svn-id: trunk@469 -
This commit is contained in:
parent
34988490b3
commit
804670921f
@ -1070,12 +1070,24 @@ var
|
|||||||
Control : TControl;
|
Control : TControl;
|
||||||
Position : TPoint;
|
Position : TPoint;
|
||||||
BW : Integer;
|
BW : Integer;
|
||||||
|
Window : TWInControl;
|
||||||
begin
|
begin
|
||||||
|
FHintTimer.Enabled := False;
|
||||||
|
|
||||||
|
Position := Mouse.CursorPos;
|
||||||
|
Window := FindLCLWindow(Position);
|
||||||
|
if not(Assigned(window)) then Exit;
|
||||||
|
|
||||||
|
//get the parent until parent is nil
|
||||||
|
While Window.Parent <> nil do
|
||||||
|
Window := Window.Parent;
|
||||||
|
|
||||||
|
if (window <> FCustomForm) then Exit;
|
||||||
|
|
||||||
BW := 0;
|
BW := 0;
|
||||||
if (FCustomForm is TForm) then
|
if (FCustomForm is TForm) then
|
||||||
BW := TForm(FCustomForm).BorderWidth;
|
BW := TForm(FCustomForm).BorderWidth;
|
||||||
FHintTimer.Enabled := False;
|
|
||||||
Position := Mouse.CursorPos;
|
|
||||||
if ((Position.X < (FCustomForm.LEft +BW)) or (Position.X > (FCustomForm.Left+FCustomForm.Width - BW)) or (Position.Y < FCustomForm.Top+22) or (Position.Y > (FCustomForm.Top+FCustomForm.Height - BW))) then Exit;
|
if ((Position.X < (FCustomForm.LEft +BW)) or (Position.X > (FCustomForm.Left+FCustomForm.Width - BW)) or (Position.Y < FCustomForm.Top+22) or (Position.Y > (FCustomForm.Top+FCustomForm.Height - BW))) then Exit;
|
||||||
|
|
||||||
Position := FCustomForm.ScreenToClient(Position);
|
Position := FCustomForm.ScreenToClient(Position);
|
||||||
|
@ -1226,10 +1226,21 @@ var
|
|||||||
Index: integer;
|
Index: integer;
|
||||||
PointedRow:TOIpropertyGridRow;
|
PointedRow:TOIpropertyGridRow;
|
||||||
TypeKind : TTypeKind;
|
TypeKind : TTypeKind;
|
||||||
|
Window :TWinControl;
|
||||||
begin
|
begin
|
||||||
FHintTimer.Enabled := False;
|
FHintTimer.Enabled := False;
|
||||||
|
|
||||||
Position := Mouse.CursorPos;
|
Position := Mouse.CursorPos;
|
||||||
if ( (FLastMouseMovePos.X <= 0) or (FLastMouseMOvePos.Y <= 0)
|
Window := FindLCLWindow(Position);
|
||||||
|
if not(Assigned(window)) then Exit;
|
||||||
|
|
||||||
|
//get the parent until parent is nil
|
||||||
|
While Window.Parent <> nil do
|
||||||
|
Window := Window.Parent;
|
||||||
|
|
||||||
|
if (window <> Self) then Exit;
|
||||||
|
|
||||||
|
if ( (FLastMouseMovePos.X <= 0) or (FLastMouseMOvePos.Y <= 0)
|
||||||
or (FLastMouseMovePos.X >= Width) or (FLastMouseMovePos.Y >= Height)) then
|
or (FLastMouseMovePos.X >= Width) or (FLastMouseMovePos.Y >= Height)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
|
@ -2906,11 +2906,20 @@ var
|
|||||||
cPosition : TPoint;
|
cPosition : TPoint;
|
||||||
TextPosition : TPoint;
|
TextPosition : TPoint;
|
||||||
SE : TSourceEditor;
|
SE : TSourceEditor;
|
||||||
|
WIndow : TWInControl;
|
||||||
begin
|
begin
|
||||||
FHintTimer.Enabled := False;
|
FHintTimer.Enabled := False;
|
||||||
|
|
||||||
cPosition := Mouse.CursorPos;
|
cPosition := Mouse.CursorPos;
|
||||||
|
Window := FindLCLWindow(cPosition);
|
||||||
|
if not(Assigned(window)) then Exit;
|
||||||
|
|
||||||
|
//get the parent until parent is nil
|
||||||
|
While Window.Parent <> nil do
|
||||||
|
Window := Window.Parent;
|
||||||
|
|
||||||
|
if (window <> Self) then Exit;
|
||||||
|
|
||||||
cPosition := ScreenToClient(cPosition);
|
cPosition := ScreenToClient(cPosition);
|
||||||
//Check to see if we are in the windows bounds
|
//Check to see if we are in the windows bounds
|
||||||
if ((cPosition.X <=EditorOpts.GutterWidth) or (cPosition.X >= Width) or (cPosition.Y <= 25)
|
if ((cPosition.X <=EditorOpts.GutterWidth) or (cPosition.X >= Width) or (cPosition.Y <= 25)
|
||||||
|
@ -465,7 +465,6 @@ begin
|
|||||||
Result := DeliverPostMessage(Data, MessE);
|
Result := DeliverPostMessage(Data, MessE);
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
Writeln('LLastClick = ',FormatDateTime('hh:mm:ss:zz',LLastClick));
|
|
||||||
MessI.Keys := 0;
|
MessI.Keys := 0;
|
||||||
case event^.Button of
|
case event^.Button of
|
||||||
1 : begin
|
1 : begin
|
||||||
@ -1466,6 +1465,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.49 2001/11/30 16:41:59 lazarus
|
||||||
|
Improved hints with overlapping windows.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.48 2001/11/29 18:41:27 lazarus
|
Revision 1.48 2001/11/29 18:41:27 lazarus
|
||||||
Improved the double click.
|
Improved the double click.
|
||||||
Shane
|
Shane
|
||||||
|
Loading…
Reference in New Issue
Block a user