Re: drawing area in a scrolled window
- From: jcupitt gmail com
- To: "Christopher Garrett" <ctg24 admin cam ac uk>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: drawing area in a scrolled window
- Date: Sun, 10 Jun 2007 15:29:27 +0100
On 6/10/07, Christopher Garrett <ctg24 admin cam ac uk> wrote:
However, I have only been able to get mouse coordinates from the drawing area.
I would like to get coordinates from the origin in the top left of the scrolled
window. What do I need to do? I tried getting coords from the alignment, but
that seems to cover exactly the same area as the drawing area itself...
I do this in two stages: I read adj->value and adj->page_size on
"changed" and "value_changed" to get the position and size of the
viewport in the large drawing area and note it. On a mouse event, I
can subtract the viewport from the mouse x/y to get window-relative
coordinates.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]