本文整理汇总了C++中wxCommandEvent::GetSelection方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCommandEvent::GetSelection方法的具体用法?C++ wxCommandEvent::GetSelection怎么用?C++ wxCommandEvent::GetSelection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxCommandEvent
的用法示例。
在下文中一共展示了wxCommandEvent::GetSelection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSecondPlotChoice
void XFunctionsShowDialog::OnSecondPlotChoice( wxCommandEvent& event )
{
wxString wxszLabel = mSecondPlotChoice->GetString(event.GetSelection());
// mLowerPlot->SetPlotTypeByString(wxszLabel);
UpdatePlotData(mLowerPlot, wxszLabel);
mLowerPlot->Refresh();
}
示例2: OnFrequencyRangeChoice
void XFunctionsShowDialog::OnFrequencyRangeChoice( wxCommandEvent& event )
{
int nChoice = event.GetSelection();
SetFrequencyRange(mUpperPlot, nChoice, !mLinearScaleCheck->IsChecked());
SetFrequencyRange(mLowerPlot, nChoice, !mLinearScaleCheck->IsChecked());
mUpperPlot->Refresh();
mLowerPlot->Refresh();
}
示例3: OnCheck
void OnCheck(wxCommandEvent& event)
{
if (!event.GetSelection() && !event.IsChecked())
{
wxCheckListBox* pListBox = XRCCTRL(*this, "ID_ACTIVE", wxCheckListBox);
pListBox->Check(0);
wxMessageBoxEx(_("The filename column can neither be hidden nor moved."), _("Column properties"));
}
}
示例4: physicsProblemComboBox
void OmniFEMMainFrame::physicsProblemComboBox(wxCommandEvent &event)
{
int physicsSelection = event.GetSelection();
if(physicsSelection == 0)
controller.setAbstractProblemPhysics(physicProblems::electrostatics);
else if(physicsSelection == 1)
controller.setAbstractProblemPhysics(physicProblems::magnetics);
}
示例5: OnInfoListBoxDoubleClick
void CameraTrackSettingDialog::OnInfoListBoxDoubleClick( wxCommandEvent &event )
{
Ogre::String selectStr( mCameraInfoListBox->GetString( event.GetSelection() ).c_str() );
Ogre::StringVector infos = Ogre::StringUtil::split(selectStr, ",");
if (infos.size() == 3)
{
mPointIndexTextCtrl->SetValue( Ogre::StringConverter::toString(event.GetSelection() + 1).c_str() );
mPositionTextCtrl->SetValue( infos[0].c_str() );
mOrientationTextCtrl->SetValue( infos[1].c_str() );
mTimeTextCtrl->SetValue( infos[2].c_str() );
// 定位摄像机
mCamera->setPosition( Ogre::StringConverter::parseVector3(infos[0]) );
mCamera->setOrientation( Ogre::StringConverter::parseQuaternion(infos[1]) );
}
}
示例6:
void
AnimationFrame::OnCmd_anim_collisions(wxCommandEvent& event)
{
if (mAnimationView)
{
mAnimationView->SetCollisionType(static_cast<CollisionWarning>(event.GetSelection()));
}
Refresh();
}
示例7: OnDrawMode
void VtxSceneTabs::OnDrawMode(wxCommandEvent& event){
int mode=event.GetSelection();
if(mode==0)
Render.show_points();
else if(mode==1)
Render.show_lines();
else
Render.show_shaded();
TheScene->set_changed_render();
}
示例8: OnModChoiceSelected
void MapPropertiesDialog::OnModChoiceSelected(wxCommandEvent& event) {
int index = event.GetSelection();
if (index < 0 || index >= static_cast<int>(m_modChoice->GetCount()))
return;
const String mod = m_modChoice->GetString(static_cast<unsigned int>(index)).ToStdString();
Controller::EntityPropertyCommand* command = Controller::EntityPropertyCommand::setEntityPropertyValue(*m_document, m_document->worldspawn(), Model::Entity::ModKey, mod, true);
m_document->GetCommandProcessor()->Submit(command);
init();
}
示例9: m_combo_line_colourOnSelect
void SeriesTool::m_combo_line_colourOnSelect(wxCommandEvent & event)
{
DPRINTF("SeriesTool::m_combo_line_colourOnSelect\n");
if (m_series == nullptr)
return;
m_series->GetRenderer()->GetLine()->SetColourIndex(event.GetSelection());
m_series->Validate();
}
示例10: OnComboEol
void SettingsDlg::OnComboEol(wxCommandEvent& event) {
wxString eolStr;
switch(event.GetSelection()) {
case 0: eolStr = wxT("crlf"); break;
case 1: eolStr = wxT("lf"); break;
case 2: eolStr = wxT("cr"); break;
}
m_settings.SetSettingString(wxT("formatEol"), eolStr);
}
示例11: OnComboEncoding
void SettingsDlg::OnComboEncoding(wxCommandEvent& event) {
const wxFontEncoding enc = wxFontMapper::GetEncoding(event.GetSelection());
const wxString encStr = wxFontMapper::GetEncodingName(enc);
if (enc == wxFONTENCODING_DEFAULT) m_settings.RemoveSetting(wxT("formatEncoding"));
else m_settings.SetSettingString(wxT("formatEncoding"), encStr);
// Check if bom ctrl should be enabled
m_defBom->Enable(encoding_allows_bom(enc));
}
示例12: OnCertificateChoice
void CVerifyCertDialog::OnCertificateChoice(wxCommandEvent& event)
{
int sel = event.GetSelection();
if (sel < 0 || sel > (int)m_certificates.size())
return;
DisplayCert(m_pDlg, m_certificates[sel]);
m_pDlg->Layout();
m_pDlg->GetSizer()->Fit(m_pDlg);
m_pDlg->Refresh();
}
示例13: OnChoiceMessage
void SvnCommitDialog::OnChoiceMessage(wxCommandEvent& e)
{
int idx = e.GetSelection();
if(idx == wxNOT_FOUND)
return;
CommitMessageStringData* data = (CommitMessageStringData*)m_choiceMessages->GetClientObject(idx);
if(data) {
m_stcMessage->SetText( data->GetData() );
}
}
示例14: OnScope
void NavBar::OnScope(wxCommandEvent& e)
{
size_t sel = e.GetSelection();
if(sel < m_scope->GetCount()) {
m_tags.clear();
m_func->Clear();
}
wxString scope = m_scope->GetString(sel);
DoPopulateFunctions(DoGetCurFileName(), scope);
}
示例15: OnSongReturn
void FrontEnd::OnSongReturn(wxCommandEvent& event)
{
wxPanel *panel_singer = create_page_singer_gender(m_bookCtrl);
const int idx = event.GetSelection();
if(m_bookCtrl->GetPageText(idx) == "Singers")
{
m_bookCtrl->DeletePage(idx);
m_bookCtrl->InsertPage(idx, panel_singer, "Singers", true);
}
}