本文整理汇总了C++中wxWizardEvent::Veto方法的典型用法代码示例。如果您正苦于以下问题:C++ wxWizardEvent::Veto方法的具体用法?C++ wxWizardEvent::Veto怎么用?C++ wxWizardEvent::Veto使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxWizardEvent
的用法示例。
在下文中一共展示了wxWizardEvent::Veto方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPageChanging
//------------------------------------------------------------------------------
void WizCompilerPanel::OnPageChanging(wxWizardEvent& event)
{
if (event.GetDirection() != 0) // !=0 forward, ==0 backward
{
if (GetCompilerID().IsEmpty())
{
cbMessageBox(_("You must select a compiler for your project..."), _("Error"), wxICON_ERROR, GetParent());
event.Veto();
return;
}
if (m_AllowConfigChange && !GetWantDebug() && !GetWantRelease())
{
cbMessageBox(_("You must select at least one configuration..."), _("Error"), wxICON_ERROR, GetParent());
event.Veto();
return;
}
if (m_AllowConfigChange)
{
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("scripts"));
cfg->Write(_T("/generic_wizard/want_debug"), (bool)GetWantDebug());
cfg->Write(_T("/generic_wizard/debug_name"), GetDebugName());
cfg->Write(_T("/generic_wizard/debug_output"), GetDebugOutputDir());
cfg->Write(_T("/generic_wizard/debug_objects_output"), GetDebugObjectOutputDir());
cfg->Write(_T("/generic_wizard/want_release"), (bool)GetWantRelease());
cfg->Write(_T("/generic_wizard/release_name"), GetReleaseName());
cfg->Write(_T("/generic_wizard/release_output"), GetReleaseOutputDir());
cfg->Write(_T("/generic_wizard/release_objects_output"), GetReleaseObjectOutputDir());
}
}
WizPageBase::OnPageChanging(event); // let the base class handle it too
}
示例2: 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();
}
}
}
}
示例3: 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;
}
示例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: OnWizardPageChanging
void WizardPageFlagsConfig::OnWizardPageChanging( wxWizardEvent& event )
{
uint32_t mask = ( 1 << m_pItem->m_width ) - 1;
mask = mask << m_pItem->m_pos;
if ( event.GetDirection() ) { // Forward
if ( flagtype_value == m_pItem->m_type ) {
wxString str = m_textField->GetValue();
if ( !str.IsNumber() ) {
event.Veto();
}
else {
m_value = vscp_readStringValue( str );
m_value = ( m_value << m_pItem->m_pos ) & mask;
}
}
else if ( flagtype_choice == m_pItem->m_type ) {
m_value = m_listBox->GetSelection();
m_value = ( m_value << m_pItem->m_pos ) & mask;
}
else { // Boolean
m_value = ( m_boolChoice->GetValue() ? 1 : 0 );
m_value = ( m_value << m_pItem->m_pos ) & mask;
}
}
else { // Backward
}
}
示例6: OnWizardPageChanging
void SelGenSchemaPage::OnWizardPageChanging(wxWizardEvent &event)
{
if(event.GetDirection() && m_allSchemas->GetSelection() == wxNOT_FOUND)
{
wxMessageBox(_("Please select an item to move to next step."), _("No choice made"), wxICON_WARNING | wxOK, this);
event.Veto();
}
else if(event.GetDirection())
{
if(m_allSchemas->GetSelection() > 0)
{
wparent->OIDSelectedSchema = schemasHM[schemasNames[m_allSchemas->GetSelection()]];
wparent->schemaName = schemasNames[m_allSchemas->GetSelection()];
wxArrayString tables = ddImportDBUtils::getTablesNames(wparent->getConnection(), wparent->schemaName);
wparent->getDesign()->unMarkSchemaOnAll();
wparent->getDesign()->markSchemaOn(tables);
}
else
{
wparent->OIDSelectedSchema = -1;
wparent->schemaName = _("");
}
wparent->page4->populateGrid();
}
}
示例7: OnExit
void CStartDialog::OnExit(wxWizardEvent &event)
{
int style = wxYES_NO;
if( wxMessageBox( "Are you sure you want to exit?", "Confirmation", style ) == wxYES )
EndModal( wxID_CANCEL );
else
event.Veto();
}
示例8: OnNextPage
void ConnectWizard::OnNextPage( wxWizardEvent& event ) {
dout << "> OnNextPage" << std::endl;
if( event.GetDirection() ) {
if( GetCurrentPage()==hostPage ) {
wxIPV4address addr;
if( directRadio->GetValue() && addr.Hostname( hostName->GetValue() )==false ) {
wxMessageBox(_T("Please enter a valid internet (IP v4) address for the hostname."), _T("Invalid hostname"),
wxICON_ERROR | wxOK, this);
event.Veto();
return;
}
if( addr.Service( port->GetValue() )==false ) {
wxMessageBox(_T("Please enter a valid port number (between 1 and 65535)."),
_T("Invalid port"),
wxICON_ERROR | wxOK, this);
event.Veto();
return;
}
} else
if( GetCurrentPage()==sessionlistPage ) {
d->setup.stopSearch();
// session selected?
int selected = sessions->GetSelection();
if( selected==wxNOT_FOUND ) {
wxMessageBox(_T("Please select the host you want to connect to."),
_T("No host selected"),
wxICON_ERROR | wxOK, this);
event.Veto();
return;
}
// connect finally
d->con = d->setup.connect( d->hosts[selected] );
if( d->con.isNull() ) {
wxMessageBox( _T(d->setup.errorMessage().c_str()),
_T("Connection error"),
wxICON_ERROR | wxOK, this);
event.Veto();
return;
}
}
}
dout << "< OnNextPage" << std::endl;
}
示例9: OnNextPage
void HostWizard::OnNextPage( wxWizardEvent& event ) {
if( event.GetDirection() )
if( GetCurrentPage()==sessionPage ) {
if( sessionNameEdit->GetValue().Length()==0 ) {
wxMessageBox(_T("Please enter a session name. Empty session names are not allowed."), _T("Invalid session name"),
wxICON_ERROR | wxOK, this);
event.Veto();
} else {
long ret;
if( !portEdit->GetValue().ToLong( &ret ) || ret<=0 || ret>65535 ) {
wxMessageBox(_T("Please enter a valid port number (between 1 and 65535)."), _T("Invalid port"),
wxICON_ERROR | wxOK, this);
event.Veto();
}
}
}
}
示例10: OnWizardCancel
// wizard event handlers
void OnWizardCancel(wxWizardEvent& event)
{
if ( wxMessageBox(wxT("Do you really want to cancel?"), wxT("Question"),
wxICON_QUESTION | wxYES_NO, this) != wxYES )
{
// not confirmed
event.Veto();
}
}
示例11: 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();
}
示例12: 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();
}
示例13: 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();
}
示例14: 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;
}
}
}
示例15: on_wizardpage_changing
void proxy_wizardpage::on_wizardpage_changing( wxWizardEvent& event )
{
// If proxy wizardpage values are not valid...
if ( ! is_proxy_valid() )
{
wxMessageDialog invalid_proxy_messagedialog ( this,
_( "Your proxy server is invalid. It must begin with either http:// or https://" ),
_( "Proxy invalid" ),
wxOK | wxICON_INFORMATION );
// ...then show the message dialog...
invalid_proxy_messagedialog.ShowModal();
// .. and veto the wizardpagechanging event from moving off this wizardpage.
event.Veto();
return;
}
}