Page 1 of 1

CEGUI::Window::EventShown is not propagated to children...

Posted: Thu Dec 04, 2008 23:15
by Jamarr
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?

Posted: Fri Dec 05, 2008 09:51
by CrazyEddie
Hi,

When a parent window is hidden, the state of the children has not changed; they're not hidden as far as a state change goes, they're just not visible. I don't consider this a bug, though I do understand your point of view. Having read this back and thought about it, my point of view is not 100% fixed on this - you might be able to convince me to change it :lol:

With regards to the potential event system changes, I'll keep these possibilities in mind, thanks for the suggestion.

CE.