groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] gxditview feature request


From: Ralph Corderoy
Subject: Re: [Groff] gxditview feature request
Date: Tue, 22 May 2007 13:38:51 +0100

Hi Robert,

> On my Mac, I usually keep an X server going with gxditview previewing
> the file I'm working on in my text editor.  I can switch back and
> forth with Cmd-Tab, and update the preview with 'r'.  All this I can
> do without touching a mouse.  But if I need to scroll within the
> gxditview preview page, I not only need to use the mouse, but also try
> to remember those awful, counterintuitive Mosaic mouseclick scrolls.

It's the Athena widget set IIRC.

> Inevitably, I bash the arrow keys a few times hoping that they will
> scroll the screen, but vainly...
> 
> so, could arrow-key scrolling be implemented easily in gxditview?

I was hoping it would just be an X resource issue, and indeed, putting

    GXditview.*.viewport.*.background: red
    GXditview.*.viewport.horizontal.translations: #augment \
        <Key>l: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>h: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()
    GXditview.*.viewport.vertical.translations: #augment \
        <Key>j: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>k: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()

in my ~/.Xdefaults-`hostname` had an effect, but only when a scrollbar
had the input focus, i.e. click on the scrollbar widget first and then
`j' and `k' would scroll it up and down.

To make the scrollbars "grab" these key presses no matter where the
input focus is I believe Intrinsic accelerators should be used, e.g.

    GXditview.*.viewport.vertical.accelerators: #override \
        <Key>1: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>2: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()

but the application must "install" accelerators, e.g.
XtInstallAccelerators(), to link a possible source hierarchy of the
event with the destination widget that should handle them.  I don't
think the Athena Paned widget does this automatically, but could be
wrong.

Anyway, it seems some code changes may be required after all and I don't
have a solution or further time to work on it but I thought this might
be of use to anyone who has.

Cheers,


Ralph.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]