From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA19058 for caml-red; Fri, 9 Feb 2001 10:50:04 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA31860 for ; Fri, 9 Feb 2001 10:42:26 +0100 (MET) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.6.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f199gQP29630 for ; Fri, 9 Feb 2001 10:42:26 +0100 (MET) Received: from lambda.u-strasbg.fr (lambda.u-strasbg.fr [130.79.90.63]) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) with ESMTP id KAA30833; Fri, 9 Feb 2001 10:41:22 +0100 Received: from luther by lambda.u-strasbg.fr with local (Exim 3.22 #1 (Debian)) id 14RA3p-00012g-00; Fri, 09 Feb 2001 10:41:49 +0100 Date: Fri, 9 Feb 2001 10:41:49 +0100 To: Francois Rouaix Cc: caml-list@inria.fr Subject: Re: OCaml's long range graphical direction? Message-ID: <20010209104149.A3914@lambda.u-strasbg.fr> References: <20010206102842.A27059@pauillac.inria.fr> <200102082001.f18K1VH08374@nez-perce.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: <200102082001.f18K1VH08374@nez-perce.inria.fr>; from frouaix@liquidmarket.com on Thu, Feb 08, 2001 at 12:01:29PM -0800 From: Sven LUTHER Sender: weis@pauillac.inria.fr On Thu, Feb 08, 2001 at 12:01:29PM -0800, Francois Rouaix wrote: > Okay, my 2 bits on this dicussion; (my credentials are : original designer of > the CamlTk interface, writer of MMM. More recently, I've used CamlTk for a > production tool in the company I work for). > > I actually think that none of CamlTk/LablTK/LabelGTK fit the most common need > in GUI development. In many cases, it still strikes me as utterly boring and > time consuming to write *code* to put up menus, buttons, dialogs and such. Of > course, from time to time, when you need some form of widget that is a bit > original, programming will be useful. But that doesn't happen a lot, unless > you write something that needs complex rendering or interaction. > Back in 1985, Apple started using resources to define interfaces. More > recently, Palm used resources again to define interfaces. More recently, > Mozilla folks used XML based representation (XUL) to define interfaces, with a > GUI level scripting language (JavaScript/ECMAScript). > This type of approach has, in theory, lots of advantages > - forces separation GUI from logic in the code > - allows non-programmers to do the GUI design/layout (maybe using > interactive tools in the process). > - themes easily abstracted > - language independence, extensibility, device independence > > I wish that XUL wasn't so bloated (it's basically the whole Mozilla), and that > I had time to play with it. > I would also be interested to know if anybody has explored this realm. Well, you can do almost the same thing using ocaml modules and functors, which gives you a good reason to use programing for GUI design. Basically it goes liek that : You have one module, which builds the interface. Then you have a functor, which takes the the callbacks code as parameter and does the attching of the callbacks to the interface and provides the main GUI function. an incomplete example can be found at : ftp://lambda.u-strasbg.fr/vwck-20010125_1721.tgz (it provides also some lablgtk + lablgl example, and is GPLed code) Friendly, Svne Luther