[NB To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
Hi Luc,
I hope things are going well with you.
I was interested to read your comment on Steve's proposal.
Luc (lucb@ telus.net) writes:
> Date: Mon, 13 Nov 2000 23:14:05 +0000 (UTC)
>
> (Sorry for the late reply.)
[Luc]
> I agree with your point about the GUI toolkit being Pop's Achilles heel.
> I've sometimes (briefly) wondered whether a useful approach would be to
> develop an API implemented with calls to a Java library (say java.awt).
> Then platform by platform, the Pop-11 API could be implemented with OS
> specific calls.
>
> ...
[Steve]
> > 9. Usable GUI toolkit
> >
> > The X-toolkit is Poplog's Achilles heel IHMO. This project would
> > aim to provide a GUI toolkit that was mainly implemented in Pop11
> > and deriving all the obvious benefits as a result e.g. does not
> > seg fault, require brain the size of planet to write "hello world",
> > a reinforced library shelf for the flatulent tomes that
> > tell you how clever you are for using the X-toolkit etc etc.
> ...
I formed this opinion about 8 or 9 years ago and since about
1992 or 1993 have been developing pop-11 based tools that meet
this sort of requirement. I have been helped by various users
who suggested improvements or helped with the design,
especially Riccardo Poli at first and then Brian Logan, who
has had a lot more experience with interactive graphical
packages than I have (including architectural design
packages).
These facilities, now called RCLIB< are implemented in the X
libraries provided in Poplog, and often it was very hard to
find out how to do things for the reasons you and Steve
suggest (e.g. finding out how to get a program to work out
whether to use XOR or EQUIV for doing movable objects, etc.,
which is platform dependent).
The task of producing such a package became very much easier
after Steve Leach developed Objectclass, which has been
available in Poplog since the mid 90s.
(Luc, I think you wrote one of the first teach files for
Objectclass here in Birmingham:
http://www.cs.bham.ac.uk/research/poplog/teach/advent_objectclass
)
Objectclass facilities, especially the multiple inheritance
mechanisms, are used throughout the RCLIB package, which
is also based on rc_graphic concepts (Relative Coordinates
Graphics).
RCLIB is available at the free poplog site
http://www.cs.bham.ac.uk/research/poplog/freepoplog.html
in the rclib.tar.gz file
http://www.cs.bham.ac.uk/research/poplog/rclib.tar.gz
You can read an overview here
http://www.cs.bham.ac.uk/research/poplog/rclib/help/rclib
If you fetch and install the package and want to try it out
do this in pop-11:
uses rclib
then
teach rclib_demo.p
to get a 20-30 minute tutorial overview of some of the main
RCLIB facilities, with examples that you can edit and run.
That file is also browsable remotely here
http://www.cs.bham.ac.uk/research/poplog/rclib/teach/rclib_demo.p
The most powerful feature in RCLIB is rc_control_panel which
takes a declarative description of a control panel (a list of
lists) and produces automatically formatted panels with
buttons, sliders, text or number input fields, scrolling text
fields, dials, etc.
It is described in detail in HELP rc_control_panel
http://www.cs.bham.ac.uk/research/poplog/rclib/help/rc_control_panel
though there are lots of tutorial examples in other files,
e.g. TEACH POPCONTROL shows how to set up a panel for setting
or modifying lots of pop-11/Ved global variables.
RCLIB has been used by various students for undergraduate and
MSc projects as well as PhD students and colleagues, often in
conjunction with the sim_agent toolkit. For instance a recent
undergraduate project by Duncan Fewkes produced a "Braitenberg
vehicles" package, which is likely to be available with
sim_agent after some more tidying up etc. It may be used
next term in an experimental new AI "elective" course.
Recent improvements in RCLIB have included the addition of a
very flexible dials package and removing some infelicities in
the mouse/motion event handling which Duncan uncovered.
> > does not
> > seg fault,
Naive users of RCLIB produce fewer system errors than with
propsheet because by default most of the callback facilities
in RCLIB (e.g. action buttons) use external_defer_apply,
though users can bypass this if they wish (the main Poplog X
facilities, e.g. propsheet, have the opposite default).
> ....
> require brain the size of planet to write "hello world",
You could use this procedure from RCLIB
rc_message(
x,y, strings, spacing, centre, font, bgcol, fgcol)
-> message_window;
E.g.:
rc_message("right", "top", ['hello world' 'how are you'],
2, true, '9x15', 'pink', 'blue') -> panel;
This produces a (click to dismiss) panel at the top right of
the screen (you can use numeric or descriptive screen
coordinates for x,y), with two lines of text, one for each
string in the list, automatically centred, with 2 pixel
spacing between lines, using the 9x15 font, in blue letters on
a pink background. The fifth argument (centre) can be false,
true, or the word "right", for right alignment.
The procedure works out the width of panel required for the
longest line, using the specified font, using this
Pop-11 procedure also in RCLIB:
rc_text_area(strings, font) ->(widths, maxwidth, height, ascent);
rc_message_wait is similar to rc_message, but suspends the
program till you click or press a key.
RCLIB provides many tutorial examples and all the
documentation is in Pop-11/Ved teach or help files (using none
of the fancy VED characters that get in the way of Emacs
users!).
It all runs in the same way on solaris, linux, digital unix
(on alphas, and probably also on linux alpha, though I have
not tried), etc.
If someone ever finds a way to re-implement in PC windows
poplog the basic set of X facilities that I use then all of
RCLIB will then be usable in windows/NT.
Alternatively I believe there are X emulations available for
windows/NT but I have no idea how to interface to them. (This
is the approach used by Clementine, the data-mining package
developed by ISL and now sold by SPSS, mostly written in
Pop-11 using X for graphics).
Sim_agent provides a library using objectclass multiple
inheritance mechanisms to link movable picture objects to
movable simulation objects. That interface library is
described in this file from the sim_agent package:
http://www.cs.bham.ac.uk/research/poplog/newkit/sim/help/sim_picagent
It allows a simulation object to appear in more than one
graphic window, e.g. with different scales. So changes to
simulated locations of simulation objects produce changes in
all relevant windows. Also mouse interactions in any of the
windows automatically select the same simulation object.
Anyhow, that's just a tiny taste of what's already in RCLIB,
which I believe meets many of the requirements you and Steve
had in mind. It could be a basis for developing something more
general, which is later made more portable by re-implementing
the lowest level required API.
It has been suggested that the X stuff I use could be replaced
by Java making it all more portable, but I know nothing about
how to do that since I am not a Java programmer!
Aaron
===
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html
|