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

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

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

Postby Jamarr » 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?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Dec 05, 2008 09:51

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.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests