
*) We might need to add the parent widget as a required parameter to the constructor functions. Apple's "Carbon" API requires the toplevel window to be known at construction, the exact place in the window's widget hierarchy can be changed later. Widgets cannot be moved from one window to another. Win32 requires the parent widget to be specified at widget construction time, but it also provides a function called SetParent that's supposed to change a window's parent. Gtk doesn't seem to impose any restrictions, and neither does Apple's "Cocoa" API (formerly known as OpenStep). What about other potential backends? *) As I already said, I think toWidget should be toWidget :: Widget w => w -> Widget (not in the IO monad) *) Should windows really be widgets? At least they aren't on Mac OS, and making them look like widgets would be somehow artificial. Windows can't be added to any layout container, for example. *) I'm not entirely happy with the Has* classes. It looks like the basic attributes and methods available for all widgets have to be implemented over and over again for every widget class. Is there some way around this? *) Fltk only supports a single callback, and so does the current CGA example. To support multiple callbacks, some machinery has to be added on the Haskell side. That's all for today. I think I'll have another look at the code tomorrow. Cheers, Wolfgang