From: Harvey J. Stein
Subject: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <HJSTEIN.95May1105151@sunset.huji.ac.il>
I've been doing some GUI programming lately, and have been getting
annoyed with the hassles of creating complex widgets on the fly.

For example, I have a list of database records want to throw them up
into a window, one column per list-box.  Even this simple a task is
already too much for any GUI builder, because the number of list boxes
on the window depends on the number of columns in the data.

I've been working in STk (a version of scheme with an interface to the
Tk widget set), which has some nice features to help address this, but
it still can be cumbersome.

Garnet has aggregates coupled with constraint network defined widget
placement to deal with the problem.  But, I haven't really worked with
Garnet, so I don't know how well this works in practice.

I've heard that the Symbolics lisp machines had a wonderful windowing
system.  Did it address this problem?  Did it solve it?

I'd think that with Lisp's long history of graphics and windows that
the problems of complex widget creation & management would have been
addressed and solved many times over in various clever and
sophisticated ways.

So, does anyone know of any papers, pointers, ideas, code, systems,
methodologies, CLOS classs, anecdotes, etc, out there that address
these issues?  Even just a discussion of the legendary lisp machines
would be appreciated.

Thanks,

--
Dr. Harvey J. Stein
Berger Financial Research
·······@math.huji.ac.il

From: Thomas Kwong
Subject: Re: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <tomkwongD7xEsI.4uw@netcom.com>
In article <····················@sunset.huji.ac.il>,
Harvey J. Stein <·······@sunset.huji.ac.il> wrote:
>into a window, one column per list-box.  Even this simple a task is
>already too much for any GUI builder, because the number of list boxes
>on the window depends on the number of columns in the data.
> [...]

If you use X/Motif, I suggest you use the X Motif Tools(Xmt) library.
It simplifies GUI programming a lot by letting you put UI codes into 
the resource file.  You can also build a widget hierarchy by a simple
function call.  So it is similar to UIL, but much more usable, IMHO.

    ftp://ftp.ora.com/pub/examples/xbook/Xmt/xmt200.tar.Z

Tom
-- 
Thomas Kwong (········@wilshire.com)
ftp://ftp.netcom.com/pub/to/tomkwong/home.html
Wilshire Associates, Inc.
From: Kevin Greer
Subject: Re: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <3o5dr9$glm@steel.interlog.com>
·······@sunset.huji.ac.il (Harvey J. Stein) wrote:
>
>I've been doing some GUI programming lately, and have been getting
>annoyed with the hassles of creating complex widgets on the fly.
>
> [...] 
>
>I've been working in STk (a version of scheme with an interface to the
>Tk widget set), which has some nice features to help address this, but
>it still can be cumbersome.
>

You might want to check out the language WINTERP, its an XLISP (an OO Lisp)
interpreter with support for the Motif widget set built in.  You can find
information about it at <HREF="http://www.eit.com/software/winterp">.

Here's the blurb from Yahoo:

WINTERP 2.0 - WINTERP is the OSF/Motif Widget INTERPRETER An interactive
       object-oriented user interface language for rapid prototyping,
       development and delivery of extensible applications with Motif
       GUIs and Xtango graphics/animation. 


I haven't used WINTERP but I have used STk and I don't think you'll find
an easier to use widget library that Tk, but if you do let me know.
From: Chris Bitmead
Subject: Re: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <CHRISB.95May3131922@stork.cssc-syd.tansu.com.au>
In article <····················@sunset.huji.ac.il> ·······@sunset.huji.ac.il (Harvey J. Stein) writes:

>I've been doing some GUI programming lately, and have been getting
>annoyed with the hassles of creating complex widgets on the fly.
>
>For example, I have a list of database records want to throw them up
>into a window, one column per list-box.  Even this simple a task is
>already too much for any GUI builder, because the number of list boxes
>on the window depends on the number of columns in the data.
>
>I've been working in STk (a version of scheme with an interface to the
>Tk widget set), which has some nice features to help address this, but
>it still can be cumbersome.
>
>Garnet has aggregates coupled with constraint network defined widget
>placement to deal with the problem.  But, I haven't really worked with
>Garnet, so I don't know how well this works in practice.
>
>I've heard that the Symbolics lisp machines had a wonderful windowing
>system.  Did it address this problem?  Did it solve it?
>
>I'd think that with Lisp's long history of graphics and windows that
>the problems of complex widget creation & management would have been
>addressed and solved many times over in various clever and
>sophisticated ways.
>
>So, does anyone know of any papers, pointers, ideas, code, systems,
>methodologies, CLOS classs, anecdotes, etc, out there that address
>these issues?  Even just a discussion of the legendary lisp machines
>would be appreciated.

Normally you don't use multiple lists for this sort of thing. You just
format your data into the one list.

If you really need separate fields however you should get a matrix widget.
I've seen several available.

--

Chris Bitmead
······@ind.tansu.com.au
From: Dr. John W. Baugh
Subject: Re: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <3oavlm$bf9@taco.cc.ncsu.edu>
You might try looking at Ezd, which runs on Scheme->C ... I've used it, my
students have used it, and we think it's grand.  I'm just surprised it
isn't (doesn't appear to be) more widely used.

-- 
John Baugh       ···@eos.ncsu.edu       http://www2.ncsu.edu/eos/users/j/jwb/



                ezd - easy drawing for programs on X displays

Ezd is a graphics server that sits between an application program and the X
server and allows both existing and new programs easy access to structured
graphics.  Ezd users have been able to have their programs produce interactive
drawings within hours of reading the man page.

Structured graphics:  application defined graphical objects are ordered into
drawings by the application.  Drawings are displayed by mapping them onto
windows.  Multiple drawings may be mapped onto a window and a drawing may be
mapped onto multiple windows.  Pan and zoom operations are done by remapping
the drawing.  PostScript renderings of a window's contents are produced by a
single command.

Loose coupling to the application program:  unlike most X tools, ezd does not
require any event handling by the application.  The ezd server mantains window
contents.  As the application makes changes to drawings, the server smoothly
corrects the display.  Communication between the application and the server is
via text streams so feel free to write your application in COBOL.

Interaction:  objects in drawings are made interactive making them sensitive
to mouse and keyboard events.  When an event occurs on such an object, an
application supplied Scheme expression is evaluated.  This expression may
simply relay the event to the application, or the entire application may be
written in Scheme and embedded in the server.

The software is available for anonymous ftp from 'gatekeeper.dec.com'
[16.1.0.2]. The ezd files are in '/pub/DEC/ezd'.  These files include the
current release:

     README             - this file
     15mar93.tar.Z      - compressed tar file containing all source,
                          DECstation .o files, examples, and documentation.
     techreport.psf.Z   - compressed PostScript for WRL Research Report 91/6,
                          "Don't Fidget with Widgets, Draw!"
From: Simon Beaumont
Subject: Re: Lisp & Scheme approaches to widgets & windows
Date: 
Message-ID: <3ocqf5$grh@xenon.bt-sys.bt.co.uk>
"Dr. John W. Baugh" <jwb> wrote:
>
> You might try looking at Ezd, which runs on Scheme->C ... I've used it, my
> students have used it, and we think it's grand.  I'm just surprised it
> isn't (doesn't appear to be) more widely used.

Yeah me too! I came across EZD when I worked for DEC: it was done
by Joel Bartlett of Scheme->C. Its a return to structured graphics
(and a distributable server too!) - It's a pity no one picks up
on stuff like this... I gave it to a class of masters students in Nice
to play with and it was *fun* and they got to learn Scheme as a 
side effect! Now when was the last time you had *fun* building
a gui?

Trouble is that as soon as Xtoolkit et. al. and "the widget wrights"  
were born, every one seemed assured that the job was done, when cleary
anyone who adopts a functional style of programming and tries to
do a widget based gui will tell you: the mainstream paradigms 
are well short on elegance.

How many times have we heard: "I write this real neat clever code,
ever so elegant and pure... then I have to add some instrumentation
on and by the time it's done my baby is a monster..."

What was the slogan "...separating form from function..."
Depends on your interpretation of "form" I guess.

Winge over. Watch this space.

Simon