CEGUI::Window::EventShown is not propagated to children...
Posted: Thu Dec 04, 2008 23:15
I'm sure that technically a control's visibility state is not changed when it's parent is hidden, but conceptually this makes sense: if a window is hidden, then all the controls on that window are also hidden (the controls do not remain visible). So I think this event not propagating to children is a bug.
This causes some headache because to work around the issue you have to add this functionality to the parent window by iterating over a list of child-controls, fireing the event for each child. Ideally, this would happen automatically.
This was probably done for performance reasons? Normally it would just be a waste to propagate events like this. Perhaps CEGUI could use an updated event system that has something like 'only-propagate-on-subscription' events, events that do not need to be propagated within CEGUI but may need to be propagated under certain cases. Then whenever a user subscribes to such an event, the parent-chain is notified so a particular event for a particular control can be propagated down the chain?
This causes some headache because to work around the issue you have to add this functionality to the parent window by iterating over a list of child-controls, fireing the event for each child. Ideally, this would happen automatically.
This was probably done for performance reasons? Normally it would just be a waste to propagate events like this. Perhaps CEGUI could use an updated event system that has something like 'only-propagate-on-subscription' events, events that do not need to be propagated within CEGUI but may need to be propagated under certain cases. Then whenever a user subscribes to such an event, the parent-chain is notified so a particular event for a particular control can be propagated down the chain?