[comp.windows.x.motif] Returned mail: User unknown

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/07/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Mon, 6 May 91 14:26:19 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA14255; Mon, 6 May 91 14:07:59 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA19925; Mon, 6 May 91 13:25:20 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Mon, 6 May 91 13:09:43 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA24243; Mon, 6 May 91 09:57:46 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 6 May 91 15:21:59 GMT
From: unmvax!uokmax!geohub!dwight@ucbvax.Berkeley.EDU  (Dwight D. Moore)
Organization: Geosciences Computing Network, Univ. of Oklahoma
Subject: mysterious warning
Message-Id: <1991May6.101827@geohub.gcn.uoknor.edu>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

I have an application that reports
    "XtRemoveGrab asked to remove a widget not on the list"
The applications uses MOTIF 1.1 on  VMS (X11R4).
Any ideas on the meaning of this message?
- ----------------------------------------------------------------------------
                                Dwight D. Moore
                         Geosciences Computing Network
                            University of Oklahoma

                  dwight@geohub.gcn.uoknor.edu (129.15.40.10)
- ----------------------------------------------------------------------------
disclaimer ()
{
    if ((fp = fopen("mail", "w+")) == NULL) exit (1);
    fprintf (fp, "This is my opinion.\n");
    fprintf (fp, "This does not represent the opinion of OU or the GCN\n");
    fclose (fp);
}

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/07/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Mon, 6 May 91 14:26:29 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA14261; Mon, 6 May 91 14:08:21 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA19933; Mon, 6 May 91 13:25:32 EDT
Received: from HOPPER.ISI.COM by BU.EDU (1.99) Mon, 6 May 91 13:22:12 EDT
Received: by isi.com (5.57/Ultrix3.0-C)
	id AA29697; Mon, 6 May 91 10:19:24 -0700
Received: by trifid (4.1/inc/isi-1.6s)
	id AA06451; Mon, 6 May 91 10:20:38 PDT
Date: Mon, 6 May 91 10:20:38 PDT
From: edmark@isi.com (Ron O. Edmark)
Message-Id: <9105061720.AA06451@trifid>
To: motif@alfalfa.com
Subject: Re: Motif window decorations under olwm

> 
> > Under mwm and twm, the window decorations, including title, do appear.  What
> > can I do so that they will also show under olwm?
> 
> I wish I knew.  I also was unable to find out why (when I use a windowId as
> an icon instead of a pixmap) I can't get icon labels.  You will also find that
> olwm doesn't keep dialogs on top and doesn't unmap them when you iconize.  I
> find it helpful to think of olwm as kind of a stripped down uwm that happens
> to have borders.
> 

We are having the same problem in our application.  We found that if we 
parented our popup dialogs with our unmapped application shell we would get
window decorations but if we used the toplevel shells of our mapped windows
the decorations would go away.

A closer look at olwm reveals that it is looking at an  _OL_WIN_ATTR window
property to set the decorations (see pages 70-72 of OLIT Widget Set
Programmer's Guide).  I was going to set the "menu_type" atom to
_OL_MENU_LIMITED for all of our popups but I have been working on a bigger
problem.  None of our option menus work correctly they popup but then pop right
back down.

    +---------------------------------------------------------------------+
    | Ron Edmark                          User Interface Group            |
    | Tel:        (408) 980-1500 x282     Integrated Systems, Inc.        |
    | Internet:   edmark@isi.com          3260 Jay St.                    |
    | Voice mail: (408) 980-1590 x282     Santa Clara, CA 95054           |
    +---------------------------------------------------------------------+

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:26:23 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00411; Thu, 16 May 91 20:42:56 EDT
Received: by sun.UUCP (4.1/ASI-1.0)
	id AA00938; Thu, 16 May 91 20:25:20 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16281; Thu, 16 May 91 20:17:48 EDT
Received: by BU.EDU (1.99) Thu, 16 May 91 19:25:35 EDT
Date: Thu, 16 May 91 19:25:35 -0400
From: MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem)
Subject: Returned mail: User unknown
Message-Id: <9105162325.AA14092@BU.EDU>
To: motif-request@alfalfa.com
Resent-To: post-motif@ucbvax.berkeley.edu
Resent-From: nazgul@alfalfa.com (Information Junkie)
Resent-Date: Thu, 16 May 91 20:25:19 -0400
Resent-Message-Id: <910516202519.884@sun.alfalfa.com>

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 19:25:35 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00315; Thu, 16 May 91 19:06:41 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA15863; Thu, 16 May 91 18:27:46 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA15828; Thu, 16 May 91 18:26:43 EDT
Received: from osf.osf.org by BU.EDU (1.99) Thu, 16 May 91 18:10:06 EDT
Received: from clew.osf.org by osf.osf.org (5.64+/OSF 1.0)
	id AA29971; Thu, 16 May 91 18:10:01 -0400
Received: by clew (5.57/4.7) id AA27488; Thu, 16 May 91 18:09:44 -0400
Message-Id: <9105162209.AA27488@clew>
To: mips!swrinde!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!rtech!medicus!barry@apple.com
Cc: motif@alfalfa.com
Subject: Re: XmStringSegmentCreate().............. 
In-Reply-To: Your message of 14 May 91 00:06:41 +0000.
             <1991May14.000641.4039@medicus.com> 
Date: Thu, 16 May 91 18:09:35 EDT
From: W. Scott Meeks <meeks@osf.org>

>Date: 14 May 91 00:06:41 GMT
>From: mips!swrinde!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!rtech!medicus!barry@apple.com  (Barrelda Q. Nammowitz)
>
>I'm working with text widgets and functions and have not been 
>able to use XmStringSegmentCreate() successfully or find 
>a working example of it being used anywhere.
>
>Could some kind soul send me a working code segment using this
>motif function.
>If it matters I'm running ICS 2.21 X11R3 motif 1.0.

First, I'm a little concerned by the fact that you use "text widgets" and
XmStringSegmentCreate in the same sentence.  Text widgets don't work with
compound strings, only with ASCII strings.  If you're trying to feed an
XmString to a text widget, that's probably your problem.  

Second, it's usually not necessary to use XmStringSegmentCreate unless you
need to create a series of atypical segments, particularly with the
direction set to RtoL.  For most cases, XmStringCreate or
XmStringCreateLtoR should be sufficient.

Either way, there's a brief but complete description of
XmStringSegmentCreate in section 8.1.2.29 of the Programmer's Guide and
some sample code in section 8.1.3.

I'm afraid I don't have any code samples handy since I don't use it.

W. Scott Meeks           
Open Software Foundation 
meeks@osf.org            
(617) 621-7229           

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:26:28 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00418; Thu, 16 May 91 20:43:12 EDT
Received: by sun.UUCP (4.1/ASI-1.0)
	id AA00941; Thu, 16 May 91 20:25:36 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16279; Thu, 16 May 91 20:17:45 EDT
Received: by BU.EDU (1.99) Thu, 16 May 91 19:29:43 EDT
Date: Thu, 16 May 91 19:29:43 -0400
From: MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem)
Subject: Returned mail: User unknown
Message-Id: <9105162329.AB13788@BU.EDU>
To: motif-request@alfalfa.com
Resent-To: post-motif@ucbvax.berkeley.edu
Resent-From: nazgul@alfalfa.com (Information Junkie)
Resent-Date: Thu, 16 May 91 20:25:35 -0400
Resent-Message-Id: <910516202535.884@sun.alfalfa.com>

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 18:59:33 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA15863; Thu, 16 May 91 18:27:46 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA15828; Thu, 16 May 91 18:26:43 EDT
Received: from osf.osf.org by BU.EDU (1.99) Thu, 16 May 91 18:10:06 EDT
Received: from clew.osf.org by osf.osf.org (5.64+/OSF 1.0)
	id AA29971; Thu, 16 May 91 18:10:01 -0400
Received: by clew (5.57/4.7) id AA27488; Thu, 16 May 91 18:09:44 -0400
Message-Id: <9105162209.AA27488@clew>
To: mips!swrinde!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!rtech!medicus!barry@apple.com
Cc: motif@alfalfa.com
Subject: Re: XmStringSegmentCreate().............. 
In-Reply-To: Your message of 14 May 91 00:06:41 +0000.
             <1991May14.000641.4039@medicus.com> 
Date: Thu, 16 May 91 18:09:35 EDT
From: W. Scott Meeks <meeks@osf.org>

>Date: 14 May 91 00:06:41 GMT
>From: mips!swrinde!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!rtech!medicus!barry@apple.com  (Barrelda Q. Nammowitz)
>
>I'm working with text widgets and functions and have not been 
>able to use XmStringSegmentCreate() successfully or find 
>a working example of it being used anywhere.
>
>Could some kind soul send me a working code segment using this
>motif function.
>If it matters I'm running ICS 2.21 X11R3 motif 1.0.

First, I'm a little concerned by the fact that you use "text widgets" and
XmStringSegmentCreate in the same sentence.  Text widgets don't work with
compound strings, only with ASCII strings.  If you're trying to feed an
XmString to a text widget, that's probably your problem.  

Second, it's usually not necessary to use XmStringSegmentCreate unless you
need to create a series of atypical segments, particularly with the
direction set to RtoL.  For most cases, XmStringCreate or
XmStringCreateLtoR should be sufficient.

Either way, there's a brief but complete description of
XmStringSegmentCreate in section 8.1.2.29 of the Programmer's Guide and
some sample code in section 8.1.3.

I'm afraid I don't have any code samples handy since I don't use it.

W. Scott Meeks           
Open Software Foundation 
meeks@osf.org            
(617) 621-7229           

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:26:38 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00432; Thu, 16 May 91 20:43:42 EDT
Received: by sun.UUCP (4.1/ASI-1.0)
	id AA00947; Thu, 16 May 91 20:26:06 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16293; Thu, 16 May 91 20:18:10 EDT
Received: by BU.EDU (1.99) Thu, 16 May 91 19:46:52 EDT
Date: Thu, 16 May 91 19:46:52 -0400
From: MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem)
Subject: Returned mail: User unknown
Message-Id: <9105162346.AB14402@BU.EDU>
To: motif-request@alfalfa.com
Resent-To: post-motif@ucbvax.berkeley.edu
Resent-From: nazgul@alfalfa.com (Information Junkie)
Resent-Date: Thu, 16 May 91 20:26:06 -0400
Resent-Message-Id: <910516202606.884@sun.alfalfa.com>

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 18:59:42 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA15869; Thu, 16 May 91 18:27:54 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00284; Thu, 16 May 91 18:39:04 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00281; Thu, 16 May 91 18:38:56 EDT
Received: by sun.UUCP (4.1/ASI-1.0)
	id AA00902; Thu, 16 May 91 18:21:20 EDT
To: fmrco!sy18337@uunet.uu.net (Terry Traub)
Cc: motif@alfalfa.com
Subject: Re: XmList question
In-Reply-To: <1991May16.190348.22823@fmrco>
References: <1991May16.190348.22823@fmrco>
X-Mailer: Poste 1.0
From: nazgul@alfalfa.com (Information Junkie)
Date: Thu, 16 May 91 18:21:19 -0400
Message-Id: <910516182119.884@sun.alfalfa.com>
Encoding: 13 TEXT, 7 TEXT SIGNATURE

> The question is, how do you force the listbox to completely reset to
> the position you want?  Clearly XmListSetPos() is not enough, though
> the documentation suggests otherwise.
> 
> Also, does Motif 1.1.1's list box have this added functionality?  I hope there's
> a painless solution; our users, and I too for that matter, are accustomed
> to MS Windows' list boxes, which have much better keyboard support built in.

There's a very simple solution, but it requires adding two 3 line functions
to the code in List.c.  I've submitted an enhancement request for this.
In the meantime I would suggest using the Translation mechanism to bind
the keys instead.  In fact, your vendor should have done this already,
but....

Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:26:44 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16319; Thu, 16 May 91 20:18:46 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16277; Thu, 16 May 91 20:17:43 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 19:37:09 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA00679; Thu, 16 May 91 16:28:16 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 12:06:18 GMT
From: mintaka!think.com!paperboy!hsdndev!bunny!krs0@bloom-beacon.mit.edu  (Rod Stephens)
Organization: GTE Laboratories, Waltham, MA
Subject: Delete key deletes character after the cursor
Message-Id: <11173@bunny.GTE.COM>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

Since I upgraded to Motif 1.1.1, the delete key deletes the
character AFTER the cursor instead of the character before
the cursor. This happens in Motif text widgets in
applications I write. Other applications (xterm, emacs,
etc.) handle it normally.

I don't remember if this was a problem on Motif 1.1.0 but I
suspect not or I would have been annoyed by it before.

Does anyone know how to fix this?

+---------------------------------------------------------------+
| Rod Stephens           | "Haven't I told you not to play      |
| GTE Laboratories, Inc  |  with my super-weapons? You might    |
| (617)466-4182          |  devastate yourself!"                |
| krs0@gte.com           |                                      |
+---------------------------------------------------------------+

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:26:54 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16322; Thu, 16 May 91 20:18:50 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16291; Thu, 16 May 91 20:18:07 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 19:52:21 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA00899; Thu, 16 May 91 16:37:57 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 18:24:02 GMT
From: sdd.hp.com!hp-pcd!hpcvlx!tay@hplabs.hpl.hp.com  (Mike Taylor)
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Subject: Re: Motif Application Generators
Message-Id: <110630046@hpcvlx.cv.hp.com>
References: <1991Apr23.051543.431@avatar.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

> Where can I obtain 'MotifGen'?

MotifGen is a component of HP Interface Architect.  Architect is HP's
version of UIMX which is developed by Visual Edge in Montreal Canada.
A problem for some developers is that the code that is generated by
UIMX is heavily dependent on a UIMX library.  HP has added a tool
called MotifGen which eliminates this dependency.


Peace,

Mike Taylor
Current Products Engineering & Online
Interface Technology Operation

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Surface:  Hewlett-Packard                 Internet:  tay@hpcvlx.cv.hp.com
	  1000 NE Circle Boulevard        UUCP:      {hpfcla}!hpcvlx!tay
	  Corvallis, Oregon 97330         Fax:       (503) 750-4980

    "I get stranger things than you free with my breakfast cereal!" 
                                                   - Zaphod Beeblebrox

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:28:32 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00455; Thu, 16 May 91 21:07:23 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16322; Thu, 16 May 91 20:18:50 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16291; Thu, 16 May 91 20:18:07 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 19:52:21 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA00899; Thu, 16 May 91 16:37:57 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 18:24:02 GMT
From: sdd.hp.com!hp-pcd!hpcvlx!tay@hplabs.hpl.hp.com  (Mike Taylor)
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Subject: Re: Motif Application Generators
Message-Id: <110630046@hpcvlx.cv.hp.com>
References: <1991Apr23.051543.431@avatar.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

> Where can I obtain 'MotifGen'?

MotifGen is a component of HP Interface Architect.  Architect is HP's
version of UIMX which is developed by Visual Edge in Montreal Canada.
A problem for some developers is that the code that is generated by
UIMX is heavily dependent on a UIMX library.  HP has added a tool
called MotifGen which eliminates this dependency.


Peace,

Mike Taylor
Current Products Engineering & Online
Interface Technology Operation

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Surface:  Hewlett-Packard                 Internet:  tay@hpcvlx.cv.hp.com
	  1000 NE Circle Boulevard        UUCP:      {hpfcla}!hpcvlx!tay
	  Corvallis, Oregon 97330         Fax:       (503) 750-4980

    "I get stranger things than you free with my breakfast cereal!" 
                                                   - Zaphod Beeblebrox

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:27:04 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16339; Thu, 16 May 91 20:19:28 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16285; Thu, 16 May 91 20:17:53 EDT
Received: from csc.canberra.edu.au by BU.EDU (1.99) Thu, 16 May 91 19:42:52 EDT
Received: from echo.canberra.edu.au by csc.canberra.edu.au (4.1/SMI-4.1)
	id AA11630; Fri, 17 May 91 09:45:35 EST
Received: by echo.canberra.edu.au (5.61/5.17) 
	id AA29020; Fri, 17 May 91 09:42:13 +1000
From: jan@echo.canberra.edu.au (Jan Newmarch)
Message-Id: <9105162342.AA29020@echo.canberra.edu.au>
Subject: Frequently Asked Questions about Motif
To: motif@alfalfa.com
Date: Fri, 17 May 91 9:42:12 EST
X-Mailer: ELM [version 2.3 PL11]


Newsgroups: comp.windows.x.motif
Subject: Frequently Asked Questions about Motif
Distribution: world
Expires: Fri, 07 June 91 00:00:00 GMT

[Last changed: 09 Apr 91]
[This is last month's posting unchanged. We are moving buildings and
our network has been down for the last couple of weeks and looks like
staying that way for a few more. Kind of hard to access files when you
are running a diskless machine with no network! I hope to be back on
line for next month's posting, with some of the new things that have
come up.]

This article and one following contain the answers to some Frequently Asked 
Questions (FAQ) often seen in comp.windows.x.motif. It is posted to help reduce 
volume in this newsgroup and to provide hard-to-find information of general 
interest.

		Please redistribute this article!

This article includes answers to the following questions. Ones marked with
a + indicate questions new to this issue; those with changes of content since
the last issue are marked by *:

 0)* What versions of Motif are there?
 1) Where can I get Motif?
 2) Where can I get public domain Motif source?
 3)+ Are the Motif examples publically available?
 4) Has anyone done a public domain Motif lookalike?
 5) Does anyone from OSF pay attention to our questions/suggestions?
 6)  Does OSF have an application compliance validation service?  
 7)  What is the motif-talk mailing list?
 8)  What MIT patches do I use, and when do I use fix-osf?
 9)* What books should I read or do I need to program using Motif?
10) What is the diference between Motif and mwm?
11) Does anyone have an alternative set of 3-D defaults for a monochrome screen?
12) What prototyping tools are there to generate Motif code?
13) Why does  pressing  <return> in a text widget do nothing?
14) When I add text to a scrolling text widget how can I get the new text to show?
15) Does the text widget support 16 bit character fonts?
16) How can I stop the text widget from echoing characters typed?
17) How can I replace characters typed with say a `*'?
18) How can I best add a large piece of text to a scrolled list widget?
19) How do I best put a new set of items into a list?
20)  Can I get a bitmap to show in a list item like I can in a Label?
21)+ Can I have items with different colours in a list?
22) What can I put inside a menu bar?
23) Can I have a cascade button without a submenu in a pulldown menu?
24) Should I have a cascade button without a submenu in a pulldown menu?
25)* How can I direct the keyboard input to a particular widget?
26) How can I have a modal dialog which has to be answered before the application can continue?
27) Why does my application grow in size?
28) Why does my application take a long time to start up?
29) My application is running too slowly. How can I speed it up?
30) How can I get the Ascii text out of an XmString?
31)  When can XmStrings used as resources be freed?
32) Why doesn't XmStringGetNextSegment() work properly?
33) How do I stop my dialog disappearing when I press the help button?
34) How do I make my own dialog?
35) Is there a C++ binding for Motif?
36)  Is there a Common Lisp binding for Motif?
37)+ Is there an Ada binding for Motif?
38) What is libPW.a and do I need it?
39)* How can tell I if the user has selected the "Close" item on the system menu attached to the top-level shell?
40)* Why does an augment translation appear to act as replace for some widgets?
41) I tried to make shared libraries on a Sun, and got the message "ld.so: Undefined symbol: __XtInherit" when executing UIL.  What did I do?
42)+ Has anyone made shared libraries on an IBM RS/6000?
43) How can I set a multiline label in .Xdefaults?
44)  How do you "grey" out a widget so that it cannot be activated?
45)*  What is causing the messages "unknown keysym osfDown..."?
46)  Why doesn't the Help callback work on some widgets?
47)*  What's wrong with the Motif 1.0 File Selection Box?
48)+ Why can't I use accelerators on buttons not in a menu?
49)+ Why don't labels in a Form resize when the label is changed?
50)+ How come the title bars for my dialogs now have "_popup" or "<-popup" concatenated onto the widget name?
51)+ Has anyone done a bar graph widget?
52)+ Does anyone know of a source code of a graph widget

If you have suggestions or corrections for any of these answers or any 
additional information, please send them directly to jan@ise.canberra.edu.au;
the information will be included in the next revision (or possibly the one 
after that; thanks for the many suggestions which haven't been incorporated 
yet).  The answers in this iteration are acknowledged to be partial.

This posting is intended to be distributed at approximately the beginning of 
each month.

The information contained herein has been gathered from a variety of sources. In
many cases attribution has been lost; if you would like to claim responsibility
for a particular item, please let us know. 

Conventions used below: telephone numbers tend to be Bell-system unless 
otherwise noted; prices on items are not included.









1.  OSF and Motif


- -------------------------------------------------------------------------------
Subject:  0)* What versions of Motif are there?

Answer: Motif 1.0 is based on the R3 toolkit.  There are patch releases to 1.0:
1.0.1, 1.0.A, 1.0.2 and 1.0.3.  1.0.A was a fairly major patch, as it involved a
complete re-engineering of UIL and Mrm.  Almost everyone who has 1.0.x has
either 1.0.A or 1.0.3.  Motif 1.1 is based on the R4 toolkit.  The current
version is Motif 1.1.0, plus a couple of patches available to full support
contract holders. Motif 1.1.1 has been released as a patch to licensees with
Full Support or Technical Update service.  Motif 1.1.2 is a patch release which
contains the necessary changes to fix over 80 bugs reported against Motif. It
will be available to support contract holders (including both full support and
update service).  Future 1.1 patch releases are tentatively scheduled as
follows:

        1.1.3   3rd quarter 1991
        1.1.4   4th quarter 1991
        1.1.5   1st half 1992


Motif 1.2 is not expected until after mid 1991, and will be based on the R5
toolkit.

- -------------------------------------------------------------------------------
Subject:  1) Where can I get Motif?

Answer: [This tries to mirror FAQ of comp.windows.x Send changes to
xug@expo.lcs.mit.edu]
    Various hardware vendors produce developer's toolkits of binaries, header
files, and documentation; check your hardware vendor, particularly if that
vendor is an OSF member. Systems known to be shipping now: HP (sans UIL), Apollo
(sans UIL), SCO, ISC, Mips (RISCwindows=X11R3 + full Motif), IBM, Data General
for AViioNs (includes UIL), Bull (?), Concurrent Computer Corporation 5000,
6000, 8000 series machines.

    In addition, independent binary vendors produce Motif toolkits . ICS makes
several binary kits, notably for Sun, DEC, Apple; Quest (408-988-8880) sells
kits for Suns, as well; IXI (+44 223 462 131) offers kits for Sun3 (SunOS 3.5 or
later, and Sun4 (SunOS 4.0.1 or later). Unipalm XTech (+44 954211862; or Aurora
Technologies 617-577-1288 in USA) offers a binary kit for Suns based on Motif
1.1, with shared libraries.  NSL (+33 (1) 43 36 77 50; requests@nsl.fr) offers
kits for the Sun 3 and Sun 4.

  The kits include varied levels of bug-fixing and support for shared libraries.
BIM (Fax : +32(2)759.47.95) offer Motif 1.1 for Sun-3, Sun-4, Sun-386i. Includes
shared libraries.  Metrolink Inc. (+1-305-566-9586, sales@metrolink.com; in
Europe contact ADNT, (33 1) 3956 5333) ships an implementation of X11R4 and
Motif 1.1 for several 386 systems.

    An OSF/Motif source license must be obtained from OSF before source can be
obtained from the Open Software Foundation. Call the Direct Channel Desk at OSF
at 617-621-7300 or email direct@osf.org for ordering information.




- -------------------------------------------------------------------------------
Subject:  2) Where can I get public domain Motif source?

Answer: You cannot.  Motif source is not publically available.

- -------------------------------------------------------------------------------
Subject:  3)+ Are the Motif examples publically available?

Answer: No. They are subject to the same licensing limitations as Motif source.


- -------------------------------------------------------------------------------
Subject:  4) Has anyone done a public domain Motif lookalike?

Answer: Not yet.

- -------------------------------------------------------------------------------
Subject:  5) Does anyone from OSF pay attention to our questions/suggestions?

Answer: Yes, and they quite often post answers too. But they may not respond to
*your* problem because they have other things to do as well.  This newsgroup is
not run by OSF, and has no formal connection with OSF.  OSF is a member-driven
company.  The membership (and anyone can be a member) provides the primary input
for future development of Motif.

- -------------------------------------------------------------------------------
Subject:  6)  Does OSF have an application compliance validation service?

Answer: They have a checklist and a certification process which you can request
from them.  Ask for the Level One Certification Checklist.  The process is one
of self-certification.  It tests only the appearance and behavior of the
application against Motif style.  The product will also be put in the OSF
reference listing.  There's a one-time fee of $250.  According to the master
license agreement, you can't use any OSF identifying mark unless you have done a
certification.


- -------------------------------------------------------------------------------
Subject:  7)  What is the motif-talk mailing list?

Answer: The motif-talk mailing list is only for those who have purchased a Motif
source code license.  You can be placed on this list by emailing to motif-talk-
request.


- -------------------------------------------------------------------------------

Subject:  8)  What MIT patches do I use, and when do I use fix-osf?

Answer: The Motif 1.1.0 tape contains MIT patches 1-14. Apply these and any
others you can get.  If your MIT patch level only goes up to fix-16, you also
need to apply fix-osf.  Fix-osf was an emergency patch for a problem that
existed when the Motif 1.1 tape was cut, The MIT fix-17 completely superseded
osf-fix, so if you have applied fix-17 do not apply fix-osf.  The 1.1.1 tape
contains MIT fixes 15-18, as well as an OSF-developed fix that deals with a
subtle bug in the Selection mechanism of the Intrinsics.  Most people will have
fix-15 to 18 by now; if you don't have them:

        Back out fix-osf if you have applied it
        Apply fix-15 to 18
        Apply fix-osf-1.1.1

The Selection fix was submitted to MIT, who came up with a diferent fix.  It
will not be made into an R4 fix but should be in R5. The MIT fix was posted to
motif-talk.




2.  Literature


- -------------------------------------------------------------------------------
Subject:  9)* What books should I read or do I need to program using Motif?

Answer: Ken Lee of the DEC Western Software Laboratory (klee@wsl.dec.com)
regularly posts to comp.windows.x and ba.windows.x a list of reference books and
articles on X and X programming.  In FAQ comp.windows.x an extract of his list
appears. Specifically for Motif programming, though:

OSF/Motif Programmers Guide, Prentice-Hall 13-640525-8 (Motif 1.0) ISBN 0-13-
640681-5 (Motif 1.1) (NB: This makes use of the demo programs that you get with
a Motif source license.  The programs are not included and may or may not be
available on your system.)

OSF/Motif Programmers Reference Manual, Prentice-Hall 13-640517-17 (Motif 1.0)
 ISBN 0-13-640616-5 (Motif 1.1)

OSF/Motif Style Guide, Prentice-Hall 13-640491-X (Motif 1.0) ISBN 0-13-640673-4
(Motif 1.1)

Young, Doug. "The X Window System: Applications and Programming with Xt (Motif
Version)," Prentice Hall, 1989 (ISBN 0-13-497074-8). The excellent tutorial "X
Window Systems Programming and Applications with Xt," (ISBN 0-13-972167-3)
updated for Motif. [The examples from the Motif version are available on export
in ~ftp/contrib/young.motif.tar.Z]

Marshall Brain at brain@adm.csc.ncsu.edu posted a set of simple and useful Motif
tutorials.

You will also need books and references on Xt such as:

Asente, Paul J., and Swick, Ralph R., "X Window System Toolkit, The Complete
Programmer's Guide and Specification", Digital Press, 1990.  The bible on Xt. A
treasury of information, excellent and invaluable.  Distributed by Digital
Press, ISBN 1-55558-051-3, order number EY-E757E-DP; and by Prentice- Hall, ISBN
0-13-972191-6.

Nye, Adrian, and Tim O'Reilly, "X Toolkit Programming Manual, Volume 4,"
O'Reilly and Associates, 1989. The folks at O'Reilly give their comprehensive
treatment to programming with the MIT X11R3 Intrinsics; some information on
X11R4 is included.

O'Reilly, Tim, ed.,  "X Toolkit Reference Manual, Volume 5," O'Reilly and
Associates, 1989.  A professional reference manual for the MIT X11R3 Xt; some
information on X11R4 is included.

Books and reference manuals on Xlib may also be useful.





3.  Mwm


- -------------------------------------------------------------------------------
Subject: 10) What is the diference between Motif and mwm?

Answer: mwm is a window manager. Motif itself is made up of four parts: a User-
Interface Guideline, an API toolkit of `C' routines which helps in the building
of applications which conform to the Guideline, the window manager mwm, and a
language UIL which is designed to ease user interface development.  In general
mwm will run an application built with any X-windows API, and in general an
application built using the Motif toolkit will run under any window manager.


- -------------------------------------------------------------------------------
Subject: 11) Does anyone have an alternative set of 3-D defaults for a
monochrome screen?

Answer: This is obviously a matter of taste. Some alternatives suggested include

!Benjamin Schreiber, bs@osf.osf.org, bs@cs.brandeis.edu
Mwm*foreground:                 black           ! Actually, when a window is
Mwm*background:                 white           ! deactivated, the background
Mwm*backgroundPixmap:           50_foreground   ! becomes white, insted of
Mwm*topShadowPixmap:            white           ! 50% foreground (grey)

Mwm*activeForeground:           black
Mwm*activeBackground:           white
Mwm*activeBackgroundPixmap:     50_foreground
Mwm*activeTopShadowPixmap:      white

Mwm*menu*backgroundPixmap:      background
Mwm*menu*topShadowPixmap:       50_foreground

Mwm*title*foreground:                   black
Mwm*title*background:                   white
Mwm*title*backgroundPixmap:             white
Mwm*title*topShadowPixmap:              50_foreground
Mwm*title*activeForeground:             white
Mwm*title*activeBackground:             black
Mwm*title*activeBackgroundPixmap:       black
Mwm*title*activeBottomShadowPixmap:     50_foreground

Mwm*feedback*backgroundPixmap:          white

or

! From: tsang@isi.com (Kam C. Tsang)
Mwm*background:                      White
Mwm*activeBackground:                White
Mwm*activeBackgroundPixmap:          25_foreground
Mwm*foreground:                      Black
Mwm*activeForeground:                Black
Mwm*menu*background:                 white
Mwm*menu*foreground:                 black
xterm*Foreground:                    black
xterm*Background:                    white


or

! From: ucsd.edu!usc!snorkelwacker!paperboy!yee  (Michael K. Yee)
Mwm*cleanText:                          True

Mwm*activeBackground:           white
Mwm*activeForeground:           black
Mwm*background:                 white
Mwm*foreground:                 black

Mwm*client*activeBackgroundPixmap:      50_foreground
Mwm*client*activeTopShadowPixmap:       foreground
Mwm*client*activeBottomShadowPixmap:    background

!Mwm*client*background:                 white
!Mwm*client*foreground:                 black
Mwm*client*backgroundPixmap:            75_foreground
Mwm*client*topShadowPixmap:             foreground
Mwm*client*bottomShadowPixmap:          background

!Mwm*feedback*background:               white
!Mwm*feedback*foreground:               black
Mwm*feedback*backgroundPixmap:          50_foreground
!Mwm*feedback*topShadowPixmap:          25_foreground
!Mwm*feedback*bottomShadowPixmap:       background

!Mwm*menu*background:                   white
!Mwm*menu*foreground:                   black
Mwm*menu*backgroundPixmap:              foreground
!Mwm*menu*topShadowPixmap:              foreground
!Mwm*menu*bottomShadowPixmap:           background

!Mwm*icon*background:                   white
!Mwm*icon*foreground:                   black
Mwm*icon*activeBackgroundPixmap:        50_foreground
Mwm*icon*activeBottomShadowPixmap:      foreground
Mwm*icon*backgroundPixmap:              75_foreground





4.  Motif generators


- -------------------------------------------------------------------------------
Subject: 12) What prototyping tools are there to generate Motif code?


Answer: `Prototyping tools' come in two forms: those that can be used to design
the interface only (Interactive Design Tools), and those that go beyond this to
give support for application code (User Interface Management Systems).  There
are a number of commercial and non-commnercial tools of both kinds that will
support the Motif interface.  They include:

IDTs:

Builder Xcessory
UIMX
X Build
ExoCODE/xm


UIMS:

WINTERP
Widget Creation Library
Serpent
TeleUse


Some contact addresses are:

WINTERP: You may obtain the current source, documentation, and examples via
anonymous ftp from host export.lcs.mit.edu: in directory contrib/winterp you
will find the compress(1)'d tar(1) file winterp.tar.Z. If you do not have
Internet access you may request the source code to be mailed to you by sending a
message to winterp-source%hplnpm@hplabs.hp.com or hplabs!hplnpm!winterp-source.

Serpent: The S/W is free (anonymous ftp) from fg.sei.cmu.edu.  For more info
contact erik/robert at serpent-info@sei.cmu.edu.

TeleUse: In the U.K., send mail to xtech@unipalm.co.uk or call +44 954 211862.
In the US call Telesoft at (619) 457-2700 or write TeleSoft, 5959 Cornerstone
Court West, San Diego, California 92121.

Builder Xcessory from ICS.  More details are available by sending a request to
info@ics.com.  617.547.0510

X-Designer: From Imperial Software Technology in the UK.  Email address is
sales@ist.co.uk.  (+44) 743 587055

ExoCODE/xm: From Expert Object Corp., 7250 Cicero Avenue, Lincolnwood, IL 60646
(708)676-5555.

X Build: From Nixdorf Computer (Waltham, MA)  xbuild@nixdorf.com


ExoCode: From EXOC (Chicago, IL)

UIMX: Visual Edge Software Limited, 3870 Cote Vertu, St Laurent, Quebec, H4R
1V4, Phone: (514) 332-6430, Fax:   (514) 332-5914, or: Visual Edge Software
Ltd., 101 First Street, Suite 443, Los Altos, CA 94022, Phone: (415) 948-0753,
Fax:   (415) 948-0843





The Widget Creation Library: The distribution is available in several ways.  The
preferred approach it for you to get the compressed tar file using anonymous ftp
from either of these ftp servers:

    devvax.jpl.nasa.gov (128.149.1.143) pub/Wc1_03.tar.Z
    export.lcs.mit.edu    (18.30.0.238) /contrib/Wcl.1.05Wc1_05.tar.Z






5.  Text widget


- -------------------------------------------------------------------------------
Subject: 13) Why does  pressing  <return> in a text widget do nothing?  This
happens using Motif 1.0 when I have a text widget inside a bulletin board (or
form) inside a dialog shell. (In Motif 1.1 it is fixed for both text and list
widgets.)

Answer: In single line mode, pressing the <return> key usually invokes the
Activate() action, and in multi-line mode, the newline() action.  However,
whenever a widget is the child of a bulletin board widget which is the child of
a dialog shell, the bulletin board forces all of its children to translate
<return> to the bulletin board action Return() which is usually associated with
the default button of the dialog.  To restore the text actions of Activate() or
newline(), you need to overide the Return() action of the bulletin board.


        /* declarations */
        /* for a single line widget */
        char newTrans[] = "<Key>Return : Activate()";
        /* for a multi line widget */
        char newTrans[] = "<Key>Return : newline()";
        XtTranslations transTable;

        /* in executable section */

        transTable = XtParseTranslationTable(newTrans);

        /* after creating but before managing text widget */

        XtOverrideTranslations(textWidget, transTable);


Subject: 14) When I add text to a scrolling text widget how can I get the new
text to show?

Answer: Use the call undocumented in Motif 1.0

        void XmTextShowPosition(w, position)
        Widget w;
        XmTextPosition position;

where the position is the number of characters from the beginning of the buffer
of the text to be displayed. If you don't know how many characters are in the
buffer, use another call undocumented in Motif 1.0

        position = XmTextGetLastPosition(w)


- -------------------------------------------------------------------------------
Subject: 15) Does the text widget support 16 bit character fonts?

Answer: R5 will have support for 16 bit character sets, and Motif 1.2 will use
that. You will have to wait until then.

- -------------------------------------------------------------------------------
Subject: 16) How can I stop the text widget from echoing characters typed?  I
need to turn off echo for password input.

Answer: Use the modifyVerifyCallback to tell when input is received. Set the
`doit' field in the XmTextVerifyCallbackStruct to False to stop the echo. In
Motif 1.0 this will cause a beep per character: Live with it, because at 1.1 you
can turn it off.  Note that password hiding is inherently insecure in X -
someone may have an X grab on the keyboard and be reading all characters typed
in anyway.

- -------------------------------------------------------------------------------
Subject: 17) How can I replace characters typed with say a `*'?  I want to
replace input for password entry.

Answer: In Motif 1.1  set text->ptr in the callback structure to '*'. This does
not work under 1.0 because of an oversight in which changes to this are ignored.
In Motif 1.0, what you can do is set the doit flag to 'false' so the text is not
displayed. Then set a static boolean to True to prevent re-entrance.  Next call
XmTextReplace() to display your '*'.  then reset your re-entrance flag to False.
XmTextReplace() will call the XmNmodifyVerify callback.  To prevent getting into
an infinite loop, you need the re-entrance flag.

- -------------------------------------------------------------------------------
Subject: 18) How can I best add a large piece of text to a scrolled list widget?
It insists on adding the text one line at a time, adjusting the scroll bar each
time. It looks awful and is slow.

Answer: Unmanage the widget, add the text and then manage it again.




6.  Lists


- -------------------------------------------------------------------------------
Subject: 19) How do I best put a new set of items into a list?

Answer: Set the new list count and list by XtSetArgs and install them by
XtSetValues.

    XmString list[SIZE];
    int list_size;

    XtSetArg (args[n], XmNitemCount, list_size); n++;
    XtSetArg (args[n], XmNitems, list); n++;
    XtSetValues (w, args, n);

Each time the list is reset by this the old contents are freed by the widget and
the new supplied list is copied.  Do *not* free the old list of items yourself
as this would result in the space being freed twice.  It is not necessary to
remove the items one at a time, nor to "zero" out the list first.

- -------------------------------------------------------------------------------
Subject: 20)  Can I get a bitmap to show in a list item like I can in a Label?
I want to place a bitmap along with some normal text in my list items.

Answer: No. The workaround is to define your font containing the icons you want.
Then you can create a fontlist containing your icon font and the font you want
the text in, and then make your items multi-segment XmStrings where the first
segment contains the code of the icon you want with a charset that matches the
icon font in your fontlist and the second segment with a charset matching the
text font.


- -------------------------------------------------------------------------------
Subject: 21)+ Can I have items with different colours in a list?

Answer: No.  Since the items are XmStrings, you can already change the font of
an item by replacing it with an item with the same text and a different charset
tag.  Adding support for color would require modification of the internal data
structure in XmList as well as modification to the drawing routines.





7.  Menus


- -------------------------------------------------------------------------------
Subject: 22) What can I put inside a menu bar?

Answer: You can only put cascade buttons in menu bars. No pushbuttons, toggle
buttons or gadgets are allowed. When you create a pulldown menu with parent a
menu bar, its real parent is a shell widget.

- -------------------------------------------------------------------------------
Subject: 23) Can I have a cascade button without a submenu in a pulldown menu?

Answer: Yes you can. A cascade button has an activate callback which is called
when you click on it and it doesn't have a submenu. It can have a mnemonic, but
keyboard traversal using the arrow keys in the menu will skip over it.

- -------------------------------------------------------------------------------
Subject: 24) Should I have a cascade button without a submenu in a pulldown
menu?

Answer: No. This is forbidden by the style guide. Technically you can do it (see
previous question) but if you do it will not be Motif style compliant. This is
unlikely to change - if a "button" is important enough to be in a pulldown menu
bar with no pulldown, it should be a button elsewhere.



8.  Keyboard traversal


- -------------------------------------------------------------------------------
Subject: 25)* How can I direct the keyboard input to a particular widget?

Answer: In Motif 1.1 call XmProcessTraversal(target, XmTRAVERSE_CURRENT).  The
widget (and all of its ancestors) does need to be realized BEFORE you call this.
Otherwise it has no effect.  XmProcessTraversal is reported to have many bugs,
so it may not work right.

In Motif 1.0 call the undocumented _XmGrabTheFocus(target).

Do not use the X or Xt calls such as XtSetKeyboardFocus since this bypasses the
Motif traversal layer and can cause it to get confused.  This can lead to odd
keyboard behaviour elsewhere in your application.

- -------------------------------------------------------------------------------
Subject: 26) How can I have a modal dialog which has to be answered before the
application can continue?

Answer: The answer depends on whether you are using the Motif window manager mwm
or not.  If you are, there is a simple solution. If not (or you don't know
whether you are or not), you have to use a slightly harder method.  Test for
this by XmIsMotifWMRunning.

The window manager mwm knows how to control event passing to dialog widgets
declared as modal. If the dialog is set to application modal, then no
interaction with the rest of the application can occur until the dialog is
destroyed or unmanaged. This can be done through one of the callbacks of the
dialog:


block_dialog(parent)
Widget parent;
{
        Arg args[2];

        XtSetArg(args[0], XmNmessageString,
                XmStringCreateLtoR("....", charset));
        XtSetArg(args[1], XmNdialogStyle,
                XmDIALOG_APPLICATION_MODAL);
        dialog = XmCreateMessageDialog(parent, NULL, args, 2);
        XtAddCallback(dialog, XmNokCallback, responseCB, NULL);
        XtAddCallback(dialog, XmNcancelCallback, responseCB, NULL);
        XtAddCallback(dialog, XmNhelpCallback, responseCB, NULL);

        XtManageChild(dialog);
}

void responseCB(w, client_data, reason)
Widget w;
caddr_t client_data;
XmAnyCallbackStruct *reason;
{       int why = reason->reason;

        XtUnmanageChild(w);
        /* if you won't use it again */
        XtDestroyWidget(XtParent(w));

        switch (why) {
             case XmCR_OK:
                 /* process ok action */
                 break;
             case XmCR_CANCEL:
                 /* process cancel action */
                 break;
             case XmCR_HELP:
                 /* process help action */
                 break;
        }
}


Without using mwm, the basic version goes like this: You have to set an Xt grab
to the dialog and run your own event processing loop. This loop finishes when
the user invokes a callback from a button press. The boolean `keep_grab' is
passed to the callback as client data which sets it to false when the callback
is executed.

        Boolean keep_grab = True;
        XEvent event;
        Arg args[1];

        XtSetArg(args[0], XmNmesssageString, ...);
        dialog = XmCreateMessageDialog(parent, NULL, args, 1);
        XtAddCallback(dialog, XmNokCallback, responseCB, &keep_grab);
        XtAddCallback(dialog, XmNcancelCallback, responseCB, &keep_grab);
        XtAddCallback(dialog, XmNhelpCallback, responseCB, &keep_grab);

        XtManageChild(dialog);
        XtAddGrab(XtParent(dialog), True, False);

        while (keep_grab || XtPending()) {
                XtNextEvent(&event);
                XtDispatchEvent(&event);
         }

The "client_data" for the function (in each case) is &keep_grab.  The function
sets this to  False and unmanages the dialog before continuing to process the
callback.

        void
        responseCB(w, keep_grab, reason)
        Widget w;
        Boolean *keep_grab;
        XmAnyCallbackStruct *reason;
        {   int why = reason->reason;

            *keep_grab = False;
            XtRemoveGrab(XtParent(w));
            XtUnmanageChild(w);
            /* If you don't want to reuse it */
            XtDestroyWidget(XtParent(w));

            switch (why) {
             case XmCR_OK:
                 /* process ok action */
                 break;
             case XmCR_CANCEL:
                 /* process cancel action */
                 break;
             case XmCR_HELP:
                 /* process help action */
                 break;
            }
        }


- -------------------------------------------------------------------------------


9.  Memory and Speed


Subject: 27) Why does my application grow in size?

Answer: Motif 1.0 has many memory leaks, particularly in XmString manipulation.
Switch to Motif 1.1.

Answer: The Intrinsics have a memory leak in accelerator table management, and
Motif uses this heavily.  Avoid this by mapping/unmapping widgets rather than
creating/destroying them, or get  X11R4 fix-15/16/17.

Answer: The server may grow in size due to its own memory leaks.  Switch to a
later server.

Answer: You are responsible for garbage collection in `C'.  Some common cases
where a piece of memory becomes garbage are

 a.  Memory is allocated for a character string by Motif in XmStringGetLtoR().
     After using the string, XtFree() it.

 b.  If you have set the label in a label, pushbutton, etc widget, free it after
     calling XtSetValues() or the widget creation routine by XmStringFree().

 c.  If you have set text in a text widget, reclaim the string afterwards - the
     text widget makes its own copy.

 d.  If you have set the strings in a list widget, reclaim the space.  The list
     widget makes its own copy.

- -------------------------------------------------------------------------------
Subject: 28) Why does my application take a long time to start up?

Answer: If you have a large .Xdefaults, time may be spent reading and parsing
it.

- -------------------------------------------------------------------------------
Subject: 29) My application is running too slowly. How can I speed it up?

Answer: Use the R4 rather than R3 server.  It is much faster.

Answer: The standard memory allocator is not well tuned to Motif, and can
degrade performance.  Use a better allocator.  e.g. with SCO Unix, link with
libmalloc.a; use the allocator from GNU emacs; use the allocator from Perl.

Answer: Avoid lots of widget creation and destruction.  It fragments memory and
slows everything down.  Popup/popdown, manage/unmanage instead.

Answer: Set mappedWhenManaged to FALSE, and then call XtMapWidget()
XtUnmapWidget() rather than managing.

Answer: Get more memory - your application, the server and the Operating System
may be spending a lot of time being swapped.

Answer: If you are doing much XmString work yourself, such as heavy use of
XmStringCompare, speed may deteriorate due to the large amount of internal
conversions and malloc'ing.  Try using XmStringByteCompare if appropriate or
ordinary Ascii strings if you can.





10.  XmString


- -------------------------------------------------------------------------------
Subject: 30) How can I get the Ascii text out of an XmString?

Answer: To get the first line of text from a string created left-to-right


        char *str;
        XmString xmstr;

        /* stuff to create xmstr */
        ...

        /* set str to point to the text */
        XmStringGetLtoR(xmstr, XmSTRING_DEFAULT_CHARSET, &str);
        /* use the string */
        ...

        /* and reclaim space */
        XtFree(str);


- -------------------------------------------------------------------------------
Subject: 31)  When can XmStrings used as resources be freed?

Answer: The policy OSF have been trying to enforce is that if you set an
XmString or XmStringTable resource, the application is responsible for freeing
the XmStrings used because the widget makes a copy.  If you get an XmString
resource, then the application must free the value gotten.  If you get an
XmStringTable, then the application should NOT free the value gotten.  If the
application wants to manipulate it, it should make a copy first. This policy
appears to be implemented progressively, so may be less true for Motif 1.0 than
1.1.

- -------------------------------------------------------------------------------
Subject: 32) Why doesn't XmStringGetNextSegment() work properly?

Answer: The documentation in Motif 1.0 is in error. Instead of

        XmStringGetnextSegment(context, ...)
        XmStringContext * context;

it should be

        XmStringGetnextSegment(context, ...)
        XmStringContext context;

i.e. with no indirection.



11.  Dialogs


- -------------------------------------------------------------------------------
Subject: 33) How do I stop my dialog disappearing when I press the help button?

Answer: Bulletin board has the resource autoUnmanage which defaults to True.
This unmanages the widget when any button child is activated - including the
help button.  Set this to False to stop it disappearing. Note that you then have
to unmanage the bulletin board yourself when any other button is activated.

- -------------------------------------------------------------------------------
Subject: 34) How do I make my own dialog?  I want a dialog with my own set of
buttons that stretch and shrink like the ones in e.g. PromptDialog and its own
contents.

Answer: Start off with say a PromptDialog. Unmanage the buttons you don't want
or manage the Apply button if you want another. Unmanage the other bits of the
selection box you don't want. You can add another WorkArea child to the
selection box for any extra stuff you want.


    /* Copyright 1990, Kee Hinckley and Brian Holt Hawthorne */
    /* Permission granted for any use, provided this copyright */
    /* notice is maintained. */

    /* Create a dialog box */
    argcount = setArgs(&args, XmNautoUnmanage, False, NULL);
    SomeDialog = XmCreatePromptDialog(mainShell, "someDialog", args, argcount);

    /* Now get rid of the things we don't want */
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_SELECTION_LABEL);
    XtUnmanageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_TEXT);
    XtUnmanageChild(child);

    /* set the callbacks, and make sure the buttons we want are there */
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_OK_BUTTON);
    XtAddCallback(child, XmNactivateCallback, callSomeFunc, someArg);
    XtAddCallback(child, XmNactivateCallback, unManage, SomeDialog);
    XtManageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_APPLY_BUTTON);
    XtAddCallback(child, XmNactivateCallback, callSomeFunc, someOtherArg);
    XtManageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_CANCEL_BUTTON);
    XtAddCallback(child, XmNactivateCallback, dialogUnmanage, SomeDialog);
    XtManageChild(child);

    /* Add a new work area. This can be any manager. */
    child = XmCreateForm(SomeDialog, "someForm", NULL, 0);
    XtManageChild(child);

    /* and fill it up... */
    something = doYourStuff(child);




12.  Language bindings


- -------------------------------------------------------------------------------
Subject: 35) Is there a C++ binding for Motif?

Answer: The university of Lowell has a C++ binding.  The software is available
on any system running X11R3. Currently it is available for both the GNU's C++
compiler g++ v 1.37.1 and the AT&T C++ v 2.0 translator. The software is
available through either ftp or a 9 track reel magnetic tape for $250. A license
must be purchased first.  For additional information and license forms contact :

     University of Lowell
     Graphics Research Laboratory/Motif
     Computer Science Department
     One University Avenue
     Lowell, MA 01854
     attn : Fran Ward
     (phone 508-934-3628)


Answer: WWL is a library which defines C++ classes around X Toolkit Widgets.  It
is intended to simplify the task of C++ code writers when using the Toolkit by
providing them with C++ objects, methods, type checking and several utility
functions and classes.

WWL has been tested under SunOs4.0.3 on sun3 and sun4, HPUX version 6.5 and 7.0
and Ultrix 4.0 on DECstation 3100 and 5000. It is expected to work on most other
UNIX systems without too many problems.

WWL is distributed as a tar file with all the source, documentation and example.
The file is available using anonymous ftp from

        export.lcs.mit.edu (18.30.0.238   contrib/WWL-1.0.tar.Z
        lri.lri.fr (129.175.15.1)       pub/WWL-1.0.tar.Z


- -------------------------------------------------------------------------------
Subject: 36)  Is there a Common Lisp binding for Motif?  Answer: Try CLM. This
includes a toolkit demon (in C) that takes a widget description (with
callbacks), and forks a new process for each Motif application (which can be
just a single menu, or whatever).  Lisp can then continue running, with a
separate lightweight lisp process handling the connection & callbacks.  In North
America & net environs, CLM-2.0beta is available from export.lcs.mit.edu.

- -------------------------------------------------------------------------------
Subject: 37)+ Is there an Ada binding for Motif?

Answer: The situation is not good at the moment.

From Todd W. Lainhart: Take a look at THINGS, a VAPI with Ada bindings that was
written by the US Air Force (SAC).  It's in the public domain, and available
from export or gatekeeper.dec.com.  It implements Motif or OL look-and-feel. [I
had a look and it seemed to be missing documentation - Jan]

From David Lewis: A company called Rational appears to be making an Xm
implementation.  Also GHG in Texas has most other Xlib and Xt bindings for Ada.





13.  Miscellaneous


- -------------------------------------------------------------------------------
Subject: 38) What is libPW.a and do I need it?  My manual says I need to link in
libPW.a to use the File Selection Box.  I can't find it on my system.

Answer: The libPW.a is the Programers Workbench library which is an ATT product
not included in Berkeley based systems, hence it is not found in SunOS or
Ultrix, but is found on HP-UX (a Berkeley/ATT hybrid which chose ATT in this
case).  It contains the regex(3) routines.  Some systems which don't have these
in the libc.a need to link with -lPW.  Some systems which have the regex(3)
routines in there also have the libPW.a.  If you have regex(3) in libc, and it
works, don't link with libPW.  If you don't have regex(3) in libc, and you don't
have a libPW, then check some sites on the net for public domain replacements
(several exist), or call your vendor.

- -------------------------------------------------------------------------------
Subject: 39)* How can tell I if the user has selected the "Close" item on the
system menu attached to the top-level shell?  I need to do some clean up before
exiting.

Answer:

        void FinalCleanupCB(w, client_data, call_data)
        Widget   w;
        caddr_t  client_data, call_data;
        {
                /* tidy up stuff here */
                ...
                /* exit if you want to */
                exit (0);
        }

        main()
        {
                Atom wm_delete_window;

                ...
                XtRealizeWidget(toplevel);
                ...
                wm_delete_window =
                        XmInternAtom(XtDisplay(toplevel),
                                "WM_DELETE_WINDOW", False);
                XmAddWMProtocolCallback(toplevel, wm_delete_window,
                        FinalCleanupCB, NULL);
                XtMainLoop();
        }

To just turn the close option off, set the shell resource XmNdeleteResponse to
XmDO_NOTHING.  This means that users cannot kill your application via the system
menu, and may be a bad thing.



- -------------------------------------------------------------------------------
Subject: 40)* Why does an augment translation appear to act as replace for some
widgets?  When I use either augment or override translations in .Xdefaults it
seems to act as replace in both Motif 1.0 and 1.1

Answer: By default, the translation table is NULL.  If there is nothing
specified (either in resource file, or in args), the widget's Initialize finds:
Oh, there is NULL in translations, lets use our default ones.  If, however, the
translations have become non-NULL, the default translations are NOT used at all.
Thus, using #augment, #override or a new table has identical effect: defines the
new translations. The only way you can augment/override Motif's default
translations is AFTER Initialize, using XtSetValues.  Note, however, that Motif
managers do play with translation tables as well ... so that results are not
always easy to predict.

From OSF: A number of people have complained about not being able to
augment/override translations from the .Xdefaults.  This is due to the
complexity of the menu system/keyboard traversal and the necessary translations
changes required to support the Motif Style Guide in menus.  It cannot be fixed
in a simple way. Fixing it requires re-design of the menus/buttons and it is
planned to be fixed in 1.2.



- -------------------------------------------------------------------------------
Subject: 41) I tried to make shared libraries on a Sun, and got the message
"ld.so: Undefined symbol: __XtInherit" when executing UIL.  What did I do?

Answer: There is a problem in shared library build when you compare a function
variable to a routine name, but don't call the routine.  Either, you can build
the Xt library nonshared, or you can put a reference to XtToolkitInitialize in
the UIL main program (or even include a module that references it).  The routine
doesn't even have to be called; it just has to be there.


- -------------------------------------------------------------------------------
Subject: 42)+ Has anyone made shared libraries on an IBM RS/6000?

Answer: From Sakari Jalovaara: There is a problem: Xm redefines VendorShell and
the AIX linker put _both_ Xm's and Xt's VendorShell into programs.  When an AIX
shared library is created as many references inside the library are resolved as
possible.  If the symbol vendorShellClassRec is defined in libXt and referenced,
say, from a function XtFoo() also in libXt, the "ld" run that creates the shared
library resolves the reference:

        XtFoo() -> vendorShellClassRec

Then I create the Motif library that has its own vendorShellClassRec and an
XmBar() function that uses it; libXm will also contain a resolved reference to
vendorShellClassRec:

        XmBar() -> vendorShellClassRec

Finally, I link a program that uses both XtFoo() and XmBar() and the program
will end up with _two_ independent "vendorShellClassRec"s:

        XtFoo() -> vendorShellClassRec [Xt version]
        XmBar() -> vendorShellClassRec [Xm version]

Instand schizo zaphod mode.  In reality, vendorShellClassRec is not referenced
from functions but from other widget class records.

I can't just pull Vendor.o out from the shared Xt (Vendor.o appears to define
the only external symbols redefined by libXm) because AIX shared libraries
apparently can't contain unresolved external references.  If I take out Vendor.o
I have to take out every other file that uses symbols defined there - and then
files that need those files, etc.  I tried it and ended up with three or four
object files in libXt and the res non-sharable.

I kludged around this by putting all of libXt (minus Vendor.o) into the shared
libXm.  It isn't a pretty solution but it works - and beats having a statically
linked two-megabyte "periodic" demo...

- -------------------------------------------------------------------------------
Subject: 43) How can I set a multiline label in .Xdefaults?

Answer:

      *Label*labelString:             Here\nis\nthe\nLabel

Gives a four line label, using the escape sequence \n for a newline.
                 ----------
- ---------------------------------------------------------------------
Subject: 44)  How do you "grey" out a widget so that it cannot be activated?

Answer: Use XtSetSensitive(widget, False). Do not set the XmNsensitive resource
directly yourself (by XtSetvalues) since the widget may need to talk to parents
first.

- -------------------------------------------------------------------------------
Subject: 45)*  What is causing the messages "unknown keysym osfDown..."?  It
happens when I run an application under Motif 1.1

Answer: There is an OSF supplied addition to the /usr/lib/X11/XKeysymDB file.
It is found on the release tape and should have been automatically installed if
the installation procedure was followed in the Release Notes.

You have to copy (or append) lib/Xm/XKeysymDB into /usr/lib/X11.  This may
require root permission.  It is not clear how to fix the problem if you can't do
this.  The error comes from Xt translation table parsing and can't be fixed in
Motif, so if you can't get root permission you may be stuck.  The file is not
copyrighted so you can install it on other systems.

- -------------------------------------------------------------------------------
Subject: 46)  Why doesn't the Help callback work on some widgets?

Answer: If you press the help key the help callback of the widget with the
keyboard focus is called (not the one containing the mouse).  You can't get the
help callback of a non-keyboard-selectable widget called. To get `context
sensitive' help on these, you have to find the mouse, associate its position
with a widget and then do the help.

- -------------------------------------------------------------------------------
Subject: 47)*  What's wrong with the Motif 1.0 File Selection Box?  I can't set
the directory, change the directory or get the file mask to work.

Answer: The 1.0 File Selection Box is broken, and these don't work.  They
weren't fixed until Motif 1.04.  Use these later versions of 1.0 or switch to
Motif 1.1 where it changed a lot.

Joe Hildebrand has a work-around for some of this: Before popping up an
XmFileSelectionDialog, change to the directory you want.  When a file is
selected, check if it is a directory, so that we can change to it.  i.e.

static void show_file_box_CB(w, client_data, call_data)
   Widget               w;
   Widget               client_data;
   XmAnyCallbackStruct  *call_data;
{
   chdir("/users/hildjj/files");
   XtManageChild(client_data);
}

static void val_save(w, client_data, call_data)
   Widget       w;
   Widget       client_data;
   XmSelectionBoxCallbackStruct *call_data;
{
   struct stat buf;  /* struct stat is defined in stat.h */
   char *filename;

   /* get the file name from the FileSelectionBox */
   filename = SmX(call_data->value);

   /* get the status of the file named filename, and put it into buf */
   if (!stat(filename, &buf))
   {
      /* if it's a directory */
      /* if it's a directory */
      if(S_ISDIR(buf.st_mode))
      {
         /* change to that directory, and update the FileSelectionBox */
        chdir(filename);
        XmFileSelectionDoSearch(w, NULL);
      }
      else
         /* if it's a regualr file */
         if(S_ISREG(buf.st_mode))
            /* ask if it should be overwritten */
            XtManageChild(valbox);
         else
            /* it's another kind of file.  What type, i can't think of,
               but it might happen */
            pop_up_error_box(client_data, "Error saving file");
   }
   else  /* we couldn't get the file status */
   {
      /* if it's because the file doesn't exist, we're golden */
      if (errno == ENOENT)
         save_file();
      else   /* there is some other problem getting the status.
                e.g. bad path */
         pop_up_error_box(client_data, "Error saving file");
   }
}

this still doesn't implement the file masking stuff.



- -------------------------------------------------------------------------------
Subject: 48)+ Why can't I use accelerators on buttons not in a menu?

Answer: It is apparently a difficult feature to implement, but OSF are
considering this for the future. It is problematic trying to use the Xt
accelerators since the Motif method interferes with this.  The workaround
suggested so far is to duplicate your non-menu button by a button in a menu
somewhere, which does have a menu-accelerator installed.  When the user invokes
what they think is the accelerator for the button they can see Motif actually
invokes the button on the menu that they can't see at the time.

- -------------------------------------------------------------------------------
Subject: 49)+ Why don't labels in a Form resize when the label is changed?  I've
got some labels in a form. The labels don't resize whenever the label string
resource is changed. As a result, the operator has to resize the window to see
the new label contents. I am using Motif 1.1.

Answer: This problem may happen to any widget inside a Form widget. The problem
was that the Form will resize itself when it gets geometry requests from its
children. If its preferred size is not allowed, the Form will disallow all
geometry requests from its children. The workaround is that you should set any
ancestor of the Form to be resizable. For the shell which contains the Form you
should set the shell resource XmNallowShellResize to be True (by default, it is
set to FALSE).  There is currently an inconsistency on how resizing is being
done, and it may get fixed in Motif 1.2.

- -------------------------------------------------------------------------------
Subject: 50)+ How come the title bars for my dialogs now have "_popup" or "<-
popup" concatenated onto the widget name?


Answer: Motif 1.0.3 (?) "fixed" things such that title bars without an explicit
dialogTitle setting use the widget name with "_popup" or whatever added on.  Set
the dialogTitle resource explicitly if you don't want this new default naming
scheme.


- -------------------------------------------------------------------------------
Subject: 51)+ Has anyone done a bar graph widget?

Answer: You can fake one by using for each bar a scroll bar or even a label
which changes in size, put inside a container of some kind.

Try the StripChart widget in the Athena widget set. Set the XtNupdate resource
to 0 to keep it from automatically updating.

- -------------------------------------------------------------------------------
Subject: 52)+ Does anyone know of a source code of a graph widget where you can
add vertices and edges and get an automated updating?

Answer: No Motif one has been reported.  The XUG FAQ in comp.windows.x includes
information on graph display widgets.  There is also an implementation in the
Asente/Swick book.

From Martin Janzen: Well, it's not a widget set, but have you looked at
DataViews?  This package lets you create a wide variety of graphs, which can
display information received from data sources such as files, processes (through
pipes), or devices.  The graphs can be made to change in real time as new data
arrives.  There's also a function library which lets you work with graphs under
program control.  X drivers are included.

From Craig Timmerman: Just wanted others to know that there is a third
competitor in what may be come a big market for generic APIs.  The product is
called Open Interface and Neuron Data is the vendor.  Neuron has added some
extra, more complex widgets to their set.  The two most notable are a table and
network widget.  [...] I believe that the network widget got its name from its
ability to display expert system networks that Neuron's AI tools needed.  It
would be more aptly named the graph widget.  It can display and manipulate
graphs of various types (trees, directed graphs, etc).  Contact is

        Neuron Data
        156 University Avenue
        Palo Alto,  CA  94301
        (415) 321-4488






14.  Acknowledgements


This list was compiled using questions and answers posed to
comp.windows.x.motif. Some extracts were also taken from FAQs of comp.windows.x.
To all who contributed one way or the other, thanks! I haven't given individual
references, but  you may recognise contributions. If I have mangled them too
much, let me know.



That's all folks!


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

  ACSnet: 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

+--------------------------+















































































































































































































































































































































































































Local Variables:
mode: outline
outline-regexp: "Subject: +[0-9]+)"
eval: (hide-body)
End:

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:27:18 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00446; Thu, 16 May 91 21:06:54 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16319; Thu, 16 May 91 20:18:46 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16277; Thu, 16 May 91 20:17:43 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 19:37:09 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA00679; Thu, 16 May 91 16:28:16 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 12:06:18 GMT
From: mintaka!think.com!paperboy!hsdndev!bunny!krs0@bloom-beacon.mit.edu  (Rod Stephens)
Organization: GTE Laboratories, Waltham, MA
Subject: Delete key deletes character after the cursor
Message-Id: <11173@bunny.GTE.COM>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

Since I upgraded to Motif 1.1.1, the delete key deletes the
character AFTER the cursor instead of the character before
the cursor. This happens in Motif text widgets in
applications I write. Other applications (xterm, emacs,
etc.) handle it normally.

I don't remember if this was a problem on Motif 1.1.0 but I
suspect not or I would have been annoyed by it before.

Does anyone know how to fix this?

+---------------------------------------------------------------+
| Rod Stephens           | "Haven't I told you not to play      |
| GTE Laboratories, Inc  |  with my super-weapons? You might    |
| (617)466-4182          |  devastate yourself!"                |
| krs0@gte.com           |                                      |
+---------------------------------------------------------------+

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 22:28:29 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00655; Thu, 16 May 91 22:06:57 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16468; Thu, 16 May 91 21:36:52 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 21:07:18 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02799; Thu, 16 May 91 17:54:22 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 May 91 00:14:29 GMT
From: pa.dec.com!fortsc.enet.dec.com!mok@decwrl.dec.com  (Charles P. Mok)
Organization: Digital Equipment Corporation
Subject: Summary: Tools for automatic conversion of SunView to Motif
Message-Id: <1991May16.232139.7505@pa.dec.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


Earlier I posted to ask for tools to convert codes from SunView to Motif. 
Unfortunately I did not receive any new information (I wanted to find out more
than what I knew about), but I did receive a few messages asking me to 
summarize.  So here it is, the info that I knew when I first asked, and 
nothing more:

DXMconvert 
Expert Object Corp. (Lincolnwood IL)
708.676.5555
708.673.4549 (fax)
...!sun!sunloop!exoc!support
After June 1 1991
(Highland Park IL)
708.926.8500
708.926.8590

DXMconvert converts SunView code to portable Motif.  DXMconvert produces
portable C code with calls made to the Xt and Xm (v1.1) libraries.  I do not
have much details beyond this.  It is initially marketed to work for DECwindow
Motif but in fact I was told it should run without problem on other Motif's as
well on other platforms.

Charles                         


- ---
Charles Mok/Digital Equipment Corporation
INTERNET: mok@fortsc.enet.dec.com  UUCP: ....!decwrl!fortsc.dec.enet.com!mok
- ---

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 22:28:37 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00659; Thu, 16 May 91 22:07:12 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16470; Thu, 16 May 91 21:36:55 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 21:07:47 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02830; Thu, 16 May 91 17:55:28 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 22:39:25 GMT
From: mips!sdd.hp.com!cs.utexas.edu!news-server.csri.toronto.edu!orasis.vis.toronto.edu!tjhorton@decwrl.dec.com  ("Timothy J. Horton")
Organization: Department of Computer Science, University of Toronto
Subject: Re: How to re-manage the same child widget
Message-Id: <91May16.183920edt.8838@orasis.vis.toronto.edu>
References: <9105132043.AA11128@11128>, <91May15.224003edt.8838@orasis.vis.toronto.edu>, <1991May16.154512.23319@thyme.jpl.nasa.gov>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) writes:
>tjhorton@vis.toronto.edu ("Timothy J. Horton") writes:
>>jerryl@is.Morgan.COM (Jerry Liebelson) writes:
>>>  QUESTION:  Is there an efficient, trouble-free way to unmanage and
>>>re-manage one instance of this XmList under different parent container
>>>widgets, which themselves might be contained within different shell widgets?
>>
>>XtReparent (I think that's what it's called -- no books nearby).
>
>This fits into the category of dis-information.  There is no XtReparent().
>And there is no easy, nor clean way to reparent widgets.  This is not my
>opinion, but an echo of something Schliefer/Gettys/Converse/et. al. have
>said in months gone by.

I believe you.  Sorry, I guess I was confusing it with the Xlib call for
reparenting windows (not widgets).  XReparent or XReparentWindow or whatever.

>One possible solution would be to GetValues() the XmNitems resource from 
>one and SetValues() it onto the other.  Since this is fast and simple, 
>it's the way I would go.

This won't answer Jerry's question; his list is very large and he wants only
one instance of the XmList.  He'll have several copies because XtSetValues on
the XmNitems resource causes a list widget to allocate and make a copy of the
entire list.

If you no longer need access to the list that you provided to a list widget,
you can destroy it, because the list widget has its own private copy.  Most
motif widgets are like this; they reallocate copies of whatever you give them
via pointers.  Furthermore, if you fetch back resource values via pointers,
most widgets allocate yet another copy of the resource and pass back the new
copy, which you normally have to free explicitly.

I had an application in which I needed to very quickly swap large lists in
and out of a list widget, but couldn't, because the dang list widget always
freed its old list and allocated and copied the new one.  I had to write my
own code from scratch to display selection lists without copying them.

[Sorry for the earlier disinformation, and thanks for catching it]
Tim

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Thu, 16 May 91 21:30:45 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00463; Thu, 16 May 91 21:07:49 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16339; Thu, 16 May 91 20:19:28 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16285; Thu, 16 May 91 20:17:53 EDT
Received: from csc.canberra.edu.au by BU.EDU (1.99) Thu, 16 May 91 19:42:52 EDT
Received: from echo.canberra.edu.au by csc.canberra.edu.au (4.1/SMI-4.1)
	id AA11630; Fri, 17 May 91 09:45:35 EST
Received: by echo.canberra.edu.au (5.61/5.17) 
	id AA29020; Fri, 17 May 91 09:42:13 +1000
From: jan@echo.canberra.edu.au (Jan Newmarch)
Message-Id: <9105162342.AA29020@echo.canberra.edu.au>
Subject: Frequently Asked Questions about Motif
To: motif@alfalfa.com
Date: Fri, 17 May 91 9:42:12 EST
X-Mailer: ELM [version 2.3 PL11]


Newsgroups: comp.windows.x.motif
Subject: Frequently Asked Questions about Motif
Distribution: world
Expires: Fri, 07 June 91 00:00:00 GMT

[Last changed: 09 Apr 91]
[This is last month's posting unchanged. We are moving buildings and
our network has been down for the last couple of weeks and looks like
staying that way for a few more. Kind of hard to access files when you
are running a diskless machine with no network! I hope to be back on
line for next month's posting, with some of the new things that have
come up.]

This article and one following contain the answers to some Frequently Asked 
Questions (FAQ) often seen in comp.windows.x.motif. It is posted to help reduce 
volume in this newsgroup and to provide hard-to-find information of general 
interest.

		Please redistribute this article!

This article includes answers to the following questions. Ones marked with
a + indicate questions new to this issue; those with changes of content since
the last issue are marked by *:

 0)* What versions of Motif are there?
 1) Where can I get Motif?
 2) Where can I get public domain Motif source?
 3)+ Are the Motif examples publically available?
 4) Has anyone done a public domain Motif lookalike?
 5) Does anyone from OSF pay attention to our questions/suggestions?
 6)  Does OSF have an application compliance validation service?  
 7)  What is the motif-talk mailing list?
 8)  What MIT patches do I use, and when do I use fix-osf?
 9)* What books should I read or do I need to program using Motif?
10) What is the diference between Motif and mwm?
11) Does anyone have an alternative set of 3-D defaults for a monochrome screen?
12) What prototyping tools are there to generate Motif code?
13) Why does  pressing  <return> in a text widget do nothing?
14) When I add text to a scrolling text widget how can I get the new text to show?
15) Does the text widget support 16 bit character fonts?
16) How can I stop the text widget from echoing characters typed?
17) How can I replace characters typed with say a `*'?
18) How can I best add a large piece of text to a scrolled list widget?
19) How do I best put a new set of items into a list?
20)  Can I get a bitmap to show in a list item like I can in a Label?
21)+ Can I have items with different colours in a list?
22) What can I put inside a menu bar?
23) Can I have a cascade button without a submenu in a pulldown menu?
24) Should I have a cascade button without a submenu in a pulldown menu?
25)* How can I direct the keyboard input to a particular widget?
26) How can I have a modal dialog which has to be answered before the application can continue?
27) Why does my application grow in size?
28) Why does my application take a long time to start up?
29) My application is running too slowly. How can I speed it up?
30) How can I get the Ascii text out of an XmString?
31)  When can XmStrings used as resources be freed?
32) Why doesn't XmStringGetNextSegment() work properly?
33) How do I stop my dialog disappearing when I press the help button?
34) How do I make my own dialog?
35) Is there a C++ binding for Motif?
36)  Is there a Common Lisp binding for Motif?
37)+ Is there an Ada binding for Motif?
38) What is libPW.a and do I need it?
39)* How can tell I if the user has selected the "Close" item on the system menu attached to the top-level shell?
40)* Why does an augment translation appear to act as replace for some widgets?
41) I tried to make shared libraries on a Sun, and got the message "ld.so: Undefined symbol: __XtInherit" when executing UIL.  What did I do?
42)+ Has anyone made shared libraries on an IBM RS/6000?
43) How can I set a multiline label in .Xdefaults?
44)  How do you "grey" out a widget so that it cannot be activated?
45)*  What is causing the messages "unknown keysym osfDown..."?
46)  Why doesn't the Help callback work on some widgets?
47)*  What's wrong with the Motif 1.0 File Selection Box?
48)+ Why can't I use accelerators on buttons not in a menu?
49)+ Why don't labels in a Form resize when the label is changed?
50)+ How come the title bars for my dialogs now have "_popup" or "<-popup" concatenated onto the widget name?
51)+ Has anyone done a bar graph widget?
52)+ Does anyone know of a source code of a graph widget

If you have suggestions or corrections for any of these answers or any 
additional information, please send them directly to jan@ise.canberra.edu.au;
the information will be included in the next revision (or possibly the one 
after that; thanks for the many suggestions which haven't been incorporated 
yet).  The answers in this iteration are acknowledged to be partial.

This posting is intended to be distributed at approximately the beginning of 
each month.

The information contained herein has been gathered from a variety of sources. In
many cases attribution has been lost; if you would like to claim responsibility
for a particular item, please let us know. 

Conventions used below: telephone numbers tend to be Bell-system unless 
otherwise noted; prices on items are not included.









1.  OSF and Motif


- -------------------------------------------------------------------------------
Subject:  0)* What versions of Motif are there?

Answer: Motif 1.0 is based on the R3 toolkit.  There are patch releases to 1.0:
1.0.1, 1.0.A, 1.0.2 and 1.0.3.  1.0.A was a fairly major patch, as it involved a
complete re-engineering of UIL and Mrm.  Almost everyone who has 1.0.x has
either 1.0.A or 1.0.3.  Motif 1.1 is based on the R4 toolkit.  The current
version is Motif 1.1.0, plus a couple of patches available to full support
contract holders. Motif 1.1.1 has been released as a patch to licensees with
Full Support or Technical Update service.  Motif 1.1.2 is a patch release which
contains the necessary changes to fix over 80 bugs reported against Motif. It
will be available to support contract holders (including both full support and
update service).  Future 1.1 patch releases are tentatively scheduled as
follows:

        1.1.3   3rd quarter 1991
        1.1.4   4th quarter 1991
        1.1.5   1st half 1992


Motif 1.2 is not expected until after mid 1991, and will be based on the R5
toolkit.

- -------------------------------------------------------------------------------
Subject:  1) Where can I get Motif?

Answer: [This tries to mirror FAQ of comp.windows.x Send changes to
xug@expo.lcs.mit.edu]
    Various hardware vendors produce developer's toolkits of binaries, header
files, and documentation; check your hardware vendor, particularly if that
vendor is an OSF member. Systems known to be shipping now: HP (sans UIL), Apollo
(sans UIL), SCO, ISC, Mips (RISCwindows=X11R3 + full Motif), IBM, Data General
for AViioNs (includes UIL), Bull (?), Concurrent Computer Corporation 5000,
6000, 8000 series machines.

    In addition, independent binary vendors produce Motif toolkits . ICS makes
several binary kits, notably for Sun, DEC, Apple; Quest (408-988-8880) sells
kits for Suns, as well; IXI (+44 223 462 131) offers kits for Sun3 (SunOS 3.5 or
later, and Sun4 (SunOS 4.0.1 or later). Unipalm XTech (+44 954211862; or Aurora
Technologies 617-577-1288 in USA) offers a binary kit for Suns based on Motif
1.1, with shared libraries.  NSL (+33 (1) 43 36 77 50; requests@nsl.fr) offers
kits for the Sun 3 and Sun 4.

  The kits include varied levels of bug-fixing and support for shared libraries.
BIM (Fax : +32(2)759.47.95) offer Motif 1.1 for Sun-3, Sun-4, Sun-386i. Includes
shared libraries.  Metrolink Inc. (+1-305-566-9586, sales@metrolink.com; in
Europe contact ADNT, (33 1) 3956 5333) ships an implementation of X11R4 and
Motif 1.1 for several 386 systems.

    An OSF/Motif source license must be obtained from OSF before source can be
obtained from the Open Software Foundation. Call the Direct Channel Desk at OSF
at 617-621-7300 or email direct@osf.org for ordering information.




- -------------------------------------------------------------------------------
Subject:  2) Where can I get public domain Motif source?

Answer: You cannot.  Motif source is not publically available.

- -------------------------------------------------------------------------------
Subject:  3)+ Are the Motif examples publically available?

Answer: No. They are subject to the same licensing limitations as Motif source.


- -------------------------------------------------------------------------------
Subject:  4) Has anyone done a public domain Motif lookalike?

Answer: Not yet.

- -------------------------------------------------------------------------------
Subject:  5) Does anyone from OSF pay attention to our questions/suggestions?

Answer: Yes, and they quite often post answers too. But they may not respond to
*your* problem because they have other things to do as well.  This newsgroup is
not run by OSF, and has no formal connection with OSF.  OSF is a member-driven
company.  The membership (and anyone can be a member) provides the primary input
for future development of Motif.

- -------------------------------------------------------------------------------
Subject:  6)  Does OSF have an application compliance validation service?

Answer: They have a checklist and a certification process which you can request
from them.  Ask for the Level One Certification Checklist.  The process is one
of self-certification.  It tests only the appearance and behavior of the
application against Motif style.  The product will also be put in the OSF
reference listing.  There's a one-time fee of $250.  According to the master
license agreement, you can't use any OSF identifying mark unless you have done a
certification.


- -------------------------------------------------------------------------------
Subject:  7)  What is the motif-talk mailing list?

Answer: The motif-talk mailing list is only for those who have purchased a Motif
source code license.  You can be placed on this list by emailing to motif-talk-
request.


- -------------------------------------------------------------------------------

Subject:  8)  What MIT patches do I use, and when do I use fix-osf?

Answer: The Motif 1.1.0 tape contains MIT patches 1-14. Apply these and any
others you can get.  If your MIT patch level only goes up to fix-16, you also
need to apply fix-osf.  Fix-osf was an emergency patch for a problem that
existed when the Motif 1.1 tape was cut, The MIT fix-17 completely superseded
osf-fix, so if you have applied fix-17 do not apply fix-osf.  The 1.1.1 tape
contains MIT fixes 15-18, as well as an OSF-developed fix that deals with a
subtle bug in the Selection mechanism of the Intrinsics.  Most people will have
fix-15 to 18 by now; if you don't have them:

        Back out fix-osf if you have applied it
        Apply fix-15 to 18
        Apply fix-osf-1.1.1

The Selection fix was submitted to MIT, who came up with a diferent fix.  It
will not be made into an R4 fix but should be in R5. The MIT fix was posted to
motif-talk.




2.  Literature


- -------------------------------------------------------------------------------
Subject:  9)* What books should I read or do I need to program using Motif?

Answer: Ken Lee of the DEC Western Software Laboratory (klee@wsl.dec.com)
regularly posts to comp.windows.x and ba.windows.x a list of reference books and
articles on X and X programming.  In FAQ comp.windows.x an extract of his list
appears. Specifically for Motif programming, though:

OSF/Motif Programmers Guide, Prentice-Hall 13-640525-8 (Motif 1.0) ISBN 0-13-
640681-5 (Motif 1.1) (NB: This makes use of the demo programs that you get with
a Motif source license.  The programs are not included and may or may not be
available on your system.)

OSF/Motif Programmers Reference Manual, Prentice-Hall 13-640517-17 (Motif 1.0)
 ISBN 0-13-640616-5 (Motif 1.1)

OSF/Motif Style Guide, Prentice-Hall 13-640491-X (Motif 1.0) ISBN 0-13-640673-4
(Motif 1.1)

Young, Doug. "The X Window System: Applications and Programming with Xt (Motif
Version)," Prentice Hall, 1989 (ISBN 0-13-497074-8). The excellent tutorial "X
Window Systems Programming and Applications with Xt," (ISBN 0-13-972167-3)
updated for Motif. [The examples from the Motif version are available on export
in ~ftp/contrib/young.motif.tar.Z]

Marshall Brain at brain@adm.csc.ncsu.edu posted a set of simple and useful Motif
tutorials.

You will also need books and references on Xt such as:

Asente, Paul J., and Swick, Ralph R., "X Window System Toolkit, The Complete
Programmer's Guide and Specification", Digital Press, 1990.  The bible on Xt. A
treasury of information, excellent and invaluable.  Distributed by Digital
Press, ISBN 1-55558-051-3, order number EY-E757E-DP; and by Prentice- Hall, ISBN
0-13-972191-6.

Nye, Adrian, and Tim O'Reilly, "X Toolkit Programming Manual, Volume 4,"
O'Reilly and Associates, 1989. The folks at O'Reilly give their comprehensive
treatment to programming with the MIT X11R3 Intrinsics; some information on
X11R4 is included.

O'Reilly, Tim, ed.,  "X Toolkit Reference Manual, Volume 5," O'Reilly and
Associates, 1989.  A professional reference manual for the MIT X11R3 Xt; some
information on X11R4 is included.

Books and reference manuals on Xlib may also be useful.





3.  Mwm


- -------------------------------------------------------------------------------
Subject: 10) What is the diference between Motif and mwm?

Answer: mwm is a window manager. Motif itself is made up of four parts: a User-
Interface Guideline, an API toolkit of `C' routines which helps in the building
of applications which conform to the Guideline, the window manager mwm, and a
language UIL which is designed to ease user interface development.  In general
mwm will run an application built with any X-windows API, and in general an
application built using the Motif toolkit will run under any window manager.


- -------------------------------------------------------------------------------
Subject: 11) Does anyone have an alternative set of 3-D defaults for a
monochrome screen?

Answer: This is obviously a matter of taste. Some alternatives suggested include

!Benjamin Schreiber, bs@osf.osf.org, bs@cs.brandeis.edu
Mwm*foreground:                 black           ! Actually, when a window is
Mwm*background:                 white           ! deactivated, the background
Mwm*backgroundPixmap:           50_foreground   ! becomes white, insted of
Mwm*topShadowPixmap:            white           ! 50% foreground (grey)

Mwm*activeForeground:           black
Mwm*activeBackground:           white
Mwm*activeBackgroundPixmap:     50_foreground
Mwm*activeTopShadowPixmap:      white

Mwm*menu*backgroundPixmap:      background
Mwm*menu*topShadowPixmap:       50_foreground

Mwm*title*foreground:                   black
Mwm*title*background:                   white
Mwm*title*backgroundPixmap:             white
Mwm*title*topShadowPixmap:              50_foreground
Mwm*title*activeForeground:             white
Mwm*title*activeBackground:             black
Mwm*title*activeBackgroundPixmap:       black
Mwm*title*activeBottomShadowPixmap:     50_foreground

Mwm*feedback*backgroundPixmap:          white

or

! From: tsang@isi.com (Kam C. Tsang)
Mwm*background:                      White
Mwm*activeBackground:                White
Mwm*activeBackgroundPixmap:          25_foreground
Mwm*foreground:                      Black
Mwm*activeForeground:                Black
Mwm*menu*background:                 white
Mwm*menu*foreground:                 black
xterm*Foreground:                    black
xterm*Background:                    white


or

! From: ucsd.edu!usc!snorkelwacker!paperboy!yee  (Michael K. Yee)
Mwm*cleanText:                          True

Mwm*activeBackground:           white
Mwm*activeForeground:           black
Mwm*background:                 white
Mwm*foreground:                 black

Mwm*client*activeBackgroundPixmap:      50_foreground
Mwm*client*activeTopShadowPixmap:       foreground
Mwm*client*activeBottomShadowPixmap:    background

!Mwm*client*background:                 white
!Mwm*client*foreground:                 black
Mwm*client*backgroundPixmap:            75_foreground
Mwm*client*topShadowPixmap:             foreground
Mwm*client*bottomShadowPixmap:          background

!Mwm*feedback*background:               white
!Mwm*feedback*foreground:               black
Mwm*feedback*backgroundPixmap:          50_foreground
!Mwm*feedback*topShadowPixmap:          25_foreground
!Mwm*feedback*bottomShadowPixmap:       background

!Mwm*menu*background:                   white
!Mwm*menu*foreground:                   black
Mwm*menu*backgroundPixmap:              foreground
!Mwm*menu*topShadowPixmap:              foreground
!Mwm*menu*bottomShadowPixmap:           background

!Mwm*icon*background:                   white
!Mwm*icon*foreground:                   black
Mwm*icon*activeBackgroundPixmap:        50_foreground
Mwm*icon*activeBottomShadowPixmap:      foreground
Mwm*icon*backgroundPixmap:              75_foreground





4.  Motif generators


- -------------------------------------------------------------------------------
Subject: 12) What prototyping tools are there to generate Motif code?


Answer: `Prototyping tools' come in two forms: those that can be used to design
the interface only (Interactive Design Tools), and those that go beyond this to
give support for application code (User Interface Management Systems).  There
are a number of commercial and non-commnercial tools of both kinds that will
support the Motif interface.  They include:

IDTs:

Builder Xcessory
UIMX
X Build
ExoCODE/xm


UIMS:

WINTERP
Widget Creation Library
Serpent
TeleUse


Some contact addresses are:

WINTERP: You may obtain the current source, documentation, and examples via
anonymous ftp from host export.lcs.mit.edu: in directory contrib/winterp you
will find the compress(1)'d tar(1) file winterp.tar.Z. If you do not have
Internet access you may request the source code to be mailed to you by sending a
message to winterp-source%hplnpm@hplabs.hp.com or hplabs!hplnpm!winterp-source.

Serpent: The S/W is free (anonymous ftp) from fg.sei.cmu.edu.  For more info
contact erik/robert at serpent-info@sei.cmu.edu.

TeleUse: In the U.K., send mail to xtech@unipalm.co.uk or call +44 954 211862.
In the US call Telesoft at (619) 457-2700 or write TeleSoft, 5959 Cornerstone
Court West, San Diego, California 92121.

Builder Xcessory from ICS.  More details are available by sending a request to
info@ics.com.  617.547.0510

X-Designer: From Imperial Software Technology in the UK.  Email address is
sales@ist.co.uk.  (+44) 743 587055

ExoCODE/xm: From Expert Object Corp., 7250 Cicero Avenue, Lincolnwood, IL 60646
(708)676-5555.

X Build: From Nixdorf Computer (Waltham, MA)  xbuild@nixdorf.com


ExoCode: From EXOC (Chicago, IL)

UIMX: Visual Edge Software Limited, 3870 Cote Vertu, St Laurent, Quebec, H4R
1V4, Phone: (514) 332-6430, Fax:   (514) 332-5914, or: Visual Edge Software
Ltd., 101 First Street, Suite 443, Los Altos, CA 94022, Phone: (415) 948-0753,
Fax:   (415) 948-0843





The Widget Creation Library: The distribution is available in several ways.  The
preferred approach it for you to get the compressed tar file using anonymous ftp
from either of these ftp servers:

    devvax.jpl.nasa.gov (128.149.1.143) pub/Wc1_03.tar.Z
    export.lcs.mit.edu    (18.30.0.238) /contrib/Wcl.1.05Wc1_05.tar.Z






5.  Text widget


- -------------------------------------------------------------------------------
Subject: 13) Why does  pressing  <return> in a text widget do nothing?  This
happens using Motif 1.0 when I have a text widget inside a bulletin board (or
form) inside a dialog shell. (In Motif 1.1 it is fixed for both text and list
widgets.)

Answer: In single line mode, pressing the <return> key usually invokes the
Activate() action, and in multi-line mode, the newline() action.  However,
whenever a widget is the child of a bulletin board widget which is the child of
a dialog shell, the bulletin board forces all of its children to translate
<return> to the bulletin board action Return() which is usually associated with
the default button of the dialog.  To restore the text actions of Activate() or
newline(), you need to overide the Return() action of the bulletin board.


        /* declarations */
        /* for a single line widget */
        char newTrans[] = "<Key>Return : Activate()";
        /* for a multi line widget */
        char newTrans[] = "<Key>Return : newline()";
        XtTranslations transTable;

        /* in executable section */

        transTable = XtParseTranslationTable(newTrans);

        /* after creating but before managing text widget */

        XtOverrideTranslations(textWidget, transTable);


Subject: 14) When I add text to a scrolling text widget how can I get the new
text to show?

Answer: Use the call undocumented in Motif 1.0

        void XmTextShowPosition(w, position)
        Widget w;
        XmTextPosition position;

where the position is the number of characters from the beginning of the buffer
of the text to be displayed. If you don't know how many characters are in the
buffer, use another call undocumented in Motif 1.0

        position = XmTextGetLastPosition(w)


- -------------------------------------------------------------------------------
Subject: 15) Does the text widget support 16 bit character fonts?

Answer: R5 will have support for 16 bit character sets, and Motif 1.2 will use
that. You will have to wait until then.

- -------------------------------------------------------------------------------
Subject: 16) How can I stop the text widget from echoing characters typed?  I
need to turn off echo for password input.

Answer: Use the modifyVerifyCallback to tell when input is received. Set the
`doit' field in the XmTextVerifyCallbackStruct to False to stop the echo. In
Motif 1.0 this will cause a beep per character: Live with it, because at 1.1 you
can turn it off.  Note that password hiding is inherently insecure in X -
someone may have an X grab on the keyboard and be reading all characters typed
in anyway.

- -------------------------------------------------------------------------------
Subject: 17) How can I replace characters typed with say a `*'?  I want to
replace input for password entry.

Answer: In Motif 1.1  set text->ptr in the callback structure to '*'. This does
not work under 1.0 because of an oversight in which changes to this are ignored.
In Motif 1.0, what you can do is set the doit flag to 'false' so the text is not
displayed. Then set a static boolean to True to prevent re-entrance.  Next call
XmTextReplace() to display your '*'.  then reset your re-entrance flag to False.
XmTextReplace() will call the XmNmodifyVerify callback.  To prevent getting into
an infinite loop, you need the re-entrance flag.

- -------------------------------------------------------------------------------
Subject: 18) How can I best add a large piece of text to a scrolled list widget?
It insists on adding the text one line at a time, adjusting the scroll bar each
time. It looks awful and is slow.

Answer: Unmanage the widget, add the text and then manage it again.




6.  Lists


- -------------------------------------------------------------------------------
Subject: 19) How do I best put a new set of items into a list?

Answer: Set the new list count and list by XtSetArgs and install them by
XtSetValues.

    XmString list[SIZE];
    int list_size;

    XtSetArg (args[n], XmNitemCount, list_size); n++;
    XtSetArg (args[n], XmNitems, list); n++;
    XtSetValues (w, args, n);

Each time the list is reset by this the old contents are freed by the widget and
the new supplied list is copied.  Do *not* free the old list of items yourself
as this would result in the space being freed twice.  It is not necessary to
remove the items one at a time, nor to "zero" out the list first.

- -------------------------------------------------------------------------------
Subject: 20)  Can I get a bitmap to show in a list item like I can in a Label?
I want to place a bitmap along with some normal text in my list items.

Answer: No. The workaround is to define your font containing the icons you want.
Then you can create a fontlist containing your icon font and the font you want
the text in, and then make your items multi-segment XmStrings where the first
segment contains the code of the icon you want with a charset that matches the
icon font in your fontlist and the second segment with a charset matching the
text font.


- -------------------------------------------------------------------------------
Subject: 21)+ Can I have items with different colours in a list?

Answer: No.  Since the items are XmStrings, you can already change the font of
an item by replacing it with an item with the same text and a different charset
tag.  Adding support for color would require modification of the internal data
structure in XmList as well as modification to the drawing routines.





7.  Menus


- -------------------------------------------------------------------------------
Subject: 22) What can I put inside a menu bar?

Answer: You can only put cascade buttons in menu bars. No pushbuttons, toggle
buttons or gadgets are allowed. When you create a pulldown menu with parent a
menu bar, its real parent is a shell widget.

- -------------------------------------------------------------------------------
Subject: 23) Can I have a cascade button without a submenu in a pulldown menu?

Answer: Yes you can. A cascade button has an activate callback which is called
when you click on it and it doesn't have a submenu. It can have a mnemonic, but
keyboard traversal using the arrow keys in the menu will skip over it.

- -------------------------------------------------------------------------------
Subject: 24) Should I have a cascade button without a submenu in a pulldown
menu?

Answer: No. This is forbidden by the style guide. Technically you can do it (see
previous question) but if you do it will not be Motif style compliant. This is
unlikely to change - if a "button" is important enough to be in a pulldown menu
bar with no pulldown, it should be a button elsewhere.



8.  Keyboard traversal


- -------------------------------------------------------------------------------
Subject: 25)* How can I direct the keyboard input to a particular widget?

Answer: In Motif 1.1 call XmProcessTraversal(target, XmTRAVERSE_CURRENT).  The
widget (and all of its ancestors) does need to be realized BEFORE you call this.
Otherwise it has no effect.  XmProcessTraversal is reported to have many bugs,
so it may not work right.

In Motif 1.0 call the undocumented _XmGrabTheFocus(target).

Do not use the X or Xt calls such as XtSetKeyboardFocus since this bypasses the
Motif traversal layer and can cause it to get confused.  This can lead to odd
keyboard behaviour elsewhere in your application.

- -------------------------------------------------------------------------------
Subject: 26) How can I have a modal dialog which has to be answered before the
application can continue?

Answer: The answer depends on whether you are using the Motif window manager mwm
or not.  If you are, there is a simple solution. If not (or you don't know
whether you are or not), you have to use a slightly harder method.  Test for
this by XmIsMotifWMRunning.

The window manager mwm knows how to control event passing to dialog widgets
declared as modal. If the dialog is set to application modal, then no
interaction with the rest of the application can occur until the dialog is
destroyed or unmanaged. This can be done through one of the callbacks of the
dialog:


block_dialog(parent)
Widget parent;
{
        Arg args[2];

        XtSetArg(args[0], XmNmessageString,
                XmStringCreateLtoR("....", charset));
        XtSetArg(args[1], XmNdialogStyle,
                XmDIALOG_APPLICATION_MODAL);
        dialog = XmCreateMessageDialog(parent, NULL, args, 2);
        XtAddCallback(dialog, XmNokCallback, responseCB, NULL);
        XtAddCallback(dialog, XmNcancelCallback, responseCB, NULL);
        XtAddCallback(dialog, XmNhelpCallback, responseCB, NULL);

        XtManageChild(dialog);
}

void responseCB(w, client_data, reason)
Widget w;
caddr_t client_data;
XmAnyCallbackStruct *reason;
{       int why = reason->reason;

        XtUnmanageChild(w);
        /* if you won't use it again */
        XtDestroyWidget(XtParent(w));

        switch (why) {
             case XmCR_OK:
                 /* process ok action */
                 break;
             case XmCR_CANCEL:
                 /* process cancel action */
                 break;
             case XmCR_HELP:
                 /* process help action */
                 break;
        }
}


Without using mwm, the basic version goes like this: You have to set an Xt grab
to the dialog and run your own event processing loop. This loop finishes when
the user invokes a callback from a button press. The boolean `keep_grab' is
passed to the callback as client data which sets it to false when the callback
is executed.

        Boolean keep_grab = True;
        XEvent event;
        Arg args[1];

        XtSetArg(args[0], XmNmesssageString, ...);
        dialog = XmCreateMessageDialog(parent, NULL, args, 1);
        XtAddCallback(dialog, XmNokCallback, responseCB, &keep_grab);
        XtAddCallback(dialog, XmNcancelCallback, responseCB, &keep_grab);
        XtAddCallback(dialog, XmNhelpCallback, responseCB, &keep_grab);

        XtManageChild(dialog);
        XtAddGrab(XtParent(dialog), True, False);

        while (keep_grab || XtPending()) {
                XtNextEvent(&event);
                XtDispatchEvent(&event);
         }

The "client_data" for the function (in each case) is &keep_grab.  The function
sets this to  False and unmanages the dialog before continuing to process the
callback.

        void
        responseCB(w, keep_grab, reason)
        Widget w;
        Boolean *keep_grab;
        XmAnyCallbackStruct *reason;
        {   int why = reason->reason;

            *keep_grab = False;
            XtRemoveGrab(XtParent(w));
            XtUnmanageChild(w);
            /* If you don't want to reuse it */
            XtDestroyWidget(XtParent(w));

            switch (why) {
             case XmCR_OK:
                 /* process ok action */
                 break;
             case XmCR_CANCEL:
                 /* process cancel action */
                 break;
             case XmCR_HELP:
                 /* process help action */
                 break;
            }
        }


- -------------------------------------------------------------------------------


9.  Memory and Speed


Subject: 27) Why does my application grow in size?

Answer: Motif 1.0 has many memory leaks, particularly in XmString manipulation.
Switch to Motif 1.1.

Answer: The Intrinsics have a memory leak in accelerator table management, and
Motif uses this heavily.  Avoid this by mapping/unmapping widgets rather than
creating/destroying them, or get  X11R4 fix-15/16/17.

Answer: The server may grow in size due to its own memory leaks.  Switch to a
later server.

Answer: You are responsible for garbage collection in `C'.  Some common cases
where a piece of memory becomes garbage are

 a.  Memory is allocated for a character string by Motif in XmStringGetLtoR().
     After using the string, XtFree() it.

 b.  If you have set the label in a label, pushbutton, etc widget, free it after
     calling XtSetValues() or the widget creation routine by XmStringFree().

 c.  If you have set text in a text widget, reclaim the string afterwards - the
     text widget makes its own copy.

 d.  If you have set the strings in a list widget, reclaim the space.  The list
     widget makes its own copy.

- -------------------------------------------------------------------------------
Subject: 28) Why does my application take a long time to start up?

Answer: If you have a large .Xdefaults, time may be spent reading and parsing
it.

- -------------------------------------------------------------------------------
Subject: 29) My application is running too slowly. How can I speed it up?

Answer: Use the R4 rather than R3 server.  It is much faster.

Answer: The standard memory allocator is not well tuned to Motif, and can
degrade performance.  Use a better allocator.  e.g. with SCO Unix, link with
libmalloc.a; use the allocator from GNU emacs; use the allocator from Perl.

Answer: Avoid lots of widget creation and destruction.  It fragments memory and
slows everything down.  Popup/popdown, manage/unmanage instead.

Answer: Set mappedWhenManaged to FALSE, and then call XtMapWidget()
XtUnmapWidget() rather than managing.

Answer: Get more memory - your application, the server and the Operating System
may be spending a lot of time being swapped.

Answer: If you are doing much XmString work yourself, such as heavy use of
XmStringCompare, speed may deteriorate due to the large amount of internal
conversions and malloc'ing.  Try using XmStringByteCompare if appropriate or
ordinary Ascii strings if you can.





10.  XmString


- -------------------------------------------------------------------------------
Subject: 30) How can I get the Ascii text out of an XmString?

Answer: To get the first line of text from a string created left-to-right


        char *str;
        XmString xmstr;

        /* stuff to create xmstr */
        ...

        /* set str to point to the text */
        XmStringGetLtoR(xmstr, XmSTRING_DEFAULT_CHARSET, &str);
        /* use the string */
        ...

        /* and reclaim space */
        XtFree(str);


- -------------------------------------------------------------------------------
Subject: 31)  When can XmStrings used as resources be freed?

Answer: The policy OSF have been trying to enforce is that if you set an
XmString or XmStringTable resource, the application is responsible for freeing
the XmStrings used because the widget makes a copy.  If you get an XmString
resource, then the application must free the value gotten.  If you get an
XmStringTable, then the application should NOT free the value gotten.  If the
application wants to manipulate it, it should make a copy first. This policy
appears to be implemented progressively, so may be less true for Motif 1.0 than
1.1.

- -------------------------------------------------------------------------------
Subject: 32) Why doesn't XmStringGetNextSegment() work properly?

Answer: The documentation in Motif 1.0 is in error. Instead of

        XmStringGetnextSegment(context, ...)
        XmStringContext * context;

it should be

        XmStringGetnextSegment(context, ...)
        XmStringContext context;

i.e. with no indirection.



11.  Dialogs


- -------------------------------------------------------------------------------
Subject: 33) How do I stop my dialog disappearing when I press the help button?

Answer: Bulletin board has the resource autoUnmanage which defaults to True.
This unmanages the widget when any button child is activated - including the
help button.  Set this to False to stop it disappearing. Note that you then have
to unmanage the bulletin board yourself when any other button is activated.

- -------------------------------------------------------------------------------
Subject: 34) How do I make my own dialog?  I want a dialog with my own set of
buttons that stretch and shrink like the ones in e.g. PromptDialog and its own
contents.

Answer: Start off with say a PromptDialog. Unmanage the buttons you don't want
or manage the Apply button if you want another. Unmanage the other bits of the
selection box you don't want. You can add another WorkArea child to the
selection box for any extra stuff you want.


    /* Copyright 1990, Kee Hinckley and Brian Holt Hawthorne */
    /* Permission granted for any use, provided this copyright */
    /* notice is maintained. */

    /* Create a dialog box */
    argcount = setArgs(&args, XmNautoUnmanage, False, NULL);
    SomeDialog = XmCreatePromptDialog(mainShell, "someDialog", args, argcount);

    /* Now get rid of the things we don't want */
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_SELECTION_LABEL);
    XtUnmanageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_TEXT);
    XtUnmanageChild(child);

    /* set the callbacks, and make sure the buttons we want are there */
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_OK_BUTTON);
    XtAddCallback(child, XmNactivateCallback, callSomeFunc, someArg);
    XtAddCallback(child, XmNactivateCallback, unManage, SomeDialog);
    XtManageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_APPLY_BUTTON);
    XtAddCallback(child, XmNactivateCallback, callSomeFunc, someOtherArg);
    XtManageChild(child);
    child = XmSelectionBoxGetChild(SomeDialog, XmDIALOG_CANCEL_BUTTON);
    XtAddCallback(child, XmNactivateCallback, dialogUnmanage, SomeDialog);
    XtManageChild(child);

    /* Add a new work area. This can be any manager. */
    child = XmCreateForm(SomeDialog, "someForm", NULL, 0);
    XtManageChild(child);

    /* and fill it up... */
    something = doYourStuff(child);




12.  Language bindings


- -------------------------------------------------------------------------------
Subject: 35) Is there a C++ binding for Motif?

Answer: The university of Lowell has a C++ binding.  The software is available
on any system running X11R3. Currently it is available for both the GNU's C++
compiler g++ v 1.37.1 and the AT&T C++ v 2.0 translator. The software is
available through either ftp or a 9 track reel magnetic tape for $250. A license
must be purchased first.  For additional information and license forms contact :

     University of Lowell
     Graphics Research Laboratory/Motif
     Computer Science Department
     One University Avenue
     Lowell, MA 01854
     attn : Fran Ward
     (phone 508-934-3628)


Answer: WWL is a library which defines C++ classes around X Toolkit Widgets.  It
is intended to simplify the task of C++ code writers when using the Toolkit by
providing them with C++ objects, methods, type checking and several utility
functions and classes.

WWL has been tested under SunOs4.0.3 on sun3 and sun4, HPUX version 6.5 and 7.0
and Ultrix 4.0 on DECstation 3100 and 5000. It is expected to work on most other
UNIX systems without too many problems.

WWL is distributed as a tar file with all the source, documentation and example.
The file is available using anonymous ftp from

        export.lcs.mit.edu (18.30.0.238   contrib/WWL-1.0.tar.Z
        lri.lri.fr (129.175.15.1)       pub/WWL-1.0.tar.Z


- -------------------------------------------------------------------------------
Subject: 36)  Is there a Common Lisp binding for Motif?  Answer: Try CLM. This
includes a toolkit demon (in C) that takes a widget description (with
callbacks), and forks a new process for each Motif application (which can be
just a single menu, or whatever).  Lisp can then continue running, with a
separate lightweight lisp process handling the connection & callbacks.  In North
America & net environs, CLM-2.0beta is available from export.lcs.mit.edu.

- -------------------------------------------------------------------------------
Subject: 37)+ Is there an Ada binding for Motif?

Answer: The situation is not good at the moment.

From Todd W. Lainhart: Take a look at THINGS, a VAPI with Ada bindings that was
written by the US Air Force (SAC).  It's in the public domain, and available
from export or gatekeeper.dec.com.  It implements Motif or OL look-and-feel. [I
had a look and it seemed to be missing documentation - Jan]

From David Lewis: A company called Rational appears to be making an Xm
implementation.  Also GHG in Texas has most other Xlib and Xt bindings for Ada.





13.  Miscellaneous


- -------------------------------------------------------------------------------
Subject: 38) What is libPW.a and do I need it?  My manual says I need to link in
libPW.a to use the File Selection Box.  I can't find it on my system.

Answer: The libPW.a is the Programers Workbench library which is an ATT product
not included in Berkeley based systems, hence it is not found in SunOS or
Ultrix, but is found on HP-UX (a Berkeley/ATT hybrid which chose ATT in this
case).  It contains the regex(3) routines.  Some systems which don't have these
in the libc.a need to link with -lPW.  Some systems which have the regex(3)
routines in there also have the libPW.a.  If you have regex(3) in libc, and it
works, don't link with libPW.  If you don't have regex(3) in libc, and you don't
have a libPW, then check some sites on the net for public domain replacements
(several exist), or call your vendor.

- -------------------------------------------------------------------------------
Subject: 39)* How can tell I if the user has selected the "Close" item on the
system menu attached to the top-level shell?  I need to do some clean up before
exiting.

Answer:

        void FinalCleanupCB(w, client_data, call_data)
        Widget   w;
        caddr_t  client_data, call_data;
        {
                /* tidy up stuff here */
                ...
                /* exit if you want to */
                exit (0);
        }

        main()
        {
                Atom wm_delete_window;

                ...
                XtRealizeWidget(toplevel);
                ...
                wm_delete_window =
                        XmInternAtom(XtDisplay(toplevel),
                                "WM_DELETE_WINDOW", False);
                XmAddWMProtocolCallback(toplevel, wm_delete_window,
                        FinalCleanupCB, NULL);
                XtMainLoop();
        }

To just turn the close option off, set the shell resource XmNdeleteResponse to
XmDO_NOTHING.  This means that users cannot kill your application via the system
menu, and may be a bad thing.



- -------------------------------------------------------------------------------
Subject: 40)* Why does an augment translation appear to act as replace for some
widgets?  When I use either augment or override translations in .Xdefaults it
seems to act as replace in both Motif 1.0 and 1.1

Answer: By default, the translation table is NULL.  If there is nothing
specified (either in resource file, or in args), the widget's Initialize finds:
Oh, there is NULL in translations, lets use our default ones.  If, however, the
translations have become non-NULL, the default translations are NOT used at all.
Thus, using #augment, #override or a new table has identical effect: defines the
new translations. The only way you can augment/override Motif's default
translations is AFTER Initialize, using XtSetValues.  Note, however, that Motif
managers do play with translation tables as well ... so that results are not
always easy to predict.

From OSF: A number of people have complained about not being able to
augment/override translations from the .Xdefaults.  This is due to the
complexity of the menu system/keyboard traversal and the necessary translations
changes required to support the Motif Style Guide in menus.  It cannot be fixed
in a simple way. Fixing it requires re-design of the menus/buttons and it is
planned to be fixed in 1.2.



- -------------------------------------------------------------------------------
Subject: 41) I tried to make shared libraries on a Sun, and got the message
"ld.so: Undefined symbol: __XtInherit" when executing UIL.  What did I do?

Answer: There is a problem in shared library build when you compare a function
variable to a routine name, but don't call the routine.  Either, you can build
the Xt library nonshared, or you can put a reference to XtToolkitInitialize in
the UIL main program (or even include a module that references it).  The routine
doesn't even have to be called; it just has to be there.


- -------------------------------------------------------------------------------
Subject: 42)+ Has anyone made shared libraries on an IBM RS/6000?

Answer: From Sakari Jalovaara: There is a problem: Xm redefines VendorShell and
the AIX linker put _both_ Xm's and Xt's VendorShell into programs.  When an AIX
shared library is created as many references inside the library are resolved as
possible.  If the symbol vendorShellClassRec is defined in libXt and referenced,
say, from a function XtFoo() also in libXt, the "ld" run that creates the shared
library resolves the reference:

        XtFoo() -> vendorShellClassRec

Then I create the Motif library that has its own vendorShellClassRec and an
XmBar() function that uses it; libXm will also contain a resolved reference to
vendorShellClassRec:

        XmBar() -> vendorShellClassRec

Finally, I link a program that uses both XtFoo() and XmBar() and the program
will end up with _two_ independent "vendorShellClassRec"s:

        XtFoo() -> vendorShellClassRec [Xt version]
        XmBar() -> vendorShellClassRec [Xm version]

Instand schizo zaphod mode.  In reality, vendorShellClassRec is not referenced
from functions but from other widget class records.

I can't just pull Vendor.o out from the shared Xt (Vendor.o appears to define
the only external symbols redefined by libXm) because AIX shared libraries
apparently can't contain unresolved external references.  If I take out Vendor.o
I have to take out every other file that uses symbols defined there - and then
files that need those files, etc.  I tried it and ended up with three or four
object files in libXt and the res non-sharable.

I kludged around this by putting all of libXt (minus Vendor.o) into the shared
libXm.  It isn't a pretty solution but it works - and beats having a statically
linked two-megabyte "periodic" demo...

- -------------------------------------------------------------------------------
Subject: 43) How can I set a multiline label in .Xdefaults?

Answer:

      *Label*labelString:             Here\nis\nthe\nLabel

Gives a four line label, using the escape sequence \n for a newline.
                 ----------
- ---------------------------------------------------------------------
Subject: 44)  How do you "grey" out a widget so that it cannot be activated?

Answer: Use XtSetSensitive(widget, False). Do not set the XmNsensitive resource
directly yourself (by XtSetvalues) since the widget may need to talk to parents
first.

- -------------------------------------------------------------------------------
Subject: 45)*  What is causing the messages "unknown keysym osfDown..."?  It
happens when I run an application under Motif 1.1

Answer: There is an OSF supplied addition to the /usr/lib/X11/XKeysymDB file.
It is found on the release tape and should have been automatically installed if
the installation procedure was followed in the Release Notes.

You have to copy (or append) lib/Xm/XKeysymDB into /usr/lib/X11.  This may
require root permission.  It is not clear how to fix the problem if you can't do
this.  The error comes from Xt translation table parsing and can't be fixed in
Motif, so if you can't get root permission you may be stuck.  The file is not
copyrighted so you can install it on other systems.

- -------------------------------------------------------------------------------
Subject: 46)  Why doesn't the Help callback work on some widgets?

Answer: If you press the help key the help callback of the widget with the
keyboard focus is called (not the one containing the mouse).  You can't get the
help callback of a non-keyboard-selectable widget called. To get `context
sensitive' help on these, you have to find the mouse, associate its position
with a widget and then do the help.

- -------------------------------------------------------------------------------
Subject: 47)*  What's wrong with the Motif 1.0 File Selection Box?  I can't set
the directory, change the directory or get the file mask to work.

Answer: The 1.0 File Selection Box is broken, and these don't work.  They
weren't fixed until Motif 1.04.  Use these later versions of 1.0 or switch to
Motif 1.1 where it changed a lot.

Joe Hildebrand has a work-around for some of this: Before popping up an
XmFileSelectionDialog, change to the directory you want.  When a file is
selected, check if it is a directory, so that we can change to it.  i.e.

static void show_file_box_CB(w, client_data, call_data)
   Widget               w;
   Widget               client_data;
   XmAnyCallbackStruct  *call_data;
{
   chdir("/users/hildjj/files");
   XtManageChild(client_data);
}

static void val_save(w, client_data, call_data)
   Widget       w;
   Widget       client_data;
   XmSelectionBoxCallbackStruct *call_data;
{
   struct stat buf;  /* struct stat is defined in stat.h */
   char *filename;

   /* get the file name from the FileSelectionBox */
   filename = SmX(call_data->value);

   /* get the status of the file named filename, and put it into buf */
   if (!stat(filename, &buf))
   {
      /* if it's a directory */
      /* if it's a directory */
      if(S_ISDIR(buf.st_mode))
      {
         /* change to that directory, and update the FileSelectionBox */
        chdir(filename);
        XmFileSelectionDoSearch(w, NULL);
      }
      else
         /* if it's a regualr file */
         if(S_ISREG(buf.st_mode))
            /* ask if it should be overwritten */
            XtManageChild(valbox);
         else
            /* it's another kind of file.  What type, i can't think of,
               but it might happen */
            pop_up_error_box(client_data, "Error saving file");
   }
   else  /* we couldn't get the file status */
   {
      /* if it's because the file doesn't exist, we're golden */
      if (errno == ENOENT)
         save_file();
      else   /* there is some other problem getting the status.
                e.g. bad path */
         pop_up_error_box(client_data, "Error saving file");
   }
}

this still doesn't implement the file masking stuff.



- -------------------------------------------------------------------------------
Subject: 48)+ Why can't I use accelerators on buttons not in a menu?

Answer: It is apparently a difficult feature to implement, but OSF are
considering this for the future. It is problematic trying to use the Xt
accelerators since the Motif method interferes with this.  The workaround
suggested so far is to duplicate your non-menu button by a button in a menu
somewhere, which does have a menu-accelerator installed.  When the user invokes
what they think is the accelerator for the button they can see Motif actually
invokes the button on the menu that they can't see at the time.

- -------------------------------------------------------------------------------
Subject: 49)+ Why don't labels in a Form resize when the label is changed?  I've
got some labels in a form. The labels don't resize whenever the label string
resource is changed. As a result, the operator has to resize the window to see
the new label contents. I am using Motif 1.1.

Answer: This problem may happen to any widget inside a Form widget. The problem
was that the Form will resize itself when it gets geometry requests from its
children. If its preferred size is not allowed, the Form will disallow all
geometry requests from its children. The workaround is that you should set any
ancestor of the Form to be resizable. For the shell which contains the Form you
should set the shell resource XmNallowShellResize to be True (by default, it is
set to FALSE).  There is currently an inconsistency on how resizing is being
done, and it may get fixed in Motif 1.2.

- -------------------------------------------------------------------------------
Subject: 50)+ How come the title bars for my dialogs now have "_popup" or "<-
popup" concatenated onto the widget name?


Answer: Motif 1.0.3 (?) "fixed" things such that title bars without an explicit
dialogTitle setting use the widget name with "_popup" or whatever added on.  Set
the dialogTitle resource explicitly if you don't want this new default naming
scheme.


- -------------------------------------------------------------------------------
Subject: 51)+ Has anyone done a bar graph widget?

Answer: You can fake one by using for each bar a scroll bar or even a label
which changes in size, put inside a container of some kind.

Try the StripChart widget in the Athena widget set. Set the XtNupdate resource
to 0 to keep it from automatically updating.

- -------------------------------------------------------------------------------
Subject: 52)+ Does anyone know of a source code of a graph widget where you can
add vertices and edges and get an automated updating?

Answer: No Motif one has been reported.  The XUG FAQ in comp.windows.x includes
information on graph display widgets.  There is also an implementation in the
Asente/Swick book.

From Martin Janzen: Well, it's not a widget set, but have you looked at
DataViews?  This package lets you create a wide variety of graphs, which can
display information received from data sources such as files, processes (through
pipes), or devices.  The graphs can be made to change in real time as new data
arrives.  There's also a function library which lets you work with graphs under
program control.  X drivers are included.

From Craig Timmerman: Just wanted others to know that there is a third
competitor in what may be come a big market for generic APIs.  The product is
called Open Interface and Neuron Data is the vendor.  Neuron has added some
extra, more complex widgets to their set.  The two most notable are a table and
network widget.  [...] I believe that the network widget got its name from its
ability to display expert system networks that Neuron's AI tools needed.  It
would be more aptly named the graph widget.  It can display and manipulate
graphs of various types (trees, directed graphs, etc).  Contact is

        Neuron Data
        156 University Avenue
        Palo Alto,  CA  94301
        (415) 321-4488






14.  Acknowledgements


This list was compiled using questions and answers posed to
comp.windows.x.motif. Some extracts were also taken from FAQs of comp.windows.x.
To all who contributed one way or the other, thanks! I haven't given individual
references, but  you may recognise contributions. If I have mangled them too
much, let me know.



That's all folks!


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

  ACSnet: 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

+--------------------------+















































































































































































































































































































































































































Local Variables:
mode: outline
outline-regexp: "Subject: +[0-9]+)"
eval: (hide-body)
End:

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 00:27:31 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00676; Thu, 16 May 91 22:36:35 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00655; Thu, 16 May 91 22:06:57 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16468; Thu, 16 May 91 21:36:52 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 21:07:18 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02799; Thu, 16 May 91 17:54:22 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 May 91 00:14:29 GMT
From: pa.dec.com!fortsc.enet.dec.com!mok@decwrl.dec.com  (Charles P. Mok)
Organization: Digital Equipment Corporation
Subject: Summary: Tools for automatic conversion of SunView to Motif
Message-Id: <1991May16.232139.7505@pa.dec.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


Earlier I posted to ask for tools to convert codes from SunView to Motif. 
Unfortunately I did not receive any new information (I wanted to find out more
than what I knew about), but I did receive a few messages asking me to 
summarize.  So here it is, the info that I knew when I first asked, and 
nothing more:

DXMconvert 
Expert Object Corp. (Lincolnwood IL)
708.676.5555
708.673.4549 (fax)
...!sun!sunloop!exoc!support
After June 1 1991
(Highland Park IL)
708.926.8500
708.926.8590

DXMconvert converts SunView code to portable Motif.  DXMconvert produces
portable C code with calls made to the Xt and Xm (v1.1) libraries.  I do not
have much details beyond this.  It is initially marketed to work for DECwindow
Motif but in fact I was told it should run without problem on other Motif's as
well on other platforms.

Charles                         


- ---
Charles Mok/Digital Equipment Corporation
INTERNET: mok@fortsc.enet.dec.com  UUCP: ....!decwrl!fortsc.dec.enet.com!mok
- ---

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Host is unreachable
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 00:29:06 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00684; Thu, 16 May 91 22:36:58 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00659; Thu, 16 May 91 22:07:12 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16470; Thu, 16 May 91 21:36:55 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 21:07:47 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02830; Thu, 16 May 91 17:55:28 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 22:39:25 GMT
From: mips!sdd.hp.com!cs.utexas.edu!news-server.csri.toronto.edu!orasis.vis.toronto.edu!tjhorton@decwrl.dec.com  ("Timothy J. Horton")
Organization: Department of Computer Science, University of Toronto
Subject: Re: How to re-manage the same child widget
Message-Id: <91May16.183920edt.8838@orasis.vis.toronto.edu>
References: <9105132043.AA11128@11128>, <91May15.224003edt.8838@orasis.vis.toronto.edu>, <1991May16.154512.23319@thyme.jpl.nasa.gov>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) writes:
>tjhorton@vis.toronto.edu ("Timothy J. Horton") writes:
>>jerryl@is.Morgan.COM (Jerry Liebelson) writes:
>>>  QUESTION:  Is there an efficient, trouble-free way to unmanage and
>>>re-manage one instance of this XmList under different parent container
>>>widgets, which themselves might be contained within different shell widgets?
>>
>>XtReparent (I think that's what it's called -- no books nearby).
>
>This fits into the category of dis-information.  There is no XtReparent().
>And there is no easy, nor clean way to reparent widgets.  This is not my
>opinion, but an echo of something Schliefer/Gettys/Converse/et. al. have
>said in months gone by.

I believe you.  Sorry, I guess I was confusing it with the Xlib call for
reparenting windows (not widgets).  XReparent or XReparentWindow or whatever.

>One possible solution would be to GetValues() the XmNitems resource from 
>one and SetValues() it onto the other.  Since this is fast and simple, 
>it's the way I would go.

This won't answer Jerry's question; his list is very large and he wants only
one instance of the XmList.  He'll have several copies because XtSetValues on
the XmNitems resource causes a list widget to allocate and make a copy of the
entire list.

If you no longer need access to the list that you provided to a list widget,
you can destroy it, because the list widget has its own private copy.  Most
motif widgets are like this; they reallocate copies of whatever you give them
via pointers.  Furthermore, if you fetch back resource values via pointers,
most widgets allocate yet another copy of the resource and pass back the new
copy, which you normally have to free explicitly.

I had an application in which I needed to very quickly swap large lists in
and out of a list widget, but couldn't, because the dang list widget always
freed its old list and allocated and copied the new one.  I had to write my
own code from scratch to display selection lists without copying them.

[Sorry for the earlier disinformation, and thanks for catching it]
Tim

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 03:34:44 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00839; Fri, 17 May 91 01:07:07 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16727; Fri, 17 May 91 00:30:21 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 22:52:57 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA05408; Thu, 16 May 91 19:50:09 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 15 May 91 15:37:25 GMT
From: mips!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!lth.se!abblund!abblund.se!erik@decwrl.dec.com  (Erik Sparre)
Organization: ABB Corporate Research, Lund, Sweden
Subject: Style Guide conformance checklist - where ?
Message-Id: <1991May15.153725.620@abblund.se>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


Where can I get a copy of the OSF/Motif Style Guide conformance checklist ?

Please mail responses.

Thanks

- -- 
Erik Sparre                                  | Email erik@abblund.se
ABB Corporate Research                       | Phone +46 46 168527
Dept. KLL, Lab for Man-Machine Communication | Telex        33709
IDEON Research Park, S-223 70 LUND, SWEDEN   | Fax   +46 46 145620

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 03:34:51 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00849; Fri, 17 May 91 01:07:33 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16729; Fri, 17 May 91 00:30:23 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 22:53:11 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA05218; Thu, 16 May 91 19:41:08 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 May 91 01:10:15 GMT
From: nprdc!apple@ucsd.edu  (Jim Apple)
Organization: Navy Personnel R&D Center, San Diego
Subject: Need help with Ulowell MotifC++ bindings
Message-Id: <15457@arctic.nprdc.navy.mil>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


	I need some help with the Ulowell C++ bindings for Motif.

My problem is that I can not pass a object (XMObject) as a argument
to a function that is in another source file.

	here is a short fragment of what I'm trying to do

- ----- main.cc

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 03:34:58 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00864; Fri, 17 May 91 01:36:38 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00839; Fri, 17 May 91 01:07:07 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16727; Fri, 17 May 91 00:30:21 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 22:52:57 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA05408; Thu, 16 May 91 19:50:09 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 15 May 91 15:37:25 GMT
From: mips!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!lth.se!abblund!abblund.se!erik@decwrl.dec.com  (Erik Sparre)
Organization: ABB Corporate Research, Lund, Sweden
Subject: Style Guide conformance checklist - where ?
Message-Id: <1991May15.153725.620@abblund.se>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


Where can I get a copy of the OSF/Motif Style Guide conformance checklist ?

Please mail responses.

Thanks

- -- 
Erik Sparre                                  | Email erik@abblund.se
ABB Corporate Research                       | Phone +46 46 168527
Dept. KLL, Lab for Man-Machine Communication | Telex        33709
IDEON Research Park, S-223 70 LUND, SWEDEN   | Fax   +46 46 145620

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 03:36:30 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00872; Fri, 17 May 91 01:37:01 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA00849; Fri, 17 May 91 01:07:33 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA16729; Fri, 17 May 91 00:30:23 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Thu, 16 May 91 22:53:11 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA05218; Thu, 16 May 91 19:41:08 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 May 91 01:10:15 GMT
From: nprdc!apple@ucsd.edu  (Jim Apple)
Organization: Navy Personnel R&D Center, San Diego
Subject: Need help with Ulowell MotifC++ bindings
Message-Id: <15457@arctic.nprdc.navy.mil>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com


	I need some help with the Ulowell C++ bindings for Motif.

My problem is that I can not pass a object (XMObject) as a argument
to a function that is in another source file.

	here is a short fragment of what I'm trying to do

- ----- main.cc

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 04:27:08 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01015; Fri, 17 May 91 04:06:59 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA17252; Fri, 17 May 91 03:46:13 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Fri, 17 May 91 01:07:33 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA08663; Thu, 16 May 91 22:07:02 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 21:59:52 GMT
From: usc!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!cs.umn.edu!uc!shamash!hare.udev.cdc.com!slc1290@ucsd.edu  (steve chesney x4662)
Organization: Control Data
Subject: Use of XmList widget without selection
Message-Id: <33292@shamash.cdc.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

Our application has a possible use for something like the XmList widget to 
display narrative text.  (This text is reference only, so a text widget IMHO is
inappropriate).  The List widget comes with behavior that allows the user to 
select from the list.  I cannot find a way to turn this behavior off as 
selection makes no sense in this context. Is there a straightforward way
(straighter than playing with highlight color resources) to turn off selection
in a list?


- -- 

Steve Chesney       Control Data Corporation      slc1290@hare.udev.cdc.com

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 06:26:20 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01067; Fri, 17 May 91 04:36:50 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA17291; Fri, 17 May 91 03:47:57 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Fri, 17 May 91 03:23:45 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA12185; Fri, 17 May 91 00:13:22 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 14:38:30 GMT
From: hpfcso!hpfcdc!mhn@hplabs.hpl.hp.com  (Mark Notess)
Organization: HP Fort Collins, Co.
Subject: Re: Menus, ToggleButtons and VisibleWhenOff resource]
Message-Id: <30280001@hpfcdc.HP.COM>
References: <1991May13.192036.23825@srg.uucp>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

> Is there any way to override the toggle button resource XmNvisibleWhenOff
> when the button is a child of a row column menu?

Yes--use Motif 1.1.

> This is forced to False in this case.

In 1.1, it only defaults to False.

> The style guide says it should be this way but nobody here happens to like
> that no button appears. 

I don't like it either--it is particularly bad for check boxes since, if
they are all off initially, the user has no clue how it works (and the
menu disappears before the feedback shows up).

Mark
   **     Mark Notess   *   mhn%hpfcla@hplabs.HP.COM   *   (303) 229-6232   **
   ** Hewlett-Packard * 3404 E. Harmony Road * Fort Collins, CO  80525  USA **

Disclaimer:  I don't speak for HP...

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 06:26:27 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01071; Fri, 17 May 91 04:37:02 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA17283; Fri, 17 May 91 03:47:31 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Fri, 17 May 91 01:54:39 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA09703; Thu, 16 May 91 22:48:29 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 17 May 91 03:06:10 GMT
From: sdd.hp.com!cs.utexas.edu!news-server.csri.toronto.edu!neat.cs.toronto.edu!tjhorton@decwrl.dec.com  ("Timothy J. Horton")
Organization: Department of Computer Science, University of Toronto
Subject: Re: How to re-manage the same child widget
Message-Id: <91May16.230552edt.6244@neat.cs.toronto.edu>
References: <91May16.183920edt.8838@orasis.vis.toronto.edu>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

Let me get this right the second time

tjhorton@vis.toronto.edu ("Timothy J. Horton") writes:
>Most motif widgets are like this; they reallocate copies of whatever you give
>them via pointers.

          (using *either* XtSetValues or convenience routines)

>Furthermore, if you fetch back resource values via pointers,

          USING CONVENIENCE ROUTINES SUCH AS "XmTextGetString",
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>most widgets allocate yet another copy of the resource and pass back the new
>copy, which you normally have to free explicitly.

XtGetValues normally bypasses this copy/free cycle.  For instance,
XmTextGetString gives you a *copy* of the text widget's internal buffer,
wheras XtGetValues on its XmNvalue returns a pointer to the text widget's
internal buffer.

Thus, getting and setting are different.

>I had an application in which I needed to very quickly swap large lists in
>and out of a list widget, but couldn't, because the dang list widget always
>freed its old list and allocated and copied the new one.  I had to write my
>own code from scratch to display selection lists without copying them.

Someone asked about this -- I just used a drawing area and a scrollbar, and the
input callback from the drawing area for item selection.  I don't have the code
(now belongs to a previous client), but it only took a day to write, except
that it required some messy Xlib hacking.

Tim

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
alphalpha-motif-local@apollo.hp.com... reply: read error
451 alphalpha-motif-local@apollo.hp.com... reply: read error
421 censun1.gsfc.nasa.gov.tcp... Deferred: Connection timed out during user open with censun1.gsfc.nasa.gov
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 06:26:34 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01077; Fri, 17 May 91 04:37:22 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01015; Fri, 17 May 91 04:06:59 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA17252; Fri, 17 May 91 03:46:13 EDT
Received: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Fri, 17 May 91 01:07:33 EDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA08663; Thu, 16 May 91 22:07:02 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for motif@alphalpha.com (motif@alphalpha.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 16 May 91 21:59:52 GMT
From: usc!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!cs.umn.edu!uc!shamash!hare.udev.cdc.com!slc1290@ucsd.edu  (steve chesney x4662)
Organization: Control Data
Subject: Use of XmList widget without selection
Message-Id: <33292@shamash.cdc.com>
Sender: motif-request@alfalfa.com
To: motif@alfalfa.com

Our application has a possible use for something like the XmList widget to 
display narrative text.  (This text is reference only, so a text widget IMHO is
inappropriate).  The List widget comes with behavior that allows the user to 
select from the list.  I cannot find a way to turn this behavior off as 
selection makes no sense in this context. Is there a straightforward way
(straighter than playing with highlight color resources) to turn off selection
in a list?


- -- 

Steve Chesney       Control Data Corporation      slc1290@hare.udev.cdc.com

MAILER-DAEMON@alfalfa.com (Mail Delivery Subsystem) (05/17/91)

   ----- Transcript of session follows -----
>>> RCPT To:<post-motif@ucbvax.berkeley.edu>
<<< 550 <post-motif@ucbvax.berkeley.edu>... User unknown
550 post-motif@ucbvax.berkeley.edu... User unknown

   ----- Unsent message follows -----
Received: by BU.EDU (1.99) Fri, 17 May 91 06:27:33 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA01097; Fri, 17 May 91 05:06:42 EDT
Received: by alfalfa.com ( 5.52 (84)/test)
	id AA17353; Fri, 17 May 91 04:24:08 EDT
Received: from cunyvm.cuny.edu by BU.EDU (1.99) Fri, 17 May 91 03:59:33 EDT
Received: from EMBL-Heidelberg.DE by CUNYVM.CUNY.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 6687; Fri, 17 May 91 03:59:18 EDT
Date: Fri, 17 May 91 09:58 +0100
From: David Wild <EMBL-Heidelberg.DE!WILD@CUNYVM.CUNY.EDU>
Subject: Tools for automatic conversion of Motif code to XView
To: motif@alfalfa.com
Message-Id: <7449C4A9A8BFA00720@EMBL-Heidelberg.DE>
X-Organization: European Molecular Biology Laboratory, Heidelberg.
X-Envelope-To: motif@alfalfa.com
X-Vms-To: in%"motif@alfalfa.com"

Does anyone know of tools which will convert Motif code to XView, or Motif
UIL to Guide GIL?

Thanks,

David Wild