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


C++ GetNextChild函数代码示例

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


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


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