[comp.windows.x] toolkit

bil@WHEATIES.AI.MIT.EDU (Bill Rockenbeck) (12/08/87)

We are trying to write some simple X11 programs on a Sun 3 using the
version of the toolkit distributed in the XV11R1 tape. We have found
that the toolkit is fairly buggy, and have not had much luck getting
anything more complicated than a label to work.

We have two questions: 

1) Has anyone else had better luck using the toolkit on a Sun? Perhaps
there is some set of bug fixes we could apply to the raw version off
the tape to make it work better?

2) Are there any complex toolkit programs that are known to work on a
Sun that we could examine?

haynes@DECWRL.DEC.COM (12/08/87)

The previous version of the toolkit was not (or minimally) tested on suns.

Now that we have a sun available to us, the next release should be better.

	-- Charles

lfl@cs.odu.edu (Lianfang Liu) (11/16/89)

Does anybody know:

Why is there no standard toolkit for x window ?

How to chang the string value of asciiStringWidget ? I use X Toolkit Athena 
Widgets. I tried 'XtSetValue' and to modify XtNstring. They did not work.
There is not 'XtTextReplace' in this Toolkit.

I tried to use Button1MotionMask,Button2MotionMask or Button3MotionMask. I
do not know why they do not work. Only ButtonMotionMask works.

Thanks in advance.

Lianfang Liu
lfl@cs.odu.edu

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (11/17/89)

> Why is there no standard toolkit for x window ?

There is a standard set of Toolkit Intrinsics, but no standard widget set.  This
is because one of the things that has make X so big is that we provide
"Mechanism not Policy".   Once you get up to the widget layer you have to 
provide policy.  This is where the X Consortium disagrees on what is "right" and
thus there is no standard.  I don't expect one anytime soon.

> How to chang the string value of asciiStringWidget ? I use X Toolkit Athena 
> Widgets. I tried 'XtSetValue' and to modify XtNstring. They did not work.
> There is not 'XtTextReplace' in this Toolkit.

No XtTextReplace?  It is provided with the Text widget in the Athena Widget set,
which widget set are you using?

> I tried to use Button1MotionMask,Button2MotionMask or Button3MotionMask. I
> do not know why they do not work. Only ButtonMotionMask works.

Where are you doing this?  In the translation table the correct value is
Btn1Motion.  If you are working directly in Xlib then you need to check the 
event detail on every motion event.  There are only so many masks in a "long"
and having one for each mouse button is a bit excessive.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213

gustav@arp.anu.oz.au (Zdzislaw Meglicki) (11/21/89)

From article <10431@xanth.cs.odu.edu>, by lfl@cs.odu.edu (Lianfang Liu):
> 
> Does anybody know:
> Why is there no standard toolkit for x window ?
> 
As far as I know libXt, libXaw, and libXmu yield a standard toolkit for X.
Although many vendors may want to _push_ theirs, and may try not to include
Athena widgets in their distribution, you can always get Athena Widgets from 
expo.lcs.mit.edu via ftp anonymous.

> How to change the string value of asciiStringWidget ? I use X Toolkit Athena 
> Widgets. I tried 'XtSetValue' and to modify XtNstring. They did not work.
> There is not 'XtTextReplace' in this Toolkit.
This is an example illustrating how you can do what you want with Athena
Widgets (incidentally - XtTextReplace is available with Athena Widgets).

#include <X11/Intrinsic.h>
#include <X11/AsciiText.h>

...
	char			*a_string
	Widget			global_magic_output, main_pane;
	Arg			text_args [30];
	int			i;
	static XtTextBlock	text_block;
	static XtTextPosition	old_length, total_length, length;
...
	XtSetArg (text_args [i], XtNeditType, (XtArgVal) XttextEdit);
	i++;
...
	global_magic_output = XtCreateManagedWidget ("magic_output",
				asciiStringWidgetClass, main_pane, text_args,
				i);
	XtTextEnableRedisplay (global_magic_output);

...
	text_block.firstPos = (int) old_length;
	text_block.length = (int) length;
	text_block.ptr = a_string;
	text_block.format = FMT8BIT;
	XtTextReplace (global_magic_output, old_length, total_length,
		&text_block);
	XtTextSetInsertionPoint (global_magic_output, total_length);

Hope it'll help

	Gustav Meglicki,
	Automated Reasoning Project,
	The Research School of Social Sciences,
	The Australian National University,
	GPO Box 4, Canberra, ACT 2601, Australia
	inet: gustav@arp.anu.oz.au

graham@fuel.dec.com (kris graham) (11/28/89)

> From article <10431@xanth.cs.odu.edu>, by lfl@cs.odu.edu (Lianfang Liu):
> > 
> > Does anybody know:

> > Why is there no standard toolkit for x window ?
> > 
> As far as I know libXt, libXaw, and libXmu yield a standard toolkit for X.
> Although many vendors may want to _push_ theirs, and may try not to include
> Athena widgets in their distribution, you can always get Athena Widgets from 
> expo.lcs.mit.edu via ftp anonymous.

This discussion has the potential for a big 'rathole' ;^)
I thought ' libXt, libXaw, and libXmu '  were *only* reference
implementations?!
We have been told several times that X  (at least, for today) provides
'mechanism'
*not* 'policy'.   Some customers require specialized widget sets to
accomplish some
mission critical tasks that are not provided by the MIT widgets.  It is
at this point
that vendors can offer support and much needed flexibility.  Not every
user wants
to become a self-annointed widget writing guru! 

BTW:  I agree that vendors should make the sources to their widgets available.
           There are many users willing to pay moderate prices for good
products.

Christopher Graham          
Digital Equipment Corp            
Ultrix Resource Center                                           
New York City

marbru@auto-trol.UUCP (Martin Brunecky) (11/29/89)

In article <1532@riscy.dec.com> graham@fuel.dec.com (kris graham) writes:
>
>> From article <10431@xanth.cs.odu.edu>, by lfl@cs.odu.edu (Lianfang Liu):
>> > Does anybody know:
>> > Why is there no standard toolkit for x window ?
>
>This discussion has the potential for a big 'rathole' ;^)

....
Most of us simply assume that the "standard" will be Xt Intrinsics based,
be it Xaw, Motif, Xt-OpenLook ...

There are many things that make a product the REAL, SUCCESSFULL standard,
and I don't want to list them all here...

One potential problem I see with Xt Intrinsics based "standard" is that it is
specified/implemented by a widget set. However, ANY widget set will NOT
cover everyone's needs. Thus, people will have to be able to SUBCLASS of
one or other member of the "standard" widget set hierarchy. And here is
the problem:
 - you need source to be able to subclass (at least xxxP.h files)
 - the "standard" widget set members MUST NOT make assumptions about other
   widgets in the set, since otherwise they are "closed".

Currently, Xaw provides source availability, and does NOT make (too many)
assumptions about other widgets. Hoewer, it's functionality is kind-of
limited, so I doubt it can make it as the "standard".

Motif offers source (if you can justify $1000) However, Motif widget set
is tied together by zilions of assumptions about widget set members, making
any additions to Motif quite difficult. And once you have to modify the
"standard" Motif widgets to cooperate with your add-on one, where is
the standard ?

DECwindows XUI lost the battle by being "private". Plus, many of the 
problematic "features" of Motif (such as tight coupling of widget set,
hidden shells etc.) have their roots in XUI.

I can not comment on the Xt Open Look - I have troubles to justify $$$$
to see the code. May be one day....

So for now, even though I wish there was a single standard for the toolkit,
I don't see the light at the end of the tunnel. I wished Motif was "IT",
but, as I said, it has some "features" that prevent me to believe it will
"make it".
-- 
###############################################################################
Martin Brunecky, Auto-trol Technology Corporation,
12500 North Washington Street, Denver, CO-80241-2404
(303) 252-2499                                        ncar!ico!auto-trol!marbru