本文整理汇总了C++中wxAuiNotebookEvent::Veto方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiNotebookEvent::Veto方法的具体用法?C++ wxAuiNotebookEvent::Veto怎么用?C++ wxAuiNotebookEvent::Veto使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAuiNotebookEvent
的用法示例。
在下文中一共展示了wxAuiNotebookEvent::Veto方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnNotebookPageClose
void MapTabbook::OnNotebookPageClose(wxAuiNotebookEvent& evt)
{
EditorTab* editorTab = GetTab(evt.GetInt());
MapTab* mapTab = dynamic_cast<MapTab*>(editorTab);
if(mapTab && mapTab->IsUniqueReference() && mapTab->GetMap()) {
if(mapTab->GetEditor()->IsLive()) {
if(mapTab->GetMap()->hasChanged()) {
SetFocusedTab(evt.GetInt());
if(gui.root->DoQuerySave(false)) {
gui.RefreshPalettes(nullptr, false);
gui.UpdateMenus();
} else {
evt.Veto();
}
} else {
gui.RefreshPalettes(nullptr, false);
gui.UpdateMenus();
}
}
return;
}
LiveLogTab* lt = dynamic_cast<LiveLogTab*>(editorTab);
if(lt && lt->IsConnected()) {
evt.Veto();
}
}
示例2: OnCanvasClosing
void OnCanvasClosing(wxAuiNotebookEvent& evt)
{
wm.wup.lock();
wxWindow* pPage=GetPage(evt.GetSelection());
EW_ASSERT(pPage!=NULL);
MvcView* pView=MvcView::GetViewByCanvas(pPage);
if(!pView)
{
return;
}
ICmdParam cmd(-1);
if(!pView->OnClose(wm))
{
evt.Veto();
wm.wup.unlock();
return;
}
if(pPage==m_pCurrentCanvas)
{
m_pCurrentCanvas.reset(NULL);
SetActiveView(NULL);
}
wm.book.DetachView(pView);
}
示例3: OnNotebookPageClose
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
{
// Override event
event.Veto();
wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_LOG_WINDOW)
ToggleLogWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_LOG_CONFIG_WINDOW)
ToggleLogConfigWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_REGISTER_WINDOW)
g_pCodeWindow->ToggleRegisterWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_WATCH_WINDOW)
g_pCodeWindow->ToggleWatchWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_BREAKPOINT_WINDOW)
g_pCodeWindow->ToggleBreakPointWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_JIT_WINDOW)
g_pCodeWindow->ToggleJitWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_MEMORY_WINDOW)
g_pCodeWindow->ToggleMemoryWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_SOUND_WINDOW)
g_pCodeWindow->ToggleSoundWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_VIDEO_WINDOW)
g_pCodeWindow->ToggleVideoWindow(false);
}
示例4: OnTabClosing
void CContextControl::OnTabClosing(wxAuiNotebookEvent& event)
{
// Need to defer event, wxAUI would write to free'd memory
// if we'd actually delete tab and potenially the notebook with it
QueueEvent(new wxCommandEvent(fzEVT_TAB_CLOSING_DEFERRED, event.GetSelection()));
event.Veto();
}
示例5: OnPageClosing
void ShellManager::OnPageClosing(wxAuiNotebookEvent& event)
{
ShellCtrlBase* sh = GetPage(event.GetSelection());
// LOGSTREAM << wxString::Format(_T("OnPageClosing(): ed=%p, title=%s\n"), eb, eb ? eb->GetTitle().c_str() : _T(""));
if (!QueryClose(sh))
event.Veto();
// event.Skip(); // allow others to process it too
}
示例6: OnCanvasChanging
void OnCanvasChanging(wxAuiNotebookEvent& evt)
{
wm.wup.lock();
if(!SetCurrentCanvas(NULL))
{
evt.Veto();
wm.wup.unlock();
}
}
示例7: OnAuiNotebookPageClose
void frmMain::OnAuiNotebookPageClose(wxAuiNotebookEvent &event)
{
// Prevent the user closing the four main tabs.
if (event.GetSelection() < 4)
{
wxMessageBox(_("This tab cannot be closed."), _("Close tab"), wxICON_INFORMATION | wxOK);
event.Veto();
return;
}
event.Skip();
}
示例8: OnPageClose
void wxAuiMDIClientWindow::OnPageClose(wxAuiNotebookEvent& evt)
{
wxAuiMDIChildFrame* wnd;
wnd = static_cast<wxAuiMDIChildFrame*>(GetPage(evt.GetSelection()));
wnd->Close();
// regardless of the result of wnd->Close(), we've
// already taken care of the close operations, so
// suppress further processing
evt.Veto();
}
示例9: OneditorsNotebookPageClose
void MainFrame::OneditorsNotebookPageClose(wxAuiNotebookEvent& event)
{
if ( dynamic_cast<StartHerePage*>(editorsNotebook->GetPage(event.GetSelection())) != NULL )
startPage = NULL;
else if ( CodeEditor * editor = dynamic_cast<CodeEditor*>(editorsNotebook->GetPage(event.GetSelection())) )
{
if ( !editor->QueryClose() )
event.Veto();
}
else if ( EditorScene * editor = dynamic_cast<EditorScene*>(editorsNotebook->GetPage(event.GetSelection())) )
{
if ( !editor->CanBeClosed() )
{
event.Veto();
infoBar->ShowMessage(_("Please close the preview before closing the editor."));
}
//Save the event to log file
LogFileManager::Get()->WriteToLogFile("Closed layout "+editor->GetLayout().GetName());
}
}
示例10: OnDeleteDiagramTab
void frmDatabaseDesigner::OnDeleteDiagramTab(wxAuiNotebookEvent &event)
{
deletedTab = event.GetSelection();
wxAuiNotebook *ctrl = (wxAuiNotebook *)event.GetEventObject();
hdDrawingView *view = (hdDrawingView *) ctrl->GetPage(event.GetSelection());
int res = wxMessageBox(wxT("Are you sure you want to delete diagram \"") + view->getDrawing()->getName() + _("\" from model?"),
wxT("Delete diagram?"),
wxYES_NO | wxNO_DEFAULT,
this);
if (res != wxYES)
{
event.Veto();
}
else
{
setModelChanged(true);
}
UpdateToolbar();
}
示例11: OnCloseNotebook
void MainWindow::OnCloseNotebook(wxAuiNotebookEvent& event)
{
wxAuiNotebook* m_note = (wxAuiNotebook *) event.GetEventObject();
if(m_note->GetSelection()== 0)event.Veto();
}
示例12: OnAllowNotebookDnD
//should work accroding to docs/sample, but doesn't (not even in sample)
void SLChatNotebook::OnAllowNotebookDnD(wxAuiNotebookEvent& evt)
{
evt.Veto();
}