I have started an in-depth refactoring of the whole
Epsitec.Common.Widgets namespace. I am cleaning up a much too cluttered class hierarchy in order to prepare a public version of the GUI toolkit. This code polishing is also badly needed in order to simplify the implementation of the
GUI Builder which should become available by the end of this year.
I started by re-reading the current implementation of the
Widget base class. It is a huge class totalling more than 6000 lines of code. Being very general, it has lots of properties, which are used only by a subset of the derived classes. And it has lots of events, too. All this consumes more memory space than what is really needed, most of the time. I have therefore decided to put all these properties and events into a
Hashtable; I have written wrapper properties so that the users won't be affected by this change.
What I have come up happens to be very similar to what Microsoft did in the Windows Presentation Framework (formerly known as Avalon) - as I discovered this week-end; my way of accessing properties is almost the equivalent of WPF's interaction between
DependencyObjects and
DependencyProperties. It's amusing to see how different developments finally lead to the same ideas