MCPcopy Create free account
hub / github.com/cmauri/eviacam / OnCheckboxWorkspaceLimitClick

Method OnCheckboxWorkspaceLimitClick

src/wconfiguration.cpp:1710–1735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1708 */
1709
1710void WConfiguration::OnCheckboxWorkspaceLimitClick( wxCommandEvent& event )
1711{
1712 if(m_chkEnabledWorkspace->GetValue()) {
1713 m_chkEnabledWorkspace->SetValue(false);
1714 wxMessageDialog dlg (NULL, _("This action could make you lose the control of the computer.\nDo you want to continue?"), _("eViacam warning"), wxICON_EXCLAMATION | wxYES_NO );
1715 if (dlg.ShowModal()== wxID_YES)
1716 {
1717 m_chkEnabledWorkspace->SetValue(true);
1718 wxGetApp().GetController().GetPointerAction().SetRestrictedWorkingArea(m_chkEnabledWorkspace->GetValue());
1719 m_spin_top_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1720 m_spin_left_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1721 m_spin_right_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1722 m_spin_bottom_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1723 }
1724 } else {
1725 wxGetApp().GetController().GetPointerAction().SetRestrictedWorkingArea(m_chkEnabledWorkspace->GetValue());
1726 m_spin_top_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1727 m_spin_left_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1728 m_spin_right_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1729 m_spin_bottom_workspace->Enable(m_chkEnabledWorkspace->GetValue());
1730 }
1731
1732
1733 event.Skip(false);
1734 Changed ();
1735}
1736
1737
1738#if defined(__WXGTK__)

Callers

nothing calls this directly

Calls 4

GetValueMethod · 0.80
SetValueMethod · 0.80
EnableMethod · 0.80

Tested by

no test coverage detected