[comp.windows.x] Technical question concerning Xaw viewport and Xw ImageEdit widget

eric@eedsp.eedsp.gatech.edu (Eric Hyche ) (10/17/90)

I am using the Xw imageEdit widget as the child of the Xaw
viewport widget in my application. I have two questions:

1) In order to zoom/unzoom, I am changing the pixelScale
on the imageEdit widget on the fly using XtSetValues. This
zooms great, but the problem is that the viewport automatically
readjusts the viewing area, so the area you were looking at
(and wanted to zoom in on) is no longer in the viewing area
after the zoom. I tried to fix this by manually calculating
the correct "shown" and "top" resources (for the correct zoom)
and manually setting these on the viewport's two scrollbars.
The scrollbars changed their displays fine, but this did not
affect the region of the image shown. 

2) The second question is related, I think, to the first. In my
application, I deal with files which contain lots of 512x480
images. Therefore, I want to advance from one frame to another.
I tried doing this by recreating an ximage with the data from the
next frame and setting the XtNimage resource (in the imageEdit
widget) using XtSetValues. The XtSetValues call works fine, but
the screen is not updated until a move the viewport around or
otherwise redisplay the image. It seems to me an expose event
needs to be generated somewhere, but I'm not sure how to do
that. I simply want the imageEdit widget to reflect the
changes in its resources immediately.

If anyone out there needs more information to give any help, I
will gladly tell you more. 

As you probably can tell, I am using the imageEdit widget for
something it wasn't really designed for. (The update at low
pixelScales is yawningly slow.) However, the paradigm the
imageEdit widget uses is exactly what I was looking for. Does
anyone know of imawidgets in other widget sets which have similar
I/O paradigms but use a different display routine?

Eric Hyche
eric@medinfo.gatech.edu