[comp.windows.x] XView extensible?? Colour XView??

everson@CompSci.Bristol.AC.UK (Phill Everson ) (10/12/89)

Is XView extensible? Does anyone have any ideas as to the difficulty
of, say, attempting to code a different style slider under XView? I am
aware that SunView1 was basically non-extensible, but does anyone
'in-the-know' have any ideas about XView? Would anyone care to comment
on the possibility or feasibility of adding, say, a different style of
slider?

Also I've heard rumours that the recent release of the X11/NeWS merge
server from Sun (Open Windows) is slow when you try to use colour and
that a port of a colour graphics application from SunView1 to XView
using this server will take a real hit on performance. I have not seen
this myself so the rumour may be unstubstantiated, but if anyone has
definitive information I'd appreciate it.

Phillip G. Everson
--------------------------------------------------------------------------
Medical Imaging                      Senior Software Engineer
Dept Comp Sci                        Philips Radiotherapy Systems
University of Bristol, UK            Horfield Road, Bristol, UK

tomj@snowking.ebay.sun.COM (Tom Jacobs) (10/24/89)

Phill Everson writes:
> Is XView extensible? Does anyone have any ideas as to the difficulty
> of, say, attempting to code a different style slider under XView? I am
> aware that SunView1 was basically non-extensible, but does anyone
> 'in-the-know' have any ideas about XView? Would anyone care to comment
> on the possibility or feasibility of adding, say, a different style of
> slider?

Yes, XView is fully extensible.  It has a staticly extensible classing
model (somewhat like Xt, not exactly).  XView provides, we believe,
a very comprehensive collection of user-interface components that conform
to the OPEN LOOK guidelines.  Creating a new slider is probably not a
good example extension since XView already provides an OPEN LOOK slider.
You could, of course, create a different style slider but then your
application isn't to look like anyone else's application.  The numeric-text
item in panel package was originally done as a separate extension and
then merged in with the other panel objects (look at usr.lib/libxvol/panel/
{p_ntx_data.c,p_num_btn.c,p_num_txt.c and panel.h}).  Probably the best
examples of XView extensions are those that "add value" not provided in
base toolkit.  Most of these extensions (eg. a wysiwyg editor, cad/cam
layout design editor, etc) are subclasses of the XView CANVAS package.

We're hoping to give a tutorial on XView, including writing extensions,
at the January X Conference.  I can supply some material earlier if you'd
like... let me know if you (or anyone else) would like this material
sooner.

> Also I've heard rumours that the recent release of the X11/NeWS merge
> server from Sun (Open Windows) is slow when you try to use colour and
> that a port of a colour graphics application from SunView1 to XView
> using this server will take a real hit on performance. I have not seen
> this myself so the rumour may be unstubstantiated, but if anyone has
> definitive information I'd appreciate it.

Well, I'll squash the rumour here.  Using the Calcomp benchmarks, the
X11/NeWS server (compared with the R3 MIT Sun X Server) is 7.69 times
faster on a Sun3(w/cg2) and 3.22 times faster on a Sun4(w/cg4).  

As for porting your SunView1 program to X, there are well known performance
issues that must be analyzed when porting your application from a
kernel-based window system to X, a client-server model window system.
You'll need to decide where you'll render your images: on the client
side (pixrect or client-pixmap), on the server side (server pixmap), or
directly onto a window (remember, "retained" is only a hint and you
might have to repaint).  Reguardless of your application, you'll
definitely need to rethink your applications graphics to get acceptable
performance.  Additionally, we suggest that you convert your Pixwin
graphics to Xlib in order to avoid the 20-30% performance penalty of
the compatibility interface.  Your application will also be much more
portable. Sorry, no easy answer.
 
> Phillip G. Everson
> --------------------------------------------------------------------------
> Medical Imaging                      Senior Software Engineer
> Dept Comp Sci                        Philips Radiotherapy Systems
> University of Bristol, UK            Horfield Road, Bristol, UK

	Tom Jacobs   (tomj@sun.com   -or-   ..!sun!tomj)
	Sun Microsystems, Inc.
	Mountain View, CA  94043