mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-12-27 10:29:25 +00:00
35 lines
480 B
ObjectPascal
35 lines
480 B
ObjectPascal
program ExampleMouse;
|
|
|
|
var
|
|
Pt: Point;
|
|
|
|
begin
|
|
|
|
ShowDrawing;
|
|
ShowText;
|
|
|
|
repeat {Until we double-click}
|
|
|
|
GetMouse(Pt);
|
|
|
|
{Button down message detector}
|
|
|
|
while button do
|
|
begin
|
|
Writeln('down', Pt.h, Pt.v);
|
|
repeat {Tight loop until button up}
|
|
until not Button;
|
|
end;
|
|
|
|
{ Button up message detector}
|
|
|
|
while not button do
|
|
begin
|
|
Writeln('up', Pt.h, Pt.v);
|
|
repeat {Tight loop until button down}
|
|
until button;
|
|
end;
|
|
|
|
until 1 > 1; { forever}
|
|
|
|
end. |