您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetRootItem函数代码示例

51自学网 2021-06-01 21:14:22
  C++
这篇教程C++ GetRootItem函数代码示例写得很实用,希望能帮到您。

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

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

示例1: wxGetTextFromUser

void PartitioningTreeCtrl::onadd_h(wxCommandEvent& event){	wxString cid= wxGetTextFromUser("Enter a usagename of homeplacement","Usagename",	"", this,-1,-1,TRUE);	wxString text="Homeplacement(";	text.Append(cid);	text.Append(")");	wxTreeItemId itemid = AppendItem(GetSelection(),text,		TreeCtrlIcon_Folder,TreeCtrlIcon_FolderSelected,NULL);	Expand(GetRootItem());	Refresh();	ItemTyp itype;	itype.itemid=itemid;	itype.type=home;	itype.usagename=cid;	itemtypes.push_back(itype);}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:19,


示例2: wxTreeItemId

void BFBackupTree::Init (){    lastItemId_ = wxTreeItemId();    Freeze();    // recreate the treeCtrl with all tasks    BFBackup::Instance().InitThat(this);    // expand all items in the treeCtlr    ExpandAll();	if ( lastItemId_.IsOk() )		SelectItem(lastItemId_);	else		SelectItem(GetRootItem());    Thaw();}
开发者ID:BackupTheBerlios,项目名称:blackfisk-svn,代码行数:19,


示例3: GetDriveItems

void CDirstatDoc::OnViewShowunknown(){    CArray<CItem *, CItem *> drives;    GetDriveItems(drives);    if(m_showUnknown)    {        for(int i = 0; i < drives.GetSize(); i++)        {            CItem *unknown = drives[i]->FindUnknownItem();            ASSERT(unknown != NULL);            // FIXME: Multi-select            if(GetSelection(0) == unknown)            {                SetSelection(unknown->GetParent());            }            if(GetZoomItem() == unknown)            {                m_zoomItem = unknown->GetParent();            }            drives[i]->RemoveUnknownItem();        }        m_showUnknown = false;    }    else    {        for(int i = 0; i < drives.GetSize(); i++)        {            drives[i]->CreateUnknownItem();        }        m_showUnknown = true;    }    if(drives.GetSize() > 0)    {        SetWorkingItem(GetRootItem());    }    UpdateAllViews(NULL);}
开发者ID:JDuverge,项目名称:windirstat,代码行数:43,


示例4: GetItemText

void browsers::CellBrowser::ShowMenu(wxTreeItemId id, const wxPoint& pt) {    wxMenu menu;    RBcellID = id;    if ( id.IsOk() && (id != GetRootItem()))   {      wxString RBcellname = GetItemText(id);      menu.Append(CELLTREEOPENCELL, wxT("Open " + RBcellname));      menu.Append(tui::TMCELL_REF_B , wxT("Add reference to " + RBcellname));      menu.Append(tui::TMCELL_AREF_B, wxT("Add array of " + RBcellname));      wxString ost;      ost << wxT("export ") << RBcellname << wxT(" to GDS");      menu.Append(tui::TMGDS_EXPORTC, ost);      menu.Append(tui::TMCELL_REPORTLAY, wxT("Report layers used in " + RBcellname));    }    else {      menu.Append(tui::TMCELL_NEW, wxT("New cell")); // will be catched up in toped.cpp      menu.Append(tui::TMGDS_EXPORTL, wxT("GDS export"));    }    PopupMenu(&menu, pt);}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:19,


示例5: Freeze

void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item){    Freeze();    // expand this item first, this might result in its children being added on    // the fly    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )        Expand(item);    //else: expanding hidden root item is unsupported and unnecessary    // then (recursively) expand all the children    wxTreeItemIdValue cookie;    for ( wxTreeItemId idCurr = GetFirstChild(item, cookie);          idCurr.IsOk();          idCurr = GetNextChild(item, cookie) )    {        ExpandAllChildren(idCurr);    }    Thaw();}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:19,


示例6: GetRootItem

wxTreeItemId DirectoryTree::PopulatePath(const wxString& sPath)  {  wxString sSeparator = wxFileName::GetPathSeparator();  wxChar chSeparator = sSeparator.GetChar(0);  // Ensure path finishes in path separator	wxString sTerminatedPath = sPath;  if(sTerminatedPath.Right(1) != sSeparator)    sTerminatedPath += sSeparator;  // Start from root path  wxTreeItemId tid = GetRootItem(sPath);	if(!tid.IsOk())    {    wxLogDebug(wxT("DirectoryTree::PopulatePath(): GetRootItem(sPath) failed;"), (int) tid);    return wxTreeItemId();     }  sTerminatedPath = sTerminatedPath.AfterFirst(chSeparator);  while(sTerminatedPath != wxT(""))    {		// Ensure all children exist		AddChildren(tid);		// Select the sub-directory    wxString sDir = sTerminatedPath.BeforeFirst(chSeparator);    wxLogTrace(DIRECTORYTREE_EVENTS, wxT("CreatePath(): Directory '%s'"), sDir.c_str());    wxTreeItemId tidChild = GetChildByName(tid, sDir);		// Fail if we can't find the sub-directory    if(!tidChild.IsOk())			{			wxLogTrace(DIRECTORYTREE_EVENTS, wxT("CreatePath(): GetChildByName(%u, '%s') failed"), (int) tid, sDir.c_str());			break;			}    sTerminatedPath = sTerminatedPath.AfterFirst(chSeparator);    tid = tidChild;    }		// Return the item  return tid;  }
开发者ID:joeyates,项目名称:sherpa,代码行数:42,


示例7: update_locker

wxSize AutoResizingTreeCtrl::DoGetBestSize() const{    AutoResizingTreeCtrl& myself = const_cast<AutoResizingTreeCtrl&>(*this);    wxWindowUpdateLocker update_locker(&myself);    wxSize best_size(0, 0);    wxTreeItemId const selection = GetSelection();    wxTreeItemId const first_visible = GetFirstVisibleItem();    wxTreeItemId const root = GetRootItem();    myself.DoGetBestSizePrivate(best_size, root, true);    // need some minimal size even for an empty tree    if(best_size.x == 0 || best_size.y == 0)        {        wxSize min_size = wxTreeCtrl::DoGetBestSize();        if(best_size.x == 0)            {            best_size.x = min_size.x;            }        if(best_size.y == 0)            {            best_size.y = min_size.y;            }        }    best_size += GetSize() - GetClientSize();    if(selection.IsOk())        {        myself.SelectItem(selection);        }    if(first_visible.IsOk())        {        myself.ScrollTo(first_visible);        }    CacheBestSize(best_size);    return best_size;}
开发者ID:vadz,项目名称:lmi,代码行数:42,


示例8: GetRootItem

wxTreeItemIdSamplesTreeCtrl::getTreeItem( smp::Sample *sample ) const{	wxTreeItemId root = GetRootItem();	wxTreeItemIdValue cookie;	wxTreeItemId speakerItem = GetFirstChild( root, cookie );	wxTreeItemId foundItem;	while( speakerItem.IsOk() )	{		if ( (foundItem = getTreeItem( sample, speakerItem )).IsOk() )			return foundItem;		speakerItem = GetNextChild( root, cookie );	}	return foundItem;}
开发者ID:rainChu,项目名称:ytp-king,代码行数:20,


示例9: GetRootItem

HTREEITEM CCWTreeCtrl::GetNextTreeItem(HTREEITEM hItem){  if (NULL == hItem)    return GetRootItem();  // First, try to go to this item's 1st child  HTREEITEM hReturn = GetChildItem(hItem);  // If no more child items...  while (hItem && !hReturn) {    // Get this item's next sibling    hReturn = GetNextSiblingItem(hItem);    // If hReturn is NULL, then there are no sibling items, and we're on a leaf node.    // Backtrack up the tree one level, and we'll look for a sibling on the next    // iteration (or we'll reach the root and quit).    hItem = GetParentItem(hItem);  }  return hReturn;}
开发者ID:ByteRisc,项目名称:pwsafe,代码行数:20,


示例10: GetRootItem

// Select the tree item corresponding to the WORKSHEET_DATAITEM aItemvoid DESIGN_TREE_FRAME::SelectCell( WORKSHEET_DATAITEM* aItem ){    wxTreeItemId        rootcell = GetRootItem();    wxTreeItemIdValue   cookie;    wxTreeItemId        cell = GetFirstChild( rootcell, cookie );    while( cell.IsOk() )    {        DESIGN_TREE_ITEM_DATA* data = (DESIGN_TREE_ITEM_DATA*) GetItemData( cell );        if( data->GetItem() == aItem )        {            SelectItem( cell );            return;        }        cell = GetNextChild( rootcell, cookie );    }}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:21,


示例11: GetRootItem

//选择粒子基本参数Itemvoid SkillObjectTree::SelectSkillSetting(){	wxTreeItemId rootId = GetRootItem();	wxTreeItemIdValue idValue;	wxTreeItemId childId = GetFirstChild(rootId,idValue);	while(childId.IsOk())	{		SkillTreeItemData* pItemData = dynamic_cast<SkillTreeItemData*>(GetItemData(childId)); 		if(pItemData->GetDesc() == "Skill BasicSetting")		{			//SelectItem(childId);			Expand(childId);			mSelectSkillObject = NULL;			break;		}		childId = GetNextSibling(childId);	}}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:21,


示例12: GetRootItem

/*================CPathTreeCtrl::SearchTreeSearch the three using the search string.Adds the matched tree items to the result tree.Returns the number of items added to the result tree.================*/int CPathTreeCtrl::SearchTree( treeItemCompare_t compare, void *data, CPathTreeCtrl &result ) {	idPathTreeStack stack, searchStack;	HTREEITEM item, child;	idStr name;	int id, numItems;	numItems = 0;	result.DeleteAllItems();	stack.PushRoot( NULL );	item = GetRootItem();	searchStack.PushRoot( item );	id = 0;	while( searchStack.Num() > 0 ) {		for ( child = GetChildItem( item ); child; child = GetChildItem( child ) ) {			searchStack.Push( item, GetItemText( item ) );			item = child;		}		name = searchStack.TopName();		name += GetItemText( item );		id = GetItemData( item );		if ( compare( data, item, name ) ) {			result.AddPathToTree( name, id, stack );			numItems++;		}		for ( item = GetNextSiblingItem( item ); item == NULL;  ) {			item = GetNextSiblingItem( searchStack.TopItem() );			searchStack.Pop();			if ( searchStack.Num() <= 0 ) {				return numItems;			}		}	}	return numItems;}
开发者ID:BielBdeLuna,项目名称:StormEngine2,代码行数:50,


示例13: GetRootItem

 int SMCTreeCtrl::InsertColumn(int iCol,int nWid) {     if(iCol < 0) iCol = m_arrColWidth.GetCount();     m_arrColWidth.InsertAt(iCol,nWid);          HSTREEITEM hItem = GetRootItem();     while(hItem)     {         MCITEM *pMcItem = (MCITEM*)STreeCtrl::GetItemData(hItem);         pMcItem->arrText.InsertAt(iCol,SStringT());         hItem = GetNextItem(hItem);     }     m_nItemWid = -1;     CalcItemWidth(0);          CSize szView = GetViewSize();     szView.cx = m_nItemWid;     SetViewSize(szView);     Invalidate();     return iCol; }
开发者ID:435420057,项目名称:soui,代码行数:21,


示例14: OnBeginDrag

void SkillObjectTree::OnBeginDrag(wxTreeEvent& event){	// need to explicitly allow drag	if ( event.GetItem() != GetRootItem() )	{		m_draggedItem = event.GetItem();		wxPoint clientpt = event.GetPoint();		wxPoint screenpt = ClientToScreen(clientpt);		//wxLogMessage(wxT("OnBeginDrag: started dragging %s at screen coords (%i,%i)"),		//	GetItemText(m_draggedItem).c_str(),		//	screenpt.x, screenpt.y);		event.Allow();	}	else	{		//wxLogMessage(wxT("OnBeginDrag: this item can't be dragged."));	}}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:21,


示例15: GetRootItem

// Collapse all the tree sections.  This is recursive// so that we can collapse submenus.  SetRedraw should// be FALSE while this is executing.void CStatisticsTree::CollapseAll(HTREEITEM theItem){	HTREEITEM hCurrent;	if (theItem == NULL) {		hCurrent = GetRootItem();		m_bExpandingAll = true;	}	else		hCurrent = theItem;	while (hCurrent != NULL)	{		if (ItemHasChildren(hCurrent))			CollapseAll(GetChildItem(hCurrent));		Expand(hCurrent, TVE_COLLAPSE);		hCurrent = GetNextItem(hCurrent, TVGN_NEXT);	}	if (theItem == NULL) m_bExpandingAll = false;}
开发者ID:axxapp,项目名称:winxgui,代码行数:24,


示例16: GetRootItem

void BulletTree::SelectElementItem(Fairy::EffectElement* element){	wxTreeItemId rootId = GetRootItem();	wxTreeItemIdValue idValue;	wxTreeItemId subId;	wxTreeItemId childId = GetFirstChild(rootId,idValue);	while(childId.IsOk())	{		BulletTreeItemData* pItemData = dynamic_cast<BulletTreeItemData*>(GetItemData(childId)); 		Fairy::EffectElement* pElement = (Fairy::EffectElement*)pItemData->GetData();		if(pItemData->GetDesc() == "Effect element" && pElement == element)		{			this->SelectItem(childId);			this->Expand(childId);			return;		}		childId = GetNextSibling(childId);	}}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:21,


示例17: TreeModelBase

//[-------------------------------------------------------]//[ Public functions                                      ]//[-------------------------------------------------------]ClassInfoModel::ClassInfoModel(QObject *parent): TreeModelBase(new HeaderTreeItem, parent),	m_pCommonCategory(nullptr),	m_pAttributeCategory(nullptr),	m_pSlotsCategory(nullptr),	m_pSignalsCategory(nullptr),	m_pPropertiesCategory(nullptr),	m_pConstructorsCategory(nullptr),	m_pMethodsCategory(nullptr){	QStringList headerItems;	headerItems << "Category";	HeaderTreeItem *header = static_cast<HeaderTreeItem*>(GetRootItem());	header->setHeaderItems(headerItems);	m_pCommonCategory = new ClassInfoCategoryTreeItem("Common", GetRootItem());	m_pAttributeCategory = new ClassInfoCategoryTreeItem("Attributes", GetRootItem());	m_pSlotsCategory = new ClassInfoCategoryTreeItem("Slots", GetRootItem());	m_pSignalsCategory = new ClassInfoCategoryTreeItem("Signals", GetRootItem());	m_pPropertiesCategory = new ClassInfoCategoryTreeItem("Properties", GetRootItem());	m_pConstructorsCategory = new ClassInfoCategoryTreeItem("Constructors", GetRootItem());	m_pMethodsCategory = new ClassInfoCategoryTreeItem("Methods", GetRootItem());}
开发者ID:ByeDream,项目名称:pixellight,代码行数:26,


示例18: GetRootItem

wxTreeItemId svSymbolTree::DoAddIncludeFiles(const wxFileName& fn, const fcFileOpener::List_t& includes){    wxTreeItemId root = GetRootItem();    if(root.IsOk() == false)        return wxTreeItemId();    if( root.IsOk() && ItemHasChildren(root) ) {        wxTreeItemIdValue cookie;        wxTreeItemId child = GetFirstChild(root, cookie);        while ( child.IsOk() ) {            // Dont add duplicate items            if ( GetItemText(child) == INCLUDE_FILES_NODE_TEXT) {                Delete(child);                break;            }            child = GetNextChild(root, cookie);        }    }        if( includes.empty() )        return wxTreeItemId();    wxTreeItemId item;    if(ItemHasChildren(root)) {        item = InsertItem(root, 0, INCLUDE_FILES_NODE_TEXT, 2, 2, new MyTreeItemData(INCLUDE_FILES_NODE_TEXT, wxEmptyString));    } else {        item = AppendItem(root, INCLUDE_FILES_NODE_TEXT, 2, 2, new MyTreeItemData(INCLUDE_FILES_NODE_TEXT, wxEmptyString));    }    fcFileOpener::List_t::const_iterator iter = includes.begin();    for(; iter != includes.end(); ++iter) {        wxString displayName( *iter );        AppendItem(item, displayName, 16, 16, new MyTreeItemData(displayName, displayName) );    }    return item;}
开发者ID:05storm26,项目名称:codelite,代码行数:40,


示例19: SearchCompanionItem

//寻找项HTREEITEM CCompanionTreeCtrl::SearchCompanionItem(HTREEITEM hRootTreeItem, DWORD_PTR dwParam){	//获取父项	if (hRootTreeItem==NULL) hRootTreeItem=GetRootItem();	if (hRootTreeItem==NULL) return NULL;	//循环查找	HTREEITEM hTreeItemTemp=NULL;	do	{		if (GetItemData(hRootTreeItem)==dwParam) return hRootTreeItem;		hTreeItemTemp=GetChildItem(hRootTreeItem);		if (hTreeItemTemp!=NULL)		{			hTreeItemTemp=SearchCompanionItem(hTreeItemTemp,dwParam);			if (hTreeItemTemp!=NULL) return hTreeItemTemp;		}		hRootTreeItem=GetNextItem(hRootTreeItem,TVGN_NEXT);	} while (hRootTreeItem!=NULL);	return NULL;}
开发者ID:275958081,项目名称:netfox,代码行数:23,


示例20: GetCount

HTREEITEM KGTreeCtrl::FindNextItembySubString(CString strText, HTREEITEM hTreeItem){	//没有数据返回NULL	int nCount = GetCount();	if ( !nCount ) return NULL;		HTREEITEM FindNode = NULL;	if (!hTreeItem)		hTreeItem = GetRootItem();	if (ItemHasChildren(hTreeItem))	{		FindNode = GetChildItem(hTreeItem);		FindNode = FindItembySubString(strText,FindNode);		KG_PROCESS_SUCCESS(FindNode);	}		FindNode = GetNextSiblingItem(hTreeItem);	if (FindNode)	{		FindNode = FindItembySubString(strText,FindNode);		KG_PROCESS_SUCCESS(FindNode);	}		while((hTreeItem = GetParentItem(hTreeItem)) != 0)	{		FindNode = GetNextSiblingItem(hTreeItem);		if (FindNode)		{			FindNode = FindItembySubString(strText,FindNode);			KG_PROCESS_SUCCESS(FindNode);		}	}		return NULL;Exit1:	return FindNode;}
开发者ID:viticm,项目名称:pap2,代码行数:39,


示例21: GetRootItem

CString CBCGPBreadcrumb::GetItemPath (HBREADCRUMBITEM hItem, TCHAR delimiter) const{	CString strPath;	HBREADCRUMBITEM hRootItem = GetRootItem ();	BOOL bRootItemIsEmpty = GetItemText (hRootItem).IsEmpty ();	while (hItem != NULL)	{		CString strItem = GetItemText (hItem);		if (hItem == hRootItem && bRootItemIsEmpty)		{			// Do not add the root item if it has no text.			break;		}		globalUtils.StringAddItemQuoted (strPath, strItem, TRUE, delimiter, '/"');		hItem = GetItemParent (hItem);	}	return strPath;}
开发者ID:iclosure,项目名称:jframework,代码行数:22,


示例22: GetLastItem

HTREEITEM CTreeCtrl::GetLastItem() const{	// Begin from the root item	HTREEITEM hItem=GetRootItem(),hTemp;		for (;;)	{		// Find last sibling		while ((hTemp=GetNextItem(hItem,TVGN_NEXT))!=NULL)			hItem=hTemp;		hTemp=GetNextItem(hItem,TVGN_CHILD);		if (hTemp==NULL)		{			// No childs, return this item			return hItem;		}				// Check all childs		hItem=hTemp;	}}
开发者ID:joshball,项目名称:locate32-cogit.net,代码行数:22,


示例23: ClearSelection

BOOL CLibraryFolderCtrl::ClearSelection(HTREEITEM hExcept, HTREEITEM hItem, BOOL bSelect){	BOOL bChanged = FALSE;	if ( hItem == NULL ) hItem = GetRootItem();	for ( ; hItem != NULL ; hItem = GetNextItem( hItem, TVGN_NEXT ) )	{		BOOL bIsSelected = ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED ) ? TRUE : FALSE;		if ( hItem != hExcept && ( bIsSelected != bSelect ) )		{			SetItemState( hItem, bSelect ? TVIS_SELECTED : 0, TVIS_SELECTED );			bChanged = TRUE;		}		HTREEITEM hChild = GetChildItem( hItem );		if ( hChild != NULL ) bChanged |= ClearSelection( hExcept, hChild, bSelect );	}	return bChanged;}
开发者ID:ivan386,项目名称:Shareaza,代码行数:22,


示例24: GetRootItem

HTREEITEM CTreeCtrlEx::ItemFromData(DWORD dwData, HTREEITEM hStartAtItem/*=NULL*/) const{	// Traverse all items in tree control	HTREEITEM hItem;	if ( hStartAtItem )		hItem = hStartAtItem;	else		hItem = GetRootItem();	while ( hItem )	{		if ( dwData == (DWORD)GetItemData( hItem ) )			return hItem;		// Get first child node		HTREEITEM hNextItem = GetChildItem( hItem );		if ( !hNextItem )		{			// Get next sibling child			hNextItem = GetNextSiblingItem( hItem );			if ( !hNextItem )			{				HTREEITEM hParentItem=hItem;				while ( !hNextItem && hParentItem )				{					// No more children: Get next sibling to parent					hParentItem = GetParentItem( hParentItem );					hNextItem = GetNextSiblingItem( hParentItem );				}			}		}		hItem = hNextItem;	}	return NULL;}
开发者ID:mikemakuch,项目名称:muzikbrowzer,代码行数:39,


示例25: GetClientRect

void PropertyTree::UpdateScrollbar(){    SCROLLINFO si;    LONG nHeight;    CRect rc;    GetClientRect(rc);    nHeight = rc.Height() + 1;    ZeroMemory(&si, sizeof(SCROLLINFO));    si.cbSize = sizeof(SCROLLINFO);    si.fMask = SIF_RANGE|SIF_PAGE;    si.nMin = 0;    si.nMax = GetRootItem()->GetTotalHeight();    si.nPage = nHeight + PROPTREEITEM_DEFHEIGHT;    if ((int)si.nPage>si.nMax)        SetOriginOffset(0);    SetScrollInfo(SB_VERT, &si, TRUE);    CheckScrollVisible();	// sets a flag thats used when drawing}
开发者ID:stephen-hill,项目名称:musicCube,代码行数:22,



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


C++ GetRotation函数代码示例
C++ GetRootComponent函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。