Add WXDestroyWithoutChildren() and use it from wxStaticBoxSizer

Factor out the code from wxStaticBoxSizer dtor into a wxStaticBox method
to improve encapsulation: the static box knows better than another class
how to detach its children from it before destroying it.

No real changes yet.
This commit is contained in:
Vadim Zeitlin
2017-12-19 21:47:01 +01:00
parent 87afebd6f2
commit aa47c15abd
3 changed files with 23 additions and 14 deletions

View File

@@ -45,6 +45,12 @@ public:
*borderOther = BORDER;
}
// This is an internal function currently used by wxStaticBoxSizer only.
//
// Reparent all children of the static box under its parent and destroy the
// box itself.
virtual void WXDestroyWithoutChildren();
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }