本文整理汇总了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));
}
}
}
}
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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();
}
示例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;
}
示例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;
}
示例10: GetNextChild
int CIdXmlUtility::GetFirstChild(const char* szChildTagName, const char* szChildAttr1Name,
string& strChildTagValue, string& strChildAttr1Value)
{
m_domParser->ResetChildPos();
return GetNextChild(szChildTagName, szChildAttr1Name,
strChildTagValue, strChildAttr1Value);
}
示例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 );
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}