[racket] Extending the Racket GUI with native widgets

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jan 5 12:11:51 EST 2011

At Wed, 5 Jan 2011 18:04:26 +0100, Thomas Chust wrote:
> However, even if I override all size related methods of the
> subwindow<%> interface on a panel% and forward them to GTK+
> equivalents on the native widget, the native child widget is still not
> resized to useful dimensions by the Racket GUI system.

That's true... I imagined that you would override methods in `panel%',
such as `on-size' and `get-graphical-min-size'.

Meanwhile, I remembered that `on-size' isn't implemented correctly
right now for `panel%', and I'm working on that.

> And even if I manually resize, show and redraw the widget using calls
> of wrapped GTK+ functions at the REPL, it still doesn't show up in the
> GUI.

Can you send an example?

> Another related strange observation in contradiction to the
> documentation is that the method add-child of area-container<%> does
> not work if passed an implementation of the subwindow<%> interface
> that just extends object%, but insists on getting an instance of some
> internal mred% class.

Yes, the `subwindow<%>' interface isn't really implementable from
scratch. It should be fixed to be connected to an implementation and
documented as such (so that you get a good error when trying to
implement `subwindow<%>', instead of bad behavior when trying to use a new implementation of `subwindow<%>').



Posted on the users mailing list.