/* MapCanvas::onFocus * Called when the canvas loses or gains focus *******************************************************************/ void MapCanvas::onFocus(wxFocusEvent& e) { if (e.GetEventType() == wxEVT_SET_FOCUS) { if (context_->editMode() == Mode::Visual) lockMouse(true); } else if (e.GetEventType() == wxEVT_KILL_FOCUS) lockMouse(false); }
void SliderBar::HidingTextCtrl::on_focus_event (wxFocusEvent & ev) { if (ev.GetEventType() == wxEVT_KILL_FOCUS) { Show(false); } ev.Skip(); }
void TimeTextCtrl::OnFocus(wxFocusEvent &event) { wxCommandEvent e(EVT_CAPTURE_KEYBOARD); if (event.GetEventType() == wxEVT_KILL_FOCUS) { e.SetEventType(EVT_RELEASE_KEYBOARD); } e.SetEventObject(this); GetParent()->GetEventHandler()->ProcessEvent(e); Refresh(false); }
void SelectionBar::OnFocus(wxFocusEvent &event) { if (event.GetEventType() == wxEVT_KILL_FOCUS) { AudacityProject::ReleaseKeyboard(this); } else { AudacityProject::CaptureKeyboard(this); } Refresh(false); event.Skip(); }
void TranscriptionToolBar::OnFocus(wxFocusEvent &event) { wxCommandEvent e(EVT_CAPTURE_KEYBOARD); if (event.GetEventType() == wxEVT_KILL_FOCUS) { e.SetEventType(EVT_RELEASE_KEYBOARD); } e.SetEventObject(this); GetParent()->GetEventHandler()->ProcessEvent(e); Refresh(false); event.Skip(); }