[mcclim-devel] How stream-pointer-position should work?

Evgeny M. Zubok evgeny.zubok at tochka.ru
Sat Dec 26 15:53:46 UTC 2009


If I call stream-pointer-position on the stream without scroller, it
returns an expected position. However, when the stream has a scroller,
the function returns the position inside viewport regardless position of
scrollbars, i. e. from upper left corner of viewport, not from the
stream's origin. I have played with map-sheet-position-to-child and
map-sheet-position-to-parent but faced with the different behaviour of
these functions, which depends on how scrolling declared inside
define-application-frame. To be more presise, it depends on internal
structure of application-pane with scroller: in McCLIM it has also
border-pane as a parent (why?). I think, the programmer shouldn't keep
in mind such implementation details.

So, what is the right behavior of stream-pointer-position if the stream
has a scroller?  Shouldn't it return the real coordinates on stream as
pointer events do?

Specification says:

stream-pointer-position                               [Generic Function]

Arguments: stream &key pointer 

Summary: Returns the current position of the pointing device pointer for
the extended input stream stream as two values, the x and y positions in
the stream's drawing surface coordinate system. If pointer is not
supplied, it defaults to the stream-primary-pointer of the stream.

More information about the mcclim-devel mailing list