• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxAuiNotebookEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中wxAuiNotebookEvent的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiNotebookEvent类的具体用法?C++ wxAuiNotebookEvent怎么用?C++ wxAuiNotebookEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了wxAuiNotebookEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnCloseClicked

void InfoPane::OnCloseClicked(wxAuiNotebookEvent& event)
{
    if (event.GetSelection() == -1)
        return;
    // toggle the notebook, that sends the event
    Toggle(GetPageIndexByWindow(GetPage(event.GetSelection())));
}
开发者ID:469306621,项目名称:Languages,代码行数:7,代码来源:infopane.cpp


示例2: 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();
	}
}
开发者ID:OMARTINEZ210,项目名称:rme,代码行数:28,代码来源:editor_tabs.cpp


示例3: OnHeaderRightClick

/** @brief OnHeaderRightClick
  *
  * @todo: document this function
  */
void SLChatNotebook::OnHeaderRightClick(wxAuiNotebookEvent &event)
{
    if ( event.GetSelection() == -1 )
        return;

    m_cur_page = static_cast<ChatPanel*>( GetPage( event.GetSelection() ) );
    wxMenu* pop = new wxMenu;
    pop->Append( ID_NEW_TAB, _("New Tab") );
    pop->Append( ID_CLOSE_TAB, _("Close") );
    if ( GetPageCount() > 1)
    {
		pop->Append( ID_CLOSE_TAB_ALL, _("Close all chats"));
		pop->Append( ID_CLOSE_TAB_OTHER, _("Close all other chats"));
    }
    m_ch_menu = new ChatPanelMenu( m_cur_page, true );
	if ( m_cur_page->GetPanelType() == CPT_User ) {
		wxMenu* panel_menu = m_ch_menu->GetMenu(  );
		panel_menu->Remove( panel_menu->FindItem(_( "User" )) );
		pop->AppendSubMenu ( panel_menu, _( "Panel" ) );
		pop->AppendSubMenu ( m_ch_menu->GetUserMenuNoCreate() , _( "User" ));
	}
	else
		pop->AppendSubMenu ( m_ch_menu->GetMenu() , _( "Channel" ));
	Connect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SLChatNotebook::OnMenuItem ), 0, this );
    PopupMenu(pop);
}
开发者ID:renemilk,项目名称:springlobby,代码行数:30,代码来源:slbook.cpp


示例4: 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);

	}
开发者ID:hanwd,项目名称:ew_base,代码行数:30,代码来源:mvc_book.cpp


示例5: GetPage

//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
void
Notebook::onPageChanged(wxAuiNotebookEvent& _event)
{
    View* pNewView = NULL;
    View* pOldView = NULL;

    // Get the new view, or keep it NULL if there isn't one.
    if (_event.GetSelection() != -1)
    {
        wxWindow* pPage = GetPage(_event.GetSelection());
        Views_type::iterator newPage = m_views.find(pPage);

        if (newPage != m_views.end())
        {
            pNewView = newPage->second;
        }
    }

    // Get the old view, or keep it NULL if there isn't one.
    if (_event.GetOldSelection() != -1 && _event.GetOldSelection() < GetPageCount())
    {
        wxWindow* pOldPage = GetPage(_event.GetOldSelection());
        Views_type::iterator oldPage = m_views.find(pOldPage);
        if (oldPage != m_views.end())
        {
            pOldView = oldPage->second;
        }
    }

    notifyPageChange(pNewView, pOldView);
}
开发者ID:SgtFlame,项目名称:indiezen,代码行数:32,代码来源:Notebook.cpp


示例6: OnNotebookPageChanged

void MapTabbook::OnNotebookPageChanged(wxAuiNotebookEvent& evt)
{
	gui.UpdateMinimap();

	int32_t oldSelection = evt.GetOldSelection();
	int32_t newSelection = evt.GetSelection();

	MapTab* oldMapTab;
	if(oldSelection != -1) {
		oldMapTab = dynamic_cast<MapTab*>(GetTab(oldSelection));
	} else {
		oldMapTab = nullptr;
	}

	MapTab* newMapTab;
	if(newSelection != -1) {
		newMapTab = dynamic_cast<MapTab*>(GetTab(newSelection));
	} else {
		newMapTab = nullptr;
	}

	// std::cout << oldSelection << " " << newSelection;
	if(!newMapTab) {
		gui.RefreshPalettes(nullptr);
	} else if(!oldMapTab || !oldMapTab->HasSameReference(newMapTab)) {
		gui.RefreshPalettes(newMapTab->GetMap());
		gui.UpdateMenus();
	}
}
开发者ID:OMARTINEZ210,项目名称:rme,代码行数:29,代码来源:editor_tabs.cpp


示例7: OnTabContextMenu

void InfoPane::OnTabContextMenu(wxAuiNotebookEvent& event)
{
    if (event.GetSelection() == -1)
        return;
    // select the notebook that sends the event, because the context menu-entries act on the actual selected tab
    SetSelection(event.GetSelection());
    DoShowContextMenu();
}
开发者ID:469306621,项目名称:Languages,代码行数:8,代码来源:infopane.cpp


示例8: 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
}
开发者ID:BackupTheBerlios,项目名称:cbilplugin-svn,代码行数:8,代码来源:ShellCtrlBase.cpp


示例9: 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();
}
开发者ID:oneminot,项目名称:filezilla3,代码行数:8,代码来源:context_control.cpp


示例10: OnPageChange

// Ensure we show the data in any tabs that become visible
void frmMain::OnPageChange(wxAuiNotebookEvent &event)
{
	pgObject *data = browser->GetObject(browser->GetSelection());

	if (!data)
		return;

	ShowObjStatistics(data, ((wxAuiNotebook *)event.GetEventObject())->GetPage(event.GetSelection()));
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:10,代码来源:frmMain.cpp


示例11: OnNotebookPageClose

void HtMainFrame::OnNotebookPageClose (wxAuiNotebookEvent &event)
{
   wxAuiNotebook *nb = static_cast<wxAuiNotebook *>(event.GetEventObject());
   HexFrame *frame = static_cast<HexFrame *>(nb->GetPage(event.GetSelection()));

   wxDocManager *docm = wxGetApp().doc_manager.get();

   HexView *vw = frame->GetView();
   docm->CloseDocument(vw->GetDocument());
}
开发者ID:rjricken,项目名称:hexterminator,代码行数:10,代码来源:ht_mainframe.cpp


示例12: OnNotebookPageChange

void HtMainFrame::OnNotebookPageChange (wxAuiNotebookEvent &event)
{


#ifdef WXDEBUG
   wxAuiNotebook *nb = static_cast<wxAuiNotebook *>(event.GetEventObject());
   HexFrame *frame = static_cast<HexFrame *>(nb->GetPage(event.GetSelection()));

   frame->OnAddToDebugPanel();
#endif
}
开发者ID:rjricken,项目名称:hexterminator,代码行数:11,代码来源:ht_mainframe.cpp


示例13: 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();
}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:12,代码来源:tabmdi.cpp


示例14: OnTablebookPageChanging

/*---------------------------------------------------------------------------*/
void wxTableBook::OnTablebookPageChanging( wxAuiNotebookEvent& event )
{
    if (m_InitData)
    {   // Vérifier si c'est l'onglet Data qui doit être affiché
        if ("Data" == m_Book->GetPageText(event.GetSelection()))
        {   // Si oui lancer la sélection des données de la table
            m_InitData = false;
            RefreshData();
        }
    }
    event.Skip();
}
开发者ID:4silvertooth,项目名称:wxSqlitePlus,代码行数:13,代码来源:tablebook.cpp


示例15: 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();
}
开发者ID:search5,项目名称:pgadmin3,代码行数:12,代码来源:events.cpp


示例16: OnPageContextMenu

void ShellManager::OnPageContextMenu(wxAuiNotebookEvent& event)
{
    if (event.GetSelection() == -1)
        return;

    // select the notebook that sends the event
    m_nb->SetSelection(event.GetSelection());
    wxMenu* pop = new wxMenu;
    pop->Append(ID_REMOVE_TERMINATED, _("Close Inactive Tool Pages"));

    m_nb->PopupMenu(pop);
    delete pop;
}
开发者ID:stahta01,项目名称:codeAdapt_IDE,代码行数:13,代码来源:ShellCtrlBase.cpp


示例17: OnTab

void CFrame::OnTab(wxAuiNotebookEvent& event)
{
	event.Skip();
	if (!g_pCodeWindow) return;

	// Create the popup menu
	wxMenu MenuPopup;

	wxMenuItem* Item = new wxMenuItem(&MenuPopup, wxID_ANY, _("Select floating windows"));
	MenuPopup.Append(Item);
	Item->Enable(false);
	MenuPopup.Append(new wxMenuItem(&MenuPopup));

	for (int i = IDM_LOG_WINDOW; i <= IDM_CODE_WINDOW; i++)
	{
		wxWindow *Win = FindWindowById(i);
		if (Win && Win->IsEnabled())
		{
			Item = new wxMenuItem(&MenuPopup, i + IDM_FLOAT_LOG_WINDOW - IDM_LOG_WINDOW,
					Win->GetName(), "", wxITEM_CHECK);
			MenuPopup.Append(Item);
			Item->Check(!!FindWindowById(i + IDM_LOG_WINDOW_PARENT - IDM_LOG_WINDOW));
		}
	}

	// Line up our menu with the cursor
	wxPoint Pt = ::wxGetMousePosition();
	Pt = ScreenToClient(Pt);

	// Show
	PopupMenu(&MenuPopup, Pt);
}
开发者ID:Pnum,项目名称:dolphin,代码行数:32,代码来源:FrameAui.cpp


示例18: OnTabContextMenu

 // On tab context menu
 void OnTabContextMenu (wxAuiNotebookEvent & event)
 {
     // ensure tab is visible
     m_docArea->SetSelection(event.GetSelection());
     wxMenu * menu = new wxMenu();
     menu->Append(ID_DecoupleTab, "Decouple", "Decouple this tab");
     m_frame->PopupMenu(menu);
 }
开发者ID:svn2github,项目名称:fbide,代码行数:9,代码来源:UiManager.cpp


示例19: OnPageClosed

void EditorManager::OnPageClosed(wxAuiNotebookEvent& event)
{
	int index = event.GetSelection();

	Editor* editor = NULL;
	EditorIndexMap::iterator it;
	for(it = mEditorIndexMap.begin(); it != mEditorIndexMap.end(); ++it)
	{
		if(it->second == index)
		{
			editor = it->first;
			editor->deactivate();
			mEditorIndexMap.erase(it);
			break;
		}
	}

	if(editor != NULL)
	{
		if(editor == mActiveEditor)
			mActiveEditor = NULL;

		EditorList::iterator lit;
		for(lit = mEditors.begin(); lit != mEditors.end(); ++lit)
		{
			if((*lit) == editor)
			{
				mEditors.erase(lit);
				break;
			}
		}	
	}

	fireEvent(EditorClosed, EditorEventArgs(editor));

	// Is this handled by OnPageChanged?
	int selIndex = event.GetSelection();
	for(it = mEditorIndexMap.begin(); it != mEditorIndexMap.end(); ++it)
	{
		if(it->second == index)
		{
			setActiveEditor(it->first);
			break;
		}
	}
}
开发者ID:j-rivero,项目名称:ogre-acornacorn,代码行数:46,代码来源:EditorManager.cpp


示例20: OnCanvasChanging

	void OnCanvasChanging(wxAuiNotebookEvent& evt)
	{
		wm.wup.lock();
		if(!SetCurrentCanvas(NULL))
		{
			evt.Veto();
			wm.wup.unlock();
		}
	}
开发者ID:hanwd,项目名称:ew_base,代码行数:9,代码来源:mvc_book.cpp



注:本文中的wxAuiNotebookEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxAuiNotebookPageArray类代码示例发布时间:2022-05-31
下一篇:
C++ wxAuiManagerEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap