本文整理汇总了C++中wxCloseEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxCloseEvent类的具体用法?C++ wxCloseEvent怎么用?C++ wxCloseEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxCloseEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
}
开发者ID:hgwells,项目名称:tive,代码行数:8,代码来源:floatpane.cpp
示例2: OnEndSession
void CslApp::OnEndSession(wxCloseEvent& event)
{
LOG_DEBUG("\n");
m_shutdown=CSL_SHUTDOWN_FORCE;
event.Skip();
}
开发者ID:MorganBorman,项目名称:Cube-Server-Lister,代码行数:8,代码来源:CslApp.cpp
示例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;
}
}
开发者ID:KH6VM,项目名称:OpenSystemFusion,代码行数:17,代码来源:DExtraClientFrame.cpp
示例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();
}
开发者ID:rburkholder,项目名称:trade-frame,代码行数:8,代码来源:IQFeedMarketSymbols.cpp
示例5: OnCloseWindow
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
{
// safeguards in case the window is still shown using ShowModal
if ( !IsModal() )
Destroy();
event.Skip();
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:8,代码来源:aboutdlgg.cpp
示例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();
}
开发者ID:michaellis,项目名称:kicad-source-mirror,代码行数:58,代码来源:pcbframe.cpp
示例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();
}
开发者ID:RocFan,项目名称:kicad-source-mirror,代码行数:45,代码来源:libeditframe.cpp
示例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();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:18,代码来源:mdi.cpp
示例9: OnClose
//
// Intercept close command
//
void vtFrame::OnClose(wxCloseEvent &event)
{
if (m_canvas)
{
m_canvas->m_bRunning = false;
m_bCloseOnIdle = true;
}
event.Skip();
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:12,代码来源:frame.cpp
示例10: OnCloseFrame
void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt)
{
evt.Skip();
OnQuit();
m_helpFrame->SetController((wxHelpControllerBase*) NULL);
m_helpFrame = NULL;
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:9,代码来源:helpctrl.cpp
示例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();
}
开发者ID:95rangerxlt,项目名称:CubicSDR,代码行数:9,代码来源:AppFrame.cpp
示例12: OnCloseWindow
/////////////////////////////////////////
// stock and standard OnCloseWindow callback
/////////////////////////////////////////
void WXGL_IO_Frame::OnCloseWindow(wxCloseEvent& myEvent)
{
if (mp_Canvas->OnCloseCanvas() )
{
this->Destroy();
}
else
myEvent.Veto();
}
开发者ID:Collins-J-URI,项目名称:eigenfaces,代码行数:12,代码来源:WXGL_IO_menus.cpp
示例13: OnClose
/*****************************************************
**
** SimpleChildWindow --- OnClose
**
******************************************************/
void SimpleChildWindow::OnClose( wxCloseEvent &event )
{
assert( view );
if ( ! view->queryClose() )
{
event.Veto();
}
else ChildWindow::OnClose( event );
}
开发者ID:akshaykinhikar,项目名称:maitreya7,代码行数:14,代码来源:ChildWindow.cpp
示例14: OnClose
void NyqBench::OnClose(wxCloseEvent & e)
{
if (!Validate()) {
e.Veto();
}
else {
Show(false);
}
}
开发者ID:finefin,项目名称:audacity,代码行数:9,代码来源:NyqBench.cpp
示例15: OnCloseWindow
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_canvas->OnCloseCanvas() )
{
this->Destroy();
}
else
event.Veto();
}
开发者ID:beanhome,项目名称:dev,代码行数:9,代码来源:forty.cpp
示例16: OnClose
void MyFrame::OnClose(wxCloseEvent& event)
{
if (m_server)
{
delete m_server;
m_server = NULL;
}
event.Skip();
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:9,代码来源:server.cpp
示例17: OnClose
void MyFrame::OnClose(wxCloseEvent& event)
{
if (m_client)
{
delete m_client;
m_client = NULL;
}
event.Skip();
}
开发者ID:nealey,项目名称:vera,代码行数:9,代码来源:client.cpp
示例18: SaveLayout
void wxGD::MainFrame::OnClose( wxCloseEvent &event )
{
if( !SaveWarning() )
return;
SaveLayout();
event.Skip();
}
开发者ID:wxguidesigner,项目名称:wxGUIDesigner,代码行数:9,代码来源:mainframe.cpp
示例19: OnCloseFrame
void wxHtmlHelpControllerEx::OnCloseFrame(wxCloseEvent& evt)
{
evt.Skip();
OnQuit();
m_helpWindow->SetController(NULL);
m_helpWindow = NULL;
}
开发者ID:cyclefusion,项目名称:szarp,代码行数:9,代码来源:helpctrlex.cpp
示例20: OnClose
void MyFrame::OnClose(wxCloseEvent& event)
{
// Close the help frame; this will cause the config data to
// get written.
if ( help.GetFrame() ) // returns NULL if no help frame active
help.GetFrame()->Close(true);
// now we can safely delete the config pointer
event.Skip();
delete wxConfig::Set(NULL);
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:10,代码来源:help.cpp
注:本文中的wxCloseEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论