HDTenEightyP/NetNews huggingface dataset:
From: cpbeaure@cayley.uwaterloo.ca (Chris Beauregard)
Subject: Re: controlling an option menu from within the program (summary)
Keywords: option menu
Organization: University of Waterloo
Date: Fri, 8 Jan 1993 17:49:08 GMT

In article <C0Frr8.Hvz@undergrad.math.waterloo.edu> I write:
>In article <1993Jan6.102718.2140@gate.esat.kuleuven.ac.be> johanb@joyce.esat.kuleuven.ac.be (Johan Buelens) writes:
>>you can use the convenience functions to create the option menu, but then
>>you have to find out the names of the pushbutton widgets and the menu widget;
>>it then seems more appropriate to create the menu `the hard way' (without 
>>convenience function), so you are in control of all the widget names.

[chop chop]

>If I get some time today (ugh!) I'll take a quick shot at working the
>code out and post it...

...and here it is...

It's a matter of grabbing the subMenuId and getting the list of widgets
in the menu from there.  Then you can easily find the id of the widget
for setting XmNmenuHistory.

While the 'hard way' would probably work (dunno, haven't tried it...)
this means you can create the menu with a _lot_ less work and still
control it fairly easily.  It's even more important if you happen to
have a lot of option menus you might have to control like this. (Like
more than one...)

--------

/*
  Selects the top button in an option menu.  
  buttonNumber ranges from 0 to n-1, where n is the number of entries in
  the option menu.
*/
void XmOptionMenuSetTopButton(Widget w,int buttonNumber) {
	WidgetList list;
	Widget subMenu;
	int numberOfWidgets;

	/* Get the sub menu.  */
	XtVaGetValues(w,XmNsubMenuId,&subMenu,NULL,NULL);

	/* Get the list of menu entries */
	XtVaGetValues(subMenu,XmNchildren,&list,XmNnumChildren,&numberOfWidgets,
			NULL,NULL);

	if(buttonNumber<numberOfWidgets) {
		/* Set the top menu entry */
		XtVaSetValues(w,XmNmenuHistory,list[buttonNumber],NULL,NULL);
	}
}

---
Chris Beauregard                                cpbeaure@napier.uwaterloo.ca
Reality!?!  Where?
Newsgroups: comp.windows.x.motif
From: t8122aa@cd1.lrz-muenchen.de ()
Subject: XmVaCreateSimpleOptionMenu
Keywords: option menu
Organization: Lehrstuhl fuer Hochspannungstechnik, TU Munich
Date: Fri, 8 Jan 1993 14:10:53 GMT
Reply-To: carsten@hsa.e-technik.tu-muenchen.de

rehi,
i forgot the most important thing to ask:  I'd like to create other  names for the buttons
(instead of button_n). There is a resource in RowColumnClass, called XmNbuttons. How is the syntax for 
changing the default value.  Could you please create an example (like in periodic).
Thanks again.
From: poepping@perseus.uni-paderborn.de (Manfred Poepping)
Newsgroups: comp.windows.x.motif
Subject: Re: Motif Interface builder on the Sun
Date: 7 Jan 1993 15:43:44 +0100
Organization: Universitaet Paderborn, Germany
Distribution: usa
NNTP-Posting-Host: perseus.uni-paderborn.de

joses@delilah.Jpl.Nasa.Gov (Jose Salcedo) writes:

>Can anyone recommend an interface builder on the Sun platform? Any pointers
>would be greatly appreciated.

    Have you ever tried >> Motifation << ?

It works on Sun X11R4/X11R5 Motif 1.1.x and Motif 1.2.1.

Manfred
From: lmpieni@afterlife.ncsc.mil (Lori M. Pieniazek)
Newsgroups: comp.windows.x.motif
Subject: dynamically change background resource value
Date: 6 Jan 93 14:34:53 GMT
Organization: The Great Beyond


I have a motif program that uses a resource file with the following line in it:
*background:	green

I would like to change this value while the program is running. Is there
a way to do this so that it will change all of the widgets backgrounds to
a new color without having to change the XmNbackground resource for 
every widget?

Thanks in advance!

Lori Pieniazek
lmpieni@afterlife.ncsc.mil
Xref: sparky comp.windows.x.motif:8418 comp.windows.x:20886 comp.windows.open-look:4988
From: ray@rann.sbi.com (Raymond Blum)
Newsgroups: comp.windows.x.motif,comp.windows.x,comp.windows.open-look
Subject: XAPPLRESDIR
Date: 7 Jan 93 21:43:50 GMT
Reply-To: ray@rann.sbi.com
Organization: Salomon Inc.

Hi All
  I'm trying to get my resource file via the XAPPLRESDIR environment variable and am not having much luck. Based on info in the OSF/Motif programmer's guide, I believe that I can use this var as follows
  "setenv XAPPLRESDIR = $APPLHOME/etc"
register my appl class as "XTimesheet"
  and then put my defaults file in...
  "$APPLHOME/etc/XTimesheet"
 and the user can override these defaults by putting THEIR preferences in
  "~/XTimesheet"
I can't get this to work (!!!%@$!%^@) (BTW -The LANG var is not set). Can anyone either explain or point me to the proper usage. I'm currently using $XENVIRONMENT to point to me defaults but that doesn't let the user override easily.
  Thanks
---Raymond
---
------------------------------------------------------------------------
-----                                                              -----
-----                                                              -----
----                  \\\\\\\                                       ----
----                 \\\    \\   People ask me                      ----
----                  \\ o o       "Why are you smiling?"           ----
----                             I'm just happy!                    ----
----                     \_/                                        ----
----                                                                ----
----   Raymond Blum                                                 ----
----   ray@rann.sbi.com                                             ----
----   (201) 896-7594                                               ----

  Of course these are MY opinions! Whattya think, my EMPLOYER 
  could've thought this stuff up?
From: mattb@sdd.hp.com (Matt Bonner)
Newsgroups: comp.windows.x.motif
Subject: Motif 1.2 books
Date: 7 Jan 1993 23:11:20 GMT
Organization: Hewlett-Packard, San Diego Division
Distribution: world
NNTP-Posting-Host: hpsdlg16.sdd.hp.com
Keywords: 1.2, sample code

Are there any books out there that cover Motif 1.2 other than the 
OSF books?  I would be especially be interested in a 1.2 version
of O'Reilly Vol. 6.  Dan?  I'm trying to figure out how to use the 
MessageBox template dialog to put a text widget in it, and the 
Programmer's Reference seems to be a little hazy on how exactly 
children are attached to the dialog box.  Or if anyone would care 
to explain...

Thanks,
Matt
-- 
Matt Bonner                  |  Email: mattb@sdd.hp.com
Hewlett-Packard Company      |  Snail: 16399 West Bernardo Drive
Ink-jet Components Division  |         San Diego, CA  92127-1899
From: lee@deneb.sw.stratus.com (Lee Cooprider)
Newsgroups: comp.windows.x.motif
Subject: Menus (and other popups) with debugging
Date: 6 Jan 1993 21:13:30 GMT
Organization: Stratus Computer, Software Engineering
Distribution: world
NNTP-Posting-Host: deneb.sw.stratus.com


This feels like a FAQ, but I didn't find it in the list.

Motif causes some popup windows to grab all events when they are active.
For example, the standard PulldownMenu does this.

When one is debugging the program and it comes to a breakpoint with the
menu active, a deadlock occurs.  The program is stopped, so the menu items
cannot be selected, but the program can't be resumed, because the window 
running the debugger can't get any events.

There must be a standard solution to this problem.  What is it?
-- 
Lee W. Cooprider				PP-ASEL/IA
Lee_Cooprider@vos.stratus.com			Skylane N2908F "Wiley"
Newsgroups: comp.windows.x.motif
From: dnh@mfltd.co.uk (Des Herriott)
Subject: Motif 1.2 Text Widgets & input methods
Keywords: confused
Organization: Micro Focus Ltd., Newbury, UK
Date: Tue, 5 Jan 1993 15:30:15 GMT


I've just been reading the Motif 1.2 Programmer's Guide (ch. 11, the
bits about internationalization and so on), and there's a lot there
I just don't quite grasp.  

What I want to do is (as a prelude to a more complex project) just create
a Text widget which allows Japanese input.  Now the PG says that this widget
"provides a transparent connection to the locale-specific input method".  
Presumably this means that I just need an appropriate Japanese input method
(e.g. kinput2 or xwnmo) and the right font set (a Kanji font and an English
font), and Motif & Xlib will do the bulk of the work.  What I can't find 
anywhere is an example of how to do this; what initialisations need to be
performed, how it ties in with the concept of locales, and so on.

I'm running X11r5 & Motif 1.2 on an SVR4 486 box.  I've managed to build kinput2 and xwnmo.  So, question time:  does anyone have any simple demos involving Japanese input & text widgets?

Any help on this would be greatly appreciated,

Des.

-- 
Des Herriott,           /                                         O  O
Micro Focus, Newbury.  /     "I feel as much like I did         /      \ 
+44 (0635) 565354     /       yesterday as I do today."        /\      /\ 
dnh@mfltd.co.uk      /                                           \____/  
Newsgroups: comp.windows.x.motif
From: brian@research
Subject: Using Visuals and Depths?
Organization: Animal Logic Research, Sydney Australia
Date: Tue, 12 Jan 1993 20:37:00 GMT

Does anyone know how to set the depth of a window to 24bit, as opposed to the
default of 8bit, so I can use the 24bit TrueColor visual to display a pixmap
in a label?

Thanks in advance...

brian@dl.oz.au
From: poepping@ss10_21.uni-paderborn.de (Manfred Poepping)
Newsgroups: comp.windows.x.motif
Subject: Re: Hypertext
Date: 5 Jan 1993 09:49:40 +0100
Organization: Universitaet Paderborn, Germany
Distribution: inet
NNTP-Posting-Host: ss10_21.uni-paderborn.de

hubec@ctp.com (Hubert Chou) writes:


>Are there any third-party packages out there for building hypertext
>help-type systems under Motif? 

Yes there is...

Haven't you ever heard of XpgHelp ?

    XpgHelp supports normal links to other help pages,
    quick links (just a popup explamation), tabstops, different fonts,
    easy support for special characters and a lot more

I think you can get a free demonstrational version. Just send email
to griebel@uni-paderborn.de.

Manfred


	
Newsgroups: comp.windows.x.motif
From: daniel@moonshine.osf.org (Daniel Dardailler)
Subject: Re: Child widgets not resizing on an XtVaSetValues call to topshell
Keywords: resize, shell
Organization: Open Software Foundation, Motif Team
Date: Tue, 5 Jan 1993 15:29:51 GMT

 
|> 	I have an application which consists of a topshell widget with a form
|> widget on it.  The form has several child widgets on it that are attached to the
|> appropriate sides of the form, so that when the topshell widget is resized the
|> children are resized correctly.  The problem is occassionally. (99% of the time
|> it works fine), when I resize the topshell widget through an XtVaSetValues,
|> the shell is resized but the form and its children are not.  Has anyone else
|> seen this and is there a fix?
 

If you're using Motif 1.1.something with X11R5, you might be experimenting 
a known problem of geometry management due to a fix in Xt in the geometryYes/Done
area.

I don't remember the exact details, but try to XtSetValues the form instead 
(+ set allowShellResize true on the shell).


Newsgroups: comp.windows.x.motif
From: julia@netcom.com (Julia Miller)
Subject: WCL to UIL Translator
Keywords: WCL
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 8 Jan 1993 23:37:03 GMT

Has anyone written a wcl to uil translator, preferably one
that is public domain? Or wcl to some other 'fairly' standard 
language?

Thanks,

julia
From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
Newsgroups: comp.windows.x.motif
Subject: Re: How to gray out Text widgets
Date: 4 Jan 93 23:29:50 GMT
Organization: VPI&SU Computer Science Department, Blacksburg, VA

In article <1993Jan4.193412.4644@ornl.gov> jxt@stc06.ctd.ornl.gov (TOLLIVER J S) writes:

  >How does one gray-out an insenstive Text widget?

Using Motif 1.2+ ? Then just set XmNsensitive to False. 1.2+ support
insensitive visuals for Text and lists.

  >Do I really have to go to the trouble of changing the foreground and background
  >colors myself? 

If you're using 1.2-, yes.

  >If so, is there anyway to get at the algorithm used to choose
  >grayed-out colors for other widgets -- Labels, for instance?

You can use coloredit (export.lcs.mit.edu) to examine the rgb/hsv/cmy values of the
'gray' of the labels and use the same for text greying.

  >Johnny Tolliver

---
S Ramakrishnan, CS Dept, McBryde Hall, VaTech
Newsgroups: comp.windows.x.motif
From: esther@verdix.com (Esther Lumsdon)
Subject: How does one investigate an error message?
Summary: Ada
Keywords: help
Organization: Verdix Corp
Distribution: na
Date: Tue, 5 Jan 1993 22:24:33 GMT

I am (obviously) new to X.  A customer of my company reports that he
gets the message 
 warning: cannot convert string "1004ff08" to type VirtualBinding

when he runs the simple callbacks example (which uses Verdix' ATC Ada
binding to motif).  He is using Sun4, NeWS server, mwm.

How do I track down what this means?  I can't duplicate this message.
The only sorta-related thing which I see in the Motif FAQ covers 
a widget which does a help callback.  Is there a list of the text
of error messages someplace for X problems (like the OpenVMS System
Messages and Recovery Procedures manuals)?  Do I need to do a
strings on some of the X objects?

thanks for any help.
-- 
-- Esther Lumsdon, not speaking for Verdix.   esther@verdix.com
Q: How many user support people does it take to change a light bulb?
A: We have an exact copy of the light bulb here and it seems to be
   working fine.  Can you tell me what kind of system you have?  
Xref: sparky comp.windows.x.motif:8510 comp.windows.x:21037 comp.windows.open-look:5025
From: brown@ftms.UUCP (Vidiot)
Newsgroups: comp.windows.x.motif,comp.windows.x,comp.windows.open-look
Subject: Re: XAPPLRESDIR
Date: 11 Jan 93 20:44:08 GMT
Reply-To: brown@ftms.UUCP (Vidiot)
Organization: Vidiot's Other Hangout

In article <1355@pivot-sts.sbi.com> ray@rann.sbi.com writes:
<Hi All
<  I'm trying to get my resource file via the XAPPLRESDIR environment variable and am not having much luck. Based on info in the OSF/Motif programmer's guide, I believe that I can use this var as follows
<  "setenv XAPPLRESDIR = $APPLHOME/etc"

The csh doesn't use the = sign in the assignment of environment variables.
It should be:

	setenv XAPPLRESDIR $APPLHOME/etc

This assumes that you are using csh.
-- 
harvard\
  ucbvax!uwvax!astroatc!ftms!brown  or  uu2.psi.com!ftms!brown
rutgers/
INTERNET: brown@wi.extrel.com  or  ftms!brown%astroatc.UUCP@cs.wisc.edu
Newsgroups: comp.windows.x.motif,comp.windows.x.intrinsics
From: scott@ee.ualberta.ca (Scott Stephens)
Subject: Resizing Widgets within Code
Organization: University Of Alberta, Edmonton Canada
Distribution: na
Date: Fri, 8 Jan 1993 17:30:14 GMT


I'm having trouble with some geometry management of Motif widgets. First 
let me describe the hierarchy of the widgets. I have the following.

      topLevelShell
            |
            v
       mainWindow
            |
            v
       panedWindow
            |
            v
          form
            |
            v
 scrolledWindow & scale           separated horizontally (scrollers are 
            |                     managed but unmapped)
            v
      drawingArea

plus some menus which are unimportant to this discussion. I have chosen 
this so that the scale and scrolled window can be resized automatically 
when changing the pane sizes, with the scale acting something like a 
scroller, but not changing the viewing area, just changing a gain 
parameter. but I also want to be able to add copies of the form on down to 
the panedWindow. I also want to limit the height of the window to the size 
of the screen

If I add a copy of the form on down which would exceed the height of the 
screen, I would like to be able to have the program resize all the forms 
in the panes to be roughly the same size (give or take a pixel or two). 
The new form gets added ok, and at the default height, but one of the 
other forms gets resized to XmNpaneMinimum (set at 50 pix).

So here's the problem. After adding a new form, I have tried to adjust the 
sizes of each form, but this doesn't seem to resize them properly, and the 
drawingArea doesn't always get resized to match the size it should be 
within the scrolled window. I try resizing with XtMakeResizeRequest, 
followed by a second request if the result is XtGeometryAlmost (with the 
returned values of course).

My question is, in what order should I make these requests, and when? I 
could probably hack it together (as I did before I had the form and scale 
in here), but I'd rather do it properly so I don' run into problems.

Your help in this matter would be greatly appreciated, and thanks in 
advance to any and all who respond

R. Scott Stephens
scott@ee.ualberta.ca
From: huub@cwi.nl (Huub Bakker)
Newsgroups: comp.windows.x.motif
Subject: Bextend and BToggle translations
Keywords: mouse buttons
Date: 8 Jan 93 15:50:16 GMT
Reply-To: Huub.Bakker@cwi.nl
Organization: CWI, Centre for Mathematics & Computer Science

Hello world,

This might be a FAQ, but I can't find a hind in the manual pages, so perhaps
anybody out there can give me a hint.

A XmList widget has translation of the following form (see manual pages):


BSelect Press:	ListBeginSelect()
...
BExtend Press:	ListBeginExtend()
...
BToggle Press:   ListBeginToggle()
...

Now my left mouse button seems to be coupled automaticly to BSelect. However I
can't reach the BExtend and BToggle functionality. I have to couple these
logical names to a mouse button, but how. 

Thanks in advance,

Huub.

-- 
CWI, P.O. Box 4079 			Huub Bakker (huub@cwi.nl)
1009 AB Amsterdam
The Netherlands
Tel. 31 20 5924080
Newsgroups: comp.windows.x.motif,comp.windows.open-look
From: era@ncar.ucar.edu (Ed Arnold)
Subject: Motif 1.2 client crashes OpenWindows 3.0 server
Reply-To: era@ncar.ucar.edu (Ed Arnold)
Organization: Nat'l Center for Atmospheric Research (NCAR); Boulder, CO
Date: Mon, 4 Jan 1993 23:19:18 GMT

A followup to my November posting on this subject:

Sun now has a patch 100444-35 which fixes this bug (i.e. a Motif 1.2
client crashes the OW3 xnews server upon client startup) and approx. 50
other bugs.  Earlier versions of this patch for the OpenWindows 3.0
server, e.g. 100444-28, do NOT solve this particular bug.  (100444-35 is
applicable to OW3 running under SunOS 4.1 thru 4.1.3.)
--
Ed Arnold * NCAR * POB 3000, Boulder, CO 80307-3000 * 303-497-1253(voice)
303-497-{1298,1137}(fax) * internet: era@ncar.ucar.edu * bitnet: era@ncario
compuserve: internet:era@ncar.ucar.edu
Newsgroups: comp.windows.x.motif
From: news@fulcrum.co.uk
Subject: Problem with Icon box resources
Organization: Fulcrum Communications
Date: Fri, 8 Jan 1993 17:16:40 GMT

Please help with a problem concerning placement of the Icon Box, i.e.
the resource iconBoxGeometry does not seem to work as specified in the
OSF/Motif Programmer's Guide.
From: sub@fulcrum.co.uk (Subhash Lodhia)
Mwm*iconBoxGeometry:  7x2+2+0

(Motif Version is 1.1.3.)

Please reply by email because I dont use this group to much.

Thankyou,
Yours mailfully,

==============================================================================
Subhash C Lodhia					(sub@fulcrum.co.uk)

==============================================================================
Fulcrum Communications Ltd., Fordrough Lane, Birmingham, B9 5LD, ENGLAND.

Newsgroups: comp.windows.x.motif
From: hubec@ctp.com (Hubert Chou)
Subject: Hypertext
Organization: Cambridge Technology Partners
Date: Mon, 4 Jan 1993 16:32:57 GMT


Are there any third-party packages out there for building hypertext
help-type systems under Motif? 

Any ideas, suggestions are welcome.

Hubie Chou
hubec@ctp.com
Newsgroups: comp.windows.x.motif
From: epc1@quads.uchicago.edu (Merlin)
Subject: How to stop resizing of PushButton
Reply-To: epc1@midway.uchicago.edu
Organization: University of Chicago
Date: Tue, 12 Jan 1993 23:30:44 GMT


I am currently setting the size of a pushbutton in an apps default file.
When the user presses the button, I change the XmNlabelString of the
pushbutton with XtSetValues(button, args, 1).  The app then changes the 
label of the pushbutton but resizes the push button as if I had never set
it in my apps default file.  

How do I prevent this?  What can I put into my apps default file to
keep it the same size (I'm not changing the name of the widget or
anything).

Thanks for your help.
Newsgroups: comp.windows.x.motif
From: tim@catt.citri.edu.au (Tim Liddelow)
Subject: How do I make the lists in a FileSelectionBox/Dialog not resize ?
Keywords: X,motif,dialog
Reply-To: tim@catt.citri.edu.au
Organization: CATT Centre at CITRI
Date: Tue, 5 Jan 93 23:35:15 GMT

I have a problem with a FileSelectionDialog (that I have modified).  I have changed
the 'XmNfileSearchProc' resource to point to my own routine so I can selectively
fill up the 'Files' list widget.  The problem I find is that when the strings in
the 'Files' list widget change, I get all this ugly resizing of both the 'Files' list
and the 'Directories' list.  I have tried stuff like

XtVaSetValues(XmFileSelectionBoxGetChild(my_file_req, XmDIALOG_LIST,
	XmNlistSizePolicy, XmCONSTANT,
	NULL);

but this doesn't seem to have much effect.  Any ideas ?

Thanks in advance
---
________________________________________________________________________________
  Tim Liddelow                                          for(;;) fork();
  Systems Programmer
  Centre of Advanced Technology in Telecommunications   My brain on a bad day.
  CITRI, Melbourne, Australia                           
  internet : tim@kimba.catt.citri.edu.au                
  Phone : +61 3 282 2455   Fax : +61 3 282 2444	        
________________________________________________________________________________
From: glen@iis.UUCP
Newsgroups: comp.windows.x.motif
Subject: Re: Help: Text in Scrolled Window
Date: 5 Jan 93 23:45:16 GMT
Distribution: inet
Organization: The Internet


> 
> 	I have a Text widget in a Scrolled Window widget, which is configured to
> scroll vertically automatically (and thus is not simply a ScrolledText widget).
> This widget is used for output only, with messages being periodically appended
> to the end of the text.  I would like the scrolled window to constantly show the
> position of the current end of the text, but cannot find any way of doing it
> without changing the operation of the Scrolled Window to manual (which would make
> a lot more work).
>     Any ideas would be greatly appreciated,
>     	Jeffrey Wood
> 

The following works for me:

        XmTextInsert (mensDataLCD, mensDataPos, messageBuf);
	mensDataPos = XmTextGetLastPosition (mensDataLCD);
        XtVaSetValues (mensDataLCD,
                       XmNcursorPosition, mensDataPos,
                       NULL);
        XmTextShowPosition (mensDataLCD,
                            mensDataPos);

Good Luck !
Newsgroups: comp.windows.x.motif
From: joel@jellotrees.esd.sgi.com (Joel Tesler)
Subject: Drag & drop and security
Organization: Silicon Graphics, Inc.  Mountain View, CA
Date: Fri, 8 Jan 93 18:48:24 GMT


I would like to use Motif drag and drop to move files around.
However, providing that capability seems insecure, as someone could
simulate the Motif Drag & Drop protocol, and cause an unauthorized
file transfer.  The drag initiator can protect itself from this, by
refusing to start a drag on a synthetic event.  However, the drag
receiver gets all of its information from synthetic events sent by the
initiator.  Thus it is possible to fool a receiver into thinking it
got a drop, when actually, the user did not do any dropping.

Does anyone know any way to protect against this?

Joel Tesler
joel@sgi.com
415-390-3048