HDTenEightyP/NetNews huggingface dataset:
From: binary@nyx.cs.du.edu (binary)
Subject: !! Quick Pixmap Question !!
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Tue, 24 Nov 92 00:21:35 GMT

Here's the deal.  In main(), I'm creating a drawing area widget like:

   preview = XtVaCreateManagedWidget("preview",
      xmDrawingAreaWidgetClass, frame,
      NULL);
   XtAddCallback(preview, XmNexposeCallback, draw_preview, NULL);

Then, in the callback routine, I'm doing this:

void draw_preview(w, client_data, call_data)
   Widget w;
   XtPointer client_data;
   XtPointer call_data;
{
   Pixmap *pix;
   unsigned int *width, *height;
   int xhot, yhot;
   pix = XCreatePixmap(XtDisplay(w), XtWindow(w),
      400, 200, DefaultDepthOfScreen(XtScreen(w)));
   XReadBitmapFile(XtDisplay(w), XtWindow(w),
      "/tmp/preview.xbm", width, height, &pix, &xhot, &yhot);
   XFreePixmap(XtDisplay(w), pix);
}

The program compiles correctly, but I always get:

[2] + Bus error(coredump)

whenever I try to run it.  I've tried everything I can think
of, but the program always chokes on the 'XReadBitmapFile' line.
Any ideas on what could be going wrong here?  I'm clueless.
Thanks for any and all help!

:) :) :) :) :)
Mr Binary, SRA, RM
From: 6500msd@ucsbuxa.ucsb.edu (Michael D'Errico)
Newsgroups: comp.windows.x.motif
Subject: Re: xmFormWidgetClass, how to use.
Keywords: Form
Date: 21 Nov 92 21:02:17 GMT

In article <1992Nov19.175837.28969@osf.org> daniel@moonshine.osf.org (Daniel Dardailler) writes:

||> I'm trying to use a Form widget to manage a fileselection box on
||> top of a selection list.  I tried the following:
||> 
||>   father = XtVaCreateManagedWidget ("father",
||>                                     xmFormWidgetClass,
||>                                     toplevel, NULL);
||> 
||> ... (create fileList  -FileSelectionBox widget)
||> ... (create selectionList widget)
||> 
||>   XtVaSetValues (fileList, 
||>                  XmNleftAttachment, XmATTACH_FORM,
||>                  XmNrightAttachment, XmATTACH_FORM,
||>                  XmNtopAttachment, XmATTACH_FORM,
||>                  XmNbottomWidget, selectedList,
||>                  NULL);
||> 
||>   XtVaSetValues (selectedList, 
||>                  XmNleftAttachment, XmATTACH_FORM,
||>                  XmNrightAttachment, XmATTACH_FORM,
||>                  XmNbottomAttachment, XmATTACH_FORM,
||>                  XmNtopWidget, fileList,
||>                  NULL);
||> 
||> But the window turns out to include only the FileSelectionBox widget w/o 
||> the selection List widget.
||> 
||> Is this the right way to use form?
| 
|No, Form is a one way constraint widget.
|You only need to set the top of the selectedList to the bottom
|of the fileList.

You also need to specify XmNtopAttachment of selectedList as XmATTACH_WIDGET or
you will get the default of XmATTACH_NONE.  The result -- the selectedList is
placed underneath the fileList and is (at least partially) unusable.  If you
also set the XmNbottomAttachment of fileList to XmATTACH_WIDGET you will not
get any errors until the widgets are created.  Then you will get the annoying
"circular dependency among Form children" message.

Michael D'Errico
6500msd@ucsbuxa.ucsb.edu

Newsgroups: comp.windows.x.motif
From: lenard@mullian.ee.mu.OZ.AU (rohan james lenard)
Subject: where to find a missing file from the distribution ?
Summary: I need to find (contrib/demos/xmsamplers/xmeditor.c) from motif 1.1 dis
Organization: Computer Science, University of Melbourne, Australia
Date: Thu, 19 Nov 1992 20:15:16 GMT

Hi
The summary about says it all.  Some friends at an australian software house
have just found that a files referred to in the motif programmers handbook
is not in their distribution (DG Aviions) and would like to get it.

Can someone suggest where I might try looking ?

Thanks in advance,
Regards,
	Rohan
------------------------------------------------------------------------
lenard@munagin.ee.mu.OZ.AU			O O
lenard@mundil.cs.mu.OZ.AU			 |
lenard@ecr.mu.OZ.AU				\_/
--
Rohan Lenard
lenard@munagin.ee.mu.OZ.AU
lenard@mundil.cs.mu.OZ.AU
lenard@ecr.mu.OZ.AU
Newsgroups: comp.windows.x.motif
From: daniel@juliet.osf.org (Daniel Dardailler)
Subject: Re: Looking for Motif imake configuration files
Organization: Open Software Foundation, Motif Team
Distribution: inet
Date: Fri, 20 Nov 1992 15:54:31 GMT

TOP_MIT/contrib/Motif/config/Motif.rules & Motif.tmpl

(on export in pub/R5untarred)

contains 1.2 version of the files.
From: jonabbey@cs.utexas.edu (Jonathan David Abbey)
Newsgroups: comp.windows.x.motif
Subject: Integrating X11R5 and Motif1.2 sources for build
Date: 17 Nov 1992 14:27:56 -0600
Organization: CS Dept, University of Texas at Austin
Distribution: world
NNTP-Posting-Host: yoakum.cs.utexas.edu
Summary: OSF Documentation is extremely weak here..
Keywords: build

Hi folks.. I'm trying to build the Motif 1.2 release in a clean
fashion.  I am building on a Sun 690MP with SunOS 4.1.2.  I am a
little unclear on how best to handle the integration of the Motif
config files and the X11R5 config files.  The instructions in the
release notes are a little vague in this regard.

The section that speaks of integrating the X11R5 and Motif 1.2 source
trees seems to be what I want to do, but the documentation doesn't
actually tell you how to move directories around so that X11R5 and
Motif 1.2 are actually in the same source tree.  Does this mean that
the X11R5 config files are replaced by the Motif 1.2 config files?

Should I place the motif1.2 source tree under X11R5/mit?

Currently I am building X11R5 and Motif 1.2 in separate source trees,
and am using the XTop definition in the motif site.def file to
"integrate" the two source trees.  However, what I have to do is do a
make in the X11R5 source tree, install X11R5, go to the Motif source
tree, make sure that I have modified the ProjectDir definition in the
site.def file to match the ProjectDir definition in the X11R5 site.def
file, then do a full build and install, trusting that the Motif config
files will overwrite the X11R5 config files in the installed
directories.

This *really* seems too flaky to depend on for our permanent
installation process, in the absence of more explicit instructions
that this is indeed the desired behavior.

I would prefer to have one source tree that I can go to if we need to
make permanent changes to the config files, rather than depend on
an intricate process of modifying both config directories or always
being sure to modify and re-install motif whenever any config file in
the X11R5 distribution needs to be changed.

Any suggestions or explications would be gratefully received and
summarized.  I have looked at the FAQ, but this doesn't seem terribly
helpful.  Any general suggestions in dealing with the documentation
suit would also be appreciated.

-- 
Jonathan Abbey                               jonabbey@cs.utexas.edu
the university of texas at austin             --------------------
computer science/math/psychology    -- Oh, my.. life is just so.. you know.. --
From: ddeide@uswnvg.com (Dirk Eide)
Newsgroups: comp.windows.x.motif
Subject: Resize Problem With Motif Form
Date: 18 Nov 92 21:38:44 GMT
Distribution: usa
Organization: US West NewVector, Inc., Bellevue, WA
Originator: ddeide@nv2.uswnvg.com

I currently have a Motif form with a text widget, H slider, V slider,
label widget and cusor. It currently does all it's funtions correctly,
excepting: That when you resize the form, the form stays resized untill
you selection a function that restructures the data in the form and does
a redisplay of the entire form. The form then defaults back to the
intial default size. 
	Any Ideas?
	Dirk Eide
Newsgroups: comp.windows.x.motif
From: isc30078@nusunix1.nus.sg (PHUA KIA CHEK)
Subject: Widgets and Parenting
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 16 Nov 1992 18:28:14 GMT

Hello all,
		I am urgently in need a some database widgets like
		graph widget, table widget, image/graphics widget,
		spreadsheet widget etc.  Can anyone email me/or direct
		me to where I can get them.

		Second (not urgent), is the problem about reparenting.
		How do I reparent a widget?

		eg. bulletinboard dialog with rowcolumn with pushbutton
		how do I reparent the rowcolumn with the pushbutton onto
		a different bulletinboard dialog or another parent?

		Thanks in advance.

PS: Thanks to those who replied me regarding the WidgetID under the
mouse button.

Kia Chek
phuakiac@vms1.iscs.nus.sg
National U. of Singapore
From: snail@lsl.co.uk
Newsgroups: comp.windows.x.motif
Subject: Re: program control of list selections doesn't work
Date: 20 Nov 92 14:57:52 GMT
Organization: Laser-Scan Ltd., Cambridge

In article <1992Nov18.185829.3631@tfs.com>, paigen@tfs.com (David Paigen) writes:
> I have a dialog box that contains a list in extended select mode.
> Whenever the dialog box pops up, I need to initialize the list to
> however it was set the last time.
> 
> To do this, I store the list of items that were selected last time.
> When the dialog is started, I loop through the list and use
> XmListSelectPos for each item that should be selected.  This works
> fine for single, browse, and multiple selection modes, but it does
> not work for extended select mode.  As each item is selected, the
> previous item is unselected.
> 

Have you tried setting XmNselectedItems and XmNselectedItemCount. The former
is a pointer to the start of an array of XmStrings (You should free the array 
and the XmStrings after the call to XtSetValues) which are the strings in the
list you want selected. The latter is the number of strings in the array.
I've never needed to do this, but the manual says both of these items are
settable, so go to it, something like below:- 

static int a_function(Widget	widget_id,
		      char	strings[],
		      int       count);
{
	XmStringTable	array;
	int		i;
	Arg		arglist[2];

	/* allocate space */

	array = (XmStringTable)malloc(sizeof(XmString) * count);
	if (array == NULL)
		return MEMORY_ERROR;

	/* allocate our strings */

	for (i = 0; i < count; i++)
		array[i] = XmStringCreateLtoR(strings[i]);

	/* set the list up */

	XtSetArg(arglist[0], XmNselectedItemCount, count);
	XtSetArg(arglist[1], XmNselectedItems, array);
	XtSetValues(widget_id, arglist, 2);

	/* kill our strings */

	for (i = 0; i < count; i++)
		XmStringFree(array[i]);

	/* tidy up */

	free(array);

	return SUCCESSFUL_COMPLETION;
}

Let me know how you get on.
-- 
snail@lsl.co.uk      

"para-phrasing an American's .sig"....
For the record, I did not vote for Bill Clinton
:-)
From: dlc@gasco.uucp (Darci L. Chapman)
Newsgroups: comp.windows.x.motif
Subject: Re: TextField verification.
Date: 18 Nov 92 00:49:21 GMT
Article-I.D.: gasco.1992Nov18.004921.7805
Reply-To: dlc@gasco.com (Darci L. Chapman)
Organization: Northwest Natural Gas, Portland, OR

In article <1992Nov13.190245.24946@osf.org>, drand@spinner.osf.org (Douglas S. Rand) writes:
> In article <1992Nov12.202548.1766@enea.se>, mla@enea.se (Mats L|fstr|m) writes:
> |> 
> |> I`m trying to create an input form with a number of TextFields (and
> |> labels). My customer wants this application to check the strings
> |> written in the fields immidiatly, i.e. when the users traverses from
> |> one TextField to another, the string in the former skould be checked
> |> and the travsersion canceled if an error is found
> |> 
> |> Somehow, this looks like a not too strange thing to want, does it? I
> |> can't, however, find any way to do it.
> |> 
> 
> How about adding a <FocusOut>: Verify() translation and adding a Verify action
> to be called?  This will get called when the textfield loses focus.
> 

This can be ungainly (depending on your validation requirments) if the
user moves the mouse in/out of a bunch of textfields without entering
data.

What we did (and it's probably not in accordance with the Motif Style
Guide) was add a "<Tab>: Activate()" translation. The upshot is
that <Return> and <Tab> now both do validation and traversal the same
way.

We just didn't want validation with every <FocusOut> event.

>>-Darci->
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
\/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ 
Darci L. Chapman                                  X Window Systems Consultant
Northwest Natural Gas         Portland, Oregon                  dlc@gasco.com 
       "The OCA hates you too"                "Choose Life: Come Out!"
      (I do not speak for the Gas Company, and They don't speak for Me)
Newsgroups: comp.windows.x.motif
From: dharma@rs6419.ecs.rpi.edu (Andreas Budi Dharmawan)
Subject: Public Domain Widgets
Keywords: Customized widgets
Reply-To: dharma@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.
Date: Sun, 22 Nov 1992 19:35:13 GMT

Dear Xwindow fans:

I'm looking for public domain customized widgets. Is there an
ftp site(s) out there that provides customized widgets. The
widgets I have in minds are: dials, speedometer-like widget,
funky alert light, toggle with metal bar, etc.

Could you respond directly to dharma@rpi.edu since I don't
check this newsgroup regularly. 

Thanks a lot in advance

- Andreas Dharmawan -
   dharma@rpi.edu

Newsgroups: comp.windows.x.motif
From: daniel@juliet.osf.org (Daniel Dardailler)
Subject: Re: Refresh of screen...: WRONG SUBJECT
Organization: Open Software Foundation, Motif Team
Distribution: comp
Date: Thu, 19 Nov 1992 18:49:15 GMT

the real subject should have been: How to send bug report to the OSF.

sorry.
Newsgroups: comp.windows.x.motif
From: djs@controls.ccd.harris.com (Dan J. Smith)
Subject: How does a Motif App know if a shell widget is iconified?
Organization: Harris Controls Division
Date: Wed, 18 Nov 1992 00:38:38 GMT


I'm trying to figure out how a motif application can tell if a shell widget
is iconified. I've looked through the O'Reilly books and tried few things 
with no success. Does anyone out there have a solution? 


Thanks in advance.

Dan Smith


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel J. Smith                      Phone: (407) 242-5191
Harris Controls,  Melbourne Fl.	     Email: djs@ccd.harris.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel J. Smith                      Phone: (407) 242-5191
Harris Controls and Composition      Email: djs@ccd.harris.com
Melbourne Fl.
Newsgroups: comp.windows.x.motif
From: mark@fibermux.com (Mark Geeslin)
Subject: Dynamically linked Motif programs consume excessive swap space
Reply-To: mark@fibermux.com (Mark Geeslin)
Organization: Fibermux Corporation
Distribution: na
Date: Sat, 21 Nov 92 02:18:31 GMT


I have recently come to notice that our Motif programs are consuming
excessively large amounts of swap space when linking dynamically on a Sun
SPARCstation using Motif libraries from ICS.

In an attempt to understand this phenomenon, I created a trivial Motif program
consisting of a solitary XmBulletinBoard.  The program does nothing other
than create/manage/realize the widget and call XtAppMainLoop.  I also created
another version of the program using the corresponding OpenLook/OLIT
BulletinBoard widget.  I linked both programs dynamically.

When the programs are executed, swap space consumed by the Motif version is
approximately three (3) times that of the OLIT version (as reported by pstat).
Motif uses 1284k and OLIT uses 456k.  These same amounts are consumed for each
instance of the program running simultaneously.  So, if I have two instances
of the Motif version running, then together they will use 2568k of swap.
Furthermore, if I link the Motif program statically, then it only consumes
296k of swap for each instance.

These numbers are very surprising to me and I was hoping that some kind
and informed soul out there could enlighten me.  First, is Motif really
such a resource pig as to consume 3 times as much virtual memory as
OLIT?  Secondly, what is the point of linking dynamically if the dynamic
version uses 4 times as much memory?  I thought the idea was to reduce
the memory requirements.

I have already discussed this problem with the relevant vendors, but to
no avail.  They are as puzzled as I am.

Some standard answers that can be eliminated up front are:

1) The Motif program uses more space because the shared libraries have
   not yet been loaded, while the OLIT shared libraries are already
   in virtual memory because olwm, etc. is using them.

   No. This does not seem to explain these numbers.  If this answer was
   correct, then I should see a dramatic drop in the space required for
   a second or third instance of the Motif process.  I do not.  Each
   instance consumes the same amount of swap.

2) Shared libraries are only efficient for large programs.  For small
   or trivial programs such as the above example, they do not result
   in any savings.

   No. If this were so, then why does the OLIT dynamically linked program
   use so much less space than the Motif version.


If anyone can offer an explanation or solution to my problem, it would be
greatly appreciated.

Thanks.

Newsgroups: comp.windows.x.motif
From: pwagner@ejv.com (Peter Wagner)
Subject: Need FAQ - File selection box question
Date: Tue, 17 Nov 92 08:39:25 EST
X-Received: by usenet.pa.dec.com; id AA09693; Tue, 17 Nov 92 05:51:09 -0800
X-Received: by inet-gw-2.pa.dec.com; id AA01489; Tue, 17 Nov 92 05:51:04 -0800
X-Received: from forty-two.ejv.com by uu.psi.com (5.65b/4.1.031792-PSI/PSINet)
	id AA22468; Tue, 17 Nov 92 08:41:15 -0500
X-Received: from ejvdev4 by ejv.com (4.1/SMI-4.1)
	id AA12139; Tue, 17 Nov 92 08:40:06 EST
X-Received: from ejvmach59.ejv.com by ejvdev4 (4.1/SMI-4.1)
	id AA29225; Tue, 17 Nov 92 08:39:25 EST
X-To: comp.windows.x.motif.usenet

Could someone please point me to the FAQ?  Thanks.

In case my question is not a FAQ, here it is:

I have eliminated the Directory label & list from the
FileSelectionBox.  However, when I do so, the File label moves to the
left, but the File list stays on the right, not aligning with the File
label.  I'd like both of these widgets to line up on the left with the
other widgets.  How do I make this happen?  There seems to be a resize
callback on the Bulletin Board widget which is thwarting my efforts.
Thanks in advance.

	>p
From: dbrooks@osf.org
Newsgroups: comp.windows.x.motif
Subject: Re: Motif package for Sun
Date: 17 Nov 92 22:49:46 GMT
Distribution: inet
Organization: The Internet

> ml> Any reason why IXI was left off the list?  
> ml> They offer run-time and development Motif licenses in addition to 
> ml> their X.Desktop product. Just a customer and all that.
> 
> 
> We would be quite interested in the answer to that question also.

The list sent out from this office was a mistake; I think it was based on very
old information.  We apologise for any misunderstanding.

OSF's policy continues to be not to endorse or favor any third party products.

We maintain a reference listing of 3rd party Motif software, and we try to
keep it up to date; anyone may add themselves to it.  The last list I saw had
15 vendors for Motif on Sparcs.  For a copy, please call OSF Direct at
(617)621-7300 or

Open Software Foundation
11 Cambridge Center
Cambridge MA 02142

Similar information is in the Motif FAQ, although we do not maintain that.

David Brooks
Systems Engineering
Open Software Foundation
Newsgroups: comp.windows.x.motif
From: taxon@cygnus.eid.anl.gov (Thomas Taxon)
Subject: xview -> motif conversion
Reply-To: taxon@cygnus.eid.anl.gov
Organization: Argonne National Laboratory
Date: Wed, 18 Nov 1992 19:04:08 GMT


  Does anybody know of any package that will convert xview source into motif (or Xt) 
source?  We have an xview program that we need to convert to motif running under DeskView/X on a PC.  Any information would be greatly appreciated.

You can either post to the group or e-mail to me.

	Thanks in advance.
Newsgroups: comp.windows.x.motif
From: daniel@juliet.osf.org (Daniel Dardailler)
Subject: Re: enabling TearOff menu from a resource file ...
Organization: Open Software Foundation, Motif Team
Distribution: inet
Date: Mon, 23 Nov 1992 15:46:19 GMT

 
|> Is it possible to enable TearOff menus from a resource file ?
|> I have tried to put in my .Xdefaults file:
|> 
|> 	MyApp*tearOffModel: XmTEAR_OFF_ENABLED
|> 
|> And it does not work.

There is a converter, but you have to install it by calling
   XmRepTypeInstallTearOffModelConverter ()
at the beginning of your program.

Tear off menus introduce context dependent potential breakage and
we didn't want the end-user to be able to turn them on without
the agreement of the application.


Daniel
Xref: sparky comp.windows.x.motif:7530 comp.unix.programmer:5321 comp.unix.questions:13529 comp.windows.x:19242
From: ioi@pixmap.seas.upenn.edu (Ioi Kim Lam)
Newsgroups: comp.windows.x.motif,comp.unix.programmer,comp.unix.questions,comp.windows.x,g++.help
Subject: C++ Debugger with Motif
Date: Tue, 17 Nov 1992 14:16:28 GMT
Organization: University of Pennsylvania


I am using X11R4 on the SunOS. I am writing Motif programs in C++, using the
GNU compiler g++. Does anyone know how to debug these programs. I tried
gdb-3.2 and gdb-3.5 but they don't seem to understand the C++
function-name convention. Gdb-4.4 gives an segmentation fault with the
Motif program, although it can debug normal C++ programs under Unix. I
tried UPS but it always shows the header file instead of the source file. 

Are there any public-domain X-Debugger available that can support C++?

Please reply to ioi@eniac.seas.upenn.edu

Thank you in advance.
Xref: sparky comp.windows.x.motif:7552 comp.windows.x:19293
From: snail@lsl.co.uk
Newsgroups: comp.windows.x.motif,comp.windows.x
Subject: Re: How does a Motif App know if a shell widget is iconified?
Date: 18 Nov 92 16:10:49 GMT
Organization: Laser-Scan Ltd., Cambridge

In article <1992Nov18.003838.22438@ccd.harris.com>, djs@controls.ccd.harris.com (Dan J. Smith) writes:
> 
> I'm trying to figure out how a motif application can tell if a shell widget
> is iconified. I've looked through the O'Reilly books and tried few things 
> with no success. Does anyone out there have a solution? 

static int _check_wm_state(Display *display,
                           Window  window)
{
unsigned long *property = NULL;
unsigned long nitems;
unsigned long leftover;
Atom          xa_WM_STATE, actual_type;
int           actual_format;
int           status;

#define WM_STATE_ELEMENTS 1

XSync(display, FALSE); /* Ensure everything up to date, not absolutely needed*/

xa_WM_STATE = XInternAtom(display, "WM_STATE", False);
status = XGetWindowProperty(display, window, xa_WM_STATE,
                            0L, WM_STATE_ELEMENTS,
                            &actual_type, &actual_format, &nitems, &leftover,
                            (unsigned char **)&property);
if (!((status == Success) &&
      (actual_type == xa_WM_STATE) &&
      (nitems == WM_STATE_ELEMENTS)))
{
	if (property != NULL)
	{
		XFree((char *)property);
		property = NULL;
	}
}

/* now determine shell state from this info */

if (property == NULL)
	/* unknown */
else if (*((int *)property) == IconicState)
	/* Iconic */
else if (*((int *)property) == NOrmalState)
	/* Normal, visible */
else if (*property == WithdrawnState)
	/* Not visible, not iconic */
else
	/* unknown */

if (property != NULL)
	XFree((char *)property);

---------

Apologies for the formatting, I've had to type this, looking at another window,
our news reader isn't up to much and this editor doesn't understand cut/paste.
But the code is correct, as are the casts (and in places lack of casts). Type
it as it is (for ANSI C). Works on multi platforms here.
-- 
snail@lsl.co.uk      

You Have To Remember, You Need To Believe,
The Time Has Past, Dust In The Leaves.
Newsgroups: comp.windows.x.motif