Date: Wed, 26 Jan 2005 13:11:55 +0900 (JST) Message-Id: <20050126.131155.115913197.garrigue at math.nagoya-u.ac.jp> To: robertr at rftp.com Cc: lablgtk at kaba.or.jp Subject: Re: writing your own widgets From: Jacques Garrigue In-Reply-To: <41F6CB4C.8090509 at rftp.com> References: <41F6CB4C.8090509 at rftp.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Robert Roessler > I notice that the LablGTK version of the GTK+ 2.0 Tutorial somewhat > conspicuously leaves out "Chapter 21. Writing Your Own Widgets" - is > this forthcoming, or is there somewhere else to find this material, or > is it considered for some reason to be unnecessary? (Weak) support for creating Gtk widgets was available in lablgtk1, but has been dropped in lablgtk2. The immediate reason was that it was broken because of changes, but the deep reason is that this level is too low to hope for a reasonably type safe API. There are other ways to create your own widgets. As lablgtk already allows you to override almost all signals on an existing widget, you can easily change its behaviour at runtime. If you want to add new signals, which is the main reason to create a new widget, look at the ML signal mechanism in GUtil. It allows you to extend a widget with new signals, that look exactly like gtk signals, but can only be called from ML. In practice this should not be a major limitation, except if your main program is not written in ML. Hope this clarifies the situation. Jacques