Esempio n. 1
0
void XFunctionsShowDialog::OnSecondPlotChoice( wxCommandEvent& event )
{
    wxString wxszLabel = mSecondPlotChoice->GetString(event.GetSelection());
//    mLowerPlot->SetPlotTypeByString(wxszLabel);
    UpdatePlotData(mLowerPlot, wxszLabel);

    mLowerPlot->Refresh();
}
Esempio n. 2
0
void XFunctionsShowDialog::OnFrequencyRangeChoice( wxCommandEvent& event )
{
   int nChoice = event.GetSelection();
   SetFrequencyRange(mUpperPlot, nChoice, !mLinearScaleCheck->IsChecked());
   SetFrequencyRange(mLowerPlot, nChoice, !mLinearScaleCheck->IsChecked());
   mUpperPlot->Refresh();
   mLowerPlot->Refresh();
}
Esempio n. 3
0
	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"));
		}
	}
Esempio n. 4
0
void OmniFEMMainFrame::physicsProblemComboBox(wxCommandEvent &event)
{
	int physicsSelection = event.GetSelection();
	
	if(physicsSelection == 0)
		controller.setAbstractProblemPhysics(physicProblems::electrostatics);
	else if(physicsSelection == 1)
		controller.setAbstractProblemPhysics(physicProblems::magnetics);
}
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]) );
    }
}
Esempio n. 6
0
/* Selects the active layer:
 *  - if a file is loaded, it is loaded in this layer
 *  _ this layer is displayed on top of other layers
 */
void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event )
{
    int layer = getActiveLayer();

    setActiveLayer( event.GetSelection() );

    if( layer != getActiveLayer() )
        m_canvas->Refresh();
}
Esempio n. 7
0
void
AnimationFrame::OnCmd_anim_collisions(wxCommandEvent& event)
{
	if (mAnimationView)
	{
		mAnimationView->SetCollisionType(static_cast<CollisionWarning>(event.GetSelection()));
	}
	Refresh();
}
Esempio n. 8
0
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();
}
        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();
        }
Esempio n. 10
0
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();

}
Esempio n. 11
0
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);
}
Esempio n. 12
0
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));
}
Esempio n. 13
0
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();
}
Esempio n. 14
0
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() );
    }
}
Esempio n. 15
0
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);
}
Esempio n. 16
0
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);
    }
}
Esempio n. 17
0
void CFilterDialog::OnFilterSelect(wxCommandEvent& event)
{
	wxCheckListBox* pLocal = XRCCTRL(*this, "ID_LOCALFILTERS", wxCheckListBox);
	wxCheckListBox* pRemote = XRCCTRL(*this, "ID_REMOTEFILTERS", wxCheckListBox);

	int item = event.GetSelection();

	const CFilter& filter = m_filters[item];
	const bool localOnly = filter.HasConditionOfType(attributes) || filter.HasConditionOfType(permissions);
	if (localOnly && event.GetEventObject() != pLocal)
	{
		pRemote->Check(item, false);
		wxMessageBox(_("Selected filter only works for local files."), _("Cannot select filter"), wxICON_INFORMATION);
		return;
	}


	if (m_shiftClick)
	{
		if (event.GetEventObject() == pLocal)
		{
			if (!localOnly)
				pRemote->Check(item, pLocal->IsChecked(event.GetSelection()));
		}
		else
			pLocal->Check(item, pRemote->IsChecked(event.GetSelection()));
	}

	if (m_currentFilterSet)
	{
		m_filterSets[0] = m_filterSets[m_currentFilterSet];
		m_currentFilterSet = 0;
		wxChoice* pChoice = XRCCTRL(*this, "ID_SETS", wxChoice);
		pChoice->SetSelection(0);
	}

	bool localChecked = pLocal->IsChecked(event.GetSelection());
	bool remoteChecked = pRemote->IsChecked(event.GetSelection());
	m_filterSets[0].local[item] = localChecked;
	m_filterSets[0].remote[item] = remoteChecked;
}
Esempio n. 18
0
void SeriesTool::m_combo_marks_colourOnSelect(wxCommandEvent & event)
{
    DPRINTF("SeriesTool::m_combo_marks_colourOnSelect\n");
    if (m_series == nullptr)
        return;


    m_series->GetRenderer()->GetMarker()->SetFillColourIndex(event.GetSelection());
    m_series->Validate();

    m_combo_marks_style->CopyMarkerAttribs((plot::wxMarker*)m_series->GetRenderer()->GetMarker());
}
Esempio n. 19
0
void LIB_EDIT_FRAME::OnSelectPart( wxCommandEvent& event )
{
    int i = event.GetSelection();

    if( ( i == wxNOT_FOUND ) || ( ( i + 1 ) == m_unit ) )
        return;

    m_lastDrawItem = NULL;
    m_unit = i + 1;
    m_canvas->Refresh();
    DisplayCmpDoc();
}
Esempio n. 20
0
void ClueListBox::OnSelection(wxCommandEvent & evt)
{
    if (m_clues && m_clues->size() <= evt.GetSelection())
    {
        InvalidateCache();
        RefreshAll();
    }
    else
    {
        evt.Skip();
    }
}
Esempio n. 21
0
void LuminaryPanel::OnSelectFieldType(wxCommandEvent& event)
{
  if(event.GetSelection() != GS_SOLVER && event.GetSelection() != GS_SOLVER2D && event.GetSelection() != SIMPLE_FIELD && event.GetSelection() != FAKE_FIELD)
    {
      m_omegaDiffLabel->Enable();
      m_omegaDiffTextCtrl->Enable();
      m_omegaProjLabel->Enable();
      m_omegaProjTextCtrl->Enable();
      m_epsilonLabel->Enable();
      m_epsilonTextCtrl->Enable();
    }
  else
    {
      m_omegaDiffLabel->Disable();
      m_omegaDiffTextCtrl->Disable();
      m_omegaProjLabel->Disable();
      m_omegaProjTextCtrl->Disable();
      m_epsilonLabel->Disable();
      m_epsilonTextCtrl->Disable();
    }
}
Esempio n. 22
0
void SyntaxHighlightDlg::OnThemeChanged(wxCommandEvent& event)
{
    event.Skip();
    int sel = event.GetSelection();
    wxString themeName = m_themes->GetString((unsigned int)sel);

    //update the configuration with the new lexer's theme
    EditorConfigST::Get()->SaveStringValue(wxT("LexerTheme"), themeName);

    LoadLexers( themeName );
    Layout();
}
/* Selects the active layer:
 *  - if a file is loaded, it is loaded in this layer
 *  _ this layer is displayed on top of other layers
 */
void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event )
{
    LAYER_NUM layer = getActiveLayer();

    setActiveLayer( event.GetSelection() );

    if( layer != getActiveLayer() )
    {
        if( m_LayersManager->OnLayerSelected() )
            m_canvas->Refresh();
    }
}
Esempio n. 24
0
/// React to style type choice
void wxRichTextStyleListCtrl::OnChooseType(wxCommandEvent& event)
{
    if (event.GetEventObject() != m_styleChoice)
        event.Skip();
    else
    {
        if (m_dontUpdate)
            return;

        wxRichTextStyleListBox::wxRichTextStyleType styleType = StyleIndexToType(event.GetSelection());
        m_styleListBox->SetStyleType(styleType);
    }
}
Esempio n. 25
0
void PHPDebugStartDlg::OnDebugMethodChanged(wxCommandEvent& event)
{
    event.Skip();
    if(event.GetSelection() == 0) {
        // Debug URL
        CallAfter( &PHPDebugStartDlg::SetBookSelection, 0);
        m_project->GetSettings().SetRunAs(PHPProjectSettingsData::kRunAsWebsite);
    } else {
        // Command line script
        CallAfter( &PHPDebugStartDlg::SetBookSelection, 1);
        m_project->GetSettings().SetRunAs(PHPProjectSettingsData::kRunAsCLI);
    }
}
Esempio n. 26
0
void NavBar::OnFunction(wxCommandEvent& e)
{
    LEditor* editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
    if(!editor) return;

    size_t sel = e.GetSelection();
    if(sel >= m_tags.size()) return;

    wxString pattern = m_tags[sel]->GetPattern();
    wxString name = m_tags[sel]->GetName();
    editor->FindAndSelect(pattern, name);
    editor->SetActive();
}
Esempio n. 27
0
File: run.cpp Progetto: nszhsl/pylon
void bloopFrame::OnbuttonRUNClick(wxCommandEvent& event)
{
    if( runningThread )
    {
        delete runningThread;
        runningThread = NULL;
        //return;
    }

    clear_output();

    print("OnbuttonRUNClick: " + fstring("%d, %d", event.GetEventType(), event.GetSelection()));
    Notebook1->ChangeSelection(3);
    std::string cmmd = "";

    if(checklistRunTimeOptions->IsChecked(0))
        cmmd += " -debug";
    if(checklistRunTimeOptions->IsChecked(1))
        cmmd += " -wireframe";
    if(checklistRunTimeOptions->IsChecked(2))
        cmmd += " -boundingbox";
    if(checklistRunTimeOptions->IsChecked(3))
        cmmd += " -collisions";
    if(checklistRunTimeOptions->IsChecked(4))
        cmmd += " -version";
    if(checklistRunTimeOptions->IsChecked(5))
        cmmd += " -help";
    if(checklistRunTimeOptions->IsChecked(6))
        cmmd += " -trails";
    if(checklistRunTimeOptions->IsChecked(7))
        cmmd += " -dnrm";
    if(checklistRunTimeOptions->IsChecked(8))
        cmmd += " -usedirdata -dir " + str(textPathDir->GetValue());
    if(checklistRunTimeOptions->IsChecked(9))
        cmmd += " " + str(textOtherRunTimeOptions->GetValue());

    if(!checklistRunTimeOptions->IsChecked(8))
        cmmd += " -f " + str(textPathToGameFile->GetValue()) + str(textFileToSaveTo->GetValue());

    std::string libpaths = "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"+str(textPathToPylonDLL->GetValue())+":/usr/lib:/usr/lib/python2.7";

    cmmd = libpaths + " " + str(textPathToPylonExe->GetValue()) + cmmd;

    if( !runningThread )
    {
        print("Executing Pylon with the Command:");
        print("<font color='#FF8844'>" + cmmd + "</font>");
        runningThread = new RunThread(cmmd);
    }
}
Esempio n. 28
0
void rtlsdrPrefs::OnAISProgram( wxCommandEvent& event )
{
    m_sAISSampleRate->Enable((bool)event.GetSelection());

    wxString AISProgram = m_cAISProgram->GetString(m_cAISProgram->GetSelection());
    bool pipe = AISProgram.Contains(_T("|"));
    m_stP2args->Show(pipe);
    m_tP2args->Show(pipe);

    m_stP1args->SetLabel(AISProgram.BeforeFirst('|'));
    m_stP2args->SetLabel(AISProgram.AfterFirst('|'));

    Fit();
}
Esempio n. 29
0
void LIB_EDIT_FRAME::OnSelectUnit( wxCommandEvent& event )
{
    int i = event.GetSelection();

    if( ( i == wxNOT_FOUND ) || ( ( i + 1 ) == m_unit ) )
        return;

    m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
    m_toolManager->RunAction( EE_ACTIONS::clearSelection, true );

    m_unit = i + 1;

    m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
    RebuildView();
}
Esempio n. 30
0
void DIALOG_DRC_CONTROL::OnFootprintsSelectionEvent( wxCommandEvent& event )
{
    int selection = event.GetSelection();

    if( selection != wxNOT_FOUND )
    {
        // until a MARKER is selected, this button is not enabled.
        m_DeleteCurrentMarkerButton->Enable( true );

        // Find the selected DRC_ITEM in the listbox, position cursor there.
        focusOnItem( m_FootprintsListBox->GetItem( selection ) );
    }

    event.Skip();
}