mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 22:09:09 +02:00
* fixed mouse
This commit is contained in:
parent
2e6f9ff2a0
commit
3356001096
@ -914,15 +914,11 @@ BEGIN
|
||||
NextQueuedEvent(Event); { Next queued event }
|
||||
If (Event.What = evNothing) Then Begin
|
||||
GetKeyEvent(Event); { Fetch key event }
|
||||
{$ifdef DEBUG}
|
||||
If (Event.What = evKeyDown) then
|
||||
Begin
|
||||
if Event.keyCode = kbAltF11 then
|
||||
WriteDebugInfo := not WriteDebugInfo;
|
||||
if Event.keyCode = kbAltF12 then
|
||||
ReDraw;
|
||||
End;
|
||||
{$endif DEBUG}
|
||||
If (Event.What = evNothing) Then Begin { No mouse event }
|
||||
Drivers.GetMouseEvent(Event); { Load mouse event }
|
||||
If (Event.What = evNothing) Then
|
||||
@ -1157,7 +1153,10 @@ END;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.25 2004-11-06 17:08:48 peter
|
||||
Revision 1.26 2004-11-06 22:03:06 peter
|
||||
* fixed mouse
|
||||
|
||||
Revision 1.25 2004/11/06 17:08:48 peter
|
||||
* drawing of tview merged from old fv code
|
||||
|
||||
}
|
||||
|
33
fv/menus.pas
33
fv/menus.pas
@ -21,33 +21,9 @@
|
||||
{ ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. }
|
||||
{ }
|
||||
{*****************[ SUPPORTED PLATFORMS ]******************}
|
||||
{ 16 and 32 Bit compilers }
|
||||
{ DOS - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ DPMI - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ - FPC 0.9912+ (GO32V2) (32 Bit) }
|
||||
{ WINDOWS - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ - Delphi 1.0+ (16 Bit) }
|
||||
{ WIN95/NT - Delphi 2.0+ (32 Bit) }
|
||||
{ - Virtual Pascal 2.0+ (32 Bit) }
|
||||
{ - Speedsoft Sybil 2.0+ (32 Bit) }
|
||||
{ - FPC 0.9912+ (32 Bit) }
|
||||
{ OS2 - Virtual Pascal 1.0+ (32 Bit) }
|
||||
{ - Speed pascal 1.0+ (32 Bit) }
|
||||
{ }
|
||||
{******************[ REVISION HISTORY ]********************}
|
||||
{ Version Date Fix }
|
||||
{ ------- --------- --------------------------------- }
|
||||
{ 1.00 12 Jun 96 Initial DOS/DPMI code released. }
|
||||
{ 1.10 18 Oct 97 Code converted to GUI & TEXT mode. }
|
||||
{ 1.20 18 Jul 97 Windows conversion added. }
|
||||
{ 1.30 29 Aug 97 Platform.inc sort added. }
|
||||
{ 1.40 22 Oct 97 Delphi3 32 bit code added. }
|
||||
{ 1.50 05 May 98 Virtual pascal 2.0 code added. }
|
||||
{ 1.60 11 May 98 Clean up and ensure error checks. }
|
||||
{ 1.70 15 May 98 Documentation & format completed. }
|
||||
{ 1.80 30 Sep 99 Complete recheck preformed }
|
||||
{ 1.81 03 Nov 99 FPC windows support added }
|
||||
{ 1.90 26 Nov 99 Graphics stuff moved to GFVGraph }
|
||||
{ Only Free Pascal Compiler supported }
|
||||
{ }
|
||||
{**********************************************************}
|
||||
|
||||
UNIT Menus;
|
||||
@ -1653,7 +1629,10 @@ END;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2004-11-06 17:08:48 peter
|
||||
Revision 1.22 2004-11-06 22:03:06 peter
|
||||
* fixed mouse
|
||||
|
||||
Revision 1.21 2004/11/06 17:08:48 peter
|
||||
* drawing of tview merged from old fv code
|
||||
|
||||
}
|
||||
|
75
fv/views.pas
75
fv/views.pas
@ -21,28 +21,9 @@
|
||||
{ ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. }
|
||||
{ }
|
||||
{*****************[ SUPPORTED PLATFORMS ]******************}
|
||||
{ 16 and 32 Bit compilers }
|
||||
{ DOS - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ DPMI - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ - FPC 0.9912+ (GO32V2) (32 Bit) }
|
||||
{ WINDOWS - Turbo Pascal 7.0 + (16 Bit) }
|
||||
{ - Delphi 1.0+ (16 Bit) }
|
||||
{ WIN95/NT - Delphi 2.0+ (32 Bit) }
|
||||
{ - Virtual Pascal 2.0+ (32 Bit) }
|
||||
{ - Speedsoft Sybil 2.0+ (32 Bit) }
|
||||
{ - FPC 0.9912+ (32 Bit) }
|
||||
{ OS2 - Virtual Pascal 1.0+ (32 Bit) }
|
||||
{ }
|
||||
{******************[ REVISION HISTORY ]********************}
|
||||
{ Version Date Fix }
|
||||
{ ------- --------- --------------------------------- }
|
||||
{ 1.00 10 Nov 96 First multi platform release }
|
||||
{ 1.10 29 Aug 97 Platform.inc sort added. }
|
||||
{ 1.20 12 Sep 97 FPK pascal 0.92 conversion added. }
|
||||
{ 1.30 10 Jun 98 Virtual pascal 2.0 code added. }
|
||||
{ 1.40 10 Jul 99 Sybil 2.0 code added }
|
||||
{ 1.41 03 Nov 99 FPC Windows support added. }
|
||||
{ 1.50 26 Nov 99 Graphics stuff moved to GFVGraph }
|
||||
{ Only Free Pascal Compiler supported }
|
||||
{ }
|
||||
{**********************************************************}
|
||||
|
||||
UNIT Views;
|
||||
@ -1270,12 +1251,11 @@ END;
|
||||
{---------------------------------------------------------------------------}
|
||||
FUNCTION TView.MouseInView (Point: TPoint): Boolean;
|
||||
BEGIN
|
||||
MouseInView := False; { Preset false }
|
||||
If (Point.X < Origin.X) Then Exit; { Point to left }
|
||||
If (Point.X > (Origin.X+Size.X)) Then Exit; { Point to right }
|
||||
If (Point.Y < Origin.Y) Then Exit; { Point is above }
|
||||
If (Point.Y > (Origin.Y+Size.Y)) Then Exit; { Point is below }
|
||||
MouseInView := True; { Return true }
|
||||
MakeLocal(Point,Point);
|
||||
MouseInView := (Point.X >= 0) and
|
||||
(Point.Y >= 0) and
|
||||
(Point.X < Size.X) and
|
||||
(Point.Y < Size.Y);
|
||||
END;
|
||||
|
||||
{--TView--------------------------------------------------------------------}
|
||||
@ -4161,19 +4141,39 @@ end;
|
||||
{ MakeLocal -> Platforms DOS/DPMI/WIN/OS2 - Checked 12Sep97 LdB }
|
||||
{---------------------------------------------------------------------------}
|
||||
PROCEDURE TView.MakeLocal (Source: TPoint; Var Dest: TPoint);
|
||||
BEGIN
|
||||
Dest.X := Source.X - Origin.X; { Local x value }
|
||||
Dest.Y := Source.Y - Origin.Y; { Local y value }
|
||||
END;
|
||||
var
|
||||
cur : PView;
|
||||
begin
|
||||
cur:=@Self;
|
||||
Dest:=Source;
|
||||
repeat
|
||||
dec(Dest.X,cur^.Origin.X);
|
||||
if dest.x<0 then
|
||||
break;
|
||||
dec(Dest.Y,cur^.Origin.Y);
|
||||
if dest.y<0 then
|
||||
break;
|
||||
cur:=cur^.Owner;
|
||||
until cur=nil;
|
||||
end;
|
||||
|
||||
|
||||
{--TView--------------------------------------------------------------------}
|
||||
{ MakeGlobal -> Platforms DOS/DPMI/WIN/OS2 - Checked 12Sep97 LdB }
|
||||
{---------------------------------------------------------------------------}
|
||||
PROCEDURE TView.MakeGlobal (Source: TPoint; Var Dest: TPoint);
|
||||
BEGIN
|
||||
Dest.X := Source.X + Origin.X; { Global x value }
|
||||
Dest.Y := Source.Y + Origin.Y; { Global y value }
|
||||
END;
|
||||
var
|
||||
cur : PView;
|
||||
begin
|
||||
cur:=@Self;
|
||||
Dest:=Source;
|
||||
repeat
|
||||
inc(Dest.X,cur^.Origin.X);
|
||||
inc(Dest.Y,cur^.Origin.Y);
|
||||
cur:=cur^.Owner;
|
||||
until cur=nil;
|
||||
end;
|
||||
|
||||
|
||||
procedure TView.do_writeViewRec1(x1,x2:Sw_integer; p:PView; shadowCounter:Sw_integer);
|
||||
var
|
||||
@ -4667,7 +4667,10 @@ END.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.47 2004-11-06 17:08:48 peter
|
||||
Revision 1.48 2004-11-06 22:03:06 peter
|
||||
* fixed mouse
|
||||
|
||||
Revision 1.47 2004/11/06 17:08:48 peter
|
||||
* drawing of tview merged from old fv code
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user