Hi CE,
Thanks for your reply. You're helping me to understand the whole picture. The ideas about scripting might prove to be a good solution. However, I had another idea in my head, so I'll try to explain that.
I would like to try to use the CELayout Editor to build the GUI for my application. I thought it would make sense to "hook up" a registered application callback to any action buttons I create in the GUI layout.
Now you are telling me an "Event" tag is in the XML spec. First off, where can I find documentation on available tags? This is possibly the structure I am needing. I just glanced at the API reference and I think it will work. However, I think it will be the responsibility of the layout file parser to actually 'hook up' Events to GUI elements when one is found in the layout.
The possibility of an editor helping to enable application Events is exciting, and I hope I can help to enable a general way for CEGUI to take advantage of this. If I was doing a better job explaining the thoughts running around in my head, maybe others would be excited too
My thought is that while using the editor, I would add an identifier to an Event tag. While parsing the layout file, this identifier would be a key to a map of application functions.
One challenge is asking client code to 'register' (fill the map) application function pointers with identifiers that will exactly match the Event tag's identifier. I see the registration happening on an instance of the class that parses the layout.xml.
The other challenge is for a user of the editor to pick from a list of identifiers that will eventually correspond to callback functions. Perhaps this could be as dumb as relying upon an application's documentation to provide a list of identifiers and which have been hard coded to register with CEGUI's xml parser.
Does this sound possible to anyone but me?
Some pseudocode might describe this better:
<a href="http://rafb.net/paste/results/YdShBb97.html">app code</a>
From this code, you can see the identifiers can be strings that make sense to the user. "QuitGame" could identify App::QuitGame(), for example. This would make it easier for the "modeler" using the CELayout Editor.
I could help to add this support, I think I know what needs to happen. If this sounds reasonable, I think it would really increase the power and flexibility of CEGUI.
Thanks for listening. Please stay in touch,
-granx