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


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

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


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

示例1: OnWizEvent

void wxWizard::OnWizEvent(wxWizardEvent& event)
{
    // the dialogs have wxWS_EX_BLOCK_EVENTS style on by default but we want to
    // propagate wxEVT_WIZARD_XXX to the parent (if any), so do it manually
    if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) )
    {
        // the event will be propagated anyhow
        event.Skip();
    }
    else
    {
        wxWindow *parent = GetParent();

        if ( !parent || !parent->GetEventHandler()->ProcessEvent(event) )
        {
            event.Skip();
        }
    }

    if ( ( !m_wasModal ) &&
         event.IsAllowed() &&
         ( event.GetEventType() == wxEVT_WIZARD_FINISHED ||
           event.GetEventType() == wxEVT_WIZARD_CANCEL
         )
       )
    {
        Destroy();
    }
}
开发者ID:jonntd,项目名称:dynamica,代码行数:29,代码来源:wizard.cpp

示例2: OnWizardCancel

void OyunWizardPage::OnWizardCancel(wxWizardEvent &event) {
  if (wxMessageBox(_("Closing this wizard will quit Oyun.\n\n"
                     "Are you sure you want to quit?"),
                   _("Quit"), wxICON_QUESTION | wxYES_NO, this) != wxYES) {
    // User decided to cancel
    event.Veto();
    return;
  }

  // Otherwise, let this go
  event.Skip();
}
开发者ID:cpence,项目名称:oyun,代码行数:12,代码来源:oyunwizardpage.cpp

示例3: OnPageChanging

void PHPXDebugSetupWizard::OnPageChanging(wxWizardEvent& event)
{
    event.Skip();
    if(event.GetDirection() && event.GetPage() == m_wizardPageIDEKey) {
        // build the text to copy
        wxString content;
        content << "xdebug.remote_enable=1\n";
        content << "xdebug.idekey=\"" << m_textCtrlKey->GetValue() << "\"\n";
        content << "xdebug.remote_host=" << m_textCtrlIP->GetValue() << "\n";
        content << "xdebug.remote_port=" << m_textCtrlPort->GetValue() << "\n";

        m_textCtrlPHPIni->ChangeValue(content);
        CallAfter(&PHPXDebugSetupWizard::SelectAllIniText);
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:15,代码来源:PHPXDebugSetupWizard.cpp

示例4: GetName

void PluginWizardPage1::OnValidate(wxWizardEvent &event)
{
	wxString name = GetName();
	name = name.Trim().Trim(false);

	//we dont accept empty plugin names
	if(name.IsEmpty()){
		wxMessageBox(_("Missing plugin name"), wxT("EmbeddedLite"), wxOK | wxICON_WARNING);
		event.Veto();
		return;
	}
	//a valid name must contains only
	//[A-Za-z_]
	if(name.find_first_not_of(wxT("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_")) != wxString::npos){
		wxMessageBox(_("Invalid characters in plugin name\nonly [A-Za-z_0-9] are allowed"), wxT("EmbeddedLite"), wxOK | wxICON_WARNING);
		event.Veto();
		return;
	}
	event.Skip();
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:20,代码来源:pluginwizard_page1.cpp

示例5: OnPageChanging

void NewProjectWizard::OnPageChanging(wxWizardEvent& event)
{
    if ( event.GetDirection() ) {
        // -------------------------------------------------------
        // Switching from the Templates page
        // -------------------------------------------------------
        if ( event.GetPage() == m_wizardPageTemplate ) {
            if ( !CheckProjectTemplate() ) {
                event.Veto();
                return;
            }

        } else if ( event.GetPage() == m_wizardPageDetails ) {
            if( !CheckProjectName() || !CheckProjectPath() ) {
                event.Veto();
                return;
            }
        }
    }
    event.Skip();
}
开发者ID:HTshandou,项目名称:codelite,代码行数:21,代码来源:NewProjectWizard.cpp

示例6: OnFinish

void NewProjectWizard::OnFinish(wxWizardEvent& event)
{
    wxFileName fn(m_stxtFullFileName->GetLabel());

    // Ensure that the target folder exists
    fn.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);

    // make sure that there is no conflict in files between the template project and the selected path
    if(m_projectData.m_srcProject) {
        ProjectPtr p = m_projectData.m_srcProject;
        wxString base_dir(fn.GetPath());
        std::vector<wxFileName> files;
        p->GetFiles(files);

        for(size_t i = 0; i < files.size(); ++i) {
            wxFileName f = files.at(i);
            wxString new_file = base_dir + wxT("/") + f.GetFullName();

            if(wxFileName::FileExists(new_file)) {
                // this file already - notify the user
                wxString msg;
                msg << _("The File '") << f.GetFullName() << _("' already exists at the target directory '") << base_dir
                    << wxT("'\n");
                msg << _("Please select a different project path\n");
                msg << _("The file '") << f.GetFullName() << _("' is part of the template project [") << p->GetName()
                    << wxT("]");
                wxMessageBox(msg, _("CodeLite"), wxOK | wxICON_HAND);
                event.Veto();
                return;
            }
        }
    }

    m_projectData.m_name = m_txtProjName->GetValue();
    m_projectData.m_path = fn.GetPath();
    m_projectData.m_cmpType = m_choiceCompiler->GetStringSelection();
    m_projectData.m_debuggerType = m_choiceDebugger->GetStringSelection();
    m_projectData.m_builderName = m_choiceBuildSystem->GetStringSelection();
    event.Skip();
}
开发者ID:292388900,项目名称:codelite,代码行数:40,代码来源:NewProjectWizard.cpp

示例7: OnFinish

void PluginWizard::OnFinish(wxWizardEvent& event)
{
    event.Skip();
}
开发者ID:292388900,项目名称:codelite,代码行数:4,代码来源:PluginWizard.cpp

示例8: OnPageChanging

void NewProjectWizard::OnPageChanging(wxWizardEvent& event)
{
    if(event.GetDirection()) {
        wxDataViewItem sel = m_dataviewTemplates->GetSelection();
        NewProjectClientData* cd = dynamic_cast<NewProjectClientData*>(m_dataviewTemplatesModel->GetClientObject(sel));

        if(event.GetPage() == m_wizardPageTemplate) {
            // -------------------------------------------------------
            // Switching from the Templates page
            // -------------------------------------------------------
            if(!CheckProjectTemplate()) {
                event.Veto();
                return;
            }

            // Test to see if the selected project allows enabling the 'Create under separate folder'
            if(cd && !cd->IsCanUseSeparateFolder()) {
                m_cbSeparateDir->SetValue(false);
                m_cbSeparateDir->Enable(false);
            } else {
                m_cbSeparateDir->Enable(true);
            }

            m_txtProjName->SetFocus(); // This should have happened in the base-class ctor, but in practice it doesn't

        } else if(event.GetPage() == m_wizardPageDetails) {
            // -------------------------------------------------------
            // Switching from the Name/Path page
            // -------------------------------------------------------
            if(!CheckProjectName() || !CheckProjectPath()) {
                event.Veto();
                return;
            }
        } else if(event.GetPage() == m_wizardPageToolchain) {
            wxFileName fn(m_stxtFullFileName->GetLabel());

            // make sure that there is no conflict in files between the template project and the selected path
            if(m_projectData.m_srcProject) {
                ProjectPtr p = m_projectData.m_srcProject;
                wxString base_dir(fn.GetPath());
                std::vector<wxFileName> files;
                p->GetFiles(files);

                for(size_t i = 0; i < files.size(); ++i) {
                    wxFileName f = files.at(i);
                    wxString new_file = base_dir + wxT("/") + f.GetFullName();

                    if(wxFileName::FileExists(new_file)) {
                        // this file already - notify the user
                        wxString msg;
                        msg << _("The File '") << f.GetFullName() << _("' already exists at the target directory '")
                            << base_dir << wxT("'\n");
                        msg << _("Please select a different project path\n");
                        msg << _("The file '") << f.GetFullName() << _("' is part of the template project [")
                            << p->GetName() << wxT("]");
                        wxMessageBox(msg, _("CodeLite"), wxOK | wxICON_HAND);
                        event.Veto();
                        return;
                    }
                }
            }
        }
    }
    event.Skip();
}
开发者ID:292388900,项目名称:codelite,代码行数:65,代码来源:NewProjectWizard.cpp

示例9: OnPageChanging

void NewProjectWizard::OnPageChanging(wxWizardEvent& event)
{
    if(event.GetDirection()) {
        wxDataViewItem sel = m_dataviewTemplates->GetSelection();
        NewProjectClientData* cd = dynamic_cast<NewProjectClientData*>(m_dataviewTemplatesModel->GetClientObject(sel));

        if(event.GetPage() == m_wizardPageTemplate) {
            // -------------------------------------------------------
            // Switching from the Templates page
            // -------------------------------------------------------
            if(!CheckProjectTemplate()) {
                event.Veto();
                return;
            }

            // Test to see if the selected project allows enabling the 'Create under separate folder'
            if(cd && !cd->IsCanUseSeparateFolder()) {
                m_cbSeparateDir->SetValue(false);
                m_cbSeparateDir->Enable(false);
            } else {
                m_cbSeparateDir->Enable(true);
            }

            m_txtProjName->SetFocus(); // This should have happened in the base-class ctor, but in practice it doesn't

        } else if(event.GetPage() == m_wizardPageDetails) {
            // -------------------------------------------------------
            // Switching from the Name/Path page
            // -------------------------------------------------------
            if(!CheckProjectName() || !CheckProjectPath()) {
                event.Veto();
                return;
            }
        } else if(event.GetPage() == m_wizardPageToolchain) {
            wxFileName fn(m_stxtFullFileName->GetLabel());

            // make sure that there is no conflict in files between the template project and the selected path
            if(m_projectData.m_srcProject) {
                ProjectPtr p = m_projectData.m_srcProject;
                wxString base_dir(fn.GetPath());
                std::vector<wxFileName> files;
                p->GetFiles(files);

                for(size_t i = 0; i < files.size(); ++i) {
                    wxFileName f = files.at(i);
                    wxString new_file = base_dir + wxT("/") + f.GetFullName();

                    if(wxFileName::FileExists(new_file)) {
                        // this file already - notify the user
                        wxString msg;
                        msg << _("The File '") << f.GetFullName() << _("' already exists at the target directory '")
                            << base_dir << wxT("'\n");
                        msg << _("Please select a different project path\n");
                        msg << _("The file '") << f.GetFullName() << _("' is part of the template project [")
                            << p->GetName() << wxT("]");
                        wxMessageBox(msg, _("CodeLite"), wxOK | wxICON_HAND);
                        event.Veto();
                        return;
                    }
                }
            }
        }

        // Try to offer a sensible toolchain/debugger combination as default
        if(!m_selectionMade) {
            wxString defaultDebugger;
            if(cd && cd->GetTemplate().Lower().Contains("php")) {
                for(size_t n = 0; n < m_choiceCompiler->GetCount(); ++n) {
                    if(m_choiceCompiler->GetString(n).Lower().Contains("php")) {
                        m_choiceCompiler->SetSelection(n);
                        break;
                    }
                }
                defaultDebugger = "XDebug";

            } else {
                // If it's not a PHP project we can't be sure of anything except we don't want php tools; so select the
                // first that isn't
                for(size_t n = 0; n < m_choiceCompiler->GetCount(); ++n) {
                    if(!m_choiceCompiler->GetString(n).Lower().Contains("php")) {
                        m_choiceCompiler->SetSelection(n);
                        break;
                    }
                }
#if defined(__WXMAC__)
                defaultDebugger = "LLDB Debugger";
#else
                defaultDebugger = "GNU gdb debugger";
#endif
            }

            int index = m_choiceDebugger->FindString(defaultDebugger);
            if(index != wxNOT_FOUND) {
                m_choiceDebugger->SetSelection(index);
            }
        }
    }
    event.Skip();
}
开发者ID:since2014,项目名称:codelite,代码行数:99,代码来源:NewProjectWizard.cpp


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