Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!bloom-beacon!MBUNIX.MITRE.ORG!ted
From: ted@MBUNIX.MITRE.ORG (Ted Ede)
Newsgroups: comp.windows.x
Subject: Athena asciiStringWidget questions
Message-ID: <8909252128.AA28066@mbunix.mitre.org>
Date: 25 Sep 89 21:28:16 GMT
Sender: daemon@bloom-beacon.MIT.EDU
Organization: The Internet
Lines: 44


Time for a few more questions on text widgets.  First, boatloads of
thanks to Brian Smith of Lawrence Berkeley Laboratory for identifying
my last problem as a known bug in R3 and providing the patch.

I'm using the Athena Widgets to create a multi-window talk utility.  I
open a display on each server, and create a form widget to contain a
label and text widget for each talker.  I'd like prevent a user from
typing into just any text widget (ie talking in some else's window).

Two options I can think of:

1) force all input from the form widget into a particular text widget
using XtSetKeyboardFocus(form_widget,particular_text_widget) after I
create the managed widget but before I realize it.  This doesn't seem
to work under awm.  Is it a one shot deal or am I doing something
dumb?

2) Identifying input focus to all text widgets with a callback, and
calling XtCallAcceptFocus if the widget is the appropriate widget.  I
haven't tried this because the asciiStringWidget doesn't have a
callback for input focus.  Is there another way to get this event?
Also, XtCallAcceptFocus is not in my libXt.  Is this a common error or
were our libraries built incorrectly?


Now, for a more mundane question: How do I allow more text to be saved
in an asciiStringWidget?  I've read the section on sincs and sources,
and it doesn't paint the clearest picture to me.  Should I just
allocate a big bunch of memory and create my own string source?  Also,
I'd like the widget to just forget about text further back than N
characters, instead of beeping at me.  A sliding text window of sorts.
Is that possible?  (As an aside, DEC's S TEXT WIDGET allows for a
string 2^31 - 1 characters long.  How do they do that?)

Inquiring minds want to know.  

Thanks,
Ted

|Ted Ede -- ted@mbunix.mitre.org -- The MITRE Corporation -- Burlington Road|
| linus!mbunix!ted -- Bedford MA, 01730 -- Mail Stop B090 -- (617) 271-7465 |
|                   - this line intentionally left blank -                  |
+---------------------------------------------------------------------------+