当前位置: 首页>>代码示例>>C++>>正文


C++ wxActivateEvent::Skip方法代码示例

本文整理汇总了C++中wxActivateEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxActivateEvent::Skip方法的具体用法?C++ wxActivateEvent::Skip怎么用?C++ wxActivateEvent::Skip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxActivateEvent的用法示例。


在下文中一共展示了wxActivateEvent::Skip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnActivateApp

void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) {
#ifdef __WXMAC__
    // Make sure any modal dialog (such as Attach Wizard) ends up in front.
    if (IsModalDialogDisplayed()) {
        event.Skip();
        return;
    }
#endif

    if (event.GetActive()) {
        if (m_pEventLog && !m_pEventLog->IsIconized()) {
            m_pEventLog->Raise();
        }
        if (m_pFrame) {
            m_pFrame->Raise();
        }
#ifdef __WXMAC__
        ShowInterface();
#endif
    }
    event.Skip();
}
开发者ID:hanxue,项目名称:Boinc,代码行数:22,代码来源:BOINCGUIApp.cpp

示例2:

void
AppFrame::OnActivate(wxActivateEvent &ev)
{
	if (ev.GetActive()) {
		_mainpanel->get_keyboard().set_enabled (true);
	}
	else {
		_mainpanel->get_keyboard().set_enabled (false);
	}

	ev.Skip();
	
}
开发者ID:NikolaiUgelvik,项目名称:sooperlooper,代码行数:13,代码来源:app_frame.cpp

示例3: OnActivate

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();
}
开发者ID:Teodorrrro,项目名称:wxWidgets,代码行数:13,代码来源:helpfrm.cpp

示例4: OnActivateApp

void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) {
#ifdef __WXMAC__
    // We don't call Hide() or Show(false) for the main frame
    // under wxCocoa 2.9.5 because it bounces the Dock icon
    // (as in notification.)  We work around this by moving
    // the main window/frame off screen when displaying the
    // CDlgAbout modal dialog while the main window is hidden
    // by CTaskBarIcon::OnAbout().
    if (m_pFrame) {
        if (event.GetActive()) {
            if (!m_bAboutDialogIsOpen) {
                m_pFrame->MoveFrameOnScreen();
            }
        } else {
            m_pFrame->SaveFramePosition();
        }
    }

    // Make sure any modal dialog (such as Attach Wizard) ends up in front.
    if (IsModalDialogDisplayed()) {
        event.Skip();
        return;
    }
#endif

    if (event.GetActive()) {
        if (m_pEventLog && !m_pEventLog->IsIconized()) {
            m_pEventLog->Raise();
        }
        if (m_pFrame) {
            m_pFrame->Raise();
        }
#ifdef __WXMAC__
        ShowInterface();
#endif
    }
    event.Skip();
}
开发者ID:xiaobozi,项目名称:boinc,代码行数:38,代码来源:BOINCGUIApp.cpp

示例5: OnActivate

// 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();
         }
    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:52,代码来源:frame.cpp

示例6: OnAppActivate

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();
    }
}
开发者ID:stahta01,项目名称:codeblocks_console,代码行数:50,代码来源:app.cpp

示例7: onActivate

/* MainWindow::onActivate
 * Called when the window is activated
 *******************************************************************/
void MainWindow::onActivate(wxActivateEvent& e)
{
	if (!e.GetActive() || this->IsBeingDeleted())
	{
		e.Skip();
		return;
	}

	// Get current tab
	wxWindow* page = stc_tabs->GetPage(stc_tabs->GetSelection());

	// If start page is selected, refresh it
	if (page && page->GetName() == "startpage")
	{
		createStartPage(false);
		SetStatusText("", 1);
		SetStatusText("", 2);
	}

	// Check open directory archives for changes on the file system
	panel_archivemanager->checkDirArchives();

	e.Skip();
}
开发者ID:SanyaWaffles,项目名称:SLADE,代码行数:27,代码来源:MainWindow.cpp

示例8: OnActivate

void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
{
    if ( event.GetActive() )
    {
        // We get WM_ACTIVATE before being restored from iconized state, so we
        // can be still iconized here. In this case, avoid restoring the focus
        // as it doesn't work anyhow and we will do when we're really restored.
        if ( m_iconized )
        {
            event.Skip();
            return;
        }

        // restore focus to the child which was last focused unless one of our
        // children already has it (the frame having focus on itself does not
        // count, if only because this would be always the case for an MDI
        // child frame as the MDI parent sets focus to it before it's
        // activated)
        wxLogTrace(wxT("focus"), wxT("wxTLW %p activated."), m_hWnd);

        wxWindow* const winFocus = FindFocus();
        if ( winFocus == this || !IsDescendant(winFocus) )
            DoRestoreLastFocus();
    }
    else // deactivating
    {
        DoSaveLastFocus();

        wxLogTrace(wxT("focus"),
                   wxT("wxTLW %p deactivated, last focused: %p."),
                   m_hWnd,
                   m_winLastFocused ? GetHwndOf(m_winLastFocused) : NULL);

        event.Skip();
    }
}
开发者ID:nwhitehead,项目名称:wxWidgets,代码行数:36,代码来源:toplevel.cpp

示例9: onActivate

/* MainWindow::onActivate
 * Called when the window is activated
 *******************************************************************/
void MainWindow::onActivate(wxActivateEvent& e)
{
	if (!e.GetActive() || this->IsBeingDeleted() || App::isExiting())
	{
		e.Skip();
		return;
	}

	// Get current tab
	if (stc_tabs->GetPageCount())
	{
		wxWindow* page = stc_tabs->GetPage(stc_tabs->GetSelection());

		// If start page is selected, refresh it
		if (page && page->GetName() == "startpage")
		{
			createStartPage(false);
			SetStatusText("", 1);
			SetStatusText("", 2);
		}
	}

	e.Skip();
}
开发者ID:Gaerzi,项目名称:SLADE,代码行数:27,代码来源:MainWindow.cpp

示例10: wxLogTrace

void EDA_3D_VIEWER::OnActivate( wxActivateEvent &event )
{
    wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::OnActivate" ) );

    if( m_canvas )
    {
        // Reload data if 3D frame shows a board,
        // because it can be changed since last frame activation
        if( m_canvas->IsReloadRequestPending() )
            m_canvas->Request_refresh();

        // Activates again the focus of the canvas so it will catch mouse and key events
        m_canvas->SetFocus();
    }

    event.Skip();    // required under wxMAC
}
开发者ID:cpavlina,项目名称:kicad,代码行数:17,代码来源:eda_3d_viewer.cpp

示例11: OnActivate

void wxPropertySheetDialog::OnActivate(wxActivateEvent& event)
{
#if defined(__SMARTPHONE__)
    // Attempt to focus the choice control: not yet working, but might
    // be a step in the right direction. OnActivate overrides the default
    // handler in toplevel.cpp that sets the focus for the first child of
    // of the dialog (the choicebook).
    if (event.GetActive())
    {
        wxChoicebook* choiceBook = wxDynamicCast(GetBookCtrl(), wxChoicebook);
        if (choiceBook)
            choiceBook->SetFocus();
    }
    else
#endif
        event.Skip();
}
开发者ID:animeislife66666,项目名称:rpcs3,代码行数:17,代码来源:propdlg.cpp

示例12: wxLogDebug

// Handle timer starting and stopping logic
void
MyApp::OnActivate(wxActivateEvent & evt)
{
    // MyFrame will NULL this pointer when it is destroyed
    if (m_frame != NULL)
    {
        // The frame will handle starting the timer
        if (! evt.GetActive())
        {
            wxLogDebug(_T("App Deactivate"));
            wxLogDebug(_T("Stopping timer."));
            m_frame->OnAppDeactivate();
        }
    }

    evt.Skip();
}
开发者ID:brho,项目名称:xword,代码行数:18,代码来源:App.cpp

示例13: OnActive

// --------
// Events
void CFrame::OnActive(wxActivateEvent& event)
{
	if (Core::GetState() == Core::CORE_RUN || Core::GetState() == Core::CORE_PAUSE)
	{
		if (event.GetActive() && event.GetEventObject() == m_RenderFrame)
		{
#ifdef __WXMSW__
			::SetFocus((HWND)m_RenderParent->GetHandle());
#else
			m_RenderParent->SetFocus();
#endif
			
			if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
					Core::GetState() == Core::CORE_RUN)
				m_RenderParent->SetCursor(wxCURSOR_BLANK);
		}
		else
		{
			if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
				m_RenderParent->SetCursor(wxNullCursor);
		}
	}
	event.Skip();
}
开发者ID:Everscent,项目名称:dolphin-emu,代码行数:26,代码来源:Frame.cpp

示例14: OnActivate

	void WizardFrame::OnActivate (wxActivateEvent& event)
	{
		Gui->SetActiveFrame (this);
		event.Skip();
	}
开发者ID:ArtisR,项目名称:TrueCrypt,代码行数:5,代码来源:WizardFrame.cpp

示例15: SaveDiagramLayout

/*bool CGraphView::LoadDiagramLayout(wxExprDatabase *pdb)
{
	// Clear old graph
	m_diag.DeleteAllShapes();
	
	if(m_pGraphDescriptor==NULL) {
		Refresh(true);
		return true;
	}

	if(!m_diag.SerializeFromDatabase(pdb))
		return false;
	
	// Set up event handlers
	int i,count=m_diag.GetShapeList()->GetCount();
	for(i=0;i<count;i++) {
		wxShape *shape=(wxShape *)(m_diag.GetShapeList()->Item(i)->GetData());
		shape->SetEventHandler(new CGraphEventHandler(shape->GetEventHandler(),shape,m_pGraphDescriptor));
		shape->SetFont(m_fntText);
	}

	
	pdb->BeginFind();
	wxExpr *expr=pdb->FindClauseByFunctor("graphview");
	
	long gw,gh,sx,sy;
	expr->GetAttributeValue("gw",gw);
	expr->GetAttributeValue("gh",gh);
	expr->GetAttributeValue("sx",sx);
	expr->GetAttributeValue("sy",sy);
	
	SetScrollbars(1,1,gw,gh,sx,sy,false);
	Refresh(true);

	return true;
}


bool CGraphView::SaveDiagramLayout(wxExprDatabase *pdb)
{
	int gw,gh,sx,sy;
	GetVirtualSize(&gw,&gh);
	GetViewStart(&sx,&sy);

	pdb->ClearDatabase();
	m_diag.SerializeToDatabase(pdb);

	wxExpr *expr=new wxExpr("graphview");
	expr->AddAttributeValue("gw",(long)gw);
	expr->AddAttributeValue("gh",(long)gh);
	expr->AddAttributeValue("sx",(long)sx);
	expr->AddAttributeValue("sy",(long)sy);
	
	pdb->Append(expr);

	return true;
}
*/
void CGraphView::OnActivate(wxActivateEvent &event)
{
	UpdateCursor();
	event.Skip();
}
开发者ID:crioux,项目名称:SpeedDemon-Profiler,代码行数:63,代码来源:graphview.cpp


注:本文中的wxActivateEvent::Skip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。