Improved hints with overlapping windows.

Shane

git-svn-id: trunk@469 -
This commit is contained in:
lazarus 2001-11-30 16:41:59 +00:00
parent 34988490b3
commit 804670921f
4 changed files with 40 additions and 5 deletions

View File

@ -1070,12 +1070,24 @@ var
Control : TControl;
Position : TPoint;
BW : Integer;
Window : TWInControl;
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;
if (FCustomForm is TForm) then
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;
Position := FCustomForm.ScreenToClient(Position);

View File

@ -1226,10 +1226,21 @@ var
Index: integer;
PointedRow:TOIpropertyGridRow;
TypeKind : TTypeKind;
Window :TWinControl;
begin
FHintTimer.Enabled := False;
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
Exit;

View File

@ -2906,11 +2906,20 @@ var
cPosition : TPoint;
TextPosition : TPoint;
SE : TSourceEditor;
WIndow : TWInControl;
begin
FHintTimer.Enabled := False;
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);
//Check to see if we are in the windows bounds
if ((cPosition.X <=EditorOpts.GutterWidth) or (cPosition.X >= Width) or (cPosition.Y <= 25)

View File

@ -465,7 +465,6 @@ begin
Result := DeliverPostMessage(Data, MessE);
end
else begin
Writeln('LLastClick = ',FormatDateTime('hh:mm:ss:zz',LLastClick));
MessI.Keys := 0;
case event^.Button of
1 : begin
@ -1466,6 +1465,10 @@ end;
{ =============================================================================
$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
Improved the double click.
Shane