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

C++ wxGridEvent类代码示例

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

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



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

示例1: OnCellChange

void wxPropertyList::OnCellChange( wxGridEvent& event )
{
    int row = event.GetRow();

    wxPropertyItem *pItem = GetPropertyItemFromRow(row);
    if(pItem && row != wxNOT_FOUND)
    {
        // write propery back, and set as new
        pItem->SetNewValue(true);
        
        // write back bool
        if(pItem->GetItemType() == CHECKBOX)
        {
            if(GetCellValue(row, 1).IsSameAs("1"))
                pItem->SetCurValue("ON");
            else
                pItem->SetCurValue("OFF");
        }
        else
            pItem->SetCurValue(GetCellValue(row, 1));
    
        UpdatePropertyItem(pItem, row);
        event.Skip();
    }
}
开发者ID:AlexeyS,项目名称:cmake,代码行数:25,代码来源:PropertyList.cpp


示例2: OnCellEdit

//--------------------------------------------------------------------------------
void DialogResourceGroups::OnCellEdit( wxGridEvent& event )
{
    wxString groupName = m_groupsGrid->GetCellValue( event.GetRow(), 0 );

    // did we edit the name?
    if ( event.GetCol() == 0 )
    {
        // has the name actually changed?
        if ( m_oldGroupName.Cmp( groupName ) != 0 )
        {
            if ( renameResourceGroup( m_oldGroupName, groupName ) )
                m_oldGroupName = groupName;
            else
                m_groupsGrid->SetCellValue( event.GetRow(), 0, m_oldGroupName );
        }
    }
    // update the directory value instead
    else
    {
        setGroupDirectory(
            groupName,
            m_groupsGrid->GetCellValue( event.GetRow(), 1 ) );
    }

    event.Skip();
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:27,代码来源:DialogResourceGroups.cpp


示例3: OnSelectCell

void CManagePasswordPolicies::OnSelectCell( wxGridEvent& evt )
{
  if (evt.GetEventObject() == m_PolicyNames) {
    m_curPolRow = evt.GetRow();
    UpdateDetails();
  }
}
开发者ID:pwsafe,项目名称:pwsafe,代码行数:7,代码来源:ManagePwdPolicies.cpp


示例4: OnChangeCell

/// Intercept cell data change event.
void ctPropertyEditor::OnChangeCell(wxGridEvent& event)
{
    int row = event.GetRow();
    int col = event.GetCol();

    ApplyCellValueToProperty(row, col);
}
开发者ID:Duion,项目名称:Torsion,代码行数:8,代码来源:propeditor.cpp


示例5: OnMouseDownR

void CWatchView::OnMouseDownR(wxGridEvent& event)
{
  // popup menu
  int row = event.GetRow();
  int col = event.GetCol();

  m_selectedRow = row;

  if (col == 1 || col == 2)
  {
    wxString strNewVal = GetValueByRowCol(row, col);
    TryParse("0x" + WxStrToStr(strNewVal), &m_selectedAddress);
  }

  wxMenu menu;
  if (row != 0 && row != static_cast<int>(PowerPC::debug_interface.GetWatches().size() + 1))
  {
    // i18n: This kind of "watch" is used for watching emulated memory.
    // It's not related to timekeeping devices.
    menu.Append(IDM_DELETEWATCH, _("&Delete watch"));
  }

  if (row != 0 && row != static_cast<int>(PowerPC::debug_interface.GetWatches().size() + 1) &&
      (col == 1 || col == 2))
  {
    menu.Append(IDM_ADDMEMCHECK, _("Add memory &breakpoint"));
    menu.Append(IDM_VIEWMEMORY, _("View &memory"));
  }
  PopupMenu(&menu);
}
开发者ID:leoetlino,项目名称:dolphin,代码行数:30,代码来源:WatchView.cpp


示例6: OnTableDBGridLeftClick

void MultiViewerMain::OnTableDBGridLeftClick( wxGridEvent& event )
{
	if(eGridAdding != m_eGridState) {
		event.Skip();
		return;
	}


	if(m_nAddRow == event.GetRow())
	{
		if(	AddSQLRow() == false) 
			return;
	}
	else if(m_nCancelRow == event.GetRow())
	{
		int nTotalRow = m_pTableDBDataGrid->GetNumberRows();
		m_pTableDBDataGrid->DeleteRows(m_nEditRow, m_nEditRowCount + GridAddingModeRowCount);
		m_nEditRow = -1;
		m_nAddRow = -1;
		m_nCancelRow = -1;
	}
	else
	{
		event.Skip();
		return;
	}

	m_eGridState = eGridCommon;
}
开发者ID:yiunsr,项目名称:multidbviewer,代码行数:29,代码来源:MultiViewerMain.cpp


示例7: GetCellEditor

void nwxGrid::OnEditorEnd(wxGridEvent &e)
{
  if(m_nEditorOn)
  {
    m_nEditorOn--;

    int nRow = e.GetRow();
    int nCol = e.GetCol();
    // memory leak on following line
    wxGridCellEditor *pEdit = GetCellEditor(nRow, nCol);
    wxControl *pControl = (pEdit == NULL) ? NULL : pEdit->GetControl();
    wxTextCtrl *pText = 
      (pControl == NULL)
      ? NULL
      : wxDynamicCast(pControl,wxTextCtrl);
    if(pText != NULL)
    {
      wxString s;
      s = pText->GetValue();
      if(s == m_sEditorStartValue || s != m_sValue)
      {
        // value hasn't changed but we still want to force a 
        // CELL_CHANGED event
        wxGridEvent ee(e);
        ee.SetEventType(wxEVT_GRID_CELL_CHANGED);
        AddPendingEvent(ee);
      }
      if(pEdit != NULL)
      {
        pEdit->DecRef();
      }
    }
  }
  e.Skip();
}
开发者ID:HelloWilliam,项目名称:osiris,代码行数:35,代码来源:nwxGrid.cpp


示例8: OnCellClick

void NetBuilderProperties_frame::OnCellClick( wxGridEvent& event )
{
  MainFrame *myparent=(MainFrame *) GetParent();
  int error=0;
  wxChar *endptr;
  char rest[100];
  if (event.GetRow()==3){
	pop_selected=event.GetCol();
	int total_fdomains_value= (int) wxStrtol(Properties_grid->GetCellValue(2,pop_selected),&endptr,10);
	strcpy(rest,wxString(endptr).mb_str());
	rest[100-1]='\0';
	if (total_fdomains_value > 0 && strcmp(rest,"")==0){
	  if (total_fdomains_value!=population[pop_selected].total_fdomains)
	    Initialize_Fdomains(pop_selected,total_fdomains_value);
	}
	else{
	  myparent->text_status->SetForegroundColour( wxColour( 247, 22, 10 ) );
	  wxLogMessage(wxT(">> WARNING: fdomains of population ") + int2wxStr(pop_selected) + wxT(" must be an integer greater than 0."));
	  myparent->text_status->SetForegroundColour( wxColour( 0, 0, 0 ) );
	  error=-1;
	}
	if (error==0) {
	  population[pop_selected].total_fdomains=wxAtoi(Properties_grid->GetCellValue(2,pop_selected));
	  this->Enable(false);
	  NetBuilderDynamics_frame *Dynamics_frame=new NetBuilderDynamics_frame(this);
	  Dynamics_frame->Show();
	}
  }
  event.Skip();
}
开发者ID:msGenDev,项目名称:neuralsyns,代码行数:30,代码来源:NetBuilderProperties_frame.cpp


示例9: OnClick

void LibraryDialog::OnClick(wxGridEvent& event)
{
	int row = event.GetRow();
	switch(event.GetId())
	{
	case IDG_DEVICES:
		p_proj_item = (projectoritem*) storage::storage_item_for_row(&storage::list_projectoritem,row);

		grid_channels->set_list(NULL);
		grid_states->set_list(NULL);
		grid_values->set_list(NULL);

		if(p_proj_item != NULL)
		{
			grid_channels->set_list(&p_proj_item->list_projectorchannelitem,new_projectorchannelitem,p_proj_item);
			grid_states->set_list(&p_proj_item->list_stateitem);
		}
		break;
	case IDG_CHANNELS:
		if(p_proj_item != NULL)
		{
			p_proj_chn_item = (projectorchannelitem*) storage::storage_item_for_row(&p_proj_item->list_projectorchannelitem,row);
			grid_values->set_list(NULL);
			
			if(p_proj_chn_item->get_type() == projectorchannelitem::T_VALUE)
				grid_values->set_list(&p_proj_chn_item->list_valueitem,new_valueitem,p_proj_chn_item);
		}
		break;
	}
	event.Skip();
}
开发者ID:BackupTheBerlios,项目名称:lightshow-svn,代码行数:31,代码来源:LibraryDialog.cpp


示例10: OnCellBeginDrag

void GridFrame::OnCellBeginDrag( wxGridEvent& ev )
{
    wxLogMessage(_T("Got request to drag cell at row %d, col %d"),
                 ev.GetRow(), ev.GetCol());

    ev.Skip();
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:7,代码来源:griddemo.cpp


示例11: onLightCellChange

void HueConfDlg::onLightCellChange( wxGridEvent& event ) {
  m_Row = event.GetRow();
  m_Col = event.GetCol();
  TraceOp.trc( "hueconf", TRCLEVEL_INFO, __LINE__, 9999, "cell changed: %d,%d", m_Row, m_Col );
  m_labChangedLight->SetLabel( m_LightsGrid->GetCellValue(m_Row, 0) + wxT(": ") + m_LightsGrid->GetCellValue(m_Row, 1) );
  m_SetLight->Enable(true);
}
开发者ID:pmansvelder,项目名称:Rocrail,代码行数:7,代码来源:hueconfdlg.cpp


示例12: OnChange

void TagsEditor::OnChange(wxGridEvent & event)
{
   static bool ischanging = false;

   // Prevent recursion
   if (ischanging) {
      return;
   }

   event.Skip();

   if (event.GetCol() != 0) {
      return;
   }

   wxString n = mGrid->GetCellValue(event.GetRow(), 0);
   for (size_t i = 0; i < STATICCNT; i++) {
      if (n.CmpNoCase(labelmap[i].label) == 0) {
         ischanging = true;
         wxBell();
         mGrid->SetGridCursor(i, 0);
         event.Veto();
         ischanging = false;
         break;
      }
   }

   return;
}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:29,代码来源:Tags.cpp


示例13: OnMouseDownR

void CWatchView::OnMouseDownR(wxGridEvent& event)
{
  // popup menu
  int row = event.GetRow();
  int col = event.GetCol();

  m_selectedRow = row;

  if (col == 1 || col == 2)
  {
    wxString strNewVal = GetValueByRowCol(row, col);
    TryParse("0x" + WxStrToStr(strNewVal), &m_selectedAddress);
  }

  wxMenu menu;
  if (row != 0 && row != (int)(PowerPC::watches.GetWatches().size() + 1))
    menu.Append(IDM_DELETEWATCH, _("&Delete watch"));

  if (row != 0 && row != (int)(PowerPC::watches.GetWatches().size() + 1) && (col == 1 || col == 2))
  {
    menu.Append(IDM_ADDMEMCHECK, _("Add memory &breakpoint"));
    menu.Append(IDM_VIEWMEMORY, _("View &memory"));
  }
  PopupMenu(&menu);
}
开发者ID:spxtr,项目名称:dolphin,代码行数:25,代码来源:WatchView.cpp


示例14: OnSelectCell

void wxGISTableView::OnSelectCell(wxGridEvent& event)
{
    event.Skip();
	m_position->Clear();
	(*m_position) << event.GetRow() + 1;

}
开发者ID:Mileslee,项目名称:wxgis,代码行数:7,代码来源:tableview.cpp


示例15: OnGridDataChanged

void CEditLanguageDialog::OnGridDataChanged(wxGridEvent& event)
{
    std::map<TString, std::map<ELanguageType, TString> >& languageMap = CLanguageManager::GetInstance()->GetLanguageMap();
    std::map<TString, TString>& languageTagMap = CLanguageManager::GetInstance()->GetLanguageTagMap();
    int nRow = event.GetRow();
    int nCol = event.GetCol();
    wxString strValue = m_pLanguageGrid->GetCellValue(nRow, nCol);
    TString strEnumStr = m_pLanguageGrid->GetRowLabelValue(nRow);
    auto languageIter = languageMap.find(strEnumStr);
    BEATS_ASSERT(languageIter != languageMap.end());
    if (nCol == eLT_Count)
    {
        if (strValue.empty())
        {
            languageTagMap.erase(strEnumStr);
        }
        else
        {
            languageTagMap[strEnumStr] = strValue.ToUTF8();
        }
    }
    else
    {
        languageIter->second[(ELanguageType)nCol] = strValue.ToUTF8();
    }
}
开发者ID:BeyondEngine,项目名称:BeyondEngine,代码行数:26,代码来源:EditLanguageDialog.cpp


示例16: OnRuleTableEdit

void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event)
{
    int row = event.GetRow();
    int col = event.GetCol();
    ExtImportItems *items = Importer::Get().GetImportItems();
    ExtImportItem *item = &(*items)[row];
    RuleTable->SaveEditControlValue();

    wxString val = RuleTable->GetCellValue (row, col);
    int fixSpaces = wxNO;
    bool askedAboutSpaces = false;
    wxArrayString vals;
    wxString delims(wxT(":"));
    Importer::Get().StringToList (val, delims, vals);
    switch (col)
    {
    case 0:
        item->extensions.Clear();
        break;
    case 1:
        item->mime_types.Clear();
        break;
    }

    for (size_t i = 0; i < vals.Count(); i++)
    {

        wxString trimmed = vals[i];
        trimmed.Trim().Trim(false);
        if (trimmed.Cmp(vals[i]) != 0)
        {
            if (!askedAboutSpaces)
            {
                fixSpaces = wxMessageBox(_(
                                             "There are space characters (spaces, newlines, tabs or linefeeds) in one of \
the items. They are likely to break the pattern matching. Unless you know \
what you are doing, it is recommended to trim spaces. Do you want \
Audacity to trim spaces for you?"
                                         ),_("Spaces detected"), wxYES_NO);
                askedAboutSpaces = true;
            }
            if (fixSpaces != wxYES)
            {
                trimmed = vals[i];
            }
            else
            {
                vals[i] = trimmed;
            }
        }
        switch (col)
        {
        case 0:
            item->extensions.Add (trimmed);
            break;
        case 1:
            item->mime_types.Add (trimmed);
            break;
        }
    }
开发者ID:forssil,项目名称:thirdpartysource,代码行数:60,代码来源:ExtImportPrefs.cpp


示例17: OnLabelLeftClick

void wxGridCtrl::OnLabelLeftClick(wxGridEvent& event)
{
    event.Skip();
    if (event.GetRow() != wxNOT_FOUND)
	{
        SetGridCursor(event.GetRow(),0);
    }
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:8,代码来源:tableview.cpp


示例18: OnSelectCell

/// Intercept selection event.
void ctPropertyEditor::OnSelectCell(wxGridEvent& event)
{
    int row = event.GetRow();

    UpdateDescription(row);

    event.Skip();
}
开发者ID:Duion,项目名称:Torsion,代码行数:9,代码来源:propeditor.cpp


示例19: OnCellSelected

void PropGrid::OnCellSelected( wxGridEvent& ev )
{
	currentSelection.TopRow=ev.GetRow();
	currentSelection.LeftCol=ev.GetCol();
	currentSelection.BottomRow=ev.GetRow();
	currentSelection.RightCol=ev.GetCol();
    ev.Skip();
}
开发者ID:JimmyFarcy,项目名称:I-Simpa,代码行数:8,代码来源:PropGrid.cpp


示例20: OnLabelLeftClick

void wxGridCtrl::OnLabelLeftClick(wxGridEvent& event)
{
    if (event.GetRow() != -1)
    {
        SetGridCursor(event.GetRow(),0);
    }
    event.Skip();
}
开发者ID:jacklibj,项目名称:r5,代码行数:8,代码来源:tableview.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxHelpEvent类代码示例发布时间:2022-05-31
下一篇:
C++ wxGridCellAttr类代码示例发布时间: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