/* ================ rvRollupPanel::~rvRollupPanel destructor ================ */ rvRollupPanel::~rvRollupPanel(void) { // destroy the items for (; mItems.Num();) { _RemoveItem(0); } }
void CLangBarItemButton::CleanUp() { if (_pTooltipText) { delete [] _pTooltipText; _pTooltipText = nullptr; } ITfThreadMgr* pThreadMgr = nullptr; HRESULT hr = CoCreateInstance(CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, IID_ITfThreadMgr, (void**)&pThreadMgr); if (SUCCEEDED(hr)) { _UnregisterCompartment(pThreadMgr); _RemoveItem(pThreadMgr); pThreadMgr->Release(); pThreadMgr = nullptr; } if (_pCompartment) { delete _pCompartment; _pCompartment = nullptr; } if (_pCompartmentEventSink) { delete _pCompartmentEventSink; _pCompartmentEventSink = nullptr; } }
/* ================ rvRollupPanel::RemoveAllItems Remove all items from the control ================ */ void rvRollupPanel::RemoveAllItems() { for (; mItems.Num();) { _RemoveItem(0); } // update layout RecallLayout(); }
// _MakeEmpty void PropertyListView::_MakeEmpty() { int32 count = _CountItems(); while (PropertyItemView* item = _RemoveItem(count - 1)) { delete item; count--; } delete fPropertyObject; fPropertyObject = NULL; SetScrollOffset(BPoint(0.0, 0.0)); }
/* ================ rvRollupPanel::RemoveItem Remove the item at the given index from the rollup panel ================ */ void rvRollupPanel::RemoveItem(int index) { // safety check if (index >= mItems.Num() || index < 0) { return; } // remove the item _RemoveItem(index); // update the layout RecallLayout(); }
BListItem* BOutlineListView::RemoveItem(int32 fullIndex) { return _RemoveItem(FullListItemAt(fullIndex), fullIndex); }
bool BOutlineListView::RemoveItem(BListItem* item) { return _RemoveItem(item, FullListIndexOf(item)) != NULL; }