Re: Someone explain (Mc)Clim to me as if I were 5 years old



"thetza" <thetza@xxxxx> writes:

It might be b/c I haven't found a good tutorial, but I
think it has more to do with the preconceptions about what a GUI
toolkit is and how GUI programs are structured (I've been developing
GUI's with wxWindows, GTK, and Tk).

You're right, it's because CLIM is very weird compared to mainstream
GUIs, sort of like CL is different from mainstream languages. We are a
bunch of people that really like the CLIM UI paradigm, but you should
not expect to be able to create "standard" user interfaces with it.

a. Handles all the low-level interaction with underlying graphics
engine (xlib, etc).

CLIM does this.

b. Has a collection of 'widgets', preferably arranged in an OO fashion
so you can make your own widgets from existing ones.

CLIM has this, but there are not very many widgets (called "gadgets"
in CLIM-speak) in McCLIM. Also, their interface is a bit limited, and,
at least the CLIM applications I know of, do not use very many
gadgets.

c. Has some sort of event system.

There is an event system, but unless you're writing gadgets or other
relatively low-level stuff, you're not meant to use it. One of the
hardest things to wrap my head around when I learned CLIM was that it
is not really event-based - instead, CLIM takes care of reading
gestures from the user and looks up the corresponding commands in
command tables that you have defined for your application.

a. You create instances of different widget with various options,

You need to create the elements of your application, of course - but
you generally have fewer discrete UI elements in CLIM applications
than in normal applications, though my view may be colored by the fact
that I have never tried the commercial CLIM implementations, nor a
"real" commercial CLIM application.

b. you lay them out in a geometry manager,

You do this in CLIM as well.

c. you bind events to your widgets, and

You do this in CLIM as well.

d. you start your event loop.

You do this in CLIM as well.

(Though all of these things are generally done via the
`define-application-frame' macro)

Can someone compare and contrast McClim to the more "traditional" gui
toolkits, both in terms of its scope/purpose/goals and how McClim
applications are to be structured?

I recommend that you take a look at the Examples directory of McCLIM,
as well as a look at the code for Beirc
(http://common-lisp.net/project/beirc/), a typical free CLIM
application.

--
\ Troels "Athas"
/\ Henriksen
.



Relevant Pages

  • Re: Someone explain (Mc)Clim to me as if I were 5 years old
    ... think it has more to do with the preconceptions about what a GUI ... a GUI toolkit at the least: ... Has a collection of 'widgets', preferably arranged in an OO fashion ... and was the inspiration for CLIM. ...
    (comp.lang.lisp)
  • Re: SOT: GUI design (was Re: Why Lisp is too hard for me to use)
    ... at the moment), then cmucl and mcclim... ... papers about CLIM at http://mcclim.cliki.net/ ... different to a pure gadget GUI: ... gadgets, then use the built documents as input/controllers of the "real" ...
    (comp.lang.lisp)
  • Re: Why Lisp is too hard for me to use
    ... And I can't compare CLIM to the vendor-specific ones since I have ... That said, I do not hesitate to use it myself every time I need a GUI, ... Lisp itself. ... I am not a very experienced CLIM user. ...
    (comp.lang.lisp)
  • Re: Gui that is easy to program?
    ... Robert Vazan writes: ... Is it possible to hack up Gui as easily as batch process? ... You might want to look into CLIM then. ... or Fortran program contains an ad hoc informally-specified bug-ridden ...
    (comp.programming)
  • Re: Someone explain (Mc)Clim to me as if I were 5 years old
    ... Perhaps because CLIM implements some interesting concepts, ... prominent exception of normal widgets is rather complete. ... Programmers coming to Lisp know how to put up a GUI in any number of languages, ... I am not saying Lisp should not do better than other languages, but I am saying CLIM went in search of better along the wrong axes. ...
    (comp.lang.lisp)