[comp.windows.x] Getting to viewport scrollbars

grunwald@flute.cs.uiuc.edu (05/14/89)

Hi,

I recently added accelerators to TeXx2 to allow keyboard input (once I
figured out that it was simple), but had a question about Viewports. I
use a Viewport to hold a DviPage widget, and I wanted to get to the
viewport scrollbars. The functionality I wanted was that holding down
`space' would show you the other half of the display, if it's scrolled
away.

To do this, I needed to get to `viewport.vertical', the vertical scrollbar;
however, there's no `clean' way to get that part of the composite, that I
could deduce. So, I import ViewportP.h and just access the structure member
for the XtInstallAccelerators call. Is this the kosher way to do it? Is
there something I missed in the manual?

Clues to the clueless appreciated.

btw, texx2.8.6.tar.Z (texx2 subdirectory only) and uiuctex2.0.1.tar.Z (full
distributed) are available from a.cs.uiuc.edu, in pub/TeX. This includes the
hacks for accelerators, and an application defaults file. uiuctex2.0.1.tar.Z
includes the 386i version of texsun.
--
Dirk Grunwald
Univ. of Illinois
grunwald@flute.cs.uiuc.edu

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (05/16/89)

> To do this, I needed to get to `viewport.vertical', the vertical scrollbar;
> however, there's no `clean' way to get that part of the composite, that I
> could deduce.

You're right this functionality is not supported.

> So, I import ViewportP.h and just access the structure member
> for the XtInstallAccelerators call. Is this the kosher way to do it? 

No, there is no way to do it.  This may break horribly at some point in 
the future.

> Is there something I missed in the manual?

Nope, perhaps we should document the names of the scrollbars, then you could
use XtNameToWidget().

					Chris