🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.misc
Article #680

Textsw question

#680
From: Dave Jones
Date: Fri, 07 Jun 1991 07:37
32 lines
2038 bytes
Hi, it's me again. I'm frazzled. Pfftt! Textsw's are driving me nuts,
and it's a short drive.

For reasons we need not go into here, I'm switching from emacs to
an OpenWindows text-editor. After almost seven years of emacs, my fingers
have a mind of their own, so I thought I would use the XVIEW textsw's to
make an editor that is almost like the standard one, but knows a few
emacs key-sequences. I started such a thing once using sunview, and it
did not seem too hard. I wish I could find the source code now, but I
think I remember deleting it when I decided it would never be used. (Sob.)

Here's the plan...

I want to intercept all keyboard events. Most of them I want to pass on
to the textsw's default event-handler. Some few I want to munge on my
own, perhaps calling a textsw routine to fiddle with the buffer, et cetera.
For example, I want ctrl-k to kill to the end of the line and store
the killed text in the cut/copy-buffer. We object-oriented dudes call
this profound technique "inheritance". Simple enough?

I can't do it.

When I attach a handler to the textsw directly, it does not receive the
keyboard events. When I attach to a view on the textsw (a Xv_Window), I get
the keyboard events just fine, but SO DOES THE DAMN TEXTSW! It does its thing
after I get through doing my thing, willy-nilly. I've tried every combindation
of WIN_EVENT_PROC, WIN_NOTIFY_SAFE_EVENT_PROC, et cetera that I can think of.
I've read the XVIEW Programming Manual cover-to-cover (yuck!) and now about
all I can do is put my index finger horizontally to lips and make burbling
noises.

What is the magic formula?
Technical Details
Message-ID: <18827@prometheus.megatest.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!netcomsv!dlb!megatest!djones

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!netcomsv!dlb!megatest!djones
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.windows.misc,comp.windows.news
Subject: Textsw question
Message-ID: <18827@prometheus.megatest.UUCP>
Date: 7 Jun 91 07:37:44 GMT
Organization: Megatest Corporation, San Jose, Ca
Lines: 32