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

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

51自学网 2021-06-03 10:12:41
  C++
这篇教程C++ wxTreeItemId函数代码示例写得很实用,希望能帮到您。

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

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

示例1: DisplayDropHighlight

	wxTreeItemId DisplayDropHighlight(wxPoint point)	{		wxTreeItemId hit = GetHit(point);		if (!hit) {			ClearDropHighlight();			return wxTreeItemId();		}		const CServerPath& path = m_pRemoteTreeView->GetPathFromItem(hit);		if (path.empty()) {			ClearDropHighlight();			return wxTreeItemId();		}		const wxTreeItemId dropHighlight = m_pRemoteTreeView->m_dropHighlight;		if (dropHighlight != wxTreeItemId())			m_pRemoteTreeView->SetItemDropHighlight(dropHighlight, false);		m_pRemoteTreeView->SetItemDropHighlight(hit, true);		m_pRemoteTreeView->m_dropHighlight = hit;		return hit;	}
开发者ID:juaristi,项目名称:filezilla,代码行数:24,


示例2: while

wxTreeItemId McfViewerForm::FindNode(const wchar_t* str, wxTreeItemId lastNode){	wxTreeItemIdValue cookie;	wxTreeItemId item = m_tcFileTree->GetFirstChild(lastNode, cookie);	while (item.IsOk())	{		if (wcscmp(str, m_tcFileTree->GetItemText(item))==0)			return item;		item = m_tcFileTree->GetNextChild(lastNode, cookie);	}	return wxTreeItemId();}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:15,


示例3: wxTreeItemId

void browsers::TDTbrowser::OnTELLremovecell(wxString cellname, wxString parentname, bool orphan){   wxTreeItemId newparent;   if (orphan)   {      wxTreeItemId item;      hCellBrowser->findItem(cellname, item, hCellBrowser->GetRootItem());      hCellBrowser->copyItem(item, hCellBrowser->GetRootItem());      item = wxTreeItemId();      VERIFY(hCellBrowser->findItem(parentname, newparent, hCellBrowser->GetRootItem()));      VERIFY(hCellBrowser->findItem(cellname, item, newparent));      hCellBrowser->DeleteChildren(item);      hCellBrowser->Delete(item);   }   else if (wxT("") == parentname)   {// no parent => we are removing the cell, not it's reference      wxTreeItemId item;            //Flat      VERIFY(fCellBrowser->findItem(cellname, item, fCellBrowser->GetRootItem()));      fCellBrowser->Delete(item);      //Hier      wxTreeItemId item2;      VERIFY(hCellBrowser->findItem(cellname, item2, hCellBrowser->GetRootItem()));      // copy all children      // This part is "in case". The thing is that children should have been      // removed already, by tdtcell::removePrep      wxTreeItemIdValue cookie;      wxTreeItemId child = hCellBrowser->GetFirstChild(item2,cookie);      while (child.IsOk())      {         hCellBrowser->copyItem(child, hCellBrowser->GetRootItem());         child = hCellBrowser->GetNextChild(item2,cookie);      }      // finally delete the item and it's children      hCellBrowser->DeleteChildren(item2);      hCellBrowser->Delete(item2);   }   else       while (hCellBrowser->findItem(parentname, newparent, hCellBrowser->GetRootItem()))      {         wxTreeItemId item;         VERIFY(hCellBrowser->findItem(cellname, item, newparent));         hCellBrowser->DeleteChildren(item);         hCellBrowser->Delete(item);      }}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:48,


示例4: wxTreeItemId

wxTreeItemId ProjectExplorerWindow::GetSelection() const{    wxArrayTreeItemIds selectedIds;    m_tree->GetSelections(selectedIds);    if (selectedIds.Count() > 0)    {        return selectedIds[0];    }    else    {        return wxTreeItemId();    }}
开发者ID:Halfbrick,项目名称:decoda,代码行数:16,


示例5: GetPrevSibling

wxTreeItemId wxTreeCtrlEx::GetPrevItemSimple(wxTreeItemId const& item) const{	wxTreeItemId cur = GetPrevSibling(item);	if (cur.IsOk()) {		while (cur.IsOk() && HasChildren(cur) && IsExpanded(cur)) {			cur = GetLastChild(cur);		}	}	else {		cur = GetItemParent(item);		if (cur.IsOk() && cur == GetRootItem() && (GetWindowStyle() & wxTR_HIDE_ROOT)) {			cur = wxTreeItemId();		}	}	return cur;}
开发者ID:RanesJan,项目名称:it340midterm,代码行数:16,


示例6: while

wxTreeItemId BundlePane::FindItemInMenu(wxTreeItemId menuItem, BundleItemType type, unsigned int itemId) const {	wxTreeItemIdValue cookie;	wxTreeItemId c = m_bundleTree->GetFirstChild(menuItem, cookie);	while (c.IsOk()) {		const BundleItemData* childData = (BundleItemData*)m_bundleTree->GetItemData(c);		if (childData->m_type == BUNDLE_SUBDIR) {			wxTreeItemId res = FindItemInMenu(c, type, itemId);			if (res.IsOk()) return res;		}		else if (childData->m_type == type && childData->m_itemId == itemId) return c;		c = m_bundleTree->GetNextChild(menuItem, cookie);	}		return wxTreeItemId(); // Not in menu}
开发者ID:khmerlovers,项目名称:e,代码行数:16,


示例7: fnFullname

wxTreeItemId PHPWorkspaceView::DoGetFileItem(const wxTreeItemId& folderItem, const wxString& filename){    wxFileName fnFullname(filename);    wxString fullname = fnFullname.GetFullName();    wxTreeItemIdValue cookie;    wxTreeItemId child = m_treeCtrlView->GetFirstChild(folderItem, cookie);    while(child.IsOk()) {        const ItemData* itemData = DoGetItemData(child);        if(itemData && itemData->IsFile() && wxFileName(itemData->GetFile()).GetFullName() == fullname) {            return child;        }        child = m_treeCtrlView->GetNextChild(folderItem, cookie);    }    return wxTreeItemId();}
开发者ID:raresp,项目名称:codelite,代码行数:16,


示例8: GetFirstChild

wxTreeItemId CLocalTreeView::GetSubdir(wxTreeItemId parent, const wxString& subDir){	wxTreeItemIdValue value;	wxTreeItemId child = GetFirstChild(parent, value);	while (child)	{#ifdef __WXMSW__		if (!GetItemText(child).CmpNoCase(subDir))#else		if (GetItemText(child) == subDir)#endif			return child;		child = GetNextSibling(child);	}	return wxTreeItemId();}
开发者ID:Hellcenturion,项目名称:MILF,代码行数:17,


示例9: wxLogTrace

wxTreeItemId DirectoryTree::GetItemFromPath(const wxString& sPath, bool bReturnBestFit)  {  wxString sRemainingPath = sPath;  wxLogTrace(DIRECTORYTREE_EVENTS, wxT("GetItemFromPath('%s')"), sPath.c_str());  // Ensure path finishes in '/'  wxString sSeparator = wxFileName::GetPathSeparator();  wxChar chSeparator = sSeparator.GetChar(0);  if(sRemainingPath.Right(1) != sSeparator)    sRemainingPath += sSeparator;  // Start from root path  wxTreeItemId tid = GetRootItem(sPath);  if(!tid.IsOk())    {    wxLogDebug(wxT("GetItemFromPath(): invalid wxTreeItemId root %u"), (int) tid);    return wxTreeItemId();    }  sRemainingPath = sRemainingPath.AfterFirst(chSeparator);  while(sRemainingPath != wxT(""))    {    wxString sDir = sRemainingPath.BeforeFirst(chSeparator);    //wxLogTrace(DIRECTORYTREE_EVENTS, wxT("/tGetChildByName('%s')"), sDir.c_str());    wxTreeItemId tidChild = GetChildByName(tid, sDir);    if(!tidChild.IsOk())      {      wxLogTrace(DIRECTORYTREE_EVENTS, wxT("GetItemFromPath('%s'): Failed to find directory '%s'"), sPath.c_str(), sDir.c_str());      if(bReturnBestFit)        {        // Allow selection of 'best fit' path        return tid;        }      else        {        wxTreeItemId tidBad;        return tidBad;        }      }    sRemainingPath = sRemainingPath.AfterFirst(chSeparator);    tid = tidChild;    wxLogTrace(DIRECTORYTREE_EVENTS, wxT("/tFound child '%s'"), GetItemText(tid).c_str());    }  return tid;  }
开发者ID:joeyates,项目名称:sherpa,代码行数:46,


示例10: wxTreeItemId

ecConfigItem::ecConfigItem(ecConfigItem* parent, const wxString& name, ecConfigType ctype,                           ecOptionFlavor flavor, ecOptionType otype,                           bool active, bool enabled, bool modifiable, ecUIHint hint){    m_CdlItem = NULL;    m_name = name;    m_configType = ctype;    m_optionType = otype;    m_optionFlavor = flavor;    m_enabled = enabled;    m_active = active;    m_modifiable = modifiable;    m_parent = parent;    m_hint = hint;    m_treeItem = wxTreeItemId();    switch (otype)    {    case ecDouble:        {            m_value = 0.0;            break;        }    case ecString:    case ecEnumerated:        {            m_value = wxT("");            break;        }    case ecLong:        {            m_value = (long) 0;            break;        }    case ecBool:        {            m_value = (bool) FALSE;            break;        }    default:        {            break;        }    }}
开发者ID:ryoon,项目名称:eCos,代码行数:45,


示例11: GetFirstChild

wxTreeItemId PHPOutlineTree::DoFind(const wxString& pattern, const wxTreeItemId& parent){    if((GetRootItem() != parent) && FileUtils::FuzzyMatch(pattern, GetItemText(parent))) {        return parent;    }    if(ItemHasChildren(parent)) {        wxTreeItemIdValue cookie;        wxTreeItemId child = GetFirstChild(parent, cookie);        while(child.IsOk()) {            wxTreeItemId match = DoFind(pattern, child);            if(match.IsOk()) {                return match;            }            child = GetNextChild(parent, cookie);        }    }    return wxTreeItemId();}
开发者ID:lpc1996,项目名称:codelite,代码行数:18,


示例12: GetTreeCtrl

wxTreeItemId wxGenericDirCtrl::AppendItem (const wxTreeItemId & parent,                                           const wxString & text,                                           int image, int selectedImage,                                           wxTreeItemData * data){  wxTreeCtrl *treeCtrl = GetTreeCtrl ();  wxASSERT (treeCtrl);  if (treeCtrl)  {    return treeCtrl->AppendItem (parent, text, image, selectedImage, data);  }  else  {    return wxTreeItemId();  }}
开发者ID:drvo,项目名称:wxWidgets,代码行数:18,


示例13: wxTreeItemId

void BundlePane::OnTreeEndDrag(wxTreeEvent& event) {	if (!m_draggedItem.IsOk()) return;	const wxTreeItemId itemSrc = m_draggedItem;	const wxTreeItemId itemDst = event.GetItem();	m_draggedItem = wxTreeItemId();	if (!itemDst.IsOk()) return; // Invalid destintion	if (itemSrc == itemDst) return; // Can't drag to self	if (IsTreeItemParentOf(itemSrc, itemDst)) return; // Can't drag to one of your own children	wxLogDebug(wxT("Ending Drag over item: %s"), m_bundleTree->GetItemText(itemDst).c_str());	const BundleItemData* srcData = (BundleItemData*)m_bundleTree->GetItemData(itemSrc);	const BundleItemData* dstData = (BundleItemData*)m_bundleTree->GetItemData(itemDst);	if (!dstData->IsMenuItem()) return; // You can only drag items to menu	if (dstData->m_bundleId != srcData->m_bundleId) return; // Items can only be dragged within same bundle	// We have to cache uuid of submenus	const wxString subUuid = (srcData->m_type == BUNDLE_SUBDIR) ? srcData->m_uuid : wxString(wxEmptyString);	const unsigned int bundleId = srcData->m_bundleId;	PListDict infoDict = GetEditableMenuPlist(bundleId);		// Insert the item	Freeze();	const wxString name = m_bundleTree->GetItemText(itemSrc);	const wxTreeItemId insertedItem = InsertMenuItem(itemDst, name, new BundleItemData(*srcData), infoDict);	if (srcData->m_type == BUNDLE_SUBDIR) {		CopySubItems(itemSrc, insertedItem);	}	// Delete source ref	if (srcData->IsMenuItem()) RemoveMenuItem(itemSrc, false, infoDict);	Thaw();	// Save the modified plist	m_plistHandler.SaveBundle(bundleId);	// Update menu in editorFrame	m_syntaxHandler.ReParseBundles(true/*onlyMenu*/);}
开发者ID:khmerlovers,项目名称:e,代码行数:44,


示例14: GetFirstChild

bool browsers::CellBrowser::findItem(const wxString name, wxTreeItemId& item, const wxTreeItemId parent) {   wxTreeItemIdValue cookie;   wxTreeItemId child = GetFirstChild(parent,cookie);   while (child.IsOk())    {      if (item.IsOk())       {         if (child == item) item = wxTreeItemId();      }      else if (name == GetItemText(child))       {         item = child; return true;      }         if (findItem(name, item, child)) return true;      child = GetNextChild(parent,cookie);   }   return false;}   
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:19,


示例15: wxTreeItemId

wxTreeItemId PHPWorkspaceView::DoGetFolderItem(const wxTreeItemId& projectItem, PHPFolder::Ptr_t pFolder){    wxString curpath, path;    path = pFolder->GetPathRelativeToProject();    wxTreeItemId parent = projectItem;    wxArrayString parts = ::wxStringTokenize(path, "/", wxTOKEN_STRTOK);    for(size_t i = 0; i < parts.GetCount(); ++i) {        if(!curpath.IsEmpty()) {            curpath << "/";        }        curpath << parts.Item(i);        if(!HasFolderWithName(parent, parts.Item(i), parent)) {            return wxTreeItemId();        }    }    return parent;}
开发者ID:raresp,项目名称:codelite,代码行数:19,


示例16: 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,


示例17: wxTreeItemId

	wxTreeItemId CategoryTree::ensureHasCategory( const DatIndexCategory& p_category, bool p_force ) {		wxTreeItemId parent;		auto parentIsRoot = false;		// Determine parent node		if ( p_category.parent( ) ) {			parent = this->ensureHasCategory( *p_category.parent( ) );		} else {			parent = this->GetRootItem( );			parentIsRoot = true;		}		if ( !p_force ) {			// If parent is invalid, it means the tree isn't expanded and we shouldn't add this			if ( !parentIsRoot && ( !parent.IsOk( ) || !this->IsExpanded( parent ) ) ) {				return wxTreeItemId( );			}		}		wxTreeItemIdValue cookie;		auto child = this->GetFirstChild( parent, cookie );		// Scan for existing node		while ( child.IsOk( ) ) {			auto data = static_cast<const CategoryTreeItem*>( this->GetItemData( child ) );			if ( data->dataType( ) != CategoryTreeItem::DT_Category ) {				break;			}			if ( data->data( ) == &p_category ) {				return child;			}			child = this->GetNextChild( parent, cookie );		}		// Node does not exist, add it		auto thisNode = this->addCategoryEntry( parent, p_category.name( ) );		auto itemData = new CategoryTreeItem( CategoryTreeItem::DT_Category, &p_category );		itemData->setDirty( true );		this->SetItemData( thisNode, itemData );		// All category nodes have children		this->SetItemHasChildren( thisNode );		return thisNode;	}
开发者ID:Sirrusu,项目名称:Gw2Browser,代码行数:43,


示例18: 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,


示例19: wxString

/*! * /brief Creates a CConfigItem from a given NUTCOMPONENT. */CConfigItem::CConfigItem(CConfigItem * parent, NUTCOMPONENT * compo){    m_compo = compo;    m_option = NULL;    /* Convert the name from the one in the C structure. */    m_name = wxString(compo->nc_name, wxConvLocal);    /* Libraries contain modules. */    if (compo->nc_child) {        m_configType = nutLibrary;    } else {        m_configType = nutModule;    }    m_optionType = nutString;    m_parent = parent;    m_hint = nutHintNone;    m_itemId = wxTreeItemId();    m_value = wxEmptyString;}
开发者ID:MaurodeLyon,项目名称:Embedded-Software-Ontwikkeling,代码行数:23,


示例20: FindItemByText

 // Needed by SetStringValue wxTreeItemId FindItemByText( wxTreeItemId parent, const wxString& text ) {     wxTreeItemIdValue cookie;     wxTreeItemId child = GetFirstChild(parent,cookie);     while ( child.IsOk() )     {         if ( GetItemText(child) == text )         {             return child;         }         if ( ItemHasChildren(child) )         {             wxTreeItemId found = FindItemByText(child,text);             if ( found.IsOk() )                 return found;         }         child = GetNextChild(parent,cookie);     }     return wxTreeItemId(); }
开发者ID:ruifig,项目名称:nutcracker,代码行数:21,


示例21: wxT

ecConfigItem::ecConfigItem(ecConfigItem* parent, CdlUserVisible vitem){    m_name = wxT("UNNAMED");    m_configType = ecConfigTypeNone;    m_optionType = ecOptionTypeNone;    m_optionFlavor = ecFlavorNone;    m_enabled = FALSE;    m_active = FALSE;    m_modifiable = FALSE;    m_parent = parent;    m_CdlItem = vitem;    m_hint = ecHintNone;    m_treeItem = wxTreeItemId();    ecConfigTreeCtrl* treeCtrl = wxGetApp().GetTreeCtrl();    m_treeItem = treeCtrl->AppendItem(parent->GetTreeItem(), m_name, -1, -1, new ecTreeItemData(this));    ConvertFromCdl();    UpdateTreeItem(* treeCtrl);}
开发者ID:ryoon,项目名称:eCos,代码行数:20,


示例22: findItem

void browsers::TDTbrowser::OnTELLremovecell(wxString cellname, wxString parentname, bool orphan) {   wxTreeItemId newparent;   if (orphan) {      wxTreeItemId item;      findItem(cellname, item, GetRootItem());      copyItem(item,GetRootItem());      item = wxTreeItemId();      assert(findItem(parentname, newparent, GetRootItem()));      assert(findItem(cellname, item, newparent));      DeleteChildren(item);      Delete(item);   }   else      while (findItem(parentname, newparent, GetRootItem())) {         wxTreeItemId item;         assert(findItem(cellname, item, newparent));         DeleteChildren(item);         Delete(item);      }}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:20,


示例23: AppendItem

wxTreeItemId PHPFileLayoutTree::FindItemIdByName(const wxTreeItemId& parent, const wxString& name){    if(parent.IsOk() == false) return wxTreeItemId();    if(!ItemHasChildren(parent)) {        return AppendItem(parent, name, 7, 7, NULL);    }    wxTreeItemIdValue cookie;    wxTreeItemId child = GetFirstChild(parent, cookie);    while(child.IsOk()) {        if(GetItemText(child) == name) {            return child;        }        child = GetNextChild(parent, cookie);    }    // No match? add it    return AppendItem(parent, name, 7, 7, NULL);}
开发者ID:05storm26,项目名称:codelite,代码行数:20,


示例24: wxWindowDestroyEventHandler

void wxSTEditorTreeCtrl::SetSTENotebook(wxSTEditorNotebook* notebook){    if (m_steNotebook != NULL)    {        m_steNotebook->Disconnect(wxID_ANY, wxEVT_DESTROY,                                  wxWindowDestroyEventHandler(wxSTEditorTreeCtrl::OnWindowDestroy),                                  NULL, this);        m_steNotebook->Disconnect(wxID_ANY, wxEVT_STNOTEBOOK_PAGE_CHANGED,                                  wxNotebookEventHandler(wxSTEditorTreeCtrl::OnNotebookPageChanged),                                  NULL, this);        m_steNotebook->Disconnect(wxID_ANY, wxEVT_STEDITOR_STATE_CHANGED,                                  wxSTEditorEventHandler(wxSTEditorTreeCtrl::OnSTEState),                                  NULL, this);        if (m_steNotebook->GetSTEditorTreeCtrl() == this)            m_steNotebook->SetSTEditorTreeCtrl(NULL);    }    m_steNotebook = notebook;    DeleteAllItems();    m_notePageId = wxTreeItemId();    m_windowToSTETreeItemDataMap.clear();    if (m_steNotebook != NULL)    {        m_steNotebook->SetSTEditorTreeCtrl(this);        UpdateFromNotebook();        m_steNotebook->Connect(wxID_ANY, wxEVT_DESTROY,                               wxWindowDestroyEventHandler(wxSTEditorTreeCtrl::OnWindowDestroy),                               NULL, this);        m_steNotebook->Connect(wxID_ANY, wxEVT_STNOTEBOOK_PAGE_CHANGED,                               wxNotebookEventHandler(wxSTEditorTreeCtrl::OnNotebookPageChanged),                               NULL, this);        m_steNotebook->Connect(wxID_ANY, wxEVT_STEDITOR_STATE_CHANGED,                               wxSTEditorEventHandler(wxSTEditorTreeCtrl::OnSTEState),                               NULL, this);    }}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:41,


示例25: MyClientData

wxTreeItemId SFTPTreeView::DoAddFile(const wxTreeItemId& parent, const wxString& path){    try {        wxMemoryBuffer memBuffer;        m_sftp->Write(memBuffer, path);        SFTPAttribute::Ptr_t attr = m_sftp->Stat(path);        // Update the UI        MyClientData* newFile = new MyClientData(path);        newFile->SetIsFolder(false);        newFile->SetInitialized(false);        wxTreeItemId child = m_treeCtrl->AppendItem(            parent, newFile->GetFullName(),            m_bmpLoader->GetMimeImageId(FileExtManager::GetType(path, FileExtManager::TypeText)), wxNOT_FOUND, newFile);        return child;    } catch(clException& e) {        ::wxMessageBox(e.What(), "SFTP", wxICON_ERROR | wxOK | wxCENTER);    }    return wxTreeItemId();}
开发者ID:stahta01,项目名称:codelite,代码行数:21,


示例26: GetFirstChild

wxTreeItemId luProjTree::findItemByText(const wxTreeItemId& parent, const wxString& text){	if (!parent.IsOk()) return parent;	if (GetItemText(parent) == text)		return parent;	if (HasChildren(parent))	{		wxTreeItemIdValue cookie;		wxTreeItemId item = GetFirstChild(parent, cookie);		while (item.IsOk())		{			wxTreeItemId find = findItemByText(item, text); //find is item self or children.			if (find.IsOk()) return find;			item = GetNextChild(item, cookie);		}	}	return wxTreeItemId(); //not found}
开发者ID:dryadf68116,项目名称:vuforia-gamekit-integration,代码行数:22,


示例27: DirectoryTreeItem

wxTreeItemId DirectoryTree::AddChild(const wxTreeItemId& tidParent, const wxString& sPath)  {  DirectoryTreeItem * dti = new DirectoryTreeItem(sPath);  	wxTreeItemId tid;	if(sPath == FILE_SYSTEM_ROOT)		{		// TBI: ASSERT tree is empty		tid = AddRoot(FILE_SYSTEM_ROOT, 0, 1, dti);		}  else		{		if(!tidParent.IsOk())			{      wxLogDebug(wxT("DirectoryTree::AddChild(): invalid parent wxTreeItemId %u"), (int) tidParent);			return wxTreeItemId();			}#ifdef __WXMSW__    // Treat drives differently		wxString sDirectory;    if(sPath.Length() == 3)      sDirectory = sPath;    else      {		  wxFileName fil(sPath);		  sDirectory = fil.GetFullName();      }#else		wxFileName fil(sPath);		wxString sDirectory = fil.GetFullName();#endif // def __WXMSW__		tid = AppendItem(tidParent, sDirectory, 0, 1, dti);		}	// Show the '+' button	SetItemHasChildren(tid, true);	  return tid;  }
开发者ID:joeyates,项目名称:sherpa,代码行数:39,


示例28: while

wxTreeItemId ProjectExplorerWindow::FindFile(wxTreeItemId node, Project::File *file){  ItemData* data = static_cast<ItemData*>(m_tree->GetItemData(node));  if (data && data->isFile && data->file == file)  {    return node;  }  //Sort all childen recursively  wxTreeItemIdValue cookie;  wxTreeItemId temp = m_tree->GetFirstChild(node, cookie);  while (temp.IsOk())  {    wxTreeItemId node = FindFile(temp, file);    if (node.IsOk())      return node;    temp = m_tree->GetNextChild(temp, cookie);  }  return wxTreeItemId();}
开发者ID:Halfbrick,项目名称:decoda,代码行数:22,



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


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