[comp.windows.x] How to create a scrolled window with zoom and resize in Motif?

tomt@maui.coral.COM (Tom Tulinsky) (06/28/90)

How to create a scrolled window that supports zoom and resize in Motif?

In my application I have a map which I want to scroll and zoom.  The
map is a DrawingArea with widgets placed on it.  Creating the Scrolled
Window with scrollingPolicy=AUTOMATIC does almost everything I want; I
can scroll and resize the map.  However, when zooming I would like to
keep the center of the visible area constant.  This requires moving
the map, which I cannot seem to do.  I have tried XmScrollBarSetValues
and setting the XmNx and y of the map, but it does not move.  

What is the point of letting the application change the slider position if
there is no way to make the corresponding move to the map?

I thought I would have to do all the scrolling manually using scrollingPolicy
=APPLICATION_DEFINED but there is another problem:  how do I find out
if the user has resized the toplevel window, resizing the Scrolled Window?
I have to know this so I can change the size of the sliders.  There is no
resize callback from Scrolled Window.


 Coral
     * **	Tom Tulinsky                508 460-6010
  *  **		Coral Network Corporation   fax 508 481-6258
*  ** 		734 Forest St               net: tomt@coral.com
 ***		   Marlboro, MA 01752		
  **		
*********	
NETWORKS