Destroy a window with all children

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
mac
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

Destroy a window with all children

Postby mac » Wed Sep 08, 2004 19:43

Is it possible to destroy a window and have all child windows destroyed also?

I'm using:

Code: Select all

WindowManager::getSingleton().destroyWindow( win );


which only removes win.

Must I take care of all the elements (buttons, texts, editboxes...) belonging to the window myself?

Cheers,
mac

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

Destroy a window with all children

Postby CrazyEddie » Wed Sep 08, 2004 20:33

It is the default behaviour for a window to clean up all attached children. Normally the only time this does not happen is if you have disabled the option on a child window by setting the 'DestroyedByParent' setting to false. How are you determining that the children are not being destroyed?

Any further information would be helpful :)

CE.

User avatar
mac
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

Destroy a window with all children

Postby mac » Thu Sep 09, 2004 10:23

Sorry for the wrong information.

I wanted to recreate (create, destroy, create...) a TabControl (Panel) - and the problem was, that the button that belongs to it wasn't destroyed.

I tried a simple example with a "normal" window and everything is fine.

Thanks for the quick response. Sometimes it helps when somebody just listens... ;)
mac

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

Destroy a window with all children

Postby CrazyEddie » Thu Sep 09, 2004 13:59

Cool, no problemo :) We're here to listen :D


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests