• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxListEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnPrinter

void wxGenericPrintSetupDialog::OnPrinter(wxListEvent& event)
{
    // Delete check mark
    for (long item = 0; item < m_printerListCtrl->GetItemCount(); item++)
        m_printerListCtrl->SetItemImage( item, -1 );

    m_printerListCtrl->SetItemImage( event.GetIndex(), 0 );

    if (event.GetIndex() == 0)
    {
        m_printerCommandText->SetValue( wxT("lpr") );
    }
    else
    {
        wxListItem li;
        li.SetColumn( 1 );
        li.SetMask( wxLIST_MASK_TEXT );
        li.SetId( event.GetIndex() );
        m_printerListCtrl->GetItem( li );
        m_printerCommandText->SetValue( _T("lpr -P") + li.GetText() );
    }
}
开发者ID:EdgarTx,项目名称:wx,代码行数:22,代码来源:prntdlgg.cpp


示例2: listctrlMembersItemFocused

/*
 * listctrlMembersItemFocused
 */
void panelAdmin::listctrlMembersItemFocused(wxListEvent& event) {
   memberDetails *member = (memberDetails*) event.GetData();

   if( !member )
       return;

   if(member->_memberID == _mainApp->remoteMemberIDGet())
       _mainApp->guiMainGet()->IPsClear(0);

   _mainApp->guiMainGet()->IPsClear(member->_memberID);

   _mainApp->serverGet()->moduleGet< moduleAdmin >( modADMIN )->IPsGet( member->_memberID );
}
开发者ID:segrax,项目名称:KiLLARMY,代码行数:16,代码来源:panelAdmin.cpp


示例3: OnItemSelected

void DraggableListCtrl::OnItemSelected(wxListEvent& event)
{
	// Don't respond while in drag-mode - only the initial selection
	// (when starting the drag operation) should be handled
	if (! HasCapture())
	{
		// Remember which item is being dragged
		m_DragSource = event.GetIndex();

		// Make sure this listctrl is in focus
		SetFocus();
	}
}
开发者ID:Marlinc,项目名称:0ad,代码行数:13,代码来源:DraggableListCtrl.cpp


示例4: OnListJoin

void BattleListTab::OnListJoin( wxListEvent& event )
{
	try
	{
		ASSERT_LOGIC( m_battle_list != 0, _T( "m_battle_list = 0" ) );
	} catch ( ... ) {
		return;
	}
	if ( event.GetIndex() < 0 ) return;

	int id = m_battle_list->GetSelectedData()->GetBattleId();
	DoJoin( serverSelector().GetServer().battles_iter->GetBattle( id ) );
}
开发者ID:jgleesawn,项目名称:springlobby,代码行数:13,代码来源:battlelisttab.cpp


示例5: CheckSelection

long CMuleListCtrl::CheckSelection(wxListEvent& event)
{
	long item = event.GetIndex();
	
	// Check if clicked item is selected. If not, unselect all and select it.
	if ((item != -1) && !GetItemState(item, wxLIST_STATE_SELECTED)) {
		ClearSelection();
		
		SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
	}
	
	return item;
}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:13,代码来源:MuleListCtrl.cpp


示例6: EventListItemSelected

void LieferantDetail::EventListItemSelected(wxListEvent &event)
{  
    if(listArtikelLieferant->GetSelectedItemCount() > 1)
    {
        lastSelectedItem = -1;
        button_deleteLiefert->Enable(false);
    }
    else
    {
        lastSelectedItem = arr_db_list[event.GetIndex()];
        button_deleteLiefert->Enable(true);
    }
}
开发者ID:jmenzel,项目名称:artikelverwaltung,代码行数:13,代码来源:lieferantdetail.cpp


示例7: OnListSelect

void CRefSelDlg::OnListSelect(wxListEvent& event)
{
	_U32 index = (_U32)event.GetItem().GetId();
	
	if(index < (_U32)m_pUUIDList->GetItemCount())
	{
		wxUIntPtr itemdata = m_pUUIDList->GetItemData(index);		

		char uuid[1000];
		AUuidToString(*((A_UUID*)itemdata), uuid);
		m_strSel = wxString(uuid, wxMBConvUTF8());
	}
}
开发者ID:luozhishen,项目名称:gameengine,代码行数:13,代码来源:RefSelDlg.cpp


示例8: OnListItemSelected

void mmStockDialog::OnListItemSelected(wxListEvent& event)
{
    long selectedIndex = event.GetIndex();
    long histId = priceListBox_->GetItemData(selectedIndex);
    Model_Account::Data* account = Model_Account::instance().get(m_stock->HELDAT);
    Model_StockHistory::Data *histData = Model_StockHistory::instance().get(histId);

    if (histData->HISTID > 0)
    {
        priceDate_->SetValue(Model_StockHistory::DATE(*histData));
        currentPrice_->SetValue(Model_Account::toString(histData->VALUE, account, 6));
    }
}
开发者ID:bacanhtai,项目名称:moneymanagerex,代码行数:13,代码来源:stockdialog.cpp


示例9: OnStringSelect

void MainFrame::OnStringSelect(wxListEvent& event) {

    stringList->UpdateSelectedItem(newTextBox->GetValue());

    stringList->SetSelectedIndex(event.GetIndex());

    str_data data = stringList->GetSelectedItem();

    originalTextBox->SetValue(FromUTF8(data.oldString));
    newTextBox->SetValue(FromUTF8(data.newString));

    UpdateStatus();
}
开发者ID:WrinklyNinja,项目名称:stredit,代码行数:13,代码来源:ui.cpp


示例10: OnListSel

void MainFrame::OnListSel(wxListEvent& evt)
{
	wxTreeItemId tree_id = m_pTree->GetSelection();
	if (!tree_id)
		return;

	TreeItemData* pItem = (TreeItemData*)m_pTree->GetItemData(tree_id);
	if (!pItem)
		return;

	wxString strSel = evt.GetText();
	SetValueDescription(strSel,pItem->GetValueDesc(strSel));
}
开发者ID:omegaonline,项目名称:oocore,代码行数:13,代码来源:MainFrame.cpp


示例11: ListColumnClick

void EditorListDialog::ListColumnClick(wxListEvent& e)
{
   SortColumn col = SORT_FILE;
   switch (e.GetColumn())
   {
   case 0:
      col = SORT_FILE;
      break;
   case 1:
      col = SORT_AUTHOR;
      break;
   case 2:
      col = SORT_DATE;
      break;
   case 3:
      col = SORT_HOST;
      break;
   case 4:
      col = SORT_PATH;
      break;
   case 5:
      col = SORT_BUGNUMBER;
      break;
   default:
      ASSERT(false);
   }

   int column = e.GetColumn();
   if (column == mySortCol) 
      mySortAscending = !mySortAscending;
   else
   {
      mySortCol = (SortColumn )column;
      mySortAscending = true;
   }
   myEditors->SetSortIndicator(e.GetColumn(), mySortAscending);
   myEditors->SortItems(CompareFunc, e.GetColumn() + (mySortAscending << 8));
}
开发者ID:pampersrocker,项目名称:G-CVSNT,代码行数:38,代码来源:EditorListDialog.cpp


示例12: onKeyDown

void cmdListCtrl::onKeyDown(wxListEvent& e)
{
	int keyCode = e.GetKeyCode();
	int menuid = 0;
	switch(keyCode)
	{
		case WXK_INSERT:
			menuid = ID_TOOL_ADD;
			break;
		case WXK_DELETE:
			menuid = ID_TOOL_DELETE;
			break;
		case WXK_F2:
			menuid = ID_TOOL_EDIT;
			break;
		default:
			e.Skip();
			return;
	}
	if (menuid)
		this->RunMenu(menuid,this);
//	wxMessageBox(wxString::Format("%d,%d,%s",e.GetKeyCode(),e.GetIndex(),e.GetItem().GetText()));
}
开发者ID:ojeo,项目名称:ALMRun,代码行数:23,代码来源:cmdListCtrl.cpp


示例13: OnProcessColumnClicked

void ProcessesDialog::OnProcessColumnClicked(wxListEvent& event)
{

    int column = event.GetColumn();

    if (column == m_sortColumn)
    {
        m_sortForward = !m_sortForward;
    }

    m_sortColumn = column;
    SortColumns();

}
开发者ID:Halfbrick,项目名称:decoda,代码行数:14,代码来源:ProcessesDialog.cpp


示例14: OnGoToError

void MyFrame::OnGoToError ( wxListEvent& event ) {
    if (stc==0)
        return;
    //int idx = event.GetData();

    if(event.GetText().Len()) {
        long data = event.GetIndex();
        wxListItem list_item;
        list_item.SetId ( data );
        list_item.SetColumn ( 1 );
        list_item.SetMask ( wxLIST_MASK_TEXT );
        FBConsole->GetItem ( list_item );
        wxString File = list_item.GetText();

        unsigned long LineNr = 0;

        FBConsole->GetItemText(data).ToULong(&LineNr);
        LineNr--;

        GoToError(LineNr, File);

    }
}
开发者ID:bihai,项目名称:fbide,代码行数:23,代码来源:run.cpp


示例15: OnItemSelected

void wxEditableListBox::OnItemSelected(wxListEvent& event)
{
    m_selection = event.GetIndex();
    if (!(m_style & wxEL_NO_REORDER))
    {
        m_bUp->Enable(m_selection != 0 && m_selection < m_listCtrl->GetItemCount()-1);
        m_bDown->Enable(m_selection < m_listCtrl->GetItemCount()-2);
    }

    if (m_style & wxEL_ALLOW_EDIT)
        m_bEdit->Enable(m_selection < m_listCtrl->GetItemCount()-1);
    if (m_style & wxEL_ALLOW_DELETE)
        m_bDel->Enable(m_selection < m_listCtrl->GetItemCount()-1);
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:14,代码来源:editlbox.cpp


示例16: OnSettingsListItemSelected

void AvailabilityModePanel::OnSettingsListItemSelected(wxListEvent& event)
{
	wxListItem item = event.GetItem();
	
	long l = item.GetData();
	Server *s = *((Server**)&l);

	m_SelectedSettingsServerIndex = item.GetId();
	m_SelectedSettingsServer = s;

	m_CheckBoxEnable->SetValue( s->EnableAvailability );
	m_CheckBoxEnableTCP->SetValue( s->EnableAvailabilityTCP );
	m_CheckBoxEnableICMP->SetValue( s->EnableAvailabilityICMP );
}
开发者ID:stein1,项目名称:bbk,代码行数:14,代码来源:AvailabilityModePanel.cpp


示例17: OnGridNetworkBeginDrag

void xLightsFrame::OnGridNetworkBeginDrag(wxListEvent& event)
{
    DragRowIdx = event.GetIndex();	// save the start index
    // do some checks here to make sure valid start
    // ...
    // trigger when user releases left button (drop)
    GridNetwork->Connect(wxEVT_LEFT_UP,
                         wxMouseEventHandler(xLightsFrame::OnGridNetworkDragEnd), NULL,this);
    // trigger when user leaves window to abort drag
    GridNetwork->Connect(wxEVT_LEAVE_WINDOW,
                         wxMouseEventHandler(xLightsFrame::OnGridNetworkDragQuit), NULL,this);
    // give visual feedback that we are doing something
    GridNetwork->SetCursor(wxCursor(wxCURSOR_HAND));
}
开发者ID:kgustafson,项目名称:nutcracker_c,代码行数:14,代码来源:TabSetup.cpp


示例18: OnColumnRClick

void CMuleListCtrl::OnColumnRClick(wxListEvent& evt)
{
	wxMenu menu;
	wxListItem item;
	
	for ( int i = 0; i < GetColumnCount() && i < 15; ++i) {
		GetColumn(i, item);

		menu.AppendCheckItem(i + MP_LISTCOL_1, item.GetText() );
		menu.Check( i + MP_LISTCOL_1, GetColumnWidth(i) > COL_SIZE_MIN );
	}

	PopupMenu(&menu, evt.GetPoint());
}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:14,代码来源:MuleListCtrl.cpp


示例19:

void GUI::FilesWidget::OnFileClick(wxListEvent &e)
{
	wxListItem item;
    item.SetMask(wxLIST_MASK_TEXT|wxLIST_MASK_IMAGE);
	item.SetId(e.GetIndex());
	this->list->GetItem(item);

	wxString path = this->GetPath(this->tree->GetSelection());
	wxString file = this->list->GetItemText(e.GetIndex());

	if (path.Length() != 1)
		path.Append("/");
	path.Append(file);

	if (item.GetImage() == this->list_foldericon)
	{
		this->FillInfo(NULL, "");
		return;
	}

	// we clicked a file, so first get all our manifests and find which it belongs to
	for (size_t i = 0; i < entries.size(); i++)
	{
		BENC_SAFE_CAST(entries[i]->getFiles()->getDictValue("names"), filenames, List);

		for (size_t n = 0; n < filenames->getListSize(); n++)
		{
			BENC_SAFE_CAST(filenames->getListItem(n), listitem, String);
			
			if (listitem->getString() == path)
			{
				this->FillInfo(entries[i], listitem->getString());
				return;
			}
		}
	}
}
开发者ID:ctz,项目名称:rain,代码行数:37,代码来源:GUI-FilesWidget.cpp


示例20: onBoosterSelect

void PowerManDlg::onBoosterSelect( wxListEvent& event ) {
    int index = event.GetIndex();
    m_Props = (iONode)m_BoosterList->GetItemData(index);
    if( m_Props != NULL ) {
        initValues();
    }
    else {
        TraceOp.trc( "boosterdlg", TRCLEVEL_INFO, __LINE__, 9999, "no selection..." );
        m_GeneralPanel->Enable(false);
        m_ModulesPanel->Enable(false);
        m_BlocksPanel->Enable(false);
        m_DetailsPanel->Enable(false);
    }

}
开发者ID:TheMRod,项目名称:Rocrail,代码行数:15,代码来源:powermandlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxListItem类代码示例发布时间:2022-05-31
下一篇:
C++ wxListCtrl类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap