本文整理汇总了C++中BLayoutItem::View方法的典型用法代码示例。如果您正苦于以下问题:C++ BLayoutItem::View方法的具体用法?C++ BLayoutItem::View怎么用?C++ BLayoutItem::View使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLayoutItem
的用法示例。
在下文中一共展示了BLayoutItem::View方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
BView*
TabManager::RemoveTab(int32 index)
{
// It's important to remove the view first, since
// removing the tab will preliminary mess with the selected tab
// and then item count of card layout and tab container will not
// match yet.
BLayoutItem* item = fCardLayout->RemoveItem(index);
if (item == NULL)
return NULL;
TabView* tab = fTabContainerView->RemoveTab(index);
delete tab;
BView* view = item->View();
delete item;
return view;
}
示例2: ItemAt
bool
BLayout::RemoveView(BView* child)
{
bool removed = false;
// a view can have any number of layout items - we need to remove them all
for (int32 i = fItems.CountItems(); i-- > 0;) {
BLayoutItem* item = ItemAt(i);
if (item->View() != child)
continue;
RemoveItem(i);
removed = true;
delete item;
}
return removed;
}
示例3:
BLayoutItem*
BLayout::RemoveItem(int32 index)
{
if (index < 0 || index >= fItems.CountItems())
return NULL;
BLayoutItem* item = (BLayoutItem*)fItems.RemoveItem(index);
// if the item refers to a BView, we make sure, it is removed from the
// parent view
BView* view = item->View();
if (view && view->fParent == fView)
view->_RemoveSelf();
item->SetLayout(NULL);
ItemRemoved(item);
InvalidateLayout();
return item;
}