Esempio n. 1
0
void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
{
    wxMDIChildFrame::OnActivate(event);

    if (event.GetActive() && m_childView)
        m_childView->Activate(event.GetActive());
}
Esempio n. 2
0
void LisaScatterPlotFrame::OnActivate(wxActivateEvent& event)
{
	LOG_MSG("In LisaScatterPlotFrame::OnActivate");
	if (event.GetActive()) {
		RegisterAsActive("LisaScatterPlotFrame", GetTitle());
	}
    if ( event.GetActive() && template_canvas ) template_canvas->SetFocus();
}
Esempio n. 3
0
void PCPNewFrame::OnActivate(wxActivateEvent& event)
{
	LOG_MSG("In PCPNewFrame::OnActivate");
	if (event.GetActive()) {
		RegisterAsActive("PCPNewFrame", GetTitle());
	}
    if ( event.GetActive() && template_canvas ) template_canvas->SetFocus();
}
Esempio n. 4
0
void ConnectivityHistFrame::OnActivate(wxActivateEvent& event)
{
    LOG_MSG("In ConnectivityHistFrame::OnActivate");
    if (event.GetActive()) {
        RegisterAsActive("ConnectivityHistFrame", GetTitle());
    }
    if ( event.GetActive() && template_canvas ) template_canvas->SetFocus();
}
Esempio n. 5
0
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());
    }
}
Esempio n. 6
0
void TestScrollWinFrame::OnActivate(wxActivateEvent& event)
{
  //LOG_MSG("In TestScrollWinFrame::OnActivate");
	if (event.GetActive()) {
		RegisterAsActive("TestScrollWinFrame", GetTitle());
	}
    if ( event.GetActive() && template_canvas )
        template_canvas->SetFocus();
}
Esempio n. 7
0
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();
    }
}
Esempio n. 8
0
void wxInputConsumer::OnActivate(wxActivateEvent& event)
{
    if ( m_inputHandler && m_inputHandler->HandleActivation(this, event.GetActive()) )
        GetInputWindow()->Refresh();
    else
        event.Skip();
}
/*
 * 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();
        }
    }
}
Esempio n. 10
0
void MainFrame::OnActivate(wxActivateEvent &event)
{
	focused = event.GetActive();

	if (panel && focused)
		panel->SetFocus();
}
/*****
Handle an activate event
*****/
void tmwxHtmlHelpFrame::OnActivate(wxActivateEvent& event)
{
  wxHtmlHelpFrame::OnActivate(event);
  if (event.GetActive()) {
    wxTheApp->SetTopWindow(this);
  }
}
Esempio n. 12
0
void C3DPlotFrame::OnActivate(wxActivateEvent& event)
{
	LOG_MSG("In C3DPlotFrame::OnActivate");
	if (event.GetActive()) {
		RegisterAsActive("C3DPlotFrame", GetTitle());
	}
}
Esempio n. 13
0
void wxSTEditorFindReplaceDialog::OnActivate(wxActivateEvent &event)
{
    event.Skip();

    if (event.GetActive() && m_findReplacePanel)
        m_findReplacePanel->OnActivate(event);
}
Esempio n. 14
0
void wxWebView::OnActivate(wxActivateEvent& event)
{
    if (m_impl->page)
        m_impl->page->focusController()->setActive(event.GetActive());

    event.Skip();
}
Esempio n. 15
0
void wxAuiFloatingFrame::OnActivate(wxActivateEvent& event)
{
    if (m_owner_mgr && event.GetActive())
    {
        m_owner_mgr->OnFloatingPaneActivated(m_pane_window);
    }
}
Esempio n. 16
0
void MainFrame::OnActivate(wxActivateEvent& event)
{
    /* suggested by Brian Gaff */
    if(event.GetActive() && m_vList)
        m_vList->SetFocus();
    event.Skip();
}
void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
{
    EDA_DRAW_FRAME::OnActivate( event );

    // Ensure we do not have old selection:
    if( !event.GetActive() )
        return;

    // Ensure we have the right library list:
    std::vector< wxString > libNicknames = Prj().PcbFootprintLibs()->GetLogicalLibs();

    if( libNicknames.size() == m_libList->GetCount() )
    {
        unsigned ii;

        for( ii = 0;  ii < libNicknames.size();  ii++ )
        {
            if( libNicknames[ii] != m_libList->GetString( ii ) )
                break;
        }

        if( ii == libNicknames.size() )
            return;
    }

    // If we are here, the library list has changed, rebuild it
    ReCreateLibraryList();
    UpdateTitle();
}
Esempio n. 18
0
// 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();
    
}
Esempio n. 19
0
void TableFrame::OnActivate(wxActivateEvent& event)
{
	if (event.GetActive()) {
        wxLogMessage("In TableFrame::OnActivate");
		RegisterAsActive("TableFrame", GetTitle());
	}
	event.Skip(false);
}
Esempio n. 20
0
void FlexChildFrame::OnActivate(wxActivateEvent &event)
{
    if (event.GetActive() && listCtrl)
    {
        listCtrl->SetFocus();
        UpdateFrom(NotifyId::UpdateStatusBar);
    }
}
Esempio n. 21
0
void TableFrame::OnActivate(wxActivateEvent& event)
{
    LOG_MSG("In TableFrame::OnActivate");
    if (event.GetActive()) {
        RegisterAsActive("TableFrame", GetTitle());
    }
    event.Skip(false);
}
Esempio n. 22
0
void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event)
{
   if (event.GetActive())
      Pause(!IsScrubbing() || mProject->GetControlToolBar()->IsPauseDown());
   else
      Pause(true);

   event.Skip();
}
Esempio n. 23
0
void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event)
{
   if (event.GetActive())
      mScrubHasFocus = IsScrubbing();
   else
      mScrubHasFocus = false;

   event.Skip();
}
Esempio n. 24
0
void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) {
    if (event.GetActive()) {
        if (m_pEventLog && !m_pEventLog->IsIconized()) {
            m_pEventLog->Raise();
        }
        m_pFrame->Raise();
    }
    event.Skip();
}
void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event )
{
    m_FrameIsActive = event.GetActive();

    if( m_canvas )
        m_canvas->SetCanStartBlock( -1 );

    event.Skip();   // required under wxMAC
}
Esempio n. 26
0
	void MutChild::OnActivate(wxActivateEvent& event)
	{
		if (event.GetActive()) {
			mutUnused(event);
			mutASSERT(WK_KEY <= winKind && winKind < WK_NULL);
			TRACEC;
			SetCurrentBox(box);
		}
		event.Skip();
	}
Esempio n. 27
0
//---------------------------------------------------------
void CVIEW_Base::On_Activate(wxActivateEvent &event)
{
	if( event.GetActive() )
	{
		if( g_pSAGA_Frame )
		{
			g_pSAGA_Frame->On_Child_Activates(m_View_ID);
		}
	}
}
Esempio n. 28
0
void wxSTEditorFindReplacePanel::OnActivate(wxActivateEvent &event)
{
    event.Skip();

    if (event.GetActive())
    {
        SelectFindString();
        UpdateButtons();
    }
}
Esempio n. 29
0
// 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
    }
}
Esempio n. 30
0
void wxSwitcherDialog::OnActivate(wxActivateEvent& event)
{
    if (!event.GetActive())
    {
        if (!m_closing)
        {
            m_closing = true;
            EndModal(wxID_CANCEL);
        }
    }
}