本文整理汇总了C++中wxWizardEvent::GetPage方法的典型用法代码示例。如果您正苦于以下问题:C++ wxWizardEvent::GetPage方法的具体用法?C++ wxWizardEvent::GetPage怎么用?C++ wxWizardEvent::GetPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxWizardEvent
的用法示例。
在下文中一共展示了wxWizardEvent::GetPage方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_help_button
// Things to do if the help button was clicked.
void setup_wizard::on_help_button( wxWizardEvent &event )
{
#if ( setupUSE_ONLINE_HELP )
if ( event.GetPage() == m_viewer_wizardpage )
{
help_controller::get()->show_help_topic( plkrHELP_ID_SETUP_WIZARD_SOFTWARE_SELECTION_PAGE );
}
else if ( event.GetPage() == m_destinations_wizardpage )
{
help_controller::get()->show_help_topic( plkrHELP_ID_SETUP_WIZARD_DESTINATION_PAGE );
}
else if ( event.GetPage() == m_proxy_wizardpage )
{
help_controller::get()->show_help_topic( plkrHELP_ID_SETUP_WIZARD_PROXY_PAGE );
}
else if ( event.GetPage() == m_channel_list_wizardpage )
{
help_controller::get()->show_help_topic( plkrHELP_ID_SETUP_WIZARD_CHANNEL_LIST_PAGE );
}
else
{
// Fall through: it was either the start or end message.
help_controller::get()->show_help_topic( plkrHELP_ID_SETUP_WIZARD );
}
#endif
}
示例2: OnPageChanging
void CUpdateWizard::OnPageChanging(wxWizardEvent& event)
{
if (m_skipPageChanging)
return;
m_skipPageChanging = true;
if (event.GetPage() == m_pages[0])
{
event.Veto();
PrepareUpdateCheckPage();
StartUpdateCheck();
}
if (event.GetPage() == m_pages[1] && m_pages[1]->GetNext())
{
if (!SetLocalFile())
{
event.Veto();
m_skipPageChanging = false;
return;
}
}
m_skipPageChanging = false;
}
示例3: OnPageChanged
void FirstTimeWizard::OnPageChanged( wxWizardEvent& evt )
{
// Plugin Selector needs a special OnShow hack, because Wizard child panels don't
// receive any Show events >_<
if( (sptr)evt.GetPage() == (sptr)&m_page_plugins )
m_panel_PluginSel.OnShown();
else if( (sptr)evt.GetPage() == (sptr)&m_page_bios )
m_panel_BiosSel.OnShown();
}
示例4: OnPageChanging
void FirstTimeWizard::OnPageChanging( wxWizardEvent& evt )
{
if( evt.GetPage() == NULL ) return; // safety valve!
sptr page = (sptr)evt.GetPage()->GetClientData();
if( evt.GetDirection() )
{
// Moving forward:
// Apply settings from the current page...
if( page >= 0 )
{
if( ApplicableWizardPage* page = wxDynamicCast( GetCurrentPage(), ApplicableWizardPage ) )
{
if( !page->PrepForApply() || !page->GetApplyState().ApplyAll() )
{
evt.Veto();
return;
}
}
}
if( page == 0 )
{
if( wxFile::Exists(GetUiSettingsFilename()) || wxFile::Exists(GetVmSettingsFilename()) )
{
// Asks the user if they want to import or overwrite the existing settings.
Dialogs::ImportSettingsDialog modal( this );
if( modal.ShowModal() != wxID_OK )
{
evt.Veto();
return;
}
}
}
}
else
{
// Moving Backward:
// Some specific panels need per-init actions canceled.
if( page == 1 )
{
m_panel_PluginSel.CancelRefresh();
}
}
}
示例5: OnPageChanging
void MyWizard::OnPageChanging(wxWizardEvent &event)
{
wxWizardPage *wp=event.GetPage();
EnterLeavePage *elp=dynamic_cast<EnterLeavePage*>(wp);
if (elp)
{
if (event.GetDirection())
{
//forward
bool b=elp->OnLeave(true);
if (!b) {event.Veto();return;}
wxWizardPage *nwp=wp->GetNext();
EnterLeavePage *nelp=dynamic_cast<EnterLeavePage*>(nwp);
if (nelp)
{
bool b=nelp->OnEnter(true);
if (!b) event.Veto();
}
}
else
{
//backward
bool b=elp->OnLeave(false);
if (!b) {event.Veto();return;}
wxWizardPage *nwp=wp->GetPrev();
EnterLeavePage *nelp=dynamic_cast<EnterLeavePage*>(nwp);
if (nelp)
{
bool b=nelp->OnEnter(false);
if (!b) event.Veto();
}
}
}
}
示例6: OnShowingBooksPage
void ReadingPlanWizard::OnShowingBooksPage(wxWizardEvent& event)
{
ReadingPlanWizardDatesPage* page3 = NULL;
wxWizardPage* page = event.GetPage();
try
{
if (page == m_page3) {
page3 = static_cast<ReadingPlanWizardDatesPage*>(page);
}
//page3 = dynamic_cast<ReadingPlanWizardDatesPage*>(page);
if(page3)
{
m_page3->m_calStart->Show();
m_page3->m_calEnd->Show();
}
else
{
m_page3->m_calStart->Hide();
m_page3->m_calEnd->Hide();
}
}
catch(std::bad_cast)
{
return;
}
}
示例7: OnPageChanged
void CUpdateWizard::OnPageChanged(wxWizardEvent& event)
{
if (event.GetPage() == m_pages[0])
{
if (m_start_check)
{
m_start_check = false;
StartUpdateCheck();
}
return;
}
if (event.GetPage() != m_pages[2])
return;
wxButton* pNext = wxDynamicCast(FindWindow(wxID_FORWARD), wxButton);
pNext->Disable();
m_currentPage = 2;
wxStaticText *pText = XRCCTRL(*this, "ID_DOWNLOADTEXT", wxStaticText);
wxString text = wxString::Format(_("Downloading %s"), (CServer::GetPrefixFromProtocol(m_urlProtocol) + _T("://") + m_urlServer + m_urlFile).c_str());
text.Replace(_T("&"), _T("&&"));
pText->SetLabel(text);
m_inTransfer = false;
if (m_update_options)
m_update_options->m_use_internal_rootcert = false;
int res = m_pEngine->Command(CConnectCommand(CServer(m_urlProtocol, DEFAULT, m_urlServer, (m_urlProtocol == HTTPS) ? 443 : 80)));
if (res == FZ_REPLY_OK)
{
XRCCTRL(*this, "ID_DOWNLOADPROGRESSTEXT", wxStaticText)->SetLabel(_("Connecting to server"));
res = SendTransferCommand();
XRCCTRL(*this, "ID_DOWNLOADPROGRESS", wxGauge)->SetRange(100);
}
if (res == FZ_REPLY_OK)
ShowPage(m_pages[1]);
else if (res != FZ_REPLY_WOULDBLOCK)
FailedTransfer();
else
{
RewrapPage(2);
}
}
示例8: 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();
}
示例9: OnPageChanging
void PluginWizard::OnPageChanging(wxWizardEvent& event)
{
if ( event.GetDirection() && event.GetPage() == m_pages.at(0)) {
wxString pluginName = m_textCtrlName->GetValue();
pluginName.Trim();
if ( pluginName.IsEmpty() || !::IsValidCppIndetifier(pluginName) ) {
::wxMessageBox(_("Invalid plugin name"), "codelite");
event.Veto();
return;
}
} else if ( event.GetDirection() && event.GetPage() == m_pages.at(1)) {
if ( !wxDir::Exists( m_dirPickerCodeliteDir->GetPath() ) ) {
::wxMessageBox(_("codelite folder does not exists"), "codelite");
event.Veto();
return;
}
if ( !wxDir::Exists( m_dirPickerPluginPath->GetPath() ) ) {
::wxMessageBox(_("The selected plugin folder does not exist"), "codelite");
event.Veto();
return;
}
}
}
示例10: 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);
}
}
示例11: 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();
}
示例12: 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();
}