本文整理汇总了C++中wxBookCtrlEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxBookCtrlEvent类的具体用法?C++ wxBookCtrlEvent怎么用?C++ wxBookCtrlEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxBookCtrlEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
开发者ID:HanruZhou,项目名称:wxWidgets,代码行数:29,代码来源:richtextformatdlg.cpp
示例2: 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();
}
开发者ID:cwalther,项目名称:wxWidgets,代码行数:9,代码来源:notebook_osx.cpp
示例3: 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();
//}
}
开发者ID:erdincay,项目名称:Notebook,代码行数:10,代码来源:MainFrame.cpp
示例4: 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
开发者ID:jonntd,项目名称:dynamica,代码行数:55,代码来源:notebook.cpp
示例5: 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;
}
}
开发者ID:Jactry,项目名称:codelite,代码行数:11,代码来源:findresultstab.cpp
示例6: 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();
}
}
开发者ID:stahta01,项目名称:codelite,代码行数:12,代码来源:debuggerpane.cpp
示例7: 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();
}
开发者ID:DoctorRover,项目名称:codelite,代码行数:13,代码来源:DbViewerPanel.cpp
示例8: 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);
}
}
开发者ID:erdincay,项目名称:Notebook,代码行数:14,代码来源:MainFrame.cpp
示例9: OnPageClosing
void DbViewerPanel::OnPageClosing(wxBookCtrlEvent& event)
{
m_SuppressUpdate = true;
m_pThumbnail->SetCanvas(NULL);
event.Skip();
}
开发者ID:DoctorRover,项目名称:codelite,代码行数:7,代码来源:DbViewerPanel.cpp
示例10: OnPageChanging
void LibraryPanel::OnPageChanging(wxBookCtrlEvent& event)
{
ee::LibraryPanel::OnPageChanging(event);
Layer* curr = static_cast<LibraryPage*>(GetCurrPage())->GetLayer();
curr->SetEditable(false);
static_cast<LibraryPage*>(m_pages[event.GetSelection()])->UpdateStatusFromLayer();
}
开发者ID:xzrunner,项目名称:easyeditor,代码行数:8,代码来源:LibraryPanel.cpp
示例11: OnPageClosing
void MainFrame::OnPageClosing(wxBookCtrlEvent& event)
{
m_log->AppendText(wxString() << "Page: " << event.GetSelection() << " is being closed"
<< "\n");
// if(wxMessageBox("Allow?", "You can veto", wxYES_NO | wxCENTER | wxICON_QUESTION) != wxYES) {
// event.Veto();
//}
}
开发者ID:erdincay,项目名称:Notebook,代码行数:8,代码来源:MainFrame.cpp
示例12: OnClosePage
void FindResultsTab::OnClosePage(wxBookCtrlEvent& e)
{
int where = e.GetSelection();
if(where == wxNOT_FOUND) {
return;
}
m_book->DeletePage((size_t)where);
}
开发者ID:Jactry,项目名称:codelite,代码行数:8,代码来源:findresultstab.cpp
示例13: OnClosePage
void MainBook::OnClosePage(wxBookCtrlEvent& e)
{
clWindowUpdateLocker locker(this);
int where = e.GetSelection();
if(where == wxNOT_FOUND) {
return;
}
wxWindow* page = m_book->GetPage((size_t)where);
if(page) ClosePage(page);
}
开发者ID:fmestrone,项目名称:codelite,代码行数:10,代码来源:mainbook.cpp
示例14: OnSearchClosing
void CSearchDlg::OnSearchClosing(wxBookCtrlEvent& evt)
{
// Abort global search if it was last tab that was closed.
if ( evt.GetSelection() == ((int)m_notebook->GetPageCount() - 1 ) ) {
OnBnClickedStop(nullEvent);
}
CSearchListCtrl *ctrl = dynamic_cast<CSearchListCtrl*>(m_notebook->GetPage(evt.GetSelection()));
wxASSERT(ctrl);
// Zero to avoid results added while destructing.
ctrl->ShowResults(0);
theApp->searchlist->RemoveResults(ctrl->GetSearchId());
// Do cleanups if this was the last tab
if ( m_notebook->GetPageCount() == 1 ) {
FindWindow(IDC_SDOWNLOAD)->Enable(FALSE);
FindWindow(IDC_CLEAR_RESULTS)->Enable(FALSE);
}
}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:19,代码来源:SearchDlg.cpp
示例15: 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);
}
}
开发者ID:fmestrone,项目名称:codelite,代码行数:19,代码来源:mainbook.cpp
示例16: OnPageChanged
void LibraryPanel::OnPageChanged(wxBookCtrlEvent& event)
{
ee::LibraryPanel::OnPageChanged(event);
Layer* curr = static_cast<LibraryPage*>(GetCurrPage())->GetLayer();
ee::ChangeLayerMgrSJ::Instance()->Change(curr->GetLayerMgr());
curr->SetEditable(true);
static_cast<LibraryPage*>(m_pages[event.GetSelection()])->UpdateStatusFromLayer();
Refresh();
}
开发者ID:xzrunner,项目名称:easyeditor,代码行数:11,代码来源:LibraryPanel.cpp
示例17: 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();
}
开发者ID:fmestrone,项目名称:codelite,代码行数:20,代码来源:mainbook.cpp
示例18: OnPageChanging
void MainBook::OnPageChanging(wxBookCtrlEvent& e)
{
LEditor* editor = GetActiveEditor();
if(editor) {
editor->CallTipCancel();
}
#if HAS_LIBCLANG
ClangCodeCompletion::Instance()->CancelCodeComplete();
#endif
e.Skip();
}
开发者ID:fmestrone,项目名称:codelite,代码行数:11,代码来源:mainbook.cpp
示例19: OnListbook
void FrontEnd::OnListbook(wxBookCtrlEvent &event)
{
wxBookCtrlBase* book = GetCurrentBook();
const int idx = event.GetSelection();
if(idx != wxNOT_FOUND && book)
{
if(book->GetPageText(idx) == "All Songs")
{
m_listSongAll->ClearAll();
Songs songs;
SearchSong("select * from songs", songs);
for(SongsIter iter = songs.begin();
iter != songs.end();
iter++)
{
m_listSongAll->InsertItem(0, iter->name);
}
}
else if(book->GetPageText(idx) == "Songs Queued")
{
m_listSongQueued->ClearAll();
Songs songs;
SearchSong("select * from songs where state = 1", songs);
for(SongsIter iter = songs.begin();
iter != songs.end();
iter++)
{
m_listSongQueued->InsertItem(0, iter->name);
}
}
else if(book->GetPageText(idx) == "Songs Played")
{
m_listSongPlayed->ClearAll();
Songs songs;
SearchSong("select * from songs where state = 2", songs);
for(SongsIter iter = songs.begin();
iter != songs.end();
iter++)
{
m_listSongPlayed->InsertItem(0, iter->name);
}
}
else if(book->GetPageText(idx) == "Singer Pinyin")
{
m_listSingerAll->ClearAll();
}
}
}
开发者ID:ranjiao,项目名称:raysdemo,代码行数:54,代码来源:FrontEnd.cpp
示例20: OnPageClosed
void FindResultsTab::OnPageClosed(wxBookCtrlEvent& e)
{
// this function can't be called unless m_book != NULL
int sel = e.GetSelection();
if(sel != wxNOT_FOUND) {
ListMatchInfos::iterator itMatchInfo = m_matchInfo.begin();
for(int i = 0; i < e.GetSelection(); ++i) {
++itMatchInfo;
}
m_matchInfo.erase(itMatchInfo);
} else if(m_book->GetPageCount()) {
m_matchInfo.clear();
}
// Create a page if there is no more
if(m_book->GetPageCount() == 0) {
m_sci = NULL;
} else {
m_sci = dynamic_cast<wxStyledTextCtrl*>(m_book->GetCurrentPage());
}
}
开发者ID:Jactry,项目名称:codelite,代码行数:22,代码来源:findresultstab.cpp
注:本文中的wxBookCtrlEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论