• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetNextChild函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetNextChild函数的典型用法代码示例。如果您正苦于以下问题:C++ GetNextChild函数的具体用法?C++ GetNextChild怎么用?C++ GetNextChild使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetNextChild函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: VTLOG

void MyTreeCtrl::RefreshTreeStatus(Builder *pBuilder)
{
	VTLOG("(Refreshing Tree Status)\n");

	wxTreeItemId root = GetRootItem();
	wxTreeItemId parent, item;

	wxTreeItemIdValue cookie;
	for (parent = GetFirstChild(root, cookie); parent; parent = GetNextChild(root, cookie))
	{
		wxTreeItemIdValue cookie2;
		for (item = GetFirstChild(parent, cookie2); item; item = GetNextChild(parent, cookie2))
		{
			MyTreeItemData *data = (MyTreeItemData *)GetItemData(item);
			if (data)
			{
				SetItemText(item, MakeItemName(data->m_pLayer));
				if (data->m_pLayer == pBuilder->GetActiveLayer())
					SelectItem(item);
				if (data->m_pLayer->GetVisible())
				{
					SetItemFont(item, *wxNORMAL_FONT);
					SetItemTextColour(item, wxColour(0,0,0));
				}
				else
				{
					SetItemFont(item, *wxITALIC_FONT);
					SetItemTextColour(item, wxColour(80,80,80));
				}
			}
		}
	}
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:33,代码来源:TreeView.cpp


示例2: CONFIG_Read

//---------------------------------------------------------
void CData_Source_PgSQL::Autoconnect(void)
{
	long Reopen	= 0;

	CONFIG_Read("/DATA", "PROJECT_DB_REOPEN", Reopen);

	if( Reopen != 0 )
	{
		wxTreeItemIdValue srvCookie; wxTreeItemId srvItem = GetFirstChild(GetRootItem(), srvCookie);

		while( srvItem.IsOk() )
		{
			wxTreeItemIdValue Cookie; wxTreeItemId Item = GetFirstChild(srvItem, Cookie);

			while( Item.IsOk() )
			{
				CData_Source_PgSQL_Data	*pData	= Item.IsOk() ? (CData_Source_PgSQL_Data *)GetItemData(Item) : NULL; if( pData == NULL )	return;

				if( pData->Get_Type() == TYPE_SOURCE && !pData->Get_Username().is_Empty() )
				{
					Source_Open(pData, false);
				}

				Item	= GetNextChild(Item, Cookie);
			}

			srvItem	= GetNextChild(srvItem, srvCookie);
		}
	}
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:31,代码来源:data_source_pgsql.cpp


示例3: GetFirstChild

wxTreeItemId
SamplesTreeCtrl::getTreeItem( smp::Sample *sample, const wxTreeItemId &parent ) const
{
	wxTreeItemIdValue cookie;

	wxTreeItemId speechtem = GetFirstChild( parent, cookie );

	wxTreeItemId foundItem;
	while( speechtem.IsOk() )
	{
		SamplesTreeData *data = (SamplesTreeData *)GetItemData( speechtem );

		if ( data == NULL )
		{
			speechtem = GetNextChild( parent, cookie );
			continue;
		}

		if ( data->m_sample == sample )
			return speechtem;

		// call recursively on my children
		getTreeItem( sample, speechtem );

		// continue with my next sibling
		speechtem = GetNextChild( parent, cookie );
	}

	return speechtem;
}
开发者ID:rainChu,项目名称:ytp-king,代码行数:30,代码来源:SamplesTreeCtrl.cpp


示例4: GetNextChild

int32 UBTCompositeNode::FindChildToExecute(struct FBehaviorTreeSearchData& SearchData, EBTNodeResult::Type& LastResult) const
{
	FBTCompositeMemory* NodeMemory = GetNodeMemory<FBTCompositeMemory>(SearchData);
	int32 RetIdx = BTSpecialChild::ReturnToParent;

	if (Children.Num())
	{
		for (int32 ChildIdx = GetNextChild(SearchData, NodeMemory->CurrentChild, LastResult);
			ChildIdx >= 0;
			ChildIdx = GetNextChild(SearchData, ChildIdx, LastResult))
		{
			// check decorators
			if (DoDecoratorsAllowExecution(SearchData.OwnerComp, SearchData.OwnerComp->ActiveInstanceIdx, ChildIdx))
			{
				OnChildActivation(SearchData, ChildIdx);
				RetIdx = ChildIdx;
				break;
			}
			else
			{
				LastResult = EBTNodeResult::Failed;
				NotifyDecoratorsOnFailedActivation(SearchData, ChildIdx, LastResult);
			}
		}
	}

	return RetIdx;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:28,代码来源:BTCompositeNode.cpp


示例5:

	ChildNode * Composite::GetNextChild(ChildNode const * pNode, ID idMatch)
	{
		for (ChildNode * pSrchNode = GetNextChild(pNode); pSrchNode; pSrchNode = GetNextChild(pSrchNode))
		{
			if (pSrchNode->GetChunk()->m_idCk == idMatch && !pSrchNode->GetChunk()->IsUnknown()) return pSrchNode;
		}
		return NULL;
	}
开发者ID:Scraft,项目名称:avpmp,代码行数:8,代码来源:iff.cpp


示例6: locker

void svSymbolTree::BuildTree(const wxFileName& fn)
{
    TagEntryPtrVector_t newTags;
    ITagsStoragePtr db = TagsManagerST::Get()->GetDatabase();
    if ( !db ) {
        return;
    }
    
    db->SelectTagsByFile(fn.GetFullPath(), newTags);
    if ( TagsManagerST::Get()->AreTheSame(newTags, m_currentTags) )
        return;
    
    wxWindowUpdateLocker locker(this);
    SymbolTree::BuildTree(fn, &newTags);
    
    // Request from the parsing thread list of include files
    ++m_uid;
    
    ParseRequest *req = new ParseRequest(this);
    req->setFile(fn.GetFullPath());
    req->setType(ParseRequest::PR_PARSE_INCLUDE_STATEMENTS);
    req->_uid = m_uid; // Identifies this request
    ParseThreadST::Get()->Add( req );
    
    wxTreeItemId root = GetRootItem();
    if( root.IsOk() && ItemHasChildren(root) ) {
        wxTreeItemIdValue cookie;
        wxTreeItemId child = GetFirstChild(root, cookie);
        while ( child.IsOk() ) {
            Expand(child);
            child = GetNextChild(root, cookie);
        }
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:34,代码来源:outline_symbol_tree.cpp


示例7: Freeze

void wxTreeCtrlBase::CollapseAllChildren(const wxTreeItemId& item)
{
    Freeze();
    // first (recursively) collapse all the children
    wxTreeItemIdValue cookie;
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for ( wxTreeItemId idCurr = GetFirstChild(item, cookie);
          idCurr.IsOk();
          idCurr = GetNextChild(item, cookie) )
    {
        CollapseAllChildren(idCurr);
    }

    // then collapse this element too unless it's the hidden root which can't
    // be collapsed
    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
        Collapse(item);
    Thaw();
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:27,代码来源:treebase.cpp


示例8: GetItemText

//------------------------------------------------------------------------------
wxTreeItemId OutputTree::FindItem(wxTreeItemId parentId, const wxString &name)
{
   #if DEBUG_OUTPUT_TREE
   MessageInterface::ShowMessage
      ("OutputTree::FindItem() parentId=%s, name=%s\n",
       GetItemText(parentId).c_str(), name.c_str());
   #endif
   
   wxTreeItemId itemId;
   
   if (ItemHasChildren(parentId))
   {
      wxString itemText;
      wxTreeItemIdValue cookie;
      wxTreeItemId childId = GetFirstChild(parentId, cookie);
      
      while (childId.IsOk())
      {
         itemText = GetItemText(childId);
         if (itemText == name)
            return childId;
         
         childId = GetNextChild(parentId, cookie);
      }
   }
   
   return itemId;
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:29,代码来源:OutputTree.cpp


示例9: CheckValid

bool nuiContainer::DrawChildren(nuiDrawContext* pContext)
{
  CheckValid();
  IteratorPtr pIt;

  if (mReverseRender)
  {
    for (pIt = GetLastChild(); pIt && pIt->IsValid(); GetPreviousChild(pIt))
    {
      nuiWidgetPtr pItem = pIt->GetWidget();
      if (pItem)
        DrawChild(pContext, pItem);
    }
    delete pIt;
  }
  else
  {
    for (pIt = GetFirstChild(); pIt && pIt->IsValid(); GetNextChild(pIt))
    {
      nuiWidgetPtr pItem = pIt->GetWidget();
      if (pItem)
        DrawChild(pContext, pItem);
    }
    delete pIt;
  }
  return true;
}
开发者ID:hamedmohammadi,项目名称:nui3,代码行数:27,代码来源:nuiContainer.cpp


示例10: GetNextChild

int CIdXmlUtility::GetFirstChild(const char* szChildTagName, const char* szChildAttr1Name,
							 string& strChildTagValue, string& strChildAttr1Value)
{
	m_domParser->ResetChildPos();
	return GetNextChild(szChildTagName, szChildAttr1Name,
				strChildTagValue, strChildAttr1Value);
}
开发者ID:chutinhha,项目名称:cams,代码行数:7,代码来源:IdXmlUtility.cpp


示例11: GetFirstChild

//---------------------------------------------------------
wxTreeItemId CData_Source_PgSQL::Get_Server_Item(const wxString &Server, bool bCreate)
{
	wxString	Name	= Server.AfterFirst('[').BeforeFirst(']');

	wxTreeItemIdValue Cookie; wxTreeItemId Item = GetFirstChild(GetRootItem(), Cookie);

	while( Item.IsOk() )
	{
		if( !Name.Cmp(GetItemText(Item)) )
		{
			return( Item );
		}

		Item	= GetNextChild(Item, Cookie);
	}

	if( bCreate )
	{
		Item	= AppendItem(GetRootItem(), Name, IMG_SERVER, IMG_SERVER, new CData_Source_PgSQL_Data(TYPE_SERVER, &Name, &Name));

		SortChildren(GetRootItem());
		Expand      (GetRootItem());
	}

	return( Item );
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:27,代码来源:data_source_pgsql.cpp


示例12: GetTreeItem

wxTreeItemId wxSpinTreeCtrl::GetTreeItem(const char *nodeId, wxTreeItemId idParent, wxTreeItemIdValue cookie)
{
    if (! idParent.IsOk())
        return NULL;

    wxSpinTreeItemData *treeData = (wxSpinTreeItemData*)GetItemData(idParent);
    if (treeData && treeData->m_pNode.valid())
    {
        if (strcmp(treeData->m_pNode->id->s_name, nodeId) == 0)
        {
            return idParent;
        }
    }

    if (ItemHasChildren(idParent))
    {
        wxTreeItemId child;
        for (child = GetFirstChild(idParent, cookie); child.IsOk(); child = GetNextChild(idParent, cookie))
        {
            wxTreeItemId targetItem = GetTreeItem(nodeId, child, cookie);
            if (targetItem.IsOk())
                return targetItem;
        }
    }
    return GetTreeItem(nodeId, GetNextSibling(idParent), cookie);
}
开发者ID:mikewoz,项目名称:spinframework,代码行数:26,代码来源:wxSpinTreeCtrl.cpp


示例13: GetNextChild

VectorTreeItemId BFBackupTree::GetTaskItems (wxTreeItemId idParent, bool bGoDeep /*= true*/)
{
    VectorTreeItemId vec;

    wxTreeItemId idCurr;
    wxTreeItemIdValue idCookie;

    if (ItemHasChildren(idParent))
    {
        for (idCurr = GetFirstChild(idParent, idCookie);
             idCurr.IsOk();
             idCurr = GetNextChild(idParent, idCookie))
        {
            if (ItemHasChildren(idCurr) == bGoDeep)
            {
                VectorTreeItemId vecSub(GetTaskItems(idCurr, true));

                for (ItVectorTreeItemId it = vecSub.begin();
                     it != vecSub.end();
                     it++)
                {
                    vec.push_back(*it);
                }
            }
            else
            {
                if (IsTask(idCurr))
                    vec.push_back(idCurr);
            }
        }
    }

    return vec;
}
开发者ID:BackupTheBerlios,项目名称:blackfisk-svn,代码行数:34,代码来源:BFBackupTree.cpp


示例14: while

 bool MenuBar::SetActiveTab(MenuTab* tab)
 {
   bool found = false;
   MenuTab*  pChild = (MenuTab*)Group::GetFirstChild();
   int i=0;
   while(pChild)
   {
     ++i;
     if(pChild == tab)
     {
       pChild->SetActive(true);
       SetCurrentChild(pChild);
       found = true;
     }
     else
     {
       pChild->SetActive(false);
     }
     pChild = (MenuTab*)GetNextChild(pChild);
   }
   // Activate first tab if none where found.
   if(!found)
   {
     pChild = (MenuTab*)Group::GetFirstChild();
     pChild->SetActive();
     SetCurrentChild(pChild);
   }
   return found;
 }
开发者ID:Strongc,项目名称:DC_source,代码行数:29,代码来源:MenuBar.cpp


示例15: FindChild

static RealDTEntry
FindChild(RealDTEntry cur, char *buf)
{
	RealDTEntry	child;
	unsigned long	index;
	char *		str;
	int		dummy;

	if (cur->nChildren == 0) {
		return NULL;
	}
	index = 1;
	child = GetFirstChild(cur);
	while (1) {
		if (DTGetProperty(child, "name", (void **)&str, &dummy) != kSuccess) {
			break;
		}
		if (strcmp(str, buf) == 0) {
			return child;
		}
		if (index >= cur->nChildren) {
			break;
		}
		child = GetNextChild(child);
		index++;
	}
	return NULL;
}
开发者ID:rohsaini,项目名称:mkunity,代码行数:28,代码来源:device_tree.c


示例16: Freeze

//---------------------------------------------------------
void CData_Source_PgSQL::Update_Sources(const wxTreeItemId &Root)
{
	Freeze();

	//-----------------------------------------------------
	wxTreeItemIdValue Cookie; wxTreeItemId Item = GetFirstChild(Root, Cookie);

	while( Item.IsOk() )
	{
		Update_Source(Item);

		Item	= GetNextChild(Item, Cookie);
	}

	//-----------------------------------------------------
	CSG_Table	Connections;

	RUN_MODULE(DB_PGSQL_Get_Connections, false, SET_PARAMETER("CONNECTIONS", &Connections));	// CGet_Connections

	for(int i=0; i<Connections.Get_Count(); i++)
	{
		if( !Find_Source(Connections[i].asString(0)) )
		{
			Update_Source(Connections[i].asString(0));
		}
	}

	//-----------------------------------------------------
	SortChildren(Root);
	Expand      (Root);

	Thaw();
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:34,代码来源:data_source_pgsql.cpp


示例17: Update

void gxSceneNode::Update()
{
	for(gxSceneNode * child = GetFirstChild(); child != NULL; child = GetNextChild(child))
	{
		child->Update();
	}
}
开发者ID:ptierney,项目名称:inc,代码行数:7,代码来源:GX_Scene.cpp


示例18: CalcIdealSize

nuiRect nuiZoomView::CalcIdealSize()
{
  nuiRect rect;

  nuiSize HorizontalZoomLevel = mHorizontalZoomLevel; 
  nuiSize VerticalZoomLevel = mVerticalZoomLevel;

  if (mpVerticalSlider)
    VerticalZoomLevel = mpVerticalSlider->GetRange().GetValue();
  if (mpHorizontalSlider)
    HorizontalZoomLevel = mpHorizontalSlider->GetRange().GetValue();


  IteratorPtr pIt;
  for (pIt = GetFirstChild(); pIt && pIt->IsValid(); GetNextChild(pIt))
  {
    nuiWidgetPtr pItem = pIt->GetWidget();
    nuiRect itemRect = pItem->GetIdealRect();
    itemRect.SetSize(itemRect.GetWidth() * HorizontalZoomLevel, itemRect.GetHeight() * VerticalZoomLevel);
    rect.Union(rect, itemRect); 
  }
  delete pIt;

  rect.mLeft = 0;
  rect.mTop = 0;

  mIdealRect = rect;
  return mIdealRect;
}
开发者ID:YetToCome,项目名称:nui3,代码行数:29,代码来源:nuiZoomView.cpp


示例19: GetFirstChild

void CLocalTreeView::OnVolumesEnumerated(wxCommandEvent& event)
{
	if (!m_pVolumeEnumeratorThread)
		return;

	std::list<CVolumeDescriptionEnumeratorThread::t_VolumeInfo> volumeInfo;
	volumeInfo = m_pVolumeEnumeratorThread->GetVolumes();

	if (event.GetEventType() == fzEVT_VOLUMESENUMERATED)
	{
		delete m_pVolumeEnumeratorThread;
		m_pVolumeEnumeratorThread = 0;
	}

	for (std::list<CVolumeDescriptionEnumeratorThread::t_VolumeInfo>::const_iterator iter = volumeInfo.begin(); iter != volumeInfo.end(); iter++)
	{
		wxString drive = iter->volume;

		wxTreeItemIdValue tmp;
		wxTreeItemId item = GetFirstChild(m_drives, tmp);
		while (item)
		{
			wxString name = GetItemText(item);
			if (name == drive || name.Left(drive.Len() + 1) == drive + _T(" "))
			{
				SetItemText(item, drive + _T(" (") + iter->volumeName + _T(")"));
				break;
			}
			item = GetNextChild(m_drives, tmp);
		}
	}
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:32,代码来源:LocalTreeView.cpp


示例20: GetFirstChild

wxTreeItemId SessionTreeControl::findSession( wxTreeItemId root,
                                                std::string address )
{
    wxTreeItemIdValue temp; // unused var, needed in getchild
    wxTreeItemId targetItem;
    wxTreeItemId current = GetFirstChild( root, temp );

    while ( current.IsOk() )
    {
        wxString text = GetItemText( current );
        std::string target = std::string( text.char_str() );
        if ( target.compare( address ) == 0 )
            return current;

        if ( ItemHasChildren( current ) )
        {
            targetItem = findSession( current, address );
            if ( targetItem.IsOk() )
                return targetItem;
        }
        current = GetNextChild( root, temp );
    }

    wxTreeItemId none;
    return none; // return default value if not found
}
开发者ID:Adhesion,项目名称:grav,代码行数:26,代码来源:SessionTreeControl.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetNextItem函数代码示例发布时间:2022-05-30
下一篇:
C++ GetNextChar函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap