本文整理汇总了C++中wxBookCtrlEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxBookCtrlEvent::Skip方法的具体用法?C++ wxBookCtrlEvent::Skip怎么用?C++ wxBookCtrlEvent::Skip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxBookCtrlEvent
的用法示例。
在下文中一共展示了wxBookCtrlEvent::Skip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPageChanged
void DebuggerPane::OnPageChanged(wxBookCtrlEvent& event)
{
if(m_initDone && DebuggerMgr::Get().GetActiveDebugger() && DebuggerMgr::Get().GetActiveDebugger()->IsRunning()) {
if(event.GetEventObject() == m_book) {
ManagerST::Get()->CallAfter(&Manager::UpdateDebuggerPane);
} else {
event.Skip();
}
} else {
event.Skip();
}
}
示例2: OnPageClosing
void DbViewerPanel::OnPageClosing(wxBookCtrlEvent& event)
{
m_SuppressUpdate = true;
m_pThumbnail->SetCanvas(NULL);
event.Skip();
}
示例3: OnTabChanged
/// Apply the styles when a different tab is selected, so the previews are
/// up to date
void wxRichTextFormattingDialog::OnTabChanged(wxBookCtrlEvent& event)
{
if (m_ignoreUpdates)
return;
if (GetBookCtrl() != event.GetEventObject())
{
event.Skip();
return;
}
int oldPageId = event.GetOldSelection();
if (oldPageId != -1)
{
wxWindow* page = GetBookCtrl()->GetPage(oldPageId);
if (page)
page->TransferDataFromWindow();
}
int pageId = event.GetSelection();
if (pageId != -1)
{
wxWindow* page = GetBookCtrl()->GetPage(pageId);
if (page)
page->TransferDataToWindow();
}
}
示例4: OnSelChange
void wxNotebook::OnSelChange(wxBookCtrlEvent& event)
{
// is it our tab control?
if ( event.GetEventObject() == this )
ChangePage(event.GetOldSelection(), event.GetSelection());
// we want to give others a chance to process this message as well
event.Skip();
}
示例5: OnPageChanging
void MainFrame::OnPageChanging(wxBookCtrlEvent& event)
{
event.Skip();
wxString message;
message << "Page changing event. Selection=" << event.GetSelection();
m_log->AppendText(message + "\n");
// if(wxMessageBox("Allow?", "You can veto", wxYES_NO | wxCENTER | wxICON_QUESTION) != wxYES) {
// event.Veto();
//}
}
示例6: OnTabLabelContextMenu
void MainBook::OnTabLabelContextMenu(wxBookCtrlEvent& e)
{
e.Skip();
wxWindow* tabCtrl = static_cast<wxWindow*>(e.GetEventObject());
if((e.GetSelection() == m_book->GetSelection()) && (tabCtrl->GetParent() == m_book)) {
// we only show context menu for the active tab
e.Skip(false);
wxMenu* contextMenu = wxXmlResource::Get()->LoadMenu(wxT("editor_tab_right_click"));
// Notify the plugins about the tab label context menu
clContextMenuEvent event(wxEVT_CONTEXT_MENU_TAB_LABEL);
event.SetMenu(contextMenu);
EventNotifier::Get()->ProcessEvent(event);
contextMenu = event.GetMenu();
tabCtrl->PopupMenu(contextMenu);
wxDELETE(contextMenu);
}
}
示例7: OnSelChange
void wxNotebook::OnSelChange (
wxBookCtrlEvent& rEvent
)
{
//
// Is it our tab control?
//
if (rEvent.GetEventObject() == this)
{
int nPageCount = GetPageCount();
int nSel;
ULONG ulOS2Sel = (ULONG)rEvent.GetOldSelection();
bool bFound = false;
for (nSel = 0; nSel < nPageCount; nSel++)
{
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
{
bFound = true;
break;
}
}
if (!bFound)
return;
m_pages[nSel]->Show(false);
ulOS2Sel = (ULONG)rEvent.GetSelection();
bFound = false;
for (nSel = 0; nSel < nPageCount; nSel++)
{
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
{
bFound = true;
break;
}
}
if (!bFound)
return;
wxNotebookPage* pPage = m_pages[nSel];
pPage->Show(true);
m_nSelection = nSel;
}
//
// We want to give others a chance to process this message as well
//
rEvent.Skip();
} // end of wxNotebook::OnSelChange
示例8: OnPageClosing
void FindResultsTab::OnPageClosing(wxBookCtrlEvent& e)
{
e.Skip();
if(m_searchInProgress) {
::wxMessageBox(_("Can not close the search tab while a search is in progress"),
"CodeLite",
wxICON_WARNING | wxOK | wxCENTER);
e.Veto();
return;
}
}
示例9: OnPageChanging
void MainBook::OnPageChanging(wxBookCtrlEvent& e)
{
LEditor* editor = GetActiveEditor();
if(editor) {
editor->CallTipCancel();
}
#if HAS_LIBCLANG
ClangCodeCompletion::Instance()->CancelCodeComplete();
#endif
e.Skip();
}
示例10: OnPageChanged
void DbViewerPanel::OnPageChanged(wxBookCtrlEvent& event)
{
if(!m_SuppressUpdate) {
ErdPanel* pPanel = wxDynamicCast(m_mgr->GetPage(event.GetSelection()), ErdPanel);
if(pPanel)
m_pThumbnail->SetCanvas(pPanel->GetCanvas());
else
m_pThumbnail->SetCanvas(NULL);
} else
m_SuppressUpdate = false;
event.Skip();
}
示例11: OnPageChanged
void MainFrame::OnPageChanged(wxBookCtrlEvent& event)
{
event.Skip();
wxString message;
message << "Page changed event. Old=" << event.GetOldSelection() << ". New: =" << event.GetSelection();
m_log->AppendText(message + "\n");
wxWindow* curpage = m_book->GetCurrentPage();
int sel = m_book->FindPage(curpage);
if(sel != event.GetSelection()) {
wxMessageBox("FATAL ERROR: current page does not match the selection!!",
"Notebook Demo",
wxICON_ERROR | wxOK | wxCENTER);
}
}
示例12: OnPageClosed
void MainBook::OnPageClosed(wxBookCtrlEvent& e)
{
e.Skip();
SelectPage(m_book->GetCurrentPage());
m_quickFindBar->SetEditor(GetActiveEditor());
// any editors left open?
LEditor* editor = NULL;
for(size_t i = 0; i < m_book->GetPageCount() && editor == NULL; i++) {
editor = dynamic_cast<LEditor*>(m_book->GetPage(i));
}
if(m_book->GetPageCount() == 0) {
SendCmdEvent(wxEVT_ALL_EDITORS_CLOSED);
ShowQuickBar(false);
}
DoUpdateNotebookTheme();
}
示例13: OnPageChanged
void MainBook::OnPageChanged(wxBookCtrlEvent& e)
{
e.Skip();
int newSel = e.GetSelection();
if(newSel != wxNOT_FOUND && m_reloadingDoRaise) {
wxWindow* win = m_book->GetPage((size_t)newSel);
if(win) {
SelectPage(win);
}
}
// Cancel any tooltip
LEditor::Vec_t editors;
GetAllEditors(editors, MainBook::kGetAll_IncludeDetached);
for(size_t i = 0; i < editors.size(); ++i) {
// Cancel any calltip when switching from the editor
editors.at(i)->DoCancelCalltip();
}
DoUpdateNotebookTheme();
}
示例14: OnEventProxy
void clMultiBook::OnEventProxy(wxBookCtrlEvent& event)
{
if(event.GetEventObject() == this) {
// Avoid loops
event.Skip();
return;
}
int selection = event.GetSelection();
int oldSelection = event.GetOldSelection();
Notebook* book = dynamic_cast<Notebook*>(event.GetEventObject());
if(!book) {
clWARNING() << "clMultiBook::OnEventProxy no notebook event object!";
return;
}
// Convert the event
wxBookCtrlEvent proxyEvent(event.GetEventType());
proxyEvent.SetEventObject(this);
proxyEvent.SetSelection(wxNOT_FOUND);
proxyEvent.SetOldSelection(wxNOT_FOUND);
if(selection != wxNOT_FOUND) { proxyEvent.SetSelection(BookIndexToGlobalIndex(book, selection)); }
if(oldSelection != wxNOT_FOUND) { proxyEvent.SetOldSelection(BookIndexToGlobalIndex(book, oldSelection)); }
// Process the event
if((event.GetEventType() == wxEVT_BOOK_TAB_CONTEXT_MENU) || (event.GetEventType() == wxEVT_BOOK_PAGE_CHANGED)) {
// Use ProcessEvent
GetEventHandler()->ProcessEvent(proxyEvent);
} else if((event.GetEventType() == wxEVT_BOOK_PAGE_CLOSING) || (event.GetEventType() == wxEVT_BOOK_PAGE_CHANGING)) {
// Handle with ProcessEvent with Veto option
GetEventHandler()->ProcessEvent(proxyEvent);
if(!proxyEvent.IsAllowed()) { event.Veto(); }
} else {
// Handle with AddPendingEvent
GetEventHandler()->AddPendingEvent(proxyEvent);
if(event.GetEventType() == wxEVT_BOOK_PAGE_CLOSED) {
// A page was closed
CallAfter(&clMultiBook::UpdateView);
}
}
}
示例15: OnPageChanged
void SymbolViewPlugin::OnPageChanged(wxBookCtrlEvent& e)
{
e.Skip();
if(m_view->IsShown()) {
m_view->m_isEnabled = true;
m_view->EditorChanged();
} else if(IsPaneDetached()) {
m_view->m_isEnabled = true;
m_view->EditorChanged();
} else {
m_view->m_isEnabled = false;
int sel = m_mgr->GetWorkspacePaneNotebook()->GetSelection();
if(sel != wxNOT_FOUND) {
wxString seletionText = m_mgr->GetWorkspacePaneNotebook()->GetPageText(sel);
m_view->m_isEnabled = (seletionText == _("Outline"));
if(m_view->m_isEnabled) { m_view->EditorChanged(); }
} else {
// the page is detached
m_view->m_isEnabled = true; // just mark as active
}
}
}