cseditor and events
Christian Van Brussel <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Organization | UCL - TELE |
| Message-ID | <1339085305.19582.280.camel@scylla> |
Continuing a discussion with Sueastside around the cseditor: On Sun, 2012-05-13 at 01:59 +0200, sueastside wrote: > * About the callback management, what do we choose as a solution: explicit > > callback interfaces, CS's event system, or wxWidget 2.9's binding system? > > Maybe the CS's event system should be used everywhere in CS? > CS' event system would mean we'd need to have the CS loop running to > process the events (i think) > callback interfaces i find rather cumbersome, writing classes to > sometimes just call a single function... > wxwidget's 2.9 binding is a lot like boost:bind, since i used boost:bind > in the DAMN plugin, i'm kinda all for that system :) Some reactions: - The CS event system seems well built although it is currently underused. Controlling its processing of events is not a problem neither. - Let's kill every callback interfaces in CS, they are just cumbersome. - Using wx's bind may face the same problem than using boost::bind, ie the cross-plugin boundaries. Using simultaneously several different event systems is also not consistent. For these reasons, I'm now heading for the CS event system and have started converting cseditor to it. I've added an iEventQueue to the iContext, and GUI widgets now communicates through it. Hopefully, in the future, some tools can be added in order to help further the event management (eg using the iModifiable to create/access them automatically?), or to provide some binding functionalities. One question that arise is about the granularity of the event queues. Using a single queue for all events is probably neither efficient nor easy to use, therefore we may have to introduce several others, but where? Should every mesh receive a specific queue? Or each sector? Or one queue per 'topic': engine, collisions, sounds, edition, etc? ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/