当前位置: 首页>>代码示例>>C++>>正文


C++ RemoveChild函数代码示例

本文整理汇总了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;
    }
}
开发者ID:comutt,项目名称:FileZilla3,代码行数:13,代码来源:queue.cpp

示例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);
}
开发者ID:nielx,项目名称:haiku-serviceskit,代码行数:13,代码来源:PackageViews.cpp

示例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]);
		}
	}
开发者ID:FreeFalcon,项目名称:freefalcon-central,代码行数:13,代码来源:brigade.cpp

示例4: while

View::~View()
{
   while ( CountChildren() > 0 )
   {
      View *sam = RemoveChild(0);
      delete sam;
   }

   if ( m_popupMenu != NULL ) 
   {
	   m_popupMenu->Quit();
   }
}
开发者ID:AdamRLukaitis,项目名称:spoon,代码行数:13,代码来源:View.cpp

示例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();
}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:13,代码来源:CPUButton.cpp

示例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
}
开发者ID:PyroOS,项目名称:Pyro,代码行数:16,代码来源:remoteview.cpp

示例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;
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:13,代码来源:queue.cpp

示例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);
	}
}
开发者ID:nielx,项目名称:haiku-serviceskit,代码行数:51,代码来源:Box.cpp

示例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);
}
开发者ID:retrydev,项目名称:MMO-Framework,代码行数:15,代码来源:HierarchyNode_Model.cpp

示例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;
}
开发者ID:Clusterforge,项目名称:htcondor,代码行数:14,代码来源:job.cpp

示例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();
	}
开发者ID:zenkovich,项目名称:o2,代码行数:14,代码来源:FoldersTree.cpp

示例12: RemoveChild

BComboBox::~BComboBox()
{
	if (fPopupWindow && fPopupWindow->Lock())
		fPopupWindow->Quit();

	RemoveChild(fText);
	delete fText;

	if (fWinMovedFilter->Looper())
		fWinMovedFilter->Looper()->RemoveFilter(fWinMovedFilter);

	delete fWinMovedFilter;
	
}
开发者ID:anevilyak,项目名称:haiku,代码行数:14,代码来源:ComboBox.cpp

示例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;
}
开发者ID:3da,项目名称:BSGUI,代码行数:14,代码来源:listboxes.cpp

示例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;
        }
    }
}
开发者ID:acremean,项目名称:urho3d,代码行数:14,代码来源:Node.cpp

示例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;
    }
  }
}
开发者ID:jonjahren,项目名称:unity,代码行数:14,代码来源:FilterBar.cpp


注:本文中的RemoveChild函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。