void RosoutPanel::onPause(wxCommandEvent& evt)
{
  pause_ = evt.IsChecked();
}
Example #2
0
void CDStarRepeaterFrame::onLogging(wxCommandEvent& event)
{
	::wxGetApp().setLogging(event.IsChecked());
}
void MinecraftVersionDialog::OnSnapshots(wxCommandEvent& event)
{
	showOldSnapshots = event.IsChecked();
	Refilter();
}
void EnvironmentSettingsDlg::OnI18NCheck(wxCommandEvent& event)
{
    XRCCTRL(*this, "cbxLanguage", wxComboBox)->Enable(event.IsChecked());
}
Example #5
0
void AutosaveConfigDlg::OnSourceChecked(wxCommandEvent &event)
{
    XRCCTRL(*this, "source_mins", wxTextCtrl)->Enable(event.IsChecked());
}
void GuiderOneStar::GuiderOneStarConfigDialogPane::OnStarMassEnableChecked(wxCommandEvent& event)
{
    m_pMassChangeThreshold->Enable(event.IsChecked());
}
void EnvironmentSettingsDlg::OnPlaceCheck(wxCommandEvent& event)
{
    XRCCTRL(*this, "chkPlaceHead", wxCheckBox)->Enable(event.IsChecked());
}
Example #8
0
void MadReplaceDialog::WxCheckBoxSearchInSelectionClick(wxCommandEvent& event)
{
    UpdateSearchInSelection(event.IsChecked());
}
Example #9
0
void Frame::OnStyle(wxCommandEvent& event)
{
	long style = book->GetWindowStyleFlag();
	switch(event.GetId())
	{
	case MENU_HIDE_NAV_BUTTONS:
		if(event.IsChecked())
		{
			// Hide the navigation buttons
			style |= wxFNB_NO_NAV_BUTTONS;
		}
		else
		{
			style &= ~(wxFNB_NO_NAV_BUTTONS);
			style &= ~(wxFNB_DROPDOWN_TABS_LIST);
		}
		book->SetWindowStyleFlag(style);
		break;
	case MENU_HIDE_X:
		if(event.IsChecked())
		{
			// Hide the X button
			style |= wxFNB_NO_X_BUTTON;
		}
		else
		{
			if(style & wxFNB_NO_X_BUTTON)
				style ^= wxFNB_NO_X_BUTTON;
		}
		book->SetWindowStyleFlag(style);
		break;
	case MENU_DRAW_BORDER:
		if(event.IsChecked())
		{
			style |= wxFNB_TABS_BORDER_SIMPLE;
		}
		else
		{
			if(style & wxFNB_TABS_BORDER_SIMPLE)
				style ^= wxFNB_TABS_BORDER_SIMPLE;
		}
		book->SetWindowStyleFlag(style);
		break;
	case MENU_USE_MOUSE_MIDDLE_BTN:
		if(event.IsChecked())
		{
			style |= wxFNB_MOUSE_MIDDLE_CLOSES_TABS;
		}
		else
		{
			if(style & wxFNB_MOUSE_MIDDLE_CLOSES_TABS)
				style ^= wxFNB_MOUSE_MIDDLE_CLOSES_TABS;
		}
		book->SetWindowStyleFlag(style);
		break;
	case MENU_USE_BOTTOM_TABS:
		if(event.IsChecked())
		{
			style |= wxFNB_BOTTOM;
		}
		else
		{
			if(style & wxFNB_BOTTOM)
				style ^= wxFNB_BOTTOM;
		}
		book->SetWindowStyleFlag(style);
		book->Refresh();
		break;
	}
}
Example #10
0
void TerrainSidebar::OnShowPriorities(wxCommandEvent& evt)
{
	POST_MESSAGE(SetViewParamB, (AtlasMessage::eRenderView::GAME, L"priorities", evt.IsChecked()));
}
Example #11
0
/*
 * WxCheckBoxFindHexClick
 */
void MadReplaceDialog::WxCheckBoxFindHexClick(wxCommandEvent& event)
{
    UpdateCheckBoxByCBHex(event.IsChecked());
}
void wxScopeServerDialog::OnParallelCheckBoxClick(wxCommandEvent& event)
{
   bool parallel = event.IsChecked();
   m_server->UseParallelGuiding(parallel);
}
Example #13
0
// ------------ Event handlers starts here
// -------- generic command handler
// handles all control command events
void CDlgAdvPreferences::OnHandleCommandEvent(wxCommandEvent& ev) {
    ev.Skip();
    // If user has just set the checkbox, set textedit field to default value.
    // Note: use ChangeValue() here to avoid generating extra events.
    // m_txtProcIdleFor depends on 2 checkboxes, set it in UpdateControlStates().
    switch (ev.GetId()) {
    // processor usage page
    case ID_CHKMAXLOAD:
        DisplayValue(defaultPrefs.suspend_cpu_usage, m_txtMaxLoad, m_chkMaxLoad);
        break;
    
    // network usage page
    case ID_CHKNETDOWNLOADRATE:
        DisplayValue((defaultPrefs.max_bytes_sec_down / 1024), m_txtNetDownloadRate, m_chkNetDownloadRate);
        break;
    case ID_CHKNETUPLOADRATE:
        DisplayValue((defaultPrefs.max_bytes_sec_up / 1024), m_txtNetUploadRate, m_chkNetUploadRate);
        break;
    case ID_CHKDAILYXFERLIMIT:
        DisplayValue(defaultPrefs.daily_xfer_limit_mb, m_txt_daily_xfer_limit_mb, m_chk_daily_xfer_limit);
        DisplayValue(defaultPrefs.daily_xfer_period_days, m_txt_daily_xfer_period_days, m_chk_daily_xfer_limit);
        break;
        
    // disk usage page
    case ID_CHKDISKMAXSPACE:
        DisplayValue(defaultPrefs.disk_max_used_gb, m_txtDiskMaxSpace, m_chkDiskMaxSpace);
        break;
    case ID_CHKDISKLEASTFREE:
        DisplayValue(defaultPrefs.disk_min_free_gb, m_txtDiskLeastFree, m_chkDiskLeastFree);
        break;
    case ID_CHKDISKMAXOFTOTAL:
        DisplayValue(defaultPrefs.disk_max_used_pct, m_txtDiskMaxOfTotal, m_chkDiskMaxOfTotal);
        break;
    case ID_CHKPROCEVERYDAY:
        if (ev.IsChecked()) {
            m_txtProcEveryDayStart->ChangeValue(DoubleToTimeString(defaultPrefs.cpu_times.start_hour));
            m_txtProcEveryDayStop->ChangeValue(DoubleToTimeString(defaultPrefs.cpu_times.end_hour));
        } else {
            m_txtProcEveryDayStart->Clear();
            m_txtProcEveryDayStop->Clear();
        }
        break;
    case ID_CHKPROCSUNDAY:
    case ID_CHKPROCMONDAY:
    case ID_CHKPROCTUESDAY:
    case ID_CHKPROCWEDNESDAY:
    case ID_CHKPROCTHURSDAY:
    case ID_CHKPROCFRIDAY:
    case ID_CHKPROCSATURDAY:
        if (ev.IsChecked()) {
            (procDayStartTxts[ev.GetId() - ID_CHKPROCSUNDAY])->ChangeValue(DoubleToTimeString(defaultPrefs.cpu_times.start_hour));
            (procDayStopTxts[ev.GetId() - ID_CHKPROCSUNDAY])->ChangeValue(DoubleToTimeString(defaultPrefs.cpu_times.end_hour));
        } else {
            (procDayStartTxts[ev.GetId() - ID_CHKPROCSUNDAY])->Clear();
            (procDayStopTxts[ev.GetId() - ID_CHKPROCSUNDAY])->Clear();
        }
        break;
    case ID_CHKNETEVERYDAY:
       if (ev.IsChecked()) {
            m_txtNetEveryDayStart->ChangeValue(DoubleToTimeString(defaultPrefs.net_times.start_hour));
            m_txtNetEveryDayStop->ChangeValue(DoubleToTimeString(defaultPrefs.net_times.end_hour));
        } else {
            m_txtNetEveryDayStart->Clear();
            m_txtNetEveryDayStop->Clear();
        }
        break;
    case ID_CHKNETSUNDAY:
    case ID_CHKNETMONDAY:
    case ID_CHKNETTUESDAY:
    case ID_CHKNETWEDNESDAY:
    case ID_CHKNETTHURSDAY:
    case ID_CHKNETFRIDAY:
    case ID_CHKNETSATURDAY:
       if (ev.IsChecked()) {
            (netDayStartTxts[ev.GetId() - ID_CHKNETSUNDAY])->ChangeValue(DoubleToTimeString(defaultPrefs.net_times.start_hour));
            (netDayStopTxts[ev.GetId() - ID_CHKNETSUNDAY])->ChangeValue(DoubleToTimeString(defaultPrefs.net_times.end_hour));
        } else {
            (netDayStartTxts[ev.GetId() - ID_CHKNETSUNDAY])->Clear();
            (netDayStopTxts[ev.GetId() - ID_CHKNETSUNDAY])->Clear();
        }
        break;
    
    default:
        break;
    }
//    }
    UpdateControlStates();
}
Example #14
0
void MyFrame::OnShowAxes(wxCommandEvent& event)
{
  uiState.showAxes = event.IsChecked();
  myGLCanvas->Refresh(FALSE);
}
Example #15
0
void FDPPanel::OnEnablePicture(wxCommandEvent &event )
{
	wxChoice* region = (wxChoice*)wxWindow::FindWindowById(ID_CHOICE_FDP_REGIONS, this);
	m_FDPPicture->Show(event.IsChecked(), region->GetSelection());
}
Example #16
0
void Frame::OnShowImages(wxCommandEvent& event)
{
	m_bShowImages = event.IsChecked();
}
Example #17
0
void CNowPlayingCtrl::OnCheckCrossfade	( wxCommandEvent&	event )
{
	wxGetApp().Prefs.bGlobalFadeEnable = event.IsChecked();
}
Example #18
0
void MyFrame::OnEEGG(wxCommandEvent& evt)
{
    if (evt.GetId() == EEGG_RESTORECAL || evt.GetId() == EEGG_REVIEWCAL)
    {
        wxString savedCal = pConfig->Profile.GetString("/scope/calibration/timestamp", wxEmptyString);
        if (savedCal.IsEmpty())
        {
            wxMessageBox(_("There is no calibration data available."));
            return;
        }

        if (!pMount)
        {
            wxMessageBox(_("Please connect a mount first."));
            return;
        }

        if (evt.GetId() == EEGG_RESTORECAL)
        {
            CalRestoreDialog(this).ShowModal();
        }
        else
        {
            if (pCalReviewDlg)                                          // Review dialog is non-modal
                pCalReviewDlg->Destroy();
            pCalReviewDlg = new CalReviewDialog(this);
            pCalReviewDlg->Show();
        }
    }
    else if (evt.GetId() == EEGG_MANUALCAL)
    {
        if (pMount)
        {
            Calibration cal;
            cal.xRate  = pMount->xRate();
            cal.yRate  = pMount->yRate();
            cal.xAngle = pMount->xAngle();
            cal.yAngle = pMount->yAngle();
            cal.declination = pPointingSource->GetGuidingDeclination();
            cal.pierSide = pPointingSource->SideOfPier();
            cal.rotatorAngle = Rotator::RotatorPosition();

            if (!pMount->IsCalibrated())
            {
                cal.xRate       = 1.0;
                cal.yRate       = 1.0;
                cal.xAngle      = 0.0;
                cal.yAngle      = M_PI / 2.;
                cal.declination = 0.0;
            }

            ManualCalDialog manualcal(cal);
            if (manualcal.ShowModal () == wxID_OK)
            {
                manualcal.GetValues(&cal);
                pMount->SetCalibration(cal);
            }
        }
    }
    else if (evt.GetId() == EEGG_CLEARCAL)
    {
        wxString devicestr = "";
        if (!(pGuider && pGuider->IsCalibratingOrGuiding()))
            if (pMount)
            {
                if (pMount->IsStepGuider())
                    devicestr = _("AO");
                else
                    devicestr = _("Mount");
            }
            if (pSecondaryMount)
            {
                devicestr += _(", Mount");
            }
            if (devicestr.Length() > 0)
            {
                if (wxMessageBox(wxString::Format(_("%s calibration will be cleared - calibration will be re-done when guiding is started."), devicestr),
                    _("Clear Calibration"), wxOK | wxCANCEL) == wxOK)
                {
                    if (pMount)
                        pMount->ClearCalibration();
                    if (pSecondaryMount)
                        pSecondaryMount->ClearCalibration();
                    Debug.AddLine("User cleared calibration on " + devicestr);
                }
            }
    }
    else if (evt.GetId() == EEGG_FLIPRACAL)
    {
        Mount *scope = TheScope();

        if (scope)
        {
            double xorig = degrees(scope->xAngle());
            double yorig = degrees(scope->yAngle());

            Debug.AddLine("User-requested FlipRACal");

            if (FlipRACal())
            {
                wxMessageBox(_("Failed to flip RA calibration"));
            }
            else
            {
                double xnew = degrees(scope->xAngle());
                double ynew = degrees(scope->yAngle());
                wxMessageBox(wxString::Format(_("RA calibration angle flipped: (%.2f, %.2f) to (%.2f, %.2f)"),
                    xorig, yorig, xnew, ynew));
            }
        }
    }
    else if (evt.GetId() == EEGG_MANUALLOCK)
    {
        if (!pFrame->pNudgeLock)
            pFrame->pNudgeLock = NudgeLockTool::CreateNudgeLockToolWindow();

        pFrame->pNudgeLock->Show();
    }
    else if (evt.GetId() == EEGG_STICKY_LOCK)
    {
        bool sticky = evt.IsChecked();
        pFrame->pGuider->SetLockPosIsSticky(sticky);
        pConfig->Global.SetBoolean("/StickyLockPosition", sticky);
        NudgeLockTool::UpdateNudgeLockControls();
    }
    else
    {
        evt.Skip();
    }
}
void EnvironmentSettingsDlg::OnUseIpcCheck(wxCommandEvent& event)
{
    XRCCTRL(*this, "chkRaiseViaIPC", wxCheckBox)->Enable(event.IsChecked());
}
void OccurrencesHighlighting::OnViewOccurrencesPanel(wxCommandEvent& event)
{
    CodeBlocksDockEvent evt(event.IsChecked() ? cbEVT_SHOW_DOCK_WINDOW : cbEVT_HIDE_DOCK_WINDOW);
    evt.pWindow = m_pPanel;
    Manager::Get()->ProcessEvent(evt);
}
void EnvironmentSettingsDlg::OnHeadCheck(wxCommandEvent& event)
{
    PlaceWindow(this, event.IsChecked() ? pdlHead : pdlCentre, true);
}
Example #22
0
void CFrame::OnPerspectiveMenu(wxCommandEvent& event)
{
	ClearStatusBar();

	switch (event.GetId())
	{
		case IDM_SAVE_PERSPECTIVE:
			if (Perspectives.size() == 0)
			{
				wxMessageBox(_("Please create a perspective before saving"),
						_("Notice"), wxOK, this);
				return;
			}
			SaveIniPerspectives();
			GetStatusBar()->SetStatusText(StrToWxStr(std::string
						("Saved " + Perspectives[ActivePerspective].Name)), 0);
			break;
		case IDM_PERSPECTIVES_ADD_PANE:
			AddPane();
			break;
		case IDM_EDIT_PERSPECTIVES:
			m_bEdit = event.IsChecked();
			TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
			break;
		case IDM_ADD_PERSPECTIVE:
			{
				wxTextEntryDialog dlg(this,
						_("Enter a name for the new perspective:"),
						_("Create new perspective"));
				wxString DefaultValue = wxString::Format(_("Perspective %d"), (int)(Perspectives.size() + 1));
				dlg.SetValue(DefaultValue);

				int Return = 0;
				bool DlgOk = false;

				while (!DlgOk)
				{
					Return = dlg.ShowModal();
					if (Return == wxID_CANCEL)
					{
						return;
					}
					else if (dlg.GetValue().Find(",") != -1)
					{
						wxMessageBox(_("The name cannot contain the character ','"),
								_("Notice"), wxOK, this);
						wxString Str = dlg.GetValue();
						Str.Replace(",", "", true);
						dlg.SetValue(Str);
					}
					else if (dlg.GetValue().IsSameAs(""))
					{
						wxMessageBox(_("The name cannot be empty"),
								_("Notice"), wxOK, this);
						dlg.SetValue(DefaultValue);
					}
					else
					{
						DlgOk = true;
					}
				}

				SPerspectives Tmp;
				Tmp.Name = WxStrToStr(dlg.GetValue());
				Tmp.Perspective = m_Mgr->SavePerspective();

				ActivePerspective = (u32)Perspectives.size();
				Perspectives.push_back(Tmp);

				UpdateCurrentPerspective();
				PopulateSavedPerspectives();
			}
			break;
		case IDM_TAB_SPLIT:
			m_bTabSplit = event.IsChecked();
			ToggleNotebookStyle(m_bTabSplit, wxAUI_NB_TAB_SPLIT);
			break;
		case IDM_NO_DOCKING:
			m_bNoDocking = event.IsChecked();
			TogglePaneStyle(m_bNoDocking, IDM_NO_DOCKING);
			break;
	}
}
Example #23
0
void AutosaveConfigDlg::OnProjectsChecked(wxCommandEvent &event)
{
    XRCCTRL(*this, "project_mins", wxTextCtrl)->Enable(event.IsChecked());
    XRCCTRL(*this, "do_workspace", wxCheckBox)->Enable(event.IsChecked());
    XRCCTRL(*this, "all_projects", wxCheckBox)->Enable(event.IsChecked());
}
Example #24
0
void CDExtraGatewayFrame::onUpdates(wxCommandEvent& event)
{
	m_updates = event.IsChecked();
}
Example #25
0
void SplashDialog::OnDontShow( wxCommandEvent & Evt )
{
   bool bShow = !Evt.IsChecked(); 
   gPrefs->Write(wxT("/GUI/ShowSplashScreen"), bShow );
}
Example #26
0
void GridFrame::CellOverflow( wxCommandEvent& ev )
{
    grid->SetDefaultCellOverflow(ev.IsChecked());
    grid->Refresh();
}
Example #27
0
void CDStarRepeaterFrame::onUpdates(wxCommandEvent& event)
{
	m_updates = event.IsChecked();
}
Example #28
0
void GridFrame::OnAddToSelectToggle(wxCommandEvent& event)
{
    m_addToSel = event.IsChecked();
}
void WxProfiledResultDialog::OnPythonInfoChecked(wxCommandEvent &event) {
  bool checked = event.IsChecked();
  H3D::Profiling::profile_python_fields = checked;
}
Example #30
0
// CPU Mode and JIT Menu
void CCodeWindow::OnCPUMode(wxCommandEvent& event)
{
	switch (event.GetId())
	{
		case IDM_INTERPRETER:
			PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT);
			break;
		case IDM_BOOT_TO_PAUSE:
			bBootToPause = !bBootToPause;
			return;
		case IDM_AUTOMATIC_START:
			bAutomaticStart = !bAutomaticStart;
			return;
		case IDM_JIT_OFF:
			SConfig::GetInstance().bJITOff = event.IsChecked();
			break;
		case IDM_JIT_LS_OFF:
			SConfig::GetInstance().bJITLoadStoreOff = event.IsChecked();
			break;
		case IDM_JIT_LSLXZ_OFF:
			SConfig::GetInstance().bJITLoadStorelXzOff = event.IsChecked();
			break;
		case IDM_JIT_LSLWZ_OFF:
			SConfig::GetInstance().bJITLoadStorelwzOff = event.IsChecked();
			break;
		case IDM_JIT_LSLBZX_OFF:
			SConfig::GetInstance().bJITLoadStorelbzxOff = event.IsChecked();
			break;
		case IDM_JIT_LSF_OFF:
			SConfig::GetInstance().bJITLoadStoreFloatingOff = event.IsChecked();
			break;
		case IDM_JIT_LSP_OFF:
			SConfig::GetInstance().bJITLoadStorePairedOff = event.IsChecked();
			break;
		case IDM_JIT_FP_OFF:
			SConfig::GetInstance().bJITFloatingPointOff = event.IsChecked();
			break;
		case IDM_JIT_I_OFF:
			SConfig::GetInstance().bJITIntegerOff = event.IsChecked();
			break;
		case IDM_JIT_P_OFF:
			SConfig::GetInstance().bJITPairedOff = event.IsChecked();
			break;
		case IDM_JIT_SR_OFF:
			SConfig::GetInstance().bJITSystemRegistersOff = event.IsChecked();
			break;
	}

	// Clear the JIT cache to enable these changes
	JitInterface::ClearCache();

	// Update
	UpdateButtonStates();
}