Three days ago I started investigating CEGUI and to test it I started to write a GUI builder for it using CEGUI only (no external widgets). Then, while working, I started to ask myself questions about CEGUI and today I tought maybe it was better to ask the forums.

This first post is about themes and how the xml files are strongly tied to the theme engine (the shared library). What I did not liked at all was having the imageset name hard-coded in the engine, limiting the configurability of new themes. Also, the need to specify the window types as engine/type makes really difficult to "try" different looks for an application.
A suggestion:
First of all don't allocate the WindowFactory object statically. When a new scheme is registered don't pass just the type but pass three arguments: the scheme name, the type without the scheme name and the imageset: something like registerFactory("Taharez", "Button", "Taharez"). Then the registerFactory instantiates a new WindowFactory passing it the imageset name (this requires modification of all the window factories) and register it as scheme/type. This makes the engines much more configurable without big changes.
Now, a very nice addition would be to have an extra parameter that tells registerFactory to register the scheme as "default", i.e., without the scheme name in the type: TaharezLook/Button -> Button. Activate that functionality with a new scheme loading method (loadDefaultScheme) and it will make easy to switch between the themes (if they provide the same set of windows). Extra, theme specific window types would always be accessible using the extended name.
What do you think about?