Add a method to BView::Private that calls BView::_RemoveSelf().

Add a struct to kits/interface/Layout.cpp that uses BView::Private to
provide RAII mechanics for the removal of views (calling
BView::Private::RemoveSelf()).
Use the new struct to simplify BLayout::AddItem().
This commit is contained in:
Alex Wilson
2011-10-28 14:16:03 -06:00
parent 0926395334
commit edb4c8244c
2 changed files with 46 additions and 16 deletions
+5
View File
@@ -66,6 +66,11 @@ public:
bool WillLayout();
bool MinMaxValid();
bool RemoveSelf()
{
return fView->_RemoveSelf();
}
BView* fView;
};