void MainFrame::OnActivate(wxActivateEvent& event) { /* suggested by Brian Gaff */ if(event.GetActive() && m_vList) m_vList->SetFocus(); event.Skip(); }
void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event) { wxMDIChildFrame::OnActivate(event); if (event.GetActive() && m_childView) m_childView->Activate(event.GetActive()); }
void wxWebView::OnActivate(wxActivateEvent& event) { if (m_impl->page) m_impl->page->focusController()->setActive(event.GetActive()); event.Skip(); }
void wxInputConsumer::OnActivate(wxActivateEvent& event) { if ( m_inputHandler && m_inputHandler->HandleActivation(this, event.GetActive()) ) GetInputWindow()->Refresh(); else event.Skip(); }
void wxSTEditorFindReplaceDialog::OnActivate(wxActivateEvent &event) { event.Skip(); if (event.GetActive() && m_findReplacePanel) m_findReplacePanel->OnActivate(event); }
void TableFrame::OnActivate(wxActivateEvent& event) { if (event.GetActive()) { wxLogMessage("In TableFrame::OnActivate"); RegisterAsActive("TableFrame", GetTitle()); } event.Skip(false); }
void PCPNewFrame::OnActivate(wxActivateEvent& event) { LOG_MSG("In PCPNewFrame::OnActivate"); if (event.GetActive()) { RegisterAsActive("PCPNewFrame", GetTitle()); } if ( event.GetActive() && template_canvas ) template_canvas->SetFocus(); }
void LisaScatterPlotFrame::OnActivate(wxActivateEvent& event) { LOG_MSG("In LisaScatterPlotFrame::OnActivate"); if (event.GetActive()) { RegisterAsActive("LisaScatterPlotFrame", GetTitle()); } if ( event.GetActive() && template_canvas ) template_canvas->SetFocus(); }
void TableFrame::OnActivate(wxActivateEvent& event) { LOG_MSG("In TableFrame::OnActivate"); if (event.GetActive()) { RegisterAsActive("TableFrame", GetTitle()); } event.Skip(false); }
void ConnectivityHistFrame::OnActivate(wxActivateEvent& event) { LOG_MSG("In ConnectivityHistFrame::OnActivate"); if (event.GetActive()) { RegisterAsActive("ConnectivityHistFrame", GetTitle()); } if ( event.GetActive() && template_canvas ) template_canvas->SetFocus(); }
// NOTE: binding to this event in the WebView constructor is too early in // some cases, but leave the event handler here so that users can bind to it // at a later time if they have activation state problems. void WebView::OnTLWActivated(wxActivateEvent& event) { if (m_impl && m_impl->page && m_impl->page->focusController()) m_impl->page->focusController()->setActive(event.GetActive()); event.Skip(); }
void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event) { if (event.GetActive()) mScrubHasFocus = IsScrubbing(); else mScrubHasFocus = false; event.Skip(); }
void TestScrollWinFrame::OnActivate(wxActivateEvent& event) { //LOG_MSG("In TestScrollWinFrame::OnActivate"); if (event.GetActive()) { RegisterAsActive("TestScrollWinFrame", GetTitle()); } if ( event.GetActive() && template_canvas ) template_canvas->SetFocus(); }
void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event) { if (event.GetActive()) Pause(!IsScrubbing() || mProject->GetControlToolBar()->IsPauseDown()); else Pause(true); event.Skip(); }
void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) { if (event.GetActive()) { if (m_pEventLog && !m_pEventLog->IsIconized()) { m_pEventLog->Raise(); } m_pFrame->Raise(); } event.Skip(); }
void MovieWindowQT::OnActivate(wxActivateEvent &inEvent) { if (mMovie) { if (inEvent.GetActive()) wxLogTrace(TRACE_STAGE_DRAWING, wxT("Activate movie window.")); else wxLogTrace(TRACE_STAGE_DRAWING, wxT("Deactivate movie window.")); mMovie->Activate(inEvent.GetActive()); } }
void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event ) { m_FrameIsActive = event.GetActive(); if( m_canvas ) m_canvas->SetCanStartBlock( -1 ); event.Skip(); // required under wxMAC }
void MutChild::OnActivate(wxActivateEvent& event) { if (event.GetActive()) { mutUnused(event); mutASSERT(WK_KEY <= winKind && winKind < WK_NULL); TRACEC; SetCurrentBox(box); } event.Skip(); }
void wxSTEditorFindReplacePanel::OnActivate(wxActivateEvent &event) { event.Skip(); if (event.GetActive()) { SelectFindString(); UpdateButtons(); } }
// Default activation behaviour - set the focus for the first child // subwindow found. void wxFrame::OnActivate(wxActivateEvent& event) { if ( !event.GetActive() ) { // remember the last focused child if it is our child m_winLastFocused = FindFocus(); // so we NULL it out if it's a child from some other frame wxWindow *win = m_winLastFocused; while ( win ) { if ( win->IsTopLevel() ) { if ( win != this ) m_winLastFocused = NULL; break; } win = win->GetParent(); } event.Skip(); } else { // restore focus to the child which was last focused wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() : NULL; if (parent == NULL) parent = this; wxSetFocusToChild(parent, &m_winLastFocused); #if wxUSE_MENUS if (m_frameMenuBar != NULL) { m_frameMenuBar->MacInstallMenuBar(); } else { wxFrame *tlf = wxDynamicCast( wxTheApp->GetTopWindow(), wxFrame ); if (tlf != NULL) { // Trying top-level frame membar if (tlf->GetMenuBar()) tlf->GetMenuBar()->MacInstallMenuBar(); } } #endif } }
void wxHtmlHelpFrame::OnActivate(wxActivateEvent& event) { // This saves one mouse click when using the // wxHTML for context sensitive help systems #ifndef __WXGTK__ // NB: wxActivateEvent is a bit broken in wxGTK // and is sometimes sent when it should not be if (event.GetActive() && m_HtmlHelpWin) m_HtmlHelpWin->GetHtmlWindow()->SetFocus(); #endif event.Skip(); }
void AppFrame::OnActivate(wxActivateEvent &ev) { if (ev.GetActive()) { _mainpanel->get_keyboard().set_enabled (true); } else { _mainpanel->get_keyboard().set_enabled (false); } ev.Skip(); }
// Default activation behaviour - set the focus for the first child // subwindow found. void wxFrame::OnActivate(wxActivateEvent& event) { if ( !event.GetActive() ) { // remember the last focused child if it is our child m_winLastFocused = FindFocus(); // so we NULL it out if it's a child from some other frame wxWindow *win = m_winLastFocused; while ( win ) { if ( win->IsTopLevel() ) { if ( win != this ) { m_winLastFocused = NULL; } break; } win = win->GetParent(); } event.Skip(); } else { // restore focus to the child which was last focused wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() : NULL; if ( !parent ) { parent = this; } wxSetFocusToChild(parent, &m_winLastFocused); if ( m_frameMenuBar != NULL ) { m_frameMenuBar->MacInstallMenuBar() ; } else if (wxTheApp->GetTopWindow() && wxTheApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame))) { // Trying toplevel frame menbar if( ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar() ) ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar()->MacInstallMenuBar(); } } }
void CodeBlocksApp::OnAppActivate(wxActivateEvent& event) { // allow others to process this event event.Skip(); if (s_Loading) return; // still loading; we can't possibly be interested for this event ;) Manager *manager = Manager::Get(); if (!manager || manager->IsAppShuttingDown()) return; // Activation & De-Activation event CodeBlocksEvent cbEvent; if (event.GetActive()) cbEvent.SetEventType(cbEVT_APP_ACTIVATED); else cbEvent.SetEventType(cbEVT_APP_DEACTIVATED); Manager::Get()->ProcessEvent(cbEvent); if (!event.GetActive()) return; // fix for bug #18007: In batch build mode the following is not needed if ( !m_Batch && Manager::Get()->GetEditorManager() && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/check_modified_files"), true)) { // for some reason a mouse up event doesn't make it into scintilla (scintilla bug) // therefore the workaround is not to directly call the editorManager, but // take a detour through an event // the bug is when the file has been offered to reload, no matter what answer you // give the mouse is in a selecting mode, adding/removing things to it's selection as you // move it around // so : idEditorManagerCheckFiles, EditorManager::OnCheckForModifiedFiles just exist for this workaround wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, idEditorManagerCheckFiles); wxPostEvent(Manager::Get()->GetEditorManager(), evt); cbProjectManagerUI *prjManUI = m_Frame->GetProjectManagerUI(); if (prjManUI) static_cast<ProjectManagerUI*>(prjManUI)->CheckForExternallyModifiedProjects(); } cbEditor* ed = Manager::Get()->GetEditorManager() ? Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor() : nullptr; if (ed) { // hack for linux: without it, the editor loses the caret every second activate o.O Manager::Get()->GetEditorManager()->GetNotebook()->SetFocus(); ed->GetControl()->SetFocus(); } }
/***** Handle an activate event *****/ void tmwxHtmlHelpFrame::OnActivate(wxActivateEvent& event) { wxHtmlHelpFrame::OnActivate(event); if (event.GetActive()) { wxTheApp->SetTopWindow(this); } }
void MainEmuFrame::OnActivate( wxActivateEvent& evt ) { if( ConsoleLogFrame* logframe = wxGetApp().GetProgramLog() ) MSW_SetWindowAfter( logframe->GetHandle(), GetHandle() ); evt.Skip(); }
void GSFrame::OnActivate( wxActivateEvent& evt ) { if( IsBeingDeleted() ) return; evt.Skip(); if( wxWindow* gsPanel = GetViewport() ) gsPanel->SetFocus(); }
/* * MadHighlightingDialogActivate */ void MadHighlightingDialog::MadHighlightingDialogActivate(wxActivateEvent& event) { if(!m_InitSetting.IsEmpty() && event.GetActive()) { g_Index=-1; int i=WxListBoxSyntax->FindString(m_InitSetting); if(i==wxNOT_FOUND) { i=WxListBoxSyntax->GetSelection(); if(i==wxNOT_FOUND) i=0; } WxListBoxSyntax->SetSelection(i); wxCommandEvent e; e.SetInt(i); WxListBoxSyntaxSelected(e); m_InitSetting.Empty(); if(FindFocus()==NULL) { WxButtonCancel->SetFocus(); } } }
void ConsoleLogFrame::OnActivate( wxActivateEvent& evt ) { if( MainEmuFrame* mainframe = GetMainFramePtr() ) MSW_SetWindowAfter( mainframe->GetHandle(), GetHandle() ); evt.Skip(); }
void wxAuiFloatingFrame::OnActivate(wxActivateEvent& event) { if (m_owner_mgr && event.GetActive()) { m_owner_mgr->OnFloatingPaneActivated(m_pane_window); } }