|
@@ -6,7 +6,7 @@
|
|
|
|
|
|
This is unit implements a subset of the msmouse unit functionality
|
|
This is unit implements a subset of the msmouse unit functionality
|
|
for the gui win32 graph unit implementation
|
|
for the gui win32 graph unit implementation
|
|
-
|
|
|
|
|
|
+
|
|
See the file COPYING.FPC, included in this distribution,
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
for details about the copyright.
|
|
|
|
|
|
@@ -111,32 +111,38 @@ unit winmouse;
|
|
function InitMouse : boolean;
|
|
function InitMouse : boolean;
|
|
|
|
|
|
begin
|
|
begin
|
|
- InitMouse:=true;
|
|
|
|
|
|
+ InitMouse:=MouseFound;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure ShowMouse;
|
|
procedure ShowMouse;
|
|
|
|
|
|
begin
|
|
begin
|
|
- Windows.ShowCursor(true);
|
|
|
|
|
|
+ Windows.ShowCursor(true);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure HideMouse;
|
|
procedure HideMouse;
|
|
|
|
|
|
begin
|
|
begin
|
|
- Windows.ShowCursor(false);
|
|
|
|
|
|
+ Windows.ShowCursor(false);
|
|
end;
|
|
end;
|
|
|
|
|
|
function msghandler(Window: hwnd; AMessage, WParam,
|
|
function msghandler(Window: hwnd; AMessage, WParam,
|
|
LParam: Longint): Longint;
|
|
LParam: Longint): Longint;
|
|
|
|
|
|
begin
|
|
begin
|
|
|
|
+ { we catch the double click messages here too, }
|
|
|
|
+ { even if they never appear because the graph }
|
|
|
|
+ { windows doesn't have the cs_dblclks flags }
|
|
case amessage of
|
|
case amessage of
|
|
|
|
+ wm_lbuttondblclk,
|
|
wm_lbuttondown:
|
|
wm_lbuttondown:
|
|
- mousebuttonstate:=mousebuttonstate or LButton;
|
|
|
|
|
|
+ mousebuttonstate:=mousebuttonstate or LButton;
|
|
|
|
+ wm_rbuttondblclk,
|
|
wm_rbuttondown:
|
|
wm_rbuttondown:
|
|
- mousebuttonstate:=mousebuttonstate or RButton;
|
|
|
|
|
|
+ mousebuttonstate:=mousebuttonstate or RButton;
|
|
|
|
+ wm_mbuttondblclk,
|
|
wm_mbuttondown:
|
|
wm_mbuttondown:
|
|
- mousebuttonstate:=mousebuttonstate or MButton;
|
|
|
|
|
|
+ mousebuttonstate:=mousebuttonstate or MButton;
|
|
wm_lbuttonup:
|
|
wm_lbuttonup:
|
|
mousebuttonstate:=mousebuttonstate and not(LButton);
|
|
mousebuttonstate:=mousebuttonstate and not(LButton);
|
|
wm_rbuttonup:
|
|
wm_rbuttonup:
|
|
@@ -194,10 +200,15 @@ unit winmouse;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.2 2000-01-07 16:41:53 daniel
|
|
|
|
|
|
+ Revision 1.3 2000-03-05 13:08:52 florian
|
|
|
|
+ + some new functions
|
|
|
|
+ * double click messages are handled like single clicks because this
|
|
|
|
+ is the behavior as old DOS applications expect
|
|
|
|
+
|
|
|
|
+ Revision 1.2 2000/01/07 16:41:53 daniel
|
|
* copyright 2000
|
|
* copyright 2000
|
|
|
|
|
|
Revision 1.1 1999/11/29 22:03:39 florian
|
|
Revision 1.1 1999/11/29 22:03:39 florian
|
|
* first implementation of winmouse unit
|
|
* first implementation of winmouse unit
|
|
|
|
|
|
-}
|
|
|
|
|
|
+}
|