Date: Fri, 09 Jul 2004 15:46:17 +0200 (CEST) Message-Id: <20040709.154617.39641749.andrieu at ijm.jussieu.fr> To: seguso.forever at tin.it Cc: lablgtk at kaba.or.jp Subject: Re: Lablgtk2 Tutorial From: Olivier Andrieu In-Reply-To: <200407071041.42660.seguso.forever at tin.it> References: <003501c45fe2$da05b030$1501a8c0 at hama> <200407071041.42660.seguso.forever@tin.it> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Maurizio Colucci [Wed, 7 Jul 2004]: > Personally I really need some examples how to create my own widget > (e.g., how do I inherit GtkWidget and override some methods, and > provide my own paint function? How can I know my current width?) Do you really need to create your own widgets ? I mean, GTK+ already has a lot of general-purpose widgets. The usual way of building an application using GTK+ is to compose widgets rather than deriving new ones. That's a bit difficult to do with LablGTK anyway (in pure caml code I mean). You cannot really create new types or classes, you cannot override default signal handlers[1], and the lower-level GTK+ functions for painting are not all binded. . Also some widgets require you to provide C functions (eg custom CellRenderers), which makes them very difficult to extend in Lablgtk. [1] but that's possible, we just have to bind g_signal_override_class_closure -- Olivier