HDTenEightyP/NetNews huggingface dataset:
From: dany@othello.pencom.com (Dany Guindi)
Newsgroups: comp.windows.x.intrinsics,comp.windows.x,comp.windows.x.motif
Subject: Question: How to get "dynamic" resources?
Date: 11 Jan 93 23:13:37 GMT
Reply-To: dany@pencom.com
Organization: Pencom Software


I need to write a few Motif 1.2. programs which require the 
ability to allow the user to dynamically change resources
(such as the font), and get that resource on the application to
dynamically change.

I realize that I could use resedit to do that, but I want to actually
do it as low-cost as possible (i.e. not add the overhead of resedit).
Has anyone done something like this and can you share your wisdom with 
me?

Thanks in advance,

--dany guindi
-----------------------------
dany@pencom.com		512-343-1111
Pencom Software		Capitol of Texas Hwy Suite 300 Austin,TX 78759
My views are only my views and nothing but my views...
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
From: witr@rwwa.COM (Robert Withrow)
Subject: Re: Attach data to widget *other* than via XmNuserData?
Reply-To: witr@rwwa.com
Organization: R.W. Withrow Associates
Date: Fri, 8 Jan 1993 15:57:44 GMT

In article <1ihvlfINN35k@usenet.pa.dec.com>, klee@wsl.dec.com (Ken Lee) writes:
| |> Arbitrary data of size <= sizeof(XtPointer) can by attached to a widget
| |> through the XmNuserData resource.  Fine.
| |> 
| |> Is there any other facility to attached data to a widget? 
| 
| You can subclass the widget to add more resources.  This is usually
| a better solution than using XmNuserData, since you can type your
| new resources and define resource type coverters.

Or you can attach new resources to a widget by directly using
the resource manager (as is done by Wcl).  Which best depends on your
application.

-- 
 Robert Withrow, Tel: +1 617 598 4480, Fax: +1 617 598 4430, Net: witr@rwwa.COM
 R.W. Withrow Associates, 21 Railroad Ave, Swampscott MA 01907-1821 USA
Newsgroups: comp.windows.x.intrinsics
From: jpf@uuhelio.uucp (Jeff Francis)
Subject: Re: Book on Athena widget set
Organization: HelioCentric Software
Date: Sat, 9 Jan 1993 20:09:15 GMT

>to me.  I noticed a book in a Books in Print reference cat. by McCormack
>published by Silicon Press called "X toolkit and Athena widgets" or 

This, methinks, is just a printed and bound version of two MIT
documents that come with the R4 and R5 distribution.  If you can get
the MIT distribution you can just lpr the stuff yourself.  The "Athena
Widgets" documentation is worth printing and reading if that's your
widget set.  It is not a tutorial nor manpages but more like something
in between.

The "Standard Edition" of Volume 4 in the O'Reilly X Window System
series uses the Athena widgets to introduce Xt.

"X Window System Toolkit" by Asente and Swick.  Part I of this book is
a tutorial for both application developers and widget developers (each
chapter is split in half to cover each topic from each perspective).
Part II of the book is the Xt spec (basically the same as the "X
toolkit" part of the Silicon Press book).  Part I develops a small
demonstration widget set.

-- 
Jeff Francis, HelioCentric Software, uunet!uuhelio!jpf, (515) 232-1300
From: fajner@frlv.bull.fr (Alain.Fajner)
Newsgroups: comp.windows.x.intrinsics
Subject: Tree Widget Needed ...
Date: 4 Jan 93 18:21:50 GMT
Distribution: comp
Organization: Cediag Bull S.A., Louveciennes, France


Hi !

I'm searching for the source code of a Tree Widget.
As I don't have ftp access, could someone be kind enough to email it
to me.

Thanks in advance.

Alain.

--
                                                              ,,,
                                                             (o o)          
=========================================================oOO==(_)==OOo=====
| Alain FAJNER                  |  EMail :  A.Fajner@frlv.bull.fr         |
| BULL DSII/CEDIAG PC 3B6       |                                         |
| 68, Route de Versailles       |    Tel : (33 1) 39 02 45 80             |
| F-78430 Louveciennes FRANCE   |    Fax : (33 1) 39 02 47 95		  |
|_________________________________________________________________________|
| Everything I'm saying, writing and typing is my personal opinion !!!    |
+_________________________________________________________________________+
                                                          (__)   (__)
Newsgroups: comp.windows.x.intrinsics
From: wieck@jwminhh.hanse.de (Jan Wieck)
Subject: Re: Tree Widget Needed ...
Organization: Private Site under Mach386
X-Newsreader: Tin 1.1 PL4
Distribution: comp
Date: Thu, 7 Jan 1993 01:06:13 GMT

fajner@frlv.bull.fr (Alain.Fajner) writes:
:
: Hi !
:
: I'm searching for the source code of a Tree Widget.
: As I don't have ftp access, could someone be kind enough to email it
: to me.

        Maybe I'm a 'bit stupid, but what is a Tree Widget?  I've
        never  seen  something  like that. Could somebody exactly
        specify the Name, Synopsis, Class Hierarchy, Description,
        Constraints,  Programmatic Interface and the Transactions
        and Actions? 

	Or  should  it  randomly  generate green leaf's and brown
	lines in a core-Widget?


Until later, Jan

-- 
# Any language keeps its own misunderstandings; #
# why shouldn't programming languages do?       #
#                                               #
#            wieck@jwminhh.hanse.de (Jan Wieck) #
Newsgroups: comp.windows.x.intrinsics
From: vprasad@cs.ulowell.edu (V G Prasad)
Subject: Creating a shell widget other than defult depth ..
Keywords: Shell ,Depth
Organization: University of Massachusetts at Lowell Computer Science
Date: Wed, 6 Jan 1993 17:43:03 GMT

Hi,
Is it possible to open a shell widget to have a depth other
than the default depth ??.
In FAQ Q7 it is mentioned that the shell gets Defaultdepthofscreen
if it is an applicationShellWidgetClass.
Any help is welcome.
Thanks.
vgp


-- 
V G Prasad 
University of Massachusetts.Lowell
vprasad@cs.ulowell.edu
From: slh@gibdo.engr.washington.edu
Newsgroups: comp.windows.x.intrinsics
Subject: Re: X-fiendly sleep?
Date: 4 Jan 93 10:11:49 GMT
Article-I.D.: gibdo.1993Jan04.100557.24254
Organization: N.O.N.E.
NNTP-Posting-Host: gibdo.engr.washington.edu

In article <1992Dec27.055353.7343@athena.mit.edu> ed.duomo@lambada.oit.unc.edu writes:
[...]
>What I want is a funtion that when called from a certain location of
>the program with an argument of say 2 seconds, does not return from
>that location until 2 seconds have passed, but in contrast to
>sleep(2), those two seconds should not be spent idle, but in
>XtAppMainLoop so that events could be properly handled during that
>time. 
>
	XtAppAddTimeout() will do most of what you want,
	but it won't put you back where you called it;
	you'd have to create a callback and put the code you
	wanted after the time-out there.
	you could probably do what you want with a secondary main loop and
	xt timers or checking time points in the secondary main loop.
Newsgroups: comp.windows.x.intrinsics
From: rmbult01@starbase.spd.louisville.edu (Robert M. Bultman)
Subject: Problem using viewport widget
Summary: Bars obscure child widget
Date: Mon, 11 Jan 1993 03:08:53 GMT
Organization: University of Louisville
Keywords: Viewport widget

I am having difficulty using a Viewport widget.  The bars partially obscure
the child widget of the Viewport.  I have a form widget as the sole child of 
the Viewport widget with many asciiText widgets as children of the form
widget.  Even when the sliders are moved to their extremes, the children
are partially obscurred.  I have useBottom, useRight, and forceBars set
to True.  Any hints or solutions would be greatly appreciated.  Many thanks.

-Rob
-- 
Robert M. Bultman                              |
Speed Scientific School                        |
University of Louisville                       |
Internet: rmbult01@starbase.spd.louisville.edu |
Newsgroups: comp.windows.x.intrinsics
From: per@erix.ericsson.se (Per Hedeland)
Subject: Re: Attach data to widget *other* than via XmNuserData?
Nntp-Posting-User: per
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
Date: Fri, 8 Jan 1993 14:20:00 GMT

In article <3998@creatures.cs.vt.edu>, ramakris@csgrad.cs.vt.edu (S.Ramakrishnan) writes:
|> In article <1993Jan7.180147.13806@cfmu.eurocontrol.be> phil@cfmu.eurocontrol.be (Phil Day) writes:
|>   >If you don't mind going down a level to Xlib, then have a look
|>   >at the Context Manager routines:
|>   >
|>   >	XDeleteContext
|>   >	XFindContext
|>   >	XSaveContext
|>   >	XUniqueContext
|>   >
|>   >which allow you to associated untyped data with a window (on the client side)
|> 
|> On the client side ? You mean not in the server ?
|>  
|>    [...storing/retrieving userdata using Xlib functions...]
|>   
|> 
|> Comments:
|> 
|>   1. Since the X*Context() functions require the (Display *) _and_
|>      (Window) arguments, I think the user's data is stored with the
|>      server just as properties are.

No need to think:-), the Xlib (R5) manual says: "Note that this is local
to your program; the data is not stored in the server on a property list."
Perhaps the leading comment from the code describes it best:

/* This module implements a simple sparse array.

   XSaveContext(a,b,c,d) will store d in position (a,b,c) of the array.
   XFindContext(a,b,c,&d) will set d to be the value in position (a,b,c).
   XDeleteContext(a,b,c) will delete the entry in (a,b,c).

   a is a display id, b is a resource id, and c is a Context.  d is just an
   XPointer.  This code will work with any range of parameters, but is geared
   to be most efficient with very few (one or two) different a's.

*/

--Per Hedeland
per@erix.ericsson.se  or
per%erix.ericsson.se@sunic.sunet.se  or
...uunet!erix.ericsson.se!per
Newsgroups: comp.windows.x.intrinsics
From: as@chopper.b11.ingr.com (Anirudha Sahoo)
Subject: Validity of having two event loops in Xt
Organization: Intergraph Corp. Huntsville, AL
Date: Tue, 5 Jan 1993 15:10:25 GMT


  My last posting was garbled, that's why I am posting it again.

   I have a xclient that uses Xt. It has two event (infinite) loops. One is in 
the main routine and the other is in the Callback routine. I think it's 
definitely a bad programming style, but is it *allowed* by X standard? I am not 
very much familiar with Xt programming.
    Let me briefly explain what the application does. It Initializes Toolkit.
Creates a command widget. Then registers a callback routine. Then realizes the
toplevel shell. Then it has a infinite event loop. (That was the main routine).
In the callback routine, it creates a popup shell. Then it maps it through a 
call to XtPopup(). Then it has a infinite event loop.

  So is it *legal* to have two event loops, one in main function and other in 
the callback routine. This application core dumps inside Xt after couple of 
click on the pop up widget.

Newsgroups: comp.windows.x.intrinsics
From: cs911046@ariel.yorku.ca (PETER E REISSNER)
Subject: Book on Athena widget set
Organization: York University, Toronto, Canada
Date: Sat, 9 Jan 1993 01:41:56 GMT

I am looking and looking and looking for a book to help me learn how
to program with the Athena widget set.  All I seem to find is stuff
which has source code listings which require OpenLook, Motif or HP's
X widgets (Xw).  
At school we have Athena widgets on X11R5 (the .../Xaw/*.h files),
and there are reference manuals somewhere, but I need something that acts
as a tutorial because I can't fit any school courses into my schedule
that would teach it.  I have a book by Douglas Young, but that's no good
to me.  I noticed a book in a Books in Print reference cat. by McCormack
published by Silicon Press called "X toolkit and Athena widgets" or 
something close to that.  I'd like to know if anyone has it and could
comment on it.  If it's good, then I'll order it.

My main problem seems to be that I have no idea how to convert programs
for the HP X widget set using Xw headers to programs using Athena widgets.
The HP X widgets need the Xw.h header file, and the motif widgets need
the Xm.h header file.  BUT, Athena doesn't have any Xaw.h header file.
What do I do?  How can I try to convert these programs to athena?
Will the book I mentioned do me good?  Any other suggestions?

Thanks,
Peter Reissner
cs911046@ariel.yorku.ca
Newsgroups: comp.windows.x.intrinsics
From: riehm@struppi.medizin.uni-ulm.de (Thomas Riehm)
Subject: Focus in Athena Text Widgets?
Organization: University of Ulm, Departement of Anaesthesia
Date: Thu, 7 Jan 1993 13:01:39 GMT

Hi Folks!

I have a Problem working with X11R5, Athena Widgets. I have two one-lined
AsciiText-widgets (one-lined by giving <Key>Return the no-op()-action)
in a larger Form widget containing several other Widgets. By default,
all the Key Events that happen within the Form Widget (i.e. the only
child of my shell) should be passed to one of the two AsciiText-Widgets,
for processing them. I'm actually doing this with an AcceleratorTable,
but I have to define each single action, as "<Key>Left: backward-character()"
and so on. But it's quite a lot of work to put all of the Athena TextWidget-
Event bindings in an AcceleratorTable by hand. Isn't there an easier, better
way to do this?

Another problem is, that I want to change the focus to the other Text-Widget
when the User either presses "Tab" or clicks into the other Widget. 
Any ideas welcome!

(Please reply by mail)

                  Yours,
                       Thomas

-------------------------------------------------------------------------------- 
My address in life: Thomas Riehm, Gaensackerweg 96, 7915 Thalfingen, Germany 
My internet address:     riehm@medizin.uni-ulm.de 
-------------------------------------------------------------------------------- 
Xref: sparky comp.windows.x.intrinsics:730 comp.windows.x.motif:8424
From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
Subject: Re: Attach data to widget *other* than via XmNuserData?
Date: 8 Jan 93 05:35:48 GMT
Followup-To: comp.windows.x.intrinsics
Organization: VPI&SU Computer Science Department, Blacksburg, VA

In article <1993Jan7.180147.13806@cfmu.eurocontrol.be> phil@cfmu.eurocontrol.be (Phil Day) writes:
  >If you don't mind going down a level to Xlib, then have a look
  >at the Context Manager routines:
  >
  >	XDeleteContext
  >	XFindContext
  >	XSaveContext
  >	XUniqueContext
  >
  >which allow you to associated untyped data with a window (on the client side)

On the client side ? You mean not in the server ?
 
   [...storing/retrieving userdata using Xlib functions...]
  

Comments:

  1. Since the X*Context() functions require the (Display *) _and_
     (Window) arguments, I think the user's data is stored with the
     server just as properties are. If that's the case, every
     fetch/retrieve wil be a roundtrip request to server.
     If the server is on a congested network, the program will suffer.

     Unless the user data is meant to be shared with other processes
     sharing the display/window, why should the data be stored with the
     server ? Why the overheadd ?
     
  >(NB: Your widgets must be realized before using these routines !)

  2. A widget may be realized; it may still not have a window (slow
     network, moody window manager, etc). You must then install 
     an XmNexposeCallback or XmNmapCallback as appropriate
     to make sure.

 If the user data is private to the program, why not keep it within
 the program ? You can simply store the address of any complicate 
 structure as XmNuserData.

---
S Ramakrishnan, CS Dept, McBryde Hall, VaTech
Newsgroups: comp.windows.x.intrinsics
From: zjmw36@trc.amoco.com (Joe M. Wade)
Subject: Re: setting resources causing crash!!
Organization: Amoco Production Company, Tulsa Research
X-Checksum-Snefru: 38fede04 c3b24b48 6a2427bd 277f7697
Date: Tue, 5 Jan 1993 15:00:45 GMT

In article <7391@tivoli.UUCP> taylor@foraker.NoSubdomain.NoDomain (Eric Taylor) writes:
>In article <1992Dec31.152754.27251@atinc.uucp>, root@atinc.uucp (Operator) writes:
>|> I have created a custom widget which has many resources.  I have noticed recently that when setting resources with XtSetArg before calling XtCreateWidget, that the application core dumps in the XtCreateWidget call.  I don't know if its a certain order whe|> n setting the resources, and if its the number of resources set, but dbx definitely traces the problem in XtCreateWidget(). Actually _XtCreateWidget, which is called by XtCreateWidget(), with a seg violation at the top of memory.
>|> 
>|> Using XtSetValues seems to work fine.
>|> 
>|> Can anyone shed some light on this for me. I'm wondering if I have a resource conflict.  I am thinking that the problem exists when looking at the resource list passed down from the application.  My widget code is not called yet, so the resource list migh|> t be clobbering something, maybe.  Help before I tracethrought the Intrinsics with the debugger.
>
Please, oh please, use new-line characters in your posts.....
>
>Some debuggers are not smart enough to tell you where
>you really are (accurately) when you have gone through a function
>pointer.  You might be inside your Initialize procedure
>and not know it.
>
>I would recommend putting "printf"'s in your Initialize procedure.
>
One note here, printf's are generally buffered. I've had better
luck using fprintf's to stderr to avoid this. Using the debuggers
generally work ok for me even using function pointers. Since the 
application mentioned is using the Intrinsics, I would recommend
putting -synchronous on the command line to more accurately keep 
track of your location within the debugger.
>


-- 
* Joe M. Wade (jwade@trc.amoco.com)    *  - "programmer without a cause"  *
* Amoco Research Center                * growth sucks. stop making babies.*
* 4502 E. 41st St.  Tulsa, OK  74102   *           - Oliver Wendell Jones *
* (918) 660-4387                       *            dyffff ??             *
Newsgroups: comp.windows.x.intrinsics
From: rjkoop@sebastian.carleton.ca (rjkoop)
Subject: Looking for fax toolkit.
Organization: Carleton University, Ottawa, Canada
Date: Sat, 9 Jan 1993 15:09:44 GMT

I'm looking for an Xlib/Motif toolkit for read/write/printing/displaying
fax images (group 3 and group 4) for the RS/6000 platform.  Any ideas?
Xref: sparky comp.windows.x.intrinsics:722 comp.windows.x.motif:8393
From: snail@lsl.co.uk
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
Subject: Re: Attach data to widget *other* than via XmNuserData?
Date: 7 Jan 93 11:58:08 GMT
Organization: Laser-Scan Ltd., Cambridge

In article <BUZZ.93Jan6164723@lion.bear.com>, buzz@bear.com (Buzz Moschetti) writes:
> Arbitrary data of size <= sizeof(XtPointer) can by attached to a widget
> through the XmNuserData resource.  Fine.

Arbitary data of any size can be attached to a widget via XmNuserData, as
follows:-

	MY_BIG_STRUCT_PTR	sp;
        Arg			arglist[1];

	sp = (MY_BIG_STRUCT_PTR)malloc(sizeof(struct _my_big_struct));
	if (sp == NULL)
	{
		/* oh damn! out of memory */
		return SOME_MEMORY_ERROR;
	}

	/* fill in my big struct with data */
	
	.....

	/* tell the widget about it	*/

	XtSetArg(arglist[0], XmNuserData, sp);
	XtSetValues(widget, arglist, 1);

	return OK_ALL_DONE;

Now whenever I want to get at the data, just extract the pointer from the
widget and cast it to MY_BIG_STRUCT_PTR and then use it. No problem!

> 
> Is there any other facility to attached data to a widget?  For example,
> in XView, there is the XV_KEY_DATA resource as well as PANEL_CLIENT_DATA.
> PANEL_CLIENT_DATA works just like XmNuserData:
> 
> 	My_Data thing;
> 	xv_set(xview_obj, PANEL_CLIENT_DATA, &thing, NULL);
> 
> but XV_KEY_DATA permits you attach an unlimited (sort of) number of
> datums, each addressed through a keyval:
> 
> 	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);
> 
> keyval is of type unsigned long and can be hardcoded or generated 
> at runtime through xv_unique_key():
> 
> 	keyval = xv_unique_key();
> 
> 	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);
> 	thing *p = (thing *) xv_get(xview_obj, XV_KEY_DATA, keyval);
> 
> Any clues?

Using the example just given, you could hold a binary tree object or list
object or stack object in the MY_BIG_STRUCT and write a few simple routines to
do the XView type stuff for you. It's not hard. If you've got a decnt size
application you should have some objects around that handle list/stacks/queues
etc. Objects doesn't mean C++ either, we don't use C++, just C.
-- 
snail@lsl.co.uk      

"Washing one's hands of the conflict between the powerful and the powerless
 means to side with the powerful, not to be Neutral."
                                                     Quote by Freire.
                                                     Poster by OXFAM.
Xref: sparky comp.windows.x.intrinsics:727 comp.windows.x.motif:8413
From: klee@wsl.dec.com (Ken Lee)
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
Subject: Re: Attach data to widget *other* than via XmNuserData?
Date: 7 Jan 1993 19:18:07 GMT
Organization: DEC Western Software Laboratory
Distribution: world
Reply-To: klee@wsl.dec.com
NNTP-Posting-Host: alhambra.pa.dec.com

|> Arbitrary data of size <= sizeof(XtPointer) can by attached to a widget
|> through the XmNuserData resource.  Fine.
|> 
|> Is there any other facility to attached data to a widget? 

You can subclass the widget to add more resources.  This is usually
a better solution than using XmNuserData, since you can type your
new resources and define resource type coverters.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
From: per@erix.ericsson.se (Per Hedeland)
Subject: Re: Attach data to widget *other* than via XmNuserData?
Nntp-Posting-User: per
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
Date: Thu, 7 Jan 1993 14:33:23 GMT

In article <BUZZ.93Jan6164723@lion.bear.com>, buzz@bear.com (Buzz Moschetti) writes:
|> Arbitrary data of size <= sizeof(XtPointer) can by attached to a widget
|> through the XmNuserData resource.  Fine.
|> 
|> Is there any other facility to attached data to a widget?  For example,
|> in XView, there is the XV_KEY_DATA resource as well as PANEL_CLIENT_DATA.
|> PANEL_CLIENT_DATA works just like XmNuserData:
|> 
|> 	My_Data thing;
|> 	xv_set(xview_obj, PANEL_CLIENT_DATA, &thing, NULL);
|> 
|> but XV_KEY_DATA permits you attach an unlimited (sort of) number of
|> datums, each addressed through a keyval:
|> 
|> 	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);
|> 
|> keyval is of type unsigned long and can be hardcoded or generated 
|> at runtime through xv_unique_key():
|> 
|> 	keyval = xv_unique_key();
|> 
|> 	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);
|> 	thing *p = (thing *) xv_get(xview_obj, XV_KEY_DATA, keyval);
|> 
|> Any clues?

You might want to look into the Context Manager (Xlib functions
XSaveContext(), XFindContext(), XDeleteContext(), XUniqueContext()),
which provides functionality that appears to be very similar to the
above. The Xlib manual claims you need an X resource ID, but e.g. a
Widget ID apparently works too, provided you stick with one or the
other.

--Per Hedeland
per@erix.ericsson.se  or
per%erix.ericsson.se@sunic.sunet.se  or
...uunet!erix.ericsson.se!per

Newsgroups: comp.windows.x.intrinsics