CLIM mail archive
Positioning a menu?
Date: Mon, 25 Oct 1993 14:27 EDT
From: Nichael Cramer <ncramer@BBN.COM>
CLIM 2.0-Beta/Allegro/On a Sparc
I need to position a pop-up window at a point (PX,PY) over a pane. (I get
the window using WITH-MENU.)
The most useful function I can come up with is POSITION-SHEET-CAREFULLY.
However, this positions the menu-window relative to the upper-left corner
of the screen. (This behavious is not affected by any of the obvious
things --e.g. by setting the ASSOCIATED-WINDOW when calling WITH-MENU).
(MOVE-SHEET and MOVE-AND-RESIZE sheet appear to only frob the
transformation of the menu window and not actually move the window itself.)
Alternatively, I could convert (PX,PY) into screen-coordinates. But I
can't figure out a reasonable way to this. (For example, I seem to get
identity transformations all the way up the sheet-parent tree.)
This should work:
Transform PX and PY by the CLIM:SHEET-DEVICE-TRANSFORMATION of the pane
you want to position over to get the "screen" coordinates. Then call
POSITION-SHEET-CAREFULLY on the transformed PX and PY.
Suggestions? (BTW I got this to work in 1.1.)
Main Index |