Re: Scrolling graphic area?

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 18 Mar 97 16:56:20 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I was wondering how I would implement a scrolling graphic
> area, either with it's own scroll bars (like a browser) or with a
> seperate area using a positioner (which is what I like better
> because I can display a reduced image of the map and the crosshairs
> show wharea you are looking at nicely (assuming I can put an image
> behind the crosshairs, of course)). ...

I've discussed this topic at some length in earlier postings. You may
want to check the list archives (see the bottom of this message for
the URL).

Basically, just create a Canvas object and then create a child Window
to the Canvas (a Canvas is just a Window). Draw or tile your Pixmaps
into that window. You may end up creating child windows for each
Pixmap and using XSetWindowBackgroundPixmap() to display your
Pixmaps.

The only problem I see using a Positioner object is that you can't
easily set a background image since a Positioner with NO_BOX
attributes is illegal (if you do it, you'll see that the Positioner
crosshairs leave trails as they're moved). It might be easier to
create another Canvas and use either the X or the XForms drawing
routines to draw and undraw the crosshairs or other overlay.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/