Desktop-Problems : Mousecoordinates within picture
Author Message
Desktop-Problems : Mousecoordinates within picture

I'm just reposting my problem because it disappeared from the newsgroup =

and I didn=8Ct get any answer so far: =

The following excerpt of a Frame-Handler for the Oberon.InputMsg works
well as long the frames are opened in the two-track-view. But as soon as  =

the Rembrandt-Document which covers the picture is opened on a desktop, =

the returned coordinates x,y within the picture become wrong:
=2E..
Frame =3D POINTER TO FrameDesc;
FrameDesc =3D RECORD ( Rembrandt.FrameDesc )
some own exported record elements* : INTEGER;
END;
=2E..

PROCEDURE FrameInput ( F : Frame; VAR M : Oberon.InputMsg );
VAR x,y : INTEGER;
=2E..
Rembrandt.ScreentoPict ( F, F.X, F.Y, M.X, M.Y, x, y );
=2E..

Where is the difference between the two-track-view and an Oberon =

Desktop? Does anybody know the right statement-sequence? By the way the =

picture is sometimes zoomed with the "+"-button of Rembrandt-Documents =

and that causes no problems in the two-track-view at all.

()()()()  Abteilung Didaktik der Physik   ()()()()()()()()()()()
=

Institut fuer Theoretische Festkoerperphysik
Universitaet Karlsruhe       76128 Karlsruhe
voice:  ##49-721-608-3592/3360
fax:  ##49-721-698150
=

()()()()   http://www.*-*-*.com/ ~didaktik/   ()()()

Sat, 03 Apr 1999 03:00:00 GMT
Desktop-Problems : Mousecoordinates within picture

Quote:

> ...
> The following excerpt of a Frame-Handler for the Oberon.InputMsg works
> well as long the frames are opened in the two-track-view. But as soon as
> the Rembrandt-Document which covers the picture is opened on a desktop,
> the returned coordinates x,y within the picture become wrong:
> ...
> Frame = POINTER TO FrameDesc;
> FrameDesc = RECORD ( Rembrandt.FrameDesc )
>   some own exported record elements* : INTEGER;
> END;
> ...

> PROCEDURE FrameInput ( F : Frame; VAR M : Oberon.InputMsg );
> VAR x,y : INTEGER;
> ...
>   Rembrandt.ScreentoPict ( F, F.X, F.Y, M.X, M.Y, x, y );
> ...

> Where is the difference between the two-track-view and an Oberon
> Desktop? Does anybody know the right statement-sequence? By the way the
> picture is sometimes zoomed with the "+"-button of Rembrandt-Documents
> and that causes no problems in the two-track-view at all.
> ...

There is no difference between the tiled and the overlaped desktop.
The problem is, that this procedure expects the frame's absolute screen
coords.

This call should produce the right result:
Rembrandt.ScreentoPict(F, M.x + F.X, M.y + F.Y, M.X, M.Y, x, y)
---------  ---------

--