这篇教程C++ GetNextItem函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetNextItem函数的典型用法代码示例。如果您正苦于以下问题:C++ GetNextItem函数的具体用法?C++ GetNextItem怎么用?C++ GetNextItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetNextItem函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: 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:HackLinux,项目名称:eMule-IS-Mod,代码行数:24,
示例2: GetNextItemvoid CMySuperGrid::SortData(){ int nIndex = GetNextItem(-1, LVNI_ALL | LVNI_SELECTED); if(nIndex==-1) return; CTreeItem *pItem = reinterpret_cast<CTreeItem*>(GetItemData(nIndex)); if(AfxMessageBox("Sort all children(Yes)/nor just sort rootitems(No)",MB_YESNO)==IDYES) Sort(pItem, TRUE); else Sort(pItem, FALSE); //do a simple refresh thing if(ItemHasChildren(pItem)) { SetRedraw(0); Collapse(pItem); Expand(pItem, nIndex); SetRedraw(1); }}
开发者ID:layerfsd,项目名称:Work,代码行数:21,
示例3: GetNextItemvoid CDownloadClientsCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point){ int iSel = GetNextItem(-1, LVIS_SELECTED | LVIS_FOCUSED); const CUpDownClient* client = (iSel != -1) ? (CUpDownClient*)GetItemData(iSel) : NULL; CTitleMenu ClientMenu; ClientMenu.CreatePopupMenu(); ClientMenu.AddMenuTitle(GetResString(IDS_CLIENTS), true); ClientMenu.AppendMenu(MF_STRING | (client ? MF_ENABLED : MF_GRAYED), MP_DETAIL, GetResString(IDS_SHOWDETAILS), _T("CLIENTDETAILS")); ClientMenu.SetDefaultItem(MP_DETAIL); //Xman Xtreme Downloadmanager if (client && client->GetDownloadState() == DS_DOWNLOADING) ClientMenu.AppendMenu(MF_STRING,MP_STOP_CLIENT,GetResString(IDS_STOP_CLIENT), _T("EXIT")); //Xman end //Xman friendhandling ClientMenu.AppendMenu(MF_SEPARATOR); //Xman end ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && !client->IsFriend()) ? MF_ENABLED : MF_GRAYED), MP_ADDFRIEND, GetResString(IDS_ADDFRIEND), _T("ADDFRIEND")); //Xman friendhandling ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_REMOVEFRIEND, GetResString(IDS_REMOVEFRIEND), _T("DELETEFRIEND")); ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_FRIENDSLOT, GetResString(IDS_FRIENDSLOT), _T("FRIENDSLOT")); ClientMenu.CheckMenuItem(MP_FRIENDSLOT, (client && client->GetFriendSlot()) ? MF_CHECKED : MF_UNCHECKED); ClientMenu.AppendMenu(MF_SEPARATOR); //Xman end ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient()) ? MF_ENABLED : MF_GRAYED), MP_MESSAGE, GetResString(IDS_SEND_MSG), _T("SENDMESSAGE")); ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetViewSharedFilesSupport()) ? MF_ENABLED : MF_GRAYED), MP_SHOWLIST, GetResString(IDS_VIEWFILES), _T("VIEWFILES")); if (Kademlia::CKademlia::IsRunning() && !Kademlia::CKademlia::IsConnected()) ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetKadPort()!=0 && client->GetKadVersion() > 1) ? MF_ENABLED : MF_GRAYED), MP_BOOT, GetResString(IDS_BOOTSTRAP)); ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search")); // - show requested files (sivka/Xman) ClientMenu.AppendMenu(MF_SEPARATOR); ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED),MP_LIST_REQUESTED_FILES, GetResString(IDS_LISTREQUESTED), _T("FILEREQUESTED")); //Xman end GetPopupMenuPos(*this, point); ClientMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);}
开发者ID:rusingineer,项目名称:emulextreme-stulle,代码行数:40,
示例4: switchvoid DIALOG_CHOOSE_COMPONENT::OnInterceptSearchBoxKey( wxKeyEvent& aKeyStroke ){ // Cursor up/down and partiallyi cursor are use to do tree navigation operations. // This is done by intercepting some navigational keystrokes that normally would go to // the text search box (which has the focus by default). That way, we are mostly keyboard // operable. // (If the tree has the focus, it can handle that by itself). const wxTreeItemId sel = m_libraryComponentTree->GetSelection(); switch( aKeyStroke.GetKeyCode() ) { case WXK_UP: selectIfValid( GetPrevItem( *m_libraryComponentTree, sel ) ); break; case WXK_DOWN: selectIfValid( GetNextItem( *m_libraryComponentTree, sel ) ); break; // The following keys we can only hijack if they are not needed by the textbox itself. case WXK_LEFT: if( m_searchBox->GetInsertionPoint() == 0 ) m_libraryComponentTree->Collapse( sel ); else aKeyStroke.Skip(); // Use for original purpose: move cursor. break; case WXK_RIGHT: if( m_searchBox->GetInsertionPoint() >= (long) m_searchBox->GetLineText( 0 ).length() ) m_libraryComponentTree->Expand( sel ); else aKeyStroke.Skip(); // Use for original purpose: move cursor. break; default: aKeyStroke.Skip(); // Any other key: pass on to search box directly. break; }}
开发者ID:natsfr,项目名称:kicad,代码行数:40,
示例5: GetTreeListItemvoid CInspectorTreeCtrl::dynExpand(HTREEITEM in){ CTreeListItem *parent = GetTreeListItem(in); assertex(parent); IPropertyTree &pTree = *parent->queryPropertyTree(); if (!parent->isExpanded()) { HTREEITEM i = GetChildItem(in); while(i) { DeleteItem(i); i = GetNextItem(i, TVGN_NEXT); } CString txt; TV_INSERTSTRUCT is; is.hInsertAfter = TVI_LAST; is.item.mask = TVIF_TEXT | TVIF_PARAM; is.item.pszText = LPSTR_TEXTCALLBACK; Owned<IAttributeIterator> attrIterator = pTree.getAttributes(); ForEach(*attrIterator) { is.hParent = in; is.item.lParam = reinterpret_cast <DWORD> (createTreeListAttribute(attrIterator->queryName(), pTree)); HTREEITEM r = InsertItem(&is); ASSERT(r != NULL); } Owned<IPropertyTreeIterator> iterator = pTree.getElements("*", iptiter_sort); ForEach(*iterator) { IPropertyTree & thisTree = iterator->query(); is.hParent = in; is.item.lParam = reinterpret_cast <DWORD> (createTreeListProperty(thisTree.queryName(), thisTree)); HTREEITEM thisTreeItem = InsertItem(&is); ASSERT(thisTreeItem != NULL); } parent->setExpanded(); }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:40,
示例6: GetNextItemvoid CContactListCtrl::OnCtxMakeQuickCall(wxCommandEvent& e){ int idx = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if ((idx >= 0) && (idx < m_liEntries.size())) { CContact& rContact = m_liEntries[idx]; const TPhoneList& rPhones = rContact.getConstPhones(); int phoneIdx = e.GetId() - ID_CTX_MAKE_CALL; if ((phoneIdx >= 0) && (phoneIdx < rPhones.size())) { wxString strNumber; rPhones[phoneIdx].getCallableNumber(strNumber); CCallMonitorApi *pCM = wxGetApp().getDefaultCallProvider(); if (pCM) { wxLogMessage(wxT("Dialing %s using %s ..."), strNumber, wxGetApp().getPrefs().getDefaultCallProvider()); pCM->makeCall(strNumber.ToUTF8().data()); } else { wxLogMessage(wxT("Can't dial -> no valid default call provider")); } } }}
开发者ID:Sonderstorch,项目名称:c-mon,代码行数:22,
示例7: GetNextItemvoid CFriendListCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point){ CTitleMenu ClientMenu; ClientMenu.CreatePopupMenu(); ClientMenu.AddMenuTitle(GetResString(IDS_FRIENDLIST), true); const CFriend* cur_friend = NULL; int iSel = GetNextItem(-1, LVIS_SELECTED | LVIS_FOCUSED); if (iSel != -1) { cur_friend = (CFriend*)GetItemData(iSel); ClientMenu.AppendMenu(MF_STRING,MP_DETAIL, GetResString(IDS_SHOWDETAILS), _T("CLIENTDETAILS")); ClientMenu.SetDefaultItem(MP_DETAIL); } ClientMenu.AppendMenu(MF_STRING, MP_ADDFRIEND, GetResString(IDS_ADDAFRIEND), _T("ADDFRIEND")); ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_REMOVEFRIEND, GetResString(IDS_REMOVEFRIEND), _T("DELETEFRIEND")); ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_MESSAGE, GetResString(IDS_SEND_MSG), _T("SENDMESSAGE")); ClientMenu.AppendMenu(MF_STRING | ((cur_friend==NULL || (cur_friend && cur_friend->GetLinkedClient(true) && !cur_friend->GetLinkedClient(true)->GetViewSharedFilesSupport())) ? MF_GRAYED : MF_ENABLED), MP_SHOWLIST, GetResString(IDS_VIEWFILES) , _T("VIEWFILES")); ClientMenu.AppendMenu(MF_STRING, MP_FRIENDSLOT, GetResString(IDS_FRIENDSLOT), _T("FRIENDSLOT")); ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search")); ClientMenu.EnableMenuItem(MP_FRIENDSLOT, (cur_friend)?MF_ENABLED : MF_GRAYED); ClientMenu.CheckMenuItem(MP_FRIENDSLOT, (cur_friend && cur_friend->GetFriendSlot()) ? MF_CHECKED : MF_UNCHECKED); // MORPH START - Modified by Commander, Friendlinks [emulEspaa] - added by zz_fly ClientMenu.AppendMenu(MF_SEPARATOR); ClientMenu.AppendMenu(MF_STRING | (theApp.IsEd2kFriendLinkInClipboard() ? MF_ENABLED : MF_GRAYED), MP_PASTE, GetResString(IDS_PASTE), _T("PASTELINK")); ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_GETFRIENDED2KLINK, GetResString(IDS_GETFRIENDED2KLINK), _T("ED2KLINK")); ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_GETHTMLFRIENDED2KLINK, GetResString(IDS_GETHTMLFRIENDED2KLINK), _T("ED2KLINK")); // MORPH END - Modified by Commander, Friendlinks [emulEspaa] // - show requested files (sivka/Xman) ClientMenu.AppendMenu(MF_SEPARATOR); ClientMenu.AppendMenu(MF_STRING | (cur_friend && cur_friend->GetLinkedClient() ? MF_ENABLED : MF_GRAYED),MP_LIST_REQUESTED_FILES, GetResString(IDS_LISTREQUESTED), _T("FILEREQUESTED")); //Xman end GetPopupMenuPos(*this, point); ClientMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this); VERIFY( ClientMenu.DestroyMenu() ); // XP Style Menu [Xanatos] - Stulle}
开发者ID:rusingineer,项目名称:eMule-scarangel,代码行数:39,
示例8: 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,
示例9: wxLogDebug// Get an array of row numbers currently selected in the listctrlvoid main_listctrl::get_selected_row_numbers( wxArrayInt *row_numbers ){ long selected_row_number = -1; // '-1' needed to include the first selected row. wxLogDebug( "Entering selected row numbers function" ); for ( ;; ) { // for( ;; ) with this next line is the recommended way for iterating selected rows. // selected_row_number was initialized at -1 to allow inclusion of first selected // row. selected_row_number = GetNextItem( selected_row_number, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); if ( selected_row_number == -1 ) { break; } else { row_numbers->Add( selected_row_number ); wxLogDebug( "Appended row %ld to selected rows", selected_row_number ); } }}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:23,
示例10: GetNextItemvoid DocumentListCtrl::SortOnResemblance (bool force_sort){ if (_lastsort == sortResemblance && !force_sort) return; _lastsort = sortResemblance; // get current selected item long item_number = GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); int selected_item = (item_number == -1 ? -1 : _sortedIndices[(int)item_number]); std::vector<int> newIndices; // initialise the set of new indices for (int i=0; i < _sortedIndices.size(); ++i) { newIndices.push_back (_sortedIndices[i]); } std::sort (newIndices.begin(), newIndices.end(), _ferretparent->GetDocumentList().GetSimilarityComparer (&_document1, &_document2, _remove_common_trigrams, _ignore_template_material)); _sortedIndices = newIndices; RefreshItems (0, _sortedIndices.size()-1); // select original item if (selected_item != -1) { // find item in sorted indices, and select that position for (long i = 0, n = _sortedIndices.size(); i < n; ++i) { SetItemState (i, !wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); if (_sortedIndices[i] == selected_item) { SetItemState (i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); EnsureVisible (i); } } } Refresh (); _ferretparent->SetStatusText ("Rearranged table by similarity", 0);}
开发者ID:abame,项目名称:ferret,代码行数:39,
示例11: GetNextItemvoid DataListCtrl::OnBake(wxCommandEvent& event){ long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if (item != -1 && GetItemText(item) == "Volume") { wxString name = GetText(item, 1); wxFileDialog *fopendlg = new wxFileDialog( m_frame, "Bake Volume Data", "", "", "Muti-page Tiff file (*.tif, *.tiff)|*.tif;*.tiff|"/ "Single-page Tiff sequence (*.tif)|*.tif;*.tiff|"/ "Nrrd file (*.nrrd)|*.nrrd", wxFD_SAVE|wxFD_OVERWRITE_PROMPT); fopendlg->SetExtraControlCreator(CreateExtraControl); int rval = fopendlg->ShowModal(); if (rval == wxID_OK) { wxString filename = fopendlg->GetPath(); VRenderFrame* vr_frame = (VRenderFrame*)m_frame; if (vr_frame) { VolumeData* vd = vr_frame->GetDataManager()->GetVolumeData(name); if (vd) { vd->Save(filename, fopendlg->GetFilterIndex(), true, VRenderFrame::GetCompression()); wxString str = vd->GetPath(); SetText(item, 2, str); } } } delete fopendlg; }}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:39,
示例12: ClearSelectionBOOL 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,
示例13: InvalidOperationException /// <summary>Gets the text of the selected suggestion.</summary> /// <returns></returns> /// <exception cref="Logic::InvalidOperationException">No item selected</exception> /// <exception cref="Logic::NotImplementedException">Command selected</exception> wstring SuggestionList::GetSelected() const { // Ensure exists if (GetNextItem(-1, LVNI_SELECTED) == -1) throw InvalidOperationException(HERE, L"No item selected"); // Get selection and format switch (SuggestionType) { case Suggestion::GameObject: return VString(L"{%s}", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str()); case Suggestion::ScriptObject: return VString(L"[%s]", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str()); case Suggestion::Variable: return VString(L"$%s", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str()); case Suggestion::Label: return VString(L"%s:", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str()); case Suggestion::Command: return Content[GetNextItem(-1, LVNI_SELECTED)].Text; default: return L"Error"; } }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:21,
示例14: nCountvoid wxGxContentView::OnSelected(wxListEvent& event){ //event.Skip(); m_pSelection->Clear(NOTFIRESELID); long nItem = wxNOT_FOUND; size_t nCount(0); for ( ;; ) { nItem = GetNextItem(nItem, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if ( nItem == wxNOT_FOUND ) break; LPITEMDATA pItemData = (LPITEMDATA)GetItemData(nItem); if(pItemData == NULL) continue; nCount++; m_pSelection->Select(pItemData->nObjectID, true, NOTFIRESELID); } if (m_pGxApp != NULL) { if(nCount <= 0) m_pSelection->SetInitiator(TREECTRLID); m_pGxApp->UpdateNewMenu(m_pSelection); } wxGISStatusBar* pStatusBar = m_pApp->GetStatusBar(); if(pStatusBar) { if(nCount > 1) { pStatusBar->SetMessage(wxString::Format(_("%ld objects selected"), nCount)); } else { pStatusBar->SetMessage(wxEmptyString); } }}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:38,
示例15: GetRootItem// This is the primary function for generating HTML output of the statistics tree.// It is recursive.CString CStatisticsTree::GetHTML(bool onlyVisible, HTREEITEM theItem, int theItemLevel, bool firstItem){ HTREEITEM hCurrent; if (theItem == NULL) { if (!onlyVisible) theApp.emuledlg->statisticswnd->ShowStatistics(true); hCurrent = GetRootItem(); // Copy All Vis or Copy All } else hCurrent = theItem; CString strBuffer; if (firstItem) strBuffer.Format(_T("<font face=/"Tahoma,Verdana,Courier New,Helvetica/" size=/"2/">/r/n<b>eMule v%s %s [%s]</b>/r/n<br /><br />/r/n"), theApp.m_strCurVersionLong, GetResString(IDS_SF_STATISTICS), thePrefs.GetUserNick()); while (hCurrent != NULL) { CString strItem; if (IsBold(hCurrent)) strItem = _T("<b>") + GetItemText(hCurrent) + _T("</b>"); else strItem = GetItemText(hCurrent); for (int i = 0; i < theItemLevel; i++) strBuffer += _T(" "); if (theItemLevel == 0) strBuffer.Append(_T("/n")); strBuffer += strItem + _T("<br />"); if (ItemHasChildren(hCurrent) && (!onlyVisible || IsExpanded(hCurrent))) strBuffer += GetHTML(onlyVisible, GetChildItem(hCurrent), theItemLevel+1, false); hCurrent = GetNextItem(hCurrent, TVGN_NEXT); if (firstItem && theItem != NULL) break; // Copy Selected Branch was used, so we don't want to copy all branches at this level. Only the one that was selected. } if (firstItem) strBuffer += _T("</font>"); return strBuffer;}
开发者ID:axxapp,项目名称:winxgui,代码行数:40,
示例16: WXUNUSEDvoid WFileList::OnMenuFileDelete(wxCommandEvent& WXUNUSED(event)){ std::vector<int> subfilelist; long sfid = -1; while (1) { sfid = GetNextItem(sfid, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if (sfid == -1) break; subfilelist.push_back(sfid); } wxString surestr; if (subfilelist.empty()) return; else if (subfilelist.size() == 1) { wxString filelist = strSTL2WX(wmain->container.GetSubFileProperty(subfilelist[0], "Name")); surestr = wxString::Format(_("Going to permanently delete /"%s/". This cannot be undone, are you sure?"), filelist.c_str()); } else { surestr = wxString::Format(_("Going to permanently delete %u files. This cannot be undone, are you sure?"), subfilelist.size()); } wxMessageDialog suredlg(this, surestr, _("Delete files?"), wxYES_NO | wxNO_DEFAULT); if (suredlg.ShowModal() != wxID_YES) return; for (std::vector<int>::reverse_iterator sfi = subfilelist.rbegin(); sfi != subfilelist.rend(); ++sfi) { wmain->DeleteSubFile(*sfi, false); } ResetItems();}
开发者ID:gatlex,项目名称:cryptote,代码行数:38,
示例17: switchvoid DataListCtrl::SetSelection(int type, wxString &name){ wxString str_type; switch (type) { case DATA_VOLUME: str_type = "Volume"; break; case DATA_MESH: str_type = "Mesh"; break; case DATA_ANNOTATIONS: str_type = "Annotations"; break; } long item = -1; for (;;) { item = GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE); if (item != -1) { wxString item_type = GetText(item, 0); wxString item_name = GetText(item, 1); if (item_type == str_type && item_name == name) { SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); break; } } else break; }}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:38,
示例18: GetRootItemvoid CMultiTreeCtrl::GetCheckItems(std::vector<HTREEITEM>& vecTreeItems, HTREEITEM hTreeItem){ if (hTreeItem == NULL) { hTreeItem = GetRootItem(); } HTREEITEM hNextItem = GetChildItem(hTreeItem); while(hNextItem!=NULL) { GetCheckItems(vecTreeItems, hNextItem); hNextItem = GetNextItem(hNextItem,TVGN_NEXT); } if (hTreeItem!=NULL) { //如果该节点复选框被选中 if (GetCheck(hTreeItem)) { vecTreeItems.push_back(hTreeItem); } }}
开发者ID:github188,项目名称:MonitorSystem,代码行数:23,
示例19: HitTestvoid CMusikListCtrl::SelectClickedItem(wxMouseEvent &event){ int HitFlags = 0; long item = HitTest(event.GetPosition(),HitFlags); if(item != -1) { if((wxLIST_STATE_SELECTED & GetItemState(item,wxLIST_STATE_SELECTED)) != wxLIST_STATE_SELECTED) // bug in MSW GetItemState (mask param is ignored) { if(!event.CmdDown()) { int i = -1; while ( -1 != (i = GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED))) { if(i != item) SetItemState( i, 0, wxLIST_STATE_SELECTED ); } } SetItemState(item,wxLIST_STATE_SELECTED,wxLIST_STATE_SELECTED); wxTheApp->Yield(true); // call yield to let the SetItemState changes go through the system. } }}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:23,
示例20: GetRootItem BOOL SMCTreeCtrl::DeleteColumn(int iCol) { if(iCol<0 || iCol>=m_arrColWidth.GetCount()) return FALSE; HSTREEITEM hItem = GetRootItem(); while(hItem) { MCITEM *pMcItem = (MCITEM*)STreeCtrl::GetItemData(hItem); pMcItem->arrText.RemoveAt(iCol); hItem = GetNextItem(hItem); } int nColWid = m_arrColWidth[iCol]; m_arrColWidth.RemoveAt(iCol); m_nItemWid = -1; CalcItemWidth(0); CSize szView = GetViewSize(); szView.cx = m_nItemWid; SetViewSize(szView); Invalidate(); return TRUE; }
开发者ID:435420057,项目名称:soui,代码行数:23,
示例21: DragDatavoid wxGISToolExecuteView::OnBeginDrag(wxListEvent& event){ wxGxObject* pGxObject = m_pCatalog->GetRegisterObject(m_nParentGxObjectId); if(!pGxObject) return; wxGISTaskDataObject DragData(wxThread::GetMainId(), wxDataFormat(wxGIS_DND_ID)); long nItem = wxNOT_FOUND; int nCount(0); for ( ;; ) { nItem = GetNextItem(nItem, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if ( nItem == wxNOT_FOUND ) break; DragData.AddDecimal(GetItemData(nItem)); } wxDropSource dragSource( this ); dragSource.SetData( DragData ); wxDragResult result = dragSource.DoDragDrop( wxDrag_DefaultMove );}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:23,
示例22: pFnvoid CCaseTreeCtrl::RunTestCase(HTREEITEM hItem, OperateFun pFn){ SEARCH_FALG searchFlag = FLAG_CONTINUE; if (hItem != NULL) { searchFlag = pFn(this, hItem, 0, (DWORD)this); if(searchFlag == FLAG_CONTINUE) { hItem = GetNextItem(hItem, TVGN_CHILD); if (hItem != NULL) { searchFlag = SeatchItem(hItem,(OperateFun)pFn, (DWORD)this); } } } if(searchFlag == FLAG_CONTINUE) { m_hSelectedItem = NULL; m_hCurrentItem = NULL; }}
开发者ID:SzAllen,项目名称:Arch,代码行数:23,
示例23: switchbool wxRadioBox::OnKeyDown(wxKeyEvent& event){ wxDirection dir; switch ( event.GetKeyCode() ) { case WXK_UP: dir = wxUP; break; case WXK_LEFT: dir = wxLEFT; break; case WXK_DOWN: dir = wxDOWN; break; case WXK_RIGHT: dir = wxRIGHT; break; default: return false; } int selOld = GetSelection(); int selNew = GetNextItem(selOld, dir, GetWindowStyle()); if ( selNew != selOld ) { SetSelection(selNew); // emulate the button click SendRadioEvent(); } return true;}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:37,
示例24: GetNextItemvoid main_listctrl::refresh_rows_due_column( wxArrayString& channel_sections ){ size_t number_of_sections = channel_sections.GetCount(); wxDateTime due_datetime; wxString due_string; wxString channel_section; long row_number = -1; // '-1' needed to include the first selected row. if ( number_of_sections == 0 ) { return; } for ( ;; ) { row_number = GetNextItem( row_number, wxLIST_NEXT_ALL ); if ( row_number == -1 ) { break; } channel_section = get_row_channel_section( row_number ); // Only proceed if the current channel section was in our array if ( channel_sections.Index( channel_section ) != wxNOT_FOUND ) { due_datetime = the_plucker_controller->get_channel_due_datetime( channel_section ); due_string = due_datetime.Format( wxT( plkrPRETTY_COMPACT_DATE_TIME_FORMAT ) ).c_str(); if ( ! the_plucker_controller->is_channel_update_enabled( channel_section ) ) { due_string = _( "Never" ); } if ( due_string != get_cell_contents_string ( row_number, DUE_COLUMN ) ) { SetItem( row_number, DUE_COLUMN, due_string ); } } }}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:37,
示例25: GetNextItemvoid CUnitPane::OnPopupMenuGiveEverything (wxCommandEvent& event){ long idx = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); CUnit * pUnit = GetUnit(idx); CEditPane * pOrders; wxString N; if (pUnit) { pOrders = (CEditPane*)gpApp->m_Panes[AH_PANE_UNIT_COMMANDS]; if (pOrders) pOrders->SaveModifications(); if (m_pCurLand) m_pCurLand->guiUnit = pUnit->Id; N = wxGetTextFromUser(wxT("Give everything to unit"), wxT("Confirm")); gpApp->SetOrdersChanged(gpApp->m_pAtlantis->GenGiveEverything(pUnit, N.mb_str()) || gpApp->GetOrdersChanged()); Update(m_pCurLand); }}
开发者ID:ennorehling,项目名称:alh,代码行数:24,
示例26: ifconst GameListItem * CGameListCtrl::GetSelectedISO(){ if (m_ISOFiles.size() == 0) return NULL; else if (GetSelectedItemCount() == 0) return NULL; else { long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if (item == wxNOT_FOUND) return NULL; else { // Here is a little workaround for multiselections: // when > 1 item is selected, return info on the first one // and deselect it so the next time GetSelectedISO() is called, // the next item's info is returned if (GetSelectedItemCount() > 1) SetItemState(item, 0, wxLIST_STATE_SELECTED); return m_ISOFiles[GetItemData(item)]; } }}
开发者ID:Everscent,项目名称:dolphin-emu,代码行数:24,
注:本文中的GetNextItem函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetNextNode函数代码示例 C++ GetNextChild函数代码示例 |