Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] LablGtk
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] LablGtk
From: Nicolas FRANCOIS (AKA El Bofo) <nicolas.francois@free.fr>

> > There are plenty of small examples in the (strangely named) examples
> > directory of the distribution. For instance, you can see menus in
> > editor.ml, mouse clicks in fixed_editor.ml, and drawing in drawing.ml.
> 
> Yes. I know this. What I am looking for is REAL documentation. For
> example, I was not able to find out how to send a signal (just to let my
> drawing area know that it has to redraw itself, for example).

OK, I thought you were talking about receiving signals.
The more precise the question, the better the answer.
Actually, there is very little support for explicitly sending signals.
You have to go directly for GtkSignal.emit_unit and its friends.
The signals themselves are in the Gtk*.*.Signals submodules.
However, in your case here, you should rather call #misc#draw
         w#misc#draw (Some (Gdk.Rectangle.create 10 10 20 20))
      or w#misc#draw None

As for documentation, the only formal documentation is the README
file, which tries to tell you where is what, but not really how to use
it. One problem is that I have no idea what a real documentation
should include, without ducplicating GTK's own documentation, which is
huge. Probably more details about signals ?
Some people where working on a tutorial. Is there some progress?

> I noticed some sarcasm in your "(strangely named)". Beware, Klingons don't
> share Human's sense of humour. Grrr.

I was just pointing that, in the absence of documentation, examples
can help a lot. But they could be better organized, and it appears
that what you were looking for was not there.

> > We have also some small applications, but they were not released until
> > now out of laziness to package them.
> 
> NOthing about signals in the apps dir, I already checked this.

The above sentence means that it is _not_ there. I've actually written
such a paint application in the past, and was thinking of including it
if it can help anybody. The trouble is that it is entangled with other
code, as part of a bigger project.

> Really, you can't imagine the number of lines of code I read before
> asking. And I intensively used OCamlBrowser on LablGtk installation, but
> this is simply too much for me. I know GUI programming in Qt (and some
> others), I hate Gtk for overfeeding casting, so I thought LablGtk would be
> the solution. But I failed. Bouhou !

I know, GTK is far from ideal. But it's still the easiest thing to
interface with, after Tcl/Tk. Qt is so tightly bound to C++.

Cheers,

Jacques Garrigue
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners