本文整理汇总了C++中wxCloseEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxCloseEvent类的具体用法?C++ wxCloseEvent怎么用?C++ wxCloseEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxCloseEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnClose
void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt)
{
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
if (!evt.GetVeto()) {
m_mgr.DetachPane(m_pane_window);
Destroy();
}
}
示例2: OnEndSession
void CslApp::OnEndSession(wxCloseEvent& event)
{
LOG_DEBUG("\n");
m_shutdown=CSL_SHUTDOWN_FORCE;
event.Skip();
}
示例3: onClose
void CDExtraClientFrame::onClose(wxCloseEvent& event)
{
if (!event.CanVeto()) {
Destroy();
return;
}
int reply = ::wxMessageBox(_("Do you want to exit DExtra Client"), _("Exit DExtra Client"), wxOK | wxCANCEL | wxICON_QUESTION);
switch (reply) {
case wxOK:
Destroy();
break;
case wxCANCEL:
event.Veto();
break;
}
}
示例4: OnClose
void AppIQFeedMarketSymbols::OnClose( wxCloseEvent& event ) {
// Exit Steps: #2 -> FrameMain::OnClose
DelinkFromPanelProviderControl();
// if ( 0 != OnPanelClosing ) OnPanelClosing();
// event.Veto(); // possible call, if needed
// event.CanVeto(); // if not a
event.Skip(); // auto followed by Destroy();
}
示例5: OnCloseWindow
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
{
// safeguards in case the window is still shown using ShowModal
if ( !IsModal() )
Destroy();
event.Skip();
}
示例6: OnCloseWindow
void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
m_canvas->SetAbortRequest( true );
if( GetScreen()->IsModify() )
{
wxString msg = wxString::Format( _(
"Save the changes in\n"
"'%s'\n"
"before closing?" ),
GetChars( GetBoard()->GetFileName() )
);
int ii = DisplayExitDialog( this, msg );
switch( ii )
{
case wxID_CANCEL:
Event.Veto();
return;
case wxID_NO:
break;
case wxID_YES:
SavePcbFile( GetBoard()->GetFileName() );
break;
}
}
GetGalCanvas()->StopDrawing();
// Delete the auto save file if it exists.
wxFileName fn = GetBoard()->GetFileName();
// Auto save file name is the normal file name prefixed with a '$'.
fn.SetName( wxT( "$" ) + fn.GetName() );
// Remove the auto save file on a normal close of Pcbnew.
if( fn.FileExists() && !wxRemoveFile( fn.GetFullPath() ) )
{
wxString msg = wxString::Format( _(
"The auto save file '%s' could not be removed!" ),
GetChars( fn.GetFullPath() )
);
wxMessageBox( msg, Pgm().App().GetAppName(), wxOK | wxICON_ERROR, this );
}
// Delete board structs and undo/redo lists, to avoid crash on exit
// when deleting some structs (mainly in undo/redo lists) too late
Clear_Pcb( false );
// do not show the window because ScreenPcb will be deleted and we do not
// want any paint event
Show( false );
Destroy();
}
示例7: OnCloseWindow
void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
if( GetScreen()->IsModify() )
{
int ii = DisplayExitDialog( this, _( "Save the changes in the library before closing?" ) );
switch( ii )
{
case wxID_NO:
break;
case wxID_YES:
if ( this->SaveActiveLibrary( false ) )
break;
// fall through: cancel the close because of an error
case wxID_CANCEL:
Event.Veto();
return;
}
GetScreen()->ClrModify();
}
PART_LIBS* libs = Prj().SchLibs();
BOOST_FOREACH( const PART_LIB& lib, *libs )
{
if( lib.IsModified() )
{
wxString msg = wxString::Format( _(
"Library '%s' was modified!\nDiscard changes?" ),
GetChars( lib.GetName() )
);
if( !IsOK( this, msg ) )
{
Event.Veto();
return;
}
}
}
Destroy();
}
示例8: OnClose
void MyFrame::OnClose(wxCloseEvent& event)
{
unsigned numChildren = MyChild::GetChildrenCount();
if ( event.CanVeto() && (numChildren > 0) )
{
wxString msg;
msg.Printf("%d windows still open, close anyhow?", numChildren);
if ( wxMessageBox(msg, "Please confirm",
wxICON_QUESTION | wxYES_NO) != wxYES )
{
event.Veto();
return;
}
}
event.Skip();
}
示例9: OnClose
//
// Intercept close command
//
void vtFrame::OnClose(wxCloseEvent &event)
{
if (m_canvas)
{
m_canvas->m_bRunning = false;
m_bCloseOnIdle = true;
}
event.Skip();
}
示例10: OnCloseFrame
void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt)
{
evt.Skip();
OnQuit();
m_helpFrame->SetController((wxHelpControllerBase*) NULL);
m_helpFrame = NULL;
}
示例11: OnClose
void AppFrame::OnClose(wxCloseEvent& event) {
wxGetApp().getConfig()->setWindow(this->GetPosition(), this->GetClientSize());
wxGetApp().getConfig()->setWindowMaximized(this->IsMaximized());
wxGetApp().getConfig()->setTheme(ThemeMgr::mgr.getTheme());
wxGetApp().getConfig()->setSnap(wxGetApp().getFrequencySnap());
wxGetApp().getConfig()->setCenterFreq(wxGetApp().getFrequency());
wxGetApp().getConfig()->save();
event.Skip();
}
示例12: OnCloseWindow
/////////////////////////////////////////
// stock and standard OnCloseWindow callback
/////////////////////////////////////////
void WXGL_IO_Frame::OnCloseWindow(wxCloseEvent& myEvent)
{
if (mp_Canvas->OnCloseCanvas() )
{
this->Destroy();
}
else
myEvent.Veto();
}
示例13: OnClose
/*****************************************************
**
** SimpleChildWindow --- OnClose
**
******************************************************/
void SimpleChildWindow::OnClose( wxCloseEvent &event )
{
assert( view );
if ( ! view->queryClose() )
{
event.Veto();
}
else ChildWindow::OnClose( event );
}
示例14: OnClose
void NyqBench::OnClose(wxCloseEvent & e)
{
if (!Validate()) {
e.Veto();
}
else {
Show(false);
}
}
示例15: OnCloseWindow
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_canvas->OnCloseCanvas() )
{
this->Destroy();
}
else
event.Veto();
}