HDTenEightyP/NetNews huggingface dataset:
From: scott@asd.com (Scott Barman)
Subject: Re: Changing keyboard focus in motif, Help!!
Organization: American Software Development Corp., West Babylon, NY
Date: Fri, 28 Aug 1992 18:16:59 GMT

In article <l9ljlrINNbbo@male.EBay.Sun.COM> lohia@prathvi.EBay.Sun.COM (Raj Lohia) writes:
>Is there any way in motif, can I change keyboard focus to my 
>program's window without having user using pointer to change focus
>and regardless of window manager focus policy.
>
>I tried using XSetInputFocus in my program but it didn't work.
>
>I will appreciate any help/info.
> 
>Thanks

Try the following:

	XmProcessTraversal(w, XmTRAVERSE_CURRENT);
	XtSetKeyboarFocus(topLevel, w);

where	w is the Widget you want to recieve the focus
	topLevel is the return from XtInitialize or XtAppInitialize

Some might argue using XmProcessTraversal() is enough.  I have found
that in the cases where the destination widget is a compound widget or a
gadget, this will not completly work (you get highlight but no input
focus).  It always works when I add the XtSetKeyboardFocus(), so I do
it like the above everytime.


ATTENTION KEEPER OF THE FAQ List:

	This is a great candidate for the list!  I think this is the
fourth time in the last week-or-so this question has been asked.  So I
posted the response in hopes it would be considered for the FAQ.
-- 
scott barman			| <This space intentionally left blank>
scott@asd.com			|
 (I can barely speak for myself, you expect me to speak for my employer??)
Newsgroups: comp.windows.x.motif
From: chris@ods.com (Chris Atkins)
Subject: Re: PLEASE save my hair... FONTS!
Organization: Optical Data Systems, Inc.
X-Newsreader: Tin 1.1 PL5
Date: Thu, 3 Sep 1992 21:23:23 GMT

Ron Cecchini (cecchinr@hornsby.cs.rpi.edu) wrote:
: 
: 
: Hi all,
: 
:  First let me say that I did check all the appropriate sources (Heller, FAQ,
: "knowledgeable" friends, this group, etc.) and I am still ripping my hair out!
: 
:  My questions involve fonts, which I have readily determined to be one of
: the most annoying things known to man...
: 
: Question 1:
: In 50 words or less: What is the precise difference betwen a font and
: a charset, especially w.r.t. an XmString (NOT a widget).
: 
A fontlist is composed of 1 or more fonts.  Each font in the fontlist can be 
given an identifier.  The identifier is called the charset.  For example:
*fontlist: -*-courier-*-r-*--12-*=normal_font, \
           -*-courier-bold-r-*--12-*=bold_font
The above resource defines one fontlist with the charsets normal_font and 
bold_font.  The calls to XmStringCreate, XmStringCreateLtoR and XmStringSegmentCreate take the charset name as a paramater.
: 
: Question 3:
: Given that you can determine a string's font, how do you calculate the
: "bold" version of it?  Do you just substitute a "b" in the charset or
: font (or whatever the hell its called) string?
: 
If you set up the fontlist, you know which charsets are bold and can use the
charset name in you call to XmStringCreate.
: Question 4:
: I want to specify the font (or is it charset?) of a string at
: runtime; i.e. no resource file specifications.
: XLoadQueryFont() returns a font.  What do I use to get a charset
: to specify to XmStringCreate() ?
You set up a resource as shown above.
: 
: Basically, what I am trying to do is create a list of XmStrings (in the
: list widget of a selection box) where some of the strings are of a
: normal (default) font (or is it charset?), and where some of them are
: in bold face.
: 
: The FAQ says that I can do this.  But given that I am having all this
: difficulty just trying to change the font of one darned string, I ain't
: got nothing working yet...
: 
  XmStringCreate(text, "bold_font");
  XmStringCreate(text2, "normal_font");

O'Reilly volume 6 Motif programming manual has a very good discussions on this
subject in chapter 19 Compound Strings.

Chris Atkins
chris@ods.com
: Thank you very much,
: Ron
:
From: littlec1@jaguar.uofs.edu (Chris Little)
Newsgroups: comp.windows.x.motif
Subject: Need help getting started on VMS platform
Date: 3 Sep 92 04:34:10 GMT
Organization: University of Scranton

Hello,

I am new to this group, most definitely because I am relatively new to Motif
programming.  I use an NCD XTerminal connected to a VAX running VMS.  Our user
interface is DECWindows Motif.  I would like to start writing some Motif
applications and am currently reading Marshall Brain's book, "Motif
Programming - the essentials and more".  I would like to write a
simple application that creates two windows that communicate with one another. 
I am particularly interested in how the C/Motif/VMS interfaces handle
subprocesses and detached processes.  Can anyone out there give me pointers or
show me small sample applications that have these features?

Thank you in advance for your help.

--
Chris Little, Programmer/DBA                    University Computing Systems
                                                University of Scranton
  LITTLEC1@JAGUAR.UOFS.EDU                      Scranton, PA 18510
Newsgroups: comp.windows.x.motif
From: rols@tk1003.shearson.com (Roland King)
Subject: Flashing a widget
Organization: Lehman Brothers
Distribution: comp.windows.x.motif
Date: Fri, 4 Sep 1992 07:28:23 GMT


Does anybody know a good way to flash a widget between two colour combinations in Motif ?

I can think of  

a) Just doing it in the program directly, but I don't want to hold up processing

b) Use a timer event

Any better ways 
Thanx in advance ... Rols
Xref: sparky comp.windows.x.motif:5906 comp.windows.x:15875
From: rmcash@bnr.ca (Leo So P835)
Subject: problems extracting from XmList
Keywords: XmList
Organization: Bell-Northern Research, BNR-RTP 
Date: Mon, 31 Aug 1992 14:34:24 GMT


Hello all.

I'm trying to extract items from an XmList (so they can be saved
to disk as C strings).  XmNitems under XmList is a XmStringTable,
which is defined as:        

                typedef XmString *      XmStringTable;

by <Xm/Xm.h>.  Using the following:

    XmString    *ItemString;
    char        *SomeItem;

    ac = 0;
    XtSetArg(al[ac], XmNitems, &ItemString); ac++;
    XtGetValues(*CurrentList,al,ac);
    XmStringGetLtoR(*ItemString,CHAR_SET,&SomeItem);

I can get the first item in the list (converted to a C string)
put into SomeItem.  However, I don't know how to retrieve the
rest of the items in the list.  Can anyone help?  (It sure would
be nice if there was a convience function for extracting an XmString
from an XmList...)



Thanks for any help in advance !!
-- 
Robert M Cash                                  NN   NN  TTTTTTTT  LL
Northern Telecom, Ltd.                         NNN  NN     TT     LL
35 Davis Dr.                                   NNNN NN     TT     LL
RTP, NC 27709                                  NN NNNN     TT     LL
USA                                            NN  NNN     TT     LL
(919) 991-8243                                 NN   NN     TT     LLLLLLL
From: deveau@oceanroutes.ns.ca ("Terry J. Deveau")
Newsgroups: comp.windows.x.motif
Subject: XmNhelpCallback
Date: 4 Sep 92 15:15:33 GMT
Distribution: inet
Organization: Oceanroutes Canada Inc.

Help! I want to use the XmNhelpCallback resource avilable for
XmManager and XmPrimitive.  The manual says that there is
no default translation bound to this resource, so I have
to install my own.

Ok, but what action procedure do I name?  Do XmManager and
XmPrimitive have actions which call the help callbacks?  I
don't see any reference to these in the documentation.
In general, how can I discover all the actions defined
for a given widget class?

If there is no appropriate action I'll have to install my
own.  Ok, but how do I trigger the XmNhelpCallback from
inside my action procedure.  I presume the way to do it
would be XtCallCallbacks(widget, XmNhelpCallback, call_data),
but what about call_data?

The documentation for XmPrimitive and XmManager says that
the callback routines can expect to receive a reason of
XmCR_HELP.  This implies that call_data should be type
XmAnyCallbackStruct, or should it be XmAnyCallbackStruct* ?
Do I have to set this structure myself? If so, how can
the documentation for XmPrimitive and XmManager be so
sure that I'll use a reason of XmCR_HELP?  Makes me think
that there must be a pre-defined action for this.

Any suggestions will be most welcome.

I'm using Motif 1.0 and X11R3 on an HP9000/834 running
HP-UX 7.0 ... Terry
Newsgroups: comp.windows.x.motif
From: allen@ssvs.gsfc.nasa.gov (Madeleine Allen)
Subject: HELP --> Setting Motif Application for Kanji
Summary: Is anyone familiar with interfacing Kanji in Motif using kterm?
Keywords: kanji kterm nemacs
Organization: Goddard Space Flight Center
Date: Thu, 3 Sep 1992 21:32:03 GMT

Is anyone familiar with interfacing Kanji in Motif using kterm?

We can get our application in Kanji, using the Kanji character set but
really need to be running like kterm to get the user's input to be Kanji.

Any info would be appreciated.  Please respond by e-mail.

  --Thanks, Madeline Allen     allen@astrod.gsfs.nasa.goV

Newsgroups: comp.windows.x.motif
From: marbru@auto-trol.com (Martin Brunecky)
Subject: Re: Public Domain GUI Builder for Motif
Organization: Auto-trol Technology Corporation
Date: Tue, 25 Aug 1992 15:40:07 GMT

In article <2898@contex.contex.com> avinash@felix.contex.com (Avinash Chopde) writes:
>
>I just checked dirt.README at export.lcs.mit.edu:/contrib, it states
>that Motif support is *planned*, and not yet available.
>(MIT has Dirt version 2.1 - Jan 1992.)
>
>Is there some other version of Dirt that supports Motif ?
>
    About a year ago, I'v spent lot of time making Dirt support Motif.
    It was "alpha" release 1.9 and 1.10, if I remember correctly.
    In fact, there was lot of "stuff" already in place by Richard, but
    not quite complete and very well tested. Unfortunately, I failed
    to send my fixes back, and now they are way out of sync.

    The main problem is Dirt was designed to work with *widget*, and NOT
    Motif confusion routines. Where it is very easy to create menubar
    by calling XmCreateMenuBar(), there is no "MenuBar" widget that
    Dirt could use. And creating XmRowColumn widget with the "right"
    set of resources for menu bar from Dirt is difficult, as some of the 
    resources you need are "creation only". Another problem are widgets
    inserted by Motif "behind your back", which change instance hierarchy
    and thus all resource specifications.
    Of course, there is plenty of little gotchas, tons of resource
    conversions (Motif does not provide backwards convertor, Dirt must
    add those) etc. Plus lots of Motif toolkit ackwardness (have you
    ever built a complete Motif menu system?), which you learn how to
    deal with when coding, but sticks out as a sore thumb when using
    an IDT (to my knowledge, most commercial IDTs hide such obscurities
    by menu-system specific support - but Dirt has no "special cases",
    all widgets are treated equally).

    From my experience I do believe that making Dirt working with
    Motif is feasible. Depending on your level of knowledge you can
    spent 3 weeks or more - and then it depends how smooth you want
    to make Dirt's interactions.

-- 
=*= Opinions presented here are solely of my own, not those of my employer =*=
Martin Brunecky           marbru@auto-trol.com                  (303) 252-2499                       
Newsgroups: comp.windows.x.motif
From: chen@cds002.cebaf.gov (Jie chen)
Subject: Problem on ButtonMotionEvent (Motif v1.1)
Reply-To: chen@cds002.cebaf.gov (Jie chen)
Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
Date: Thu, 3 Sep 1992 16:43:56 GMT

Hi, To All Netters out there:
     One of my program has been writeen under Motif 1.0. Recently I recomplied
this program under Motif 1.1. Everything seems ok, but when I tried to use
ButtonMotionEvent to drag a rectangle from one place to another, this rectangle
does not move at all. When this program compiled under Motif 1.0, it has
no problem
at all. After I spent whole day of investigating, I found that  the
ButtonMotionEvent
does not work properly when there are subwindows in my drawing area even
I use
subWindowMode (includeinferior). Has anybody encountered similar
porblems?
Is there any way Motif1.1 scroll this up?  Any help will be
appreciated.

chen@cds002.cebaf.gov
Newsgroups: comp.windows.x.motif
From: chris@ods.com (Chris Atkins)
Subject: Re: Text manipulation in a Drawing Area
Organization: Optical Data Systems, Inc.
X-Newsreader: Tin 1.1 PL5
Distribution: inet
Date: Wed, 26 Aug 1992 22:55:11 GMT

One comment on my earlier response, The only to get the background pixel to
none is by creating the window with XCreateWindow and not setting the background_pixel.  You must therefore create a window as a child of the drawing area.

To get the expose events for the window, you may have to go into XtMainLoop and
insert code to check each event to see if it is for one of your "transparent"
windows.  If so do the expose processing, otherwise, pass it off to Xt for 
handling.

Chris Atkins
chris@ods.com
From: jan@PANDONIA.CANBERRA.EDU.AU (Jan Newmarch)
Newsgroups: comp.windows.x.motif
Subject: Re: Changing keyboard focus in motif, Help!!
Date: 1 Sep 92 14:31:44 GMT
Distribution: inet
Organization: The Internet

> 
> ATTENTION KEEPER OF THE FAQ List:
> 
> 	This is a great candidate for the list!  I think this is the
> fourth time in the last week-or-so this question has been asked.  So I
> posted the response in hopes it would be considered for the FAQ.

Er, it's been in the FAQ for about a year now. When I saw this latest
round come up, I sent email to the original caller pointing them to
the FAQ. In the last week, about 5 topics have come up that are already
in the FAQ. Why do I bother :-(

-- 
+----------------------+---+
  Jan Newmarch, Information Science and Engineering,
  University of Canberra, PO Box 1, Belconnen, Act 2616
  Australia. Tel: (Aust) 6-2012422. Fax: (Aust) 6-2015041

  AARnet: jan@ise.canberra.edu.au
  ARPA:   jan%ise.canberra.edu.au@uunet.uu.net
  UUCP:   {uunet,ukc}!munnari!ise.canberra.edu.au!jan
  JANET:  jan%au.edu.canberra.ise@EAN-RELAY

+--------------------------+
Newsgroups: comp.windows.x.motif
From: slangley@constant.demon.co.uk (Simon Langley)
Subject: Re: mxgdb - Motif dbx
Organization: Home
X-Newsreader: Tin 1.1 PL5
Date: Wed, 2 Sep 1992 16:53:26 GMT

K J MacDonald (kenny@castle.ed.ac.uk) wrote:
: 
: 	I was wondering if there were any more recent versions out there
: ? It looks like a nice front end to dbx.
: 
Err, isn't mxgdb a front end to the GNU debugger gdb not dbx.  The front end
for dbx is called xdbx.

-- 
   Simon Langley                   (preferred)   slangley@constant.demon.co.uk
   Hampstead, London                             slangley@cix.compulink.co.uk
Newsgroups: comp.windows.x.motif
From: root@atinc.uucp (Operator)
Subject: form attahcment problem
Organization: atinc.com
Date: Wed, 2 Sep 1992 19:26:45 GMT

I have implemented a widget using X toolkit Intrinsics.  I've tested this widget
under the Athena widget set (Xaw) and HP widget set (Xw), using their implementation
using a form widget as the parent, with no problems.  Since, the target application
development envir. is Motif, I core dump using form attachments of more than
2 sides.  That is, if a rubber the widget with any 2 sides attached, there is
no problem, but attaching the 3rd and/or 4th side, I get a core dump.  The core
dump occurs when making the XtCreateManagedWidget() call, with the attachment
resources setup in the arglist.

I tried different contraint widgets as its parent, with no problems also. Its just
the form widget thats being nasty.

My class record currently looks like this:

typedef struct _FooClassRec {
    CoreClassPart               core_class;
    XmPrimitiveClassPart        primitive_class;
    FooClassPart                foo_class;
}FooClassRec;

I've even tried not subclassing the primitive_class for Motif, still got the problem.


My question is:
        Do I need to do something special to my widget intrinsics code to behave
properly with Motif?

	Platform: SunOS 4.1.1, XR4, Motif1.1.3
thankx, ronyd@atinc
From: deveau@oceanroutes.ns.ca ("Terry J. Deveau")
Newsgroups: comp.windows.x.motif
Subject: Re: Design issue with pushbuttons
Date: 4 Sep 92 17:14:06 GMT
Distribution: inet
Organization: Oceanroutes Canada Inc.

Mark Walmsley <mjw@syd.dms.csiro.au> writes:
>
> Our application has dialog boxes which can be resized.  We are
> wondering what to do with our pushbuttons when a dialog box is
> resized.
> 
I have tried many different approaches.  In the end I settled on
allowing the pushbuttons to resize in any direction, keeping the 
gaps constant.  This decision was based on a combination of factors
including: easy to implement, behaviour didn't surprise or
confound the user, many other widgets seem to do this by default.

... Terry
From: deveau@oceanroutes.ns.ca ("Terry J. Deveau")
Newsgroups: comp.windows.x.motif
Subject: Re: Help on XmNmnemonic
Date: 25 Aug 92 14:39:40 GMT
Distribution: inet
Organization: Oceanroutes Canada Inc.

Laxma R.Garlapati <lrg@cerc.wvu.wvnet.edu> writes:

>      I am trying to set a mnemonic to a pushbutton using the fallowing 
> statement.
>       XtSetArg(args[n], XmNmnemonic, 'Q'); n++;
> 
> I can see the Underscore beneath the Q letter of the quit button that I have,
> but when I press Meta-Q, nothing happens. Anyu help is appreciated.
> 
The "Meta-" is only for pulldown from a menu bar; just press "q" for a
pushbutton.  Also, make sure caps-lock is off: "q" works, but "Q" does not.

... Terry
Newsgroups: comp.windows.x.motif
From: moharil@cs.iastate.edu (Vinay Arvind Moharil)
Subject: can't create another form
Summary: trying to create another form but not successful
Organization: Iowa State University, Ames IA
Date: Wed, 26 Aug 1992 14:02:32 GMT

Hi netters!

I am sorry if this is an FAQ.

I have created one form widget to hold some push button widgets and
label widgets. In the callback functions of the pushbuttons, I want to
create another form so that it can hold some other widgets. But creating
another form lands me in problems:
I cant attach my widgets to this new form. Also attaching one widget to
another gives me segmentation fault.

Why can't I create another form and use it the same way as the first 
form. I am sure that the problem can be solved using other kind of
container widgets but why not form?

Please HELP
thanks
vinay

Xref: sparky comp.windows.x.motif:5991 comp.windows.x:16114
From: bharat@ces.cwru.edu (M R Bharat)
Newsgroups: comp.windows.x.motif,comp.windows.x
Subject: Keyboard arrow keys doesn't work in text widgets
Date: 3 Sep 1992 20:58:03 GMT
Organization: Case Western Reserve University
Distribution: world
NNTP-Posting-Host: fox.ces.cwru.edu

Hello,

In my motif application, the keyboard arrow keys do not work in the 
text widgets.  Well, this do not happen in all the machines, in
particular it did not work in sparc stations.  Does any one has any
idea why the arrow keys work in some machines and does not in others?
Is there any dependencies (s/w, h/w)?  Please let me know at

lilbit!prakash@skybridge.scl.cwru.edu

Thanks in advance
prakash

216 371 9777
Newsgroups: comp.windows.x.motif
From: cecchinr@dimaggio.cs.rpi.edu (Ron Cecchini)
Subject: SelectionBox & multiple fonts (was something about hair pulling)
Organization: Rensselaer Polytechnic Institute, Troy, NY
Date: Thu, 3 Sep 1992 20:34:16 GMT



Hi again,

 After stuggling for another day, I was able to answer a couple
of my original questions.  In particular, I finally figured out
how to friggin' specify a font (I didn't realize it was a 2 step
process: load the font into the fontlist of the widget containing the
string and *then* specify the font when you create the string).

 I also realized that there really wasn't a whole hell of a lot of
difference between the terms  "charset" and "font".

 I still would like to know how to display the fontlist of a 
particular widget in the charset format (i.e. "-*-courier-*-r-*--*-*")

 NEW QUESTION:
I now have my selection box's list widget child supporting multiple fonts.
But when I select an item whose font is other than the default, the
item does NOT appear in the Selection text field.  Hence, I'm running
into new troubles ...

Thanx in advance to those that respond,
Ron

Newsgroups: comp.windows.x.motif
From: peterson@Data-IO.COM (Joe Peterson)
Subject: X11/Motif on HP700
Organization: Data I/O Corporation
Date: Tue, 25 Aug 1992 21:47:13 GMT

I have been tying to build X11R4-p18 and OSF/Motif 1.1.3 on our fine,
brand new HP-710 running HP-UX 8.07(?).

So far, whenever I run any of the X/Motif programs (like xlogo) I get

"Illegal instuction (core dumped)"

I have mucked a little bit with the dynamic/static link library options
that the linker provides but have not stumbled on to the correct combination
of compiler/linker flags.

I assume that someone out there has build X11R4 and Motif-1.1 on a HP700.
What was the magic (or the config/hp.cf) that you used?

Lost in HP-land,

	Joe Peterson	peterson@data-io.com
	Bill Stiehl	stiehl@data-io.com

Newsgroups: comp.windows.x.motif
From: Tom Leber <leber@panther.warm.inmet.com>
Subject: Editing within a scrollable list
Organization: Intermetrics, Inc.
X-Xxdate: Mon, 31 Aug 92 17:06:41 GMT
X-Useragent: Nuntius v1.1.1d7
Date: Mon, 31 Aug 1992 20:54:16 GMT
X-Posted-From: banshee.warm.inmet.com
X-Posted-Through: sol.ctr.columbia.edu

I have a csutomer who wants me to produce a scrollable list of text
information containing data in columns. No problem so far. The catch is
that he wants the individual items in the columns to be editable, too.
Has anyone done anything like this? This seems counter-intuitive to me,
almost spreadsheet-like rather than list-like, but the customer wants it,
so...

Any ideas?
From: rrybacki@ringer.cs.utsa.edu (Richard M. Rybacki)
Newsgroups: comp.windows.x.motif
Subject: Wierd problem with XmText, fonts, and AIX
Date: 27 Aug 92 20:18:47 GMT
Organization: University of Texas at San Antonio

I have a very annoying problem concerning XmText or XmTextField widgets.

Backgound:
   RS/6000
   AIX 3.2
   X11R4
   Motif 1.1

The problem is that text widgets seem to ingore their fontList resource
and use the "fixed" font when the application using a display other than
the RS/6000 console or the IBM XStations.  This behavior is exibited with
any application, but as a simple example, consider the following program 
which creates a label and a text widget:

#include <Xm/Xm.h>
#include <Xm/RowColumn.h>
#include <Xm/Label.h>
#include <Xm/Text.h>
#include <stdio.h>

#define FONT "-adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1"

main( int argc, char **argv )
{
	XtAppContext app;
	Widget topLevel;
	Widget rc;
	Widget label;
	Widget text;
	XFontStruct *fs;
	XmFontList font_list;

	topLevel = XtVaAppInitialize(&app, "Test", NULL, 0, &argc, argv, NULL, 
		NULL);

	rc = XtVaCreateManagedWidget("rc",
		xmRowColumnWidgetClass,	topLevel,
		NULL);

	if (!(fs = XLoadQueryFont(XtDisplay(topLevel), FONT)))
	{
		fprintf(stderr, "XLoadQueryFont failed\n");
		exit(1);
	}

	font_list = XmFontListCreate(fs, XmSTRING_DEFAULT_CHARSET);

	label = XtVaCreateManagedWidget("label",
		xmLabelWidgetClass,	rc,
		XmNfontList,		font_list,
		NULL);

	text = XtVaCreateManagedWidget("text",
		xmTextWidgetClass,	rc,
		XmNrows,			20,
		XmNcolumns,			40,
		XmNeditMode,		XmMULTI_LINE_EDIT,
		XmNfontList,		font_list,
		NULL);

	XtRealizeWidget(topLevel);
	XtAppMainLoop(app);
}

If I compile this program on the RS/6000, and use the console or an IBM 
XStation as a display, it works fine.  However, if I use a Sun or a
PC running SCO as a display, the label appears in the proper font but the
text widget comes up in the "fixed" font.  If I compile this program on the
PC, it works fine no matter which display I use.

If anyone has experienced a similar problem, I would like to hear from you.
-- 
                            Richard M. Rybacki
                       rrybacki@ringer.cs.utsa.edu
                              (512) 731-0000
                          "Will consult for food"
Newsgroups: comp.windows.x.motif