[comp.windows.x] Xaw, viewport, scrollbar

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

I have two questions regarding the use of the Xaw viewport
widget and the HP ImageEdit widget.

I am writing an application that uses the viewport widget
with the HP imageedit widget as its child. (You view the image
through the viewport.)

1) In order to "zoom" or "unzoom", I change the pixelScale
resource on the imageEdit widget using XtSetValues(). The only
problems is that when I do this, the image doesn't zoom to the
center of the image, and so I went in and manually calculated
and set the horizontal and vertical scrollbars. Unfortunately,
the scrollbars get set, but the image does not get updated.

2) I also want to advance to the next frame in a series of images,
so I create a new XImage and use XtSetValues to set this to the new
image. However, the screen doesn't reflect this change until an 
expose event is called. How can I make the widget IMMEDIATELY reflect
the change? Is it by manually synthesizing an expose event? If that
is the way to do that, then how do I manually generate an expose 
event for that widget?

Thanks in advance. If you need more information to answer the
question, I will gladly provide more.

Oh, yes - one last question. The HP ImageEdit widget's editing 
paradigm was exactly what I was looking for and so I'm using it.
However, the images I am using are 512 by 480 and the ImageEdit
widget was not designed to handle such large images (it redisplays
each replicated pixel individually). Are there any other widgets in
other widget sets which can be used?

Eric Hyche