[comp.windows.x] XView Toolkit

mago@delphi.it (Giovanni Beani) (06/18/91)

Hi netters, my questions are:
1) "On what platforms (SunOS, SCO, VMS, etc. etc.) the XView toolkit
is present at moment?"
2) "What about differences (for a programmer view) between Motif and XView?"

Thanks in advance,
        Giovanni
-----
Giovanni Beani            EMail: gbeani@delphi.it

klee@wsl.dec.com (Ken Lee) (06/19/91)

In article <9106180734.AA04888@delphi.uucp>, mago@delphi.it (Giovanni Beani) writes:
|> 2) "What about differences (for a programmer view) between Motif and XView?"

There are lots of little differences.  The most important one is that
Motif uses the standard X Toolkit intrinsics library and XView uses a
proprietary intrinsics library.  The X Toolkit intrinsics are
documented by MIT and in many other books and tutorials.  The XView
intrinsics are, as far as I know, documented in only one O'Reilly
book.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

jarober@aplcen.apl.jhu.edu (DE Robertson james an 740-9172) (06/19/91)

klee@wsl.dec.com (Ken Lee) writes:

>In article <9106180734.AA04888@delphi.uucp>, mago@delphi.it (Giovanni Beani) writes:
>|> 2) "What about differences (for a programmer view) between Motif and XView?"

>There are lots of little differences.  The most important one is that
>Motif uses the standard X Toolkit intrinsics library and XView uses a
>proprietary intrinsics library.  The X Toolkit intrinsics are
>documented by MIT and in many other books and tutorials.  The XView
>intrinsics are, as far as I know, documented in only one O'Reilly
>book.

Not exactly. Xview is built directly on top of the Xlib libraries. The 
Xview toolkit is available in source form on the MIT tape (contrib side)
along with olwm. The Xview toolkit is quite a bit easier to learn than is
the Motif toolkit (or the Athena Widgets or OLIT for that matter). Xview
is not built on a proprietary intrinsics library, just without the Xt libs.


jarober@aplcen.apl.jhu.edu

cwy@bksmel.oz.au (Chris Young) (06/20/91)

Reply-To:cwy@bksmel.UUCP (Chris Young)

In article <1991Jun19.052126.9204@aplcen.apl.jhu.edu> jarober@aplcen.apl.jhu.edu (DE Robertson james an 740-9172) writes:
> Not exactly. Xview is built directly on top of the Xlib libraries. The 
> Xview toolkit is available in source form on the MIT tape (contrib side)
> along with olwm. The Xview toolkit is quite a bit easier to learn than is
> the Motif toolkit (or the Athena Widgets or OLIT for that matter). Xview
> is not built on a proprietary intrinsics library, just without the Xt libs.

Well yes, you are techically correct. Xview uses Xlib and is not actually
proprietary.

Nevertheless, not using Xt means that MANY of the things we take for 
granted in the X world do not work properly - files tend to appear in
bizarre places, resource files don't work right , etc.

Also, I STRONGLY disagree that Xview is easier to use than Motif ...
you obviously have done more Xview - I find it the other way around as
I have done more Motif. You should be more carefull making sweeping
statements on the net unless you are asking to be flamed !

Personally, I just wish the inconsiderate sods out there would come to an
agreement on a "look & feel" standard. These virtual toolkits with half
a dozen different modes are fabulous products but REALLY !

Chris Young,
BKX Australia.
_______________________________________________________________________
Leave reality out of this,
I'm enjoying my fantasy just fine.

fischer@iesd.auc.dk (Lars P. Fischer) (06/21/91)

>>>>> On 18 Jun 91 07:34:06 GMT, mago@delphi.it (Giovanni Beani) said:

Giovanni> 1) "On what platforms (SunOS, SCO, VMS, etc. etc.) the XView toolkit
Giovanni> is present at moment?"

Sun-3/SunOS, SPARC/SunOS is available from MIT.
IBM/AIX, DEC/Ultrix, HP/HPUX is available from Unipress (see add in
UnixWorld, June '91, p.97).
Quaterdeck claims to have a PC/DESQview version "real soon now".
I've heard of a Mac/AUX port, but I can't remember by whom.
Can't remember hearing of a SCO port, offhand.

Giovanni> 2) "What about differences (for a programmer view) between
Giovanni> Motif and XView?"

OSF/MOTIF is based on the X Toolkit Intrinsics, while XView uses a
completely different API. The XView API is modeled on the SunView API,
making the transition easier for Sun programmers.

In my view, the XView API is nicer to work with. It's much simpler for
beginners to learn, and you quickly get up to speed. It has some nice
layout facilities for panels, and in general provides some nice
abstractions. It's callback method is both simple and powerful.

The XView API is mature, having existed in various forms on Sun
platforms for years. It's not exactly elegant, but in daily use it's
a very practical tool. It shows it's age in places. The models is
kind-of object oriented, and you *can* create subclasses, but to do so
you have to take quite a leap. You can't really blame XView here --
doing OO without language support isn't my kind of fun, an Intrinsic
based toolkits are no better in this respect. (A good C++ toolkit
or a C++-encapsulation of XView would help here).

I've done some major (commercial) projects with XView, and I have
taught it with quite a bit of success. I like it. 

Oh, and Dan Hellers book on XView (vol. 7 in the ORA series) is really
very good for learning how to use XView. Also, the GUIDE user
interface editor (available for Sun's for $200) is really handy for
prototyping things and for learning how to put things together.
Looking through the code generated by GUIDE is often a very good way
to pick up the right approach for handling a job.

/Lars
--
Lars Fischer,  fischer@iesd.auc.dk   | It takes an uncommon mind to think of
CS Dept., Univ. of Aalborg, DENMARK. | these things.  -- Calvin

fischer@iesd.auc.dk (Lars P. Fischer) (06/21/91)

>>>>> On 18 Jun 91 23:13:15 GMT, klee@wsl.dec.com (Ken Lee) said:

>>>>> mago@delphi.it (Giovanni Beani) writes:

Giovanni> 2) "What about differences (for a programmer view) between
Giovanni> Motif and XView?"

Ken> There are lots of little differences.  The most important one is that
Ken> Motif uses the standard X Toolkit intrinsics library and XView uses a
Ken> proprietary intrinsics library.

"proprietary" is a bit misleading here. The XView API is *different*
from the one used by Intrinsics based toolkits, but it's not
proprietary.You can implement this API in any way you wish, for any
platform or OS. XView itself is freely available from MIT. Sadly, the
free version really works only on Suns, but there's nothing to prevent
you from porting it. Even the fonts used are freely available.

Ken> The X Toolkit intrinsics are documented by MIT and in many other
Ken> books and tutorials.  The XView intrinsics are, as far as I know,
Ken> documented in only one O'Reilly book.

True, but then, how many books do you need? The XView API is really
very simple and easy to learn, and the O'Reilly volume does a good
job.

The Intrinsics based toolkits have one thing in their favor, though.
Converting from one Intrinsics based toolkits to another is
(theoretically) simple, while converting from XView to, say, OSF/MOTIF
is a bigger job. If you plan to much conversion of this kind, take a
look at OLIT for OPEN LOOK. Be warned, though, that you will have to
think of conversions in advance, i.e. select layouts and features
available in both OSF/MOTIF and OPEN LOOK, or else you'll wind up
rewriting large parts of the UI anyhow.

/Lars
--
Lars Fischer,  fischer@iesd.auc.dk   | It takes an uncommon mind to think of
CS Dept., Univ. of Aalborg, DENMARK. | these things.  -- Calvin

guy@auspex.auspex.com (Guy Harris) (06/21/91)

>The Xview toolkit is available in source form on the MIT tape (contrib side)
>along with olwm.

But you probably don't want the version that came out with the original
MIT tape; that's XView 1.0, which, I think, came with Open Windows 1.0. 
You probably want the version currently on "export.lcs.mit.edu" and
other X archives, which is XView 2.0 and is what comes with OW 2.0.

mwette@csi.jpl.nasa.gov (Matt Wette) (06/21/91)

While we're on XView, there's one thing I haven't been able to figure
out yet.  Is there a way to control resizing of widgets when a window
is resized?  (like the way you can using XtSetArg(XtNleft,XtChainLeft)
in Xaw)

Matt
-- 
 _________________________________________________________________
 Matthew R. Wette           | Jet Propulsion Laboratory, 198-326
 mwette@csi.jpl.nasa.gov    | 4800 Oak Grove Dr, Pasadena,CA 91109
 -----------------------------------------------------------------

andrew@resam.dk (Leif Andrew Rump) (06/24/91)

In <537@bksmel.oz.au> cwy@bksmel.oz.au (Chris Young) writes:
>Also, I STRONGLY disagree that Xview is easier to use than Motif ...
>you obviously have done more Xview - I find it the other way around as
>I have done more Motif. You should be more careful making sweeping
>statements on the net unless you are asking to be flamed !

What about some cool facts? How does a simple Motif program look like?
This XView program creates a window with a demo text:

#include <xview/xview.h>
#include <xview/frame.h>
#include <xview/panel.h>

#define	X_SIZE	200
#define	Y_SIZE	100

main(argc, argv)
int	argc;
char	*argv[];
{
  Frame	frame;
  Panel	panel;

  xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);

  frame = (Frame)xv_create(NULL, FRAME,
	FRAME_LABEL,	argv[0],
	XV_WIDTH,	X_SIZE,
	XV_HEIGHT,	Y_SIZE,
    NULL);

  panel = (Panel)xv_create(frame, PANEL, NULL);

  (void)xv_create(panel, PANEL_MESSAGE,
	PANEL_LABEL_STRING,	"Hello World",
    NULL);

  xv_main_loop(frame);
}

I know this program doesn't do anything put it's easy to understand!
I Motif equally easy to understand and what happens when things get
a bit more complicated? My experience with XView is that some things
is very simple and other things is rather complicated - any followups?

Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark
UUCP: andrew@ambra.dk, phone: +45 39 27 11 77                /
Currently at Scandinavian Airline Systems                =======/
UUCP: andrew@resam.dk, phone: +45 32 32 51 54                \
SAS, RESAM Project Office, CPHML-V, P.O.BOX 150, DK-2770 Kastrup, Denmark

                If it's broke, fix it (The MS-DOS way)
            If it aint broke, don't touch it (The Unix way)
	If we can't fix it, it ain't broke (Maintainer's Motto)
             If you can't fix it, fuck it (The U-boat way)

jordan@tcs.com (Jordan Hayes) (06/25/91)

Leif Andrew Rump <andrew@ambra.dk> writes:

	How does a simple Motif program look like?

Nearly the same as your XView example.  So what?

/jordan

#include <Xm/Xm.h>
#include <Xm/Frame.h>
#include <Xm/Label.h>

static String	fallbacks[] = {
    "*width:			200",
    "*height:			100",
    "*label.labelString:	Hello World!",
    NULL
};

main(argc, argv)
	int	argc;
	char	**argv;
{
	Widget		top, frame;
	XtAppContext	app;

	top = XtAppInitialize(&app, "Hello", (XrmOptionDescList)NULL,
	    (Cardinal)0, (Cardinal *)&argc, argv, fallbacks,
	    (ArgList *)NULL, (Cardinal)0);
	frame = XtCreateManagedWidget("frame", xmFrameWidgetClass, top,
	    (ArgList)NULL, 0);
	(void)XtCreateManagedWidget("label", xmLabelWidgetClass, frame,
	    (ArgList)NULL, 0);
	XtRealizeWidget(top);
	XtAppMainLoop(app);
}

nazgul@alphalpha.com (Kee Hinckley) (06/25/91)

In article <1991Jun24.090219.28243@resam.dk> andrew@resam.dk (Leif Andrew Rump) writes:
>What about some cool facts? How does a simple Motif program look like?
>This XView program creates a window with a demo text:

Toy examples are only useful if you are writing toy applications.
It is entirely possible that XView makes doing simple things simple.
So does XVT.  It's doing *hard* things that I'm interested in.  And
doing hard things means going beyond what the toolkit designers
had in mind.  I don't know for sure whether XView or Motif is
better for that kind of thing, since I haven't used both.  But I
have my suspicions :-).

-- 
Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

nazgul@alphalpha.com (Kee Hinckley) (06/25/91)

In article <1991Jun24.090219.28243@resam.dk> andrew@resam.dk (Leif Andrew Rump) writes:
>#define	X_SIZE	200
>#define	Y_SIZE	100
...
>  frame = (Frame)xv_create(NULL, FRAME,
>	FRAME_LABEL,	argv[0],
>	XV_WIDTH,	X_SIZE,
>	XV_HEIGHT,	Y_SIZE,

I shouldn't follow up twice, but I just noticed this.  Do you really
have to specify the width and height?!
-- 
Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

jarober@aplcen.apl.jhu.edu (DE Robertson james an 740-9172) (06/28/91)

andrew@resam.dk (Leif Andrew Rump) writes:

>In <537@bksmel.oz.au> cwy@bksmel.oz.au (Chris Young) writes:
>>Also, I STRONGLY disagree that Xview is easier to use than Motif ...
>>you obviously have done more Xview - I find it the other way around as
>>I have done more Motif. You should be more careful making sweeping
>>statements on the net unless you are asking to be flamed !

>What about some cool facts? How does a simple Motif program look like?

Having written Xview, OLIT, Xaw, and Motif code, I think that Xview is far
easier to learn than any of the others. To say otherwise is plain silly. You
can argue features, flexibility and portability, but the Xview learning curve
is a lot less steep. 

jarober@aplcen.apl.jhu.edu

cwy@bksmel.oz.au (Chris Young) (06/28/91)

> Having written Xview, OLIT, Xaw, and Motif code, I think that Xview is far
> easier to learn than any of the others. To say otherwise is plain silly. You

Bad luck for you.....
As I said, this may be your opinion, it's not mine !

"Silliness is in the eyes of the coder"

Frankly, if you are so damn smart - why don't you write a better toolkit and
we will all immediately start using it -):

warner@scubed.com (Ken Warner) (06/28/91)

Sorry for the FAQ, but where do you get XView Toolkit?

Ken Warner