本文整理汇总了C++中RemoveChild函数的典型用法代码示例。如果您正苦于以下问题:C++ RemoveChild函数的具体用法?C++ RemoveChild怎么用?C++ RemoveChild使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RemoveChild函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxASSERT
void CFileItem::SetActive(const bool active)
{
if (active && !IsActive()) {
wxASSERT(!GetChildrenCount(false));
AddChild(new CStatusItem);
flags |= flag_active;
}
else if (!active && IsActive()) {
CQueueItem* pItem = GetChild(0, false);
RemoveChild(pItem);
flags &= ~flag_active;
}
}
示例2: while
void
PackagesView::Clean()
{
BView* view;
while ((view = ChildAt(0))) {
if (dynamic_cast<GroupView*>(view)
|| dynamic_cast<PackageCheckBox*>(view)) {
RemoveChild(view);
delete view;
}
}
ScrollTo(0, 0);
}
示例3: while
void BrigadeClass::DisposeChildren (void)
{
Unit e;
while (element[0])
{
e = (Unit)vuDatabase->Find(element[0]);
if (e)
e->KillUnit();
else
RemoveChild(element[0]);
}
}
示例4: while
View::~View()
{
while ( CountChildren() > 0 )
{
View *sam = RemoveChild(0);
delete sam;
}
if ( m_popupMenu != NULL )
{
m_popupMenu->Quit();
}
}
示例5: BControl
CPUButton::CPUButton(BMessage *message)
: BControl(message)
{
fReplicant = true;
/* We remove the dragger if we are in deskbar */
if (CountChildren() > 1)
RemoveChild(ChildAt(1));
ResizeTo(CPUBUTTON_WIDTH, CPUBUTTON_HEIGHT);
_InitData();
}
示例6: delete
/** \brief FTP Remote View deconstructor.
* This removes the m_pcDirChangedMsg object before destruction.
*/
RemoteIconView::~RemoteIconView()
{
if( m_pcDirChangedMsg )
delete( m_pcDirChangedMsg );
if( m_pcFileContextMenu ) delete( m_pcFileContextMenu );
if( m_pcDirContextMenu ) delete( m_pcDirContextMenu );
#if 0
RemoveChild( m_pcStringView );
delete( m_pcStringView );
#endif
}
示例7: AddChild
void CFileItem::SetActive(const bool active)
{
if (active && !m_active)
{
AddChild(new CStatusItem);
}
else if (!active && m_active)
{
CQueueItem* pItem = m_children.front();
RemoveChild(pItem);
}
m_active = active;
}
示例8: GetLayout
void
BBox::DoLayout()
{
// Bail out, if we shan't do layout.
if (!(Flags() & B_SUPPORTS_LAYOUT))
return;
bool layouted = GetLayout() ? true : false;
// If the user set a layout, let the base class version call its
// hook. In case when we have BView as a label, remove it from child list
// so it won't be layouted with the rest of views and add it again
// after that.
if (layouted) {
if (fLabelView)
RemoveChild(fLabelView);
BView::DoLayout();
if (fLabelView)
AddChild(fLabelView, ChildAt(0));
else
return;
}
_ValidateLayoutData();
// Even if the user set a layout, restore label view to it's
// desired position.
// layout the label view
if (fLabelView) {
fLabelView->MoveTo(fLayoutData->label_box.LeftTop());
fLabelView->ResizeTo(fLayoutData->label_box.Size());
}
// If we have layout return here and do not layout the child
if (layouted)
return;
// layout the child
if (BView* child = _Child()) {
BRect frame(Bounds());
frame.left += fLayoutData->insets.left;
frame.top += fLayoutData->insets.top;
frame.right -= fLayoutData->insets.right;
frame.bottom -= fLayoutData->insets.bottom;
BLayoutUtils::AlignInFrame(child, frame);
}
}
示例9: Get_private
//-----------------------------------------------------------------------------
void THierarchyNode_Model::Link(std::string namePartChild, std::string namePartParent)
{
THierarchyNode* pHNodeChild = Get_private(namePartChild);
THierarchyNode* pHNodeParent = Get_private(namePartParent);
if( pHNodeChild==NULL ||
pHNodeParent==NULL )
{
BL_FIX_BUG();
return;
}
pHNodeChild->nameParent = namePartParent;
RemoveChild(pHNodeParent,namePartChild);
pHNodeParent->vecNameChild.push_back(namePartChild);
}
示例10: RemoveChild
bool
Job::RemoveChild( Job* child )
{
bool success;
MyString whynot;
success = RemoveChild( child, whynot );
if( !success ) {
debug_printf( DEBUG_QUIET,
"ERROR: RemoveChild( %s ) failed for node %s: %s\n",
child ? child->GetJobName() : "(null)",
this->GetJobName(), whynot.Value() );
}
return success;
}
示例11: RemoveChild
void AssetsFoldersTree::CopyData(const Actor& otherActor)
{
const AssetsFoldersTree& other = dynamic_cast<const AssetsFoldersTree&>(otherActor);
Widget::CopyData(other);
mFoldersTree = FindChildByType<Tree>();
RemoveChild(FindChildByType<ContextMenu>());
InitializeContext();
RetargetStatesAnimations();
SetLayoutDirty();
}
示例12: RemoveChild
BComboBox::~BComboBox()
{
if (fPopupWindow && fPopupWindow->Lock())
fPopupWindow->Quit();
RemoveChild(fText);
delete fText;
if (fWinMovedFilter->Looper())
fWinMovedFilter->Looper()->RemoveFilter(fWinMovedFilter);
delete fWinMovedFilter;
}
示例13: RemoveChild
void Listbox::RemoveItem(ListboxItem *item)
{
if (!item)
return;
unsigned int indexLast = item->index;
unsigned int index = 0;
if (item == active)
{
active = 0;
}
RemoveChild(item);
delete item;
}
示例14: RemoveChild
void Node::RemoveChild(Node* node)
{
if (!node)
return;
for (Vector<SharedPtr<Node> >::Iterator i = children_.Begin(); i != children_.End(); ++i)
{
if (*i == node)
{
RemoveChild(i);
return;
}
}
}
示例15: RemoveChild
void FilterBar::RemoveFilter(Filter::Ptr const& filter)
{
for (auto iter: filter_map_)
{
if (iter.first->id == filter->id)
{
FilterExpanderLabel* filter_view = iter.second;
RemoveChild(filter_view);
filter_map_.erase(filter_map_.find(iter.first));
GetLayout()->RemoveChildObject(filter_view);
break;
}
}
}