HDTenEightyP/NetNews huggingface dataset:
From: rsmith@pioneer.arc.nasa.gov (Roger Smith RCS)
Subject: specifying fonts for xmTextWidgetClass
Organization: RIACS, NASA Ames Research Center
Date: Tue, 6 Oct 92 19:58:36 GMT

Greetings fellow netters

I am just this week coding my first program in motif. I
have programmed extensively in Xt, Xaw, Xview, etc.

I seem to have run into a major glitch in trying to specify the
font for the text in a text box created by xmTextWidgetClass.

Oreilly Volume Six in Chapter 19 gives the following resource
specification:

*XmText.fontList:       -*-times-medium-r-*-*-10-*-*-*-*-*-*-*=charset1,\
                -*-times-bold-r-*-*-10-*-*-*-*-*-*-*=charset2,\
                -*-times-bold-r-*-*-12-*-*-*-*-*-*-*=charset3

but then does not go on to demonstrate how to specify charset1 vs 
charset2, etc., for a specific widget. I would like to specify the
font attachment for the text widget when XtVaCreateManagedWidget is
called. I checked the FAQ and got the impression that it can't be 
done, which I find hard to beleive.

Any help would be greatly appreciated... Thanks in advance.

------------------------------------------------------------------
Roger Smith
Sterling Software at
NASA-Ames Research Center
rsmith@proteus.arc.nasa.gov
- 
If change is -- inevitable -- predictable -- beneficial -- 
doesn't logic demand that you be a part of it?
One man cannot summon the future. But one man can change the present!
    -- Kirk and the Alternate Spock, "Mirror, Mirror," stardate unknown
+
From: ray@unisql.UUCP (Ray Shea)
Newsgroups: comp.windows.x.motif
Subject: Re: Large Option Menus
Date: 2 Oct 92 16:41:17 GMT
Reply-To: ray@unisql.UUCP (Ray Shea)
Organization: UniSQL, Inc., Austin, Texas, USA

In article <3561@creatures.cs.vt.edu> ramakris@csgrad.cs.vt.edu (S.Ramakrishnan) writes:
>Further, Motif style guide recommends the use of Option Menus only if
>there are no more than a "few" options. List (scrolled or otherwise) is
>recommended in other cases.

There are obvious problems with using a List though.  A List uses
more real-estate than an Option Menu, doesn't hide the list of unselected
choices when not in use, and isn't guaranteed to be displaying the currently
selected item at any given time.  

The alternative is to have a button widget whose label displays the currently
selected item...activating the button pops up a dialog containing
the scrolled list.  This is pretty clunky, and  unworkable if you have to
use it frequently in one application.  I've got dialog fever in my 
application, because I have so many places where an option menu would be
ideal 95% of the time, but 5% of the time, the list of items in the
list grows to 30, 50, or >100.  I don't want to handle the 5% case differently
from the other 95% (no point in confusing the user any more than he/she
already is), so I have to use the PushButton/Scrolled List Dialog combo
all the time.

Has anybody got any other approaches?  Changing numColumns of the option
menu's RowColumn widget to 2 is one approach, but 3 or 4 columns?  Ugly.
The only other thing I can think of is scrolling option menus, which I would
rather not implement, and would be pretty nonstandard if I did anyway.




-- 
Ray Shea		    gtaylor: "I *did* pass Eno coming out of the loo"
UniSQL, Inc.		    R o d: "Wow, sounds painful."
unisql!ray@cs.utexas.edu	
DoD #0372, '88 Hawk NT650, '74 Hubsch Loadstar
From: sbp@jet.uk (Stephen B Parker)
Newsgroups: comp.windows.x.motif
Subject: Advice sought on OptionMenu background colour change
Date: 5 Oct 92 08:49:01 GMT
Distribution: uk
Organization: Joint European Torus

Hello everyone, 

I have the following snippet of uil defining a column of OptionMenu
buttons:


	object
	 modes: XmRowColumn {
	   arguments {
	     XmNspacing        = 6;
	     XmNorientation    = XmVERTICAL;
	   };
	   controls {
	     XmOptionMenu mode_1;
	     :
	     :
	     XmOptionMenu mode_8;
	   };
	 };

	object
	  mode_1 :  XmOptionMenu { 
	    arguments { 
	      XmNmarginWidth = 0; 
	    };
	    controls { 
	      XmPulldownMenu { 
		controls {
		  mode_1_0: XmPushButton { 
		    callbacks { XmNactivateCallback = procedure New_Mode_CB(10); }; 
		    arguments { XmNlabelString = "Off            "; }; 
		  };
	          :
	          :
		  mode_1_6: XmPushButton { 
		    callbacks { XmNactivateCallback = procedure New_Mode_CB(16); }; 
		    arguments { XmNlabelString = "Increment      "; }; 
		  };
		}; 
	      };
	    }; 
	  };


My code sets the background colour of the button "mode_1" with the
following:


    Widget w;
    Arg    args[2];

    w = XtNameToWidget(top_level, "*mode_1");
    if (w==NULL) {
      fprintf(stderr,"Failed to obtain widget for *mode_1\n");
      return;
    };

    XtSetArg(args[0], XmNbackground, change_bg);
    XtSetArg(args[1], XmNforeground, change_fg);
    XtSetValues(w, args, 2);
    

Basically it works, and the button's background changes to the
requested colour. My problem is that a small area *around* the button
also changes colour. I have tried everything I can think of to
eliminate and/or limit this, but have failed.

Does anyone know how I could restrict the change of background colour
to the button alone ? I would be grateful for any advice.



-- 

Steve Parker,
JET Joint Undertaking,                       sbp@jet.uk
Abingdon,    
Oxon.
- Disclaimer: Please note that the above is a personal view and should not 
  be construed as an official comment from the JET project.
From: JJHildebrand@DOCKMASTER.NCSC.MIL
Newsgroups: comp.windows.x.motif
Subject: Re: Two easy (I hope) questions
Date: 6 Oct 92 15:49:00 GMT
Distribution: inet
Organization: The Internet

Alright.

----Q----
1. I am trying to create a three button widget.  I can get one
   button working properly (size and postition) but, the other
   buttons I create appear to lie under the first button.  If
   I grow the window, the second button grows with the window,
   but the first stays in the upper left corner and keeps
   its size.

----------------------------------
|          |           |         |
|   b1     |    b2     |    b3   |
|          |           |         |
---------------------------------


   This is what I am trying to create.
----A----
You are probably using a bulletin board as the parent of your push
buttons.  Try using a Form widget, instead.  You will need to set the
left and top attachments of b1, as well as the top attachment of b2 and
b3, to XmATTACH_FORM.  The left attachments of b2 and b3 should be
XmATTACH_WIDGET, with their XmNleftWidget resources set to b1 and b2,
respectively.  This should give you what you are looking for.  Another
way to go is to specify that each button should take up 33% of the
form...

----Q----
2. I launch a text input window after button 1 is pressed, which
   queries the user for a file name.  Once I get the file name,
   I TRY to use a system call to start a xterm which vi's the
   file.  The problem is I don't know how to pass in the string
   to the system request command so vi can vi.

   The call looks like this:

   system("xterm 'vi string_name'");

   The problem is most likely in the implementation.  Is there a way
   to get this to work, or another method I can use to accomplish
   the same thing?

----A----
I'm going to answer the question you asked, rather than the question you
wanted to ask, which is "how do I build a text editor into my program"
(the answer to that is to use the text widget).

OK.  you have a callback assigned to one of your buttons that manages a
dialog box to prompt for a file name. (BTW, you should be using a
FileSelectionBox widget, but that is a little more difficult)  This
dialog box has an OK button, and you have a callback assigned to the
dialog box's XmNokCallback.  (I'm assuming all of this.)
In this callback, the first parameter is the ID of the calling widget.
You get the ID of the text widget with:
XmMessageBoxGetChild(w, XmMESSAGE_TEXT), or some such, then get the text
from the widget with XmTextGetString(). Once you have the text, do
something like:

char buf[100];
char *file_name; /* from message dialog box */

sprintf(buf, "vi %s", file_name);
system(buf);

What documentation do you have?  If you need more specifics, give me a
holler.  You should also check out either the Douglas Young or the Tom
Berlage book.  Either or both should be in your local bookstore.
From: rph@fox.frame.com (Ron Hughes)
Newsgroups: comp.windows.x.motif
Subject: Re: Large Option Menus
Date: 1 Oct 92 17:57:45 GMT
Distribution: inet
Organization: The Internet

> Does anyone know how Motif 1.1 is supposed to deal with option menus
> where the options cannot all fit on the screen.  ie there are too
> many options.  Is there a way to scroll the options?  Any help would
> be greatly appreciated.

I don't know of any way to scroll the menu, but you can make it
multi-column.  Just set the numColumns resource on the rowColumn
(menu) widget to something more than 1.  You may also need to
set XmNpacking to XmPACK_COLUMN.

It may not be the best solution, but it's probably the easiest!

--Ron Hughes	(rph@frame.com)

Newsgroups: comp.windows.x.motif
From: fabbott@athena.mit.edu (Freeland K Abbott III)
Subject: Screenbuilder wanted
Organization: Massachusetts Institute of Technology
Distribution: comp
Date: Sat, 3 Oct 1992 02:59:50 GMT


I appreciate any advice the net could offer on the choice of a Motif
screen builder... I need something that generates clean Motif code (I
need to port the stuff it generates, so anything that uses its own
library won't do, and the code it makes should be reasonably readable
to mere mortals), runs on at least one of {hp,dec,sun}, and does the
job.  I've got some marketing material for Xvt and ExoCode, but the
materials are out of date (by a couple years), and I'd like to hear
some experience as well as marketing.

Anyway, if you could email me with your commentary, I could really use
it.  Send mail, please, not follow-up postings, since I don't read
news regularly... besides, if there're enough replies, I'll summarize,
and that'd be a lot easier from mail than from postings everyone's
already read ;-)

Thanks!
--
Freeland K. Abbott              fabbott@athena.mit.edu
104 Madison Ave.                now working for Cambridge Technology Group
Arlington, MA 02174             "And I thought 14-hr days would be over now"
Newsgroups: comp.windows.x.motif
From: pgenualdi@ws02.ips.iacd.honeywell.com (Patty Genualdi)
Subject: Closing a window with f.kill question
Keywords: f.kill close
Organization: Honeywell Industrial Automation & Control
Distribution: comp.windows.x.motif
Date: Fri, 2 Oct 92 02:10:43 GMT

HI,

I am having a problem closing a client using f.kill, is there another
Motif command which I can use which will close the window but not send
a "kill" to the client?  My client is XGator.  When I close the XGator
(Macintosh window) the XGator hangs and I have to reboot the Macintosh.

My e-mail address is pgenualdi@ws02.ips.iacd.honeywell.com

Thanks in advance.

Patty Genualdi
Newsgroups: comp.windows.x.motif
From: besp@ellis.uchicago.edu (anna  besprozannaya)
Subject: Re: List Widget and memory management
Reply-To: besp@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Mon, 5 Oct 1992 04:11:44 GMT

In article <1992Sep18.210417.6455@gasco.com> s1w@gasco.uucp (Scott A. White  x5947) writes:
>I didn't see any current threads about list widgets,
>so I'll ask a question.  The QA dept here wants Motif
>apps to be PURIFY'D before they are productional.  We
>are encountering memory leaks with the list widget and
>are adding data to the list as the FAQ prescribes:    
>    XmString list[SIZE];
>    int list_size;
>
>	/*  
>	 *  In here we use list_size[i] = XmStringCreateSimple(str) to
>	 *  fill the XmString array
>	 */
>
>    XtSetArg (args[n], XmNitemCount, list_size); n++;
>    XtSetArg (args[n], XmNitems, list); n++;
>    XtSetValues (w, args, n);
> 
You are supposed to free memory allocated by XmStringCreate... :
	for ( i = 0; i < list_size ; i++)
		XmStringFree ( list[i] );

P.S. mail to you bounced: gasco.uucp - unknown host
From: chandra@ces.cwru.edu (Anupam Chandra)
Newsgroups: comp.windows.x.motif
Subject: Please include in the mailing list
Date: 6 Oct 1992 18:56:11 GMT
Organization: Case Western Reserve University
Distribution: na
NNTP-Posting-Host: sandy.ces.cwru.edu

Hi Netters,

I am posting this for a friend. He wants his name to be included in
the mailing list.

His address is :

lilbit!prakash@skybridge.scl.cwru.edu.

I would appreciate if somebody can include his name in the mailing
list.

Thanks a million in advance.

-- 
###############################################################################

                          (####)
                        (#######)
Newsgroups: comp.windows.x.motif
From: dyoung@media.mit.edu (David Young)
Subject: Q: File Selection Box (is it retarded or am I?)
Organization: MIT Media Laboratory
Date: Fri, 2 Oct 1992 17:18:26 GMT


Ok.  You have a standard Motif file selection box.  Near the bottom is the
area where the file to be loaded is displayed and/or typed in.  Now say
you've navigated into a direcoty which contains some files and
sub-directories.  Then, as you'd expect, the bottom area contains your
current path.  If you select a file, then the area shows the file you want
to load.  Or, you can type a new filename at the end of the path.  However,
if you move into a directory which only has sub-directories and no files,
then the bottom area is EMPTY!!!  If you want to create a new file, you
need to copy the current path from the Filter area at the top, and then
type in the name of the file you want to create.  This seems really
retarded. 

So... my question is... is this behavior built-in to the file selection
box, or is there some way I can make the window behave as I think it
should?  Perhaps it's acting correctly if you want to _load_ a file, but is
there a separate mode for _saving_ a file?

david
dyoung@media-lab.media.mit.edu


--------------------
Note: while I am still using my media lab account, I am no longer a student
there.  I am now employed by: USAnimation, 818 N. La Brea Ave, Hollywood,
CA 90038
Organization: Middle East Technical University - Computer Center
Date: Tuesday, 29 Sep 1992 18:05:58 TUR
From: <C51881@TRMETU.BITNET>
Newsgroups: comp.windows.x.motif
Subject: Icons with colors

Hi,
I want to display my icons with not only two colors (bitmap) but with
multiple colors in Motif environment. How can I do this?
Thank you for help ...
                                            Budak Arpinar
                                      <C51881@TRMETU.BITNET>
Newsgroups: comp.windows.x.motif
From: test@next1.mae.okstate.edu (Test Account)
Subject:  HELP ON TEXT WIDGET
Keywords: HELP on TEXT WIDGET
Reply-To: muthann@next1.mae.okstate.edu
Organization: Oklahoma State University Computer Center
Date: Thu, 1 Oct 1992 23:24:11 GMT


Hello friends,
	I have a need for using two text widget with in the same parent  
window. I intend to use one as a command input region and the other as a  
non editable text display area. I would like the focus from the text  
display area to be redirected to the command input region. I hope the  
figure below might make this point more clear.

---------------------------------	I want the mouse to appear only in 
|				|	Command region and not to be 
|	Text Display		|	active in the display region.
|	Region			|
|				|	
|				|
|				|
---------------------------------
| > command_			|
---------------------------------
Newsgroups: comp.windows.x.motif,comp.windows.x
From: frite@vlsi.polymtl.ca (Michel Besner))
Subject: Problems using translations :(
Organization: Ecole Polytechnique de Montreal, lab. INFO
Date: Tue, 29 Sep 1992 18:54:08 GMT


	Hi there !


	I'm trying to receive events while keeping the shift+left button
down. I want to continue receiving those events while I'm moving the
mouse around (with the shift+left button still down ...).

	So far I've tried using :

	Shift<Btn1Down>,<Btn1Motion> -> I get the first event but nothing
after ....

	Shift<Btn1Motion> doesn't seem to work -> I get a code dumped
in BindActions :(


Is there a way to do it ?
Or what I'm doing wrong ?
Did I miss something ?

Any hints are welcome :)

Thanx in advance !!	
--
			Michel Besner, eng
			Sacred Heart Hospital research center

"life is a big bowl of JELL-O  :) :) "
Newsgroups: comp.windows.x.motif
From: "scott gregory" <scott.gregory@canrem.com>
Subject: xmkmf for hp 700's
Reply-To: "scott gregory" <scott.gregory@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 3 Oct 92 10:36:51 EST

<<<Ed Gallant> said to All> on 10-01-92>

EG>Does anyone know where I can get 'xmkmf' for an HP 700 series??

Try your HP salesperson/rep/dealer.  They don't 'support' the program,
which is why it isn't in their standard X11 release.  They will probably
give you the program for the asking.

*Scott Gregory* - - - - - - - - - - - Unix/X Guru in training...
- - - - - - - scott.gregory@canrem.com - - - - - - - - - - - - - - - -
---
  DeLuxe 1.21 #5411  
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
From: okeefe@cs.Buffalo.EDU (Paul O'Keefe)
Newsgroups: comp.windows.x.motif
Subject: Motif-for-Sun4: Which product is best?
Date: 27 Sep 92 19:52:05 GMT
Organization: State University of New York at Buffalo/Comp Sci
Originator: okeefe@dubhe.cs.buffalo.edu



I want a Motif development environment for a Sun4.
Since the cost and restrictions of an OSF source license
are not right for me, I'm looking at binary-only
products from ISC, Quest, IXI, TeleSoft et al.

I'm not interested in the extras, just the basics:
1) Motif 1.2 libraries and window manager with the latest bug fixes and patches
2) good source code examples and docs

Question: who's Motif-for-Sun4 is best?

Paul O'Keefe
From: bob@odi.com (Bob Miner)
Newsgroups: comp.windows.x.motif
Subject: wchar_t on SunOS 4.1.1 - 2 or 4 bytes?
Date: 28 Sep 92 20:14:49 GMT
Distribution: inet
Organization: The Internet

Sun Sparc, SunOS 4.1.1, X11R5 PL17 and Motif 1.2.1 source, Sun cc.

I'm trying to build X11R5 and Motif 1.2.1 such that I can use the
Internationalization features of X11R5 and Motif 1.2.1.  Specifically,
I need Japanese, hence I'll be using an input method.

The documentation which comes with the Sony input method - Xsi - on
the X11R5 tape (contrib/im/Xsi/REAME.sun) says, in essense, to NOT use
Sun's definition of wchar_t (2 bytes), but instead to use X's (4 bytes).

I've had several X11R5 users attest to the fact that this works, and they
all think changing Xlib.h to make wchar_t be 2 bytes would fail.  They
haven't used Motif, however.

The Motif 1.2 release notes (pg. 3-2, section 3.1.3) say that "the Xlib
interpretation of wchar_t has to match exactly the wchar_t implementation
of your C library."  And I'm sure Sun's C library uses 2 byte wchar_t, not 4.

So should I be using 2 or 4 bytes for wchar_t on Sun platforms?

If 2 bytes, will Xsi work?  If not, what other input method should I use that
will work?  Ximp?  Xsi seems to be preferred from the people I've talked to.

If 4 bytes, is there some replacement for Sun's C library routines using
wchar_t around?  The Motif 1.2 release notes mention "There is contributed
software for dealing with wchar_t.", but I haven't found it yet in the X11R5
contrib area.

In other words, what's the right way to make Motif 1.2, X11R5 and some input
method work together for Japanese?
From: kobet@picker.com (Harry Kobetitsch)
Newsgroups: comp.windows.x.motif
Subject: List Widget Deselection
Date: 2 Oct 92 15:57:41 GMT
Distribution: na
Organization: Picker International, Inc.

I am trying to deselect an item in a List widget. 
I have used XmListDeselectAllItems to get rid of
the highlighting. It seems to desect from the selected
list structure but it won't remove the highlighting.
I am in SingleSelect mode. Has anybody had this problem ?
-- 
Picker International, Inc.
595 Miner Road
Highland Heights, Ohio 44143
Voice: 216-473-2624
From: argv@z-code.z-code.com (Dan Heller)
Newsgroups: comp.windows.x.motif
Subject: Re: Column Alignment in XmList
Date: 26 Sep 92 17:08:04 GMT
Reply-To: argv@z-code.z-code.com
Distribution: inet
Organization: The Internet

> On Sep 25, 11:25am, W. Scott Meeks wrote:
> Supporting tabbing within XmStrings is proposed for the next release of
> Motif.

Oh really? :-)  How do you propose to do that?  Tabs only work when you
know the beginning and ending columns for the whole visual text stream.
You can concatenate compound strings together, and if there are any
tabs in them, you can be sure nothing is going to line up.  Especially
if you use a non-proportional font.  Since compound strings are used
everywhere, not just in list widgets, you'll end up introducing more
problems everywhere else by trying to solve one specific quirk.

Amuch easier solution that the programmer can do for himself is to
use sprintf() with space padding in the format string:

    sprintf(buf, "%20.20s%*c%10.10s", string1, ' ', string2);
    c_text = XmStringLtoRCreate(buf, charset);

Of course, this doesn't address the problems associated with my first
paragraph, but nothing can.  You might as well use space-padding instead
of complicating the compound string code even more just to get the same
results.

  --dan
From: ron@topaz.bds.com (Ron Natalie)
Newsgroups: comp.windows.x.motif
Subject: Re: HP and motif version
Date: 2 Oct 1992 14:23:51 GMT
Organization: BDS Systems
Distribution: world
NNTP-Posting-Host: topaz.bds.com

> HP's product, Motif 1.1, is OSF/Motif 1.1.3 -- almost. OSF's product has a
> few bug fixes that HP's doesn't & HP's product has a few "enhancements"
> that aren't in 1.1.3.

On which version of HP/UX?  On 8.07 it looks to be significantly older than
1.1.3, seeing how just reompiling the 1.1.1 tape fixes a whole pile of bugs
that exist in the product libXm on 8.07.

> As of Motif 1.2, we can  expect to see code which is the same as OSF's
> comparable release.

When is that likely to appear?

-Ron (Tired of having to submit to OSF's torture to get our product out the door
on machines that are *SUPPOSED* to have MOTIF on them anyway mode).
From: kettering@addvax.llnl.gov (Brett 'Volleyball Is My Game' Kettering)
Newsgroups: comp.windows.x.motif
Subject: How to strip off "_popup" string in XmCreateFormDialog?
Date: 30 Sep 92 15:34:00 GMT
Organization: Lawrence Livermore National Laboratory
News-Software: VAX/VMS VNEWS 1.41

>From: dwu@hal.gnu.ai.mit.edu (Daniel Wu)
>Subject: How to strip off "_popup" string in XmCreateFormDialog?
>Message-ID: <1992Sep29.005615.14463@mintaka.lcs.mit.edu>


>In my code, I call the routine:
	configDialog = XmCreateFormDialog (dialogShell,
		"Printer/Plotter Setup", NULL, 0);
The resulting dialog box has the Menu title:
		Printer/Plotter Setup_popup
				     ^^^^^^^
I want the string to simply read:
		Printer/Plotter Setup
without the "_popup" appendage.
>Can someone tell me what I have to do to accomplish this?

Try

  XtVaSetValues( configDialog, XmNdialogTitle, "Printer/Plotter Setup", NULL );

-------------------------------------------------------------------------------
Brett M. Kettering
PaperNet: LLNL P.O. Box 808 L-437 Livermore, CA.  94551
InterNet: brettk@llnl.gov
TalkNet : (510) 423-3467
FaxNet  : (510) 423-4606

"No other success can compensate for failure in the home."
                   -- David O. McKay
-------------------------------------------------------------------------------