Browse thread
Cross-platform "Hello, World" graphical application in OCaml
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-23 (01:22) |
From: | Jon Harrop <jon@j...> |
Subject: | Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml |
On Tuesday 22 February 2005 23:30, Daniel Bünzli wrote: > One nice thing to have would be a pure ocaml gui system (maybe along > the lines of Fruit [1] or Fudgets) with a functorized renderer > interface so that it can be used with/rendered by different graphic api > (e.g. see cegui [3,4]) or even inside a canvas widget. Input handling > should also be functorized so that it is easy to plug the gui system in > a particular environment. I prefer the idea of implementing a single back-end: a decent vector graphics renderer which uses OpenGL. I can't think of any reason I'd ditch these for another back-end. > However the big problem of these custom gui systems is the lack of > integration with the native gui system. This may not be an issue for > fullscreen vizualisation tools or games but can be for other > applications like editors (e.g., because you usually have a single > window in which everything occurs (your gl context), you don't have > access to platform specific save dialogs, look and feel, etc., etc.). I disagree. Firstly, you can have as many GL windows and contexts (and widgets) as you like. You aren't restricted to just having one window with one widget and one context. Secondly, using OpenGL does not prohibit the use of platform-specific look and feel. There is no reason you shouldn't be able to bring up native menus and dialogs. Qt, GTK and WxWindows all allow you to do this. Thirdly, Mathematica is one of the "editors" I use most often. It benefits greatly from embedded vector graphics (although software rendered for now) for features such as mathematical typesetting, graph generation and visualisation. IMHO, vector graphics based editors are a huge step forward. Imagine having an OCaml IDE which typeset your program (lambdas, pattern matches, arrows, subscripts etc.) and gave you graphical feedback on syntax, type inference and type checking, smooth scrolling, a search facility which animated its results. The possibilities are endless. The editors I've seen under Linux are making tentative steps in the right direction but they are still miles away from what could be achieved. OCamlbrowser displays hierarchical lists of module contents graphically. KEdit lets you flatten C++ function definitions, but C++ lacks nested functions. Particularly in OCaml, programming could be so much easier with more sophisticated editors... -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://ffconsultancy.com