headers/bsd: Add sys/queue.h.
[haiku.git] / src / tests / add-ons / print / ppd / ui / UIUtils.cpp
blob4a204542d8df06233b62cf6158943300da7383da
1 /*
2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
7 */
9 #include "UIUtils.h"
11 void MakeEmpty(BListView* list)
13 if (list != NULL) {
14 BListItem* item;
15 while ((item = list->RemoveItem((int32)0)) != NULL) {
16 delete item;
21 void RemoveChildren(BView* view)
23 if (view != NULL) {
24 BView* child;
25 while ((child = view->ChildAt(0)) != NULL) {
26 child->RemoveSelf();
27 delete child;