当前位置: 首页>>代码示例>>C++>>正文


C++ Notebook::RemovePage方法代码示例

本文整理汇总了C++中Notebook::RemovePage方法的典型用法代码示例。如果您正苦于以下问题:C++ Notebook::RemovePage方法的具体用法?C++ Notebook::RemovePage怎么用?C++ Notebook::RemovePage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Notebook的用法示例。


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

示例1: UnPlug

void CMakePlugin::UnPlug()
{
    wxASSERT(m_mgr);
    Notebook* notebook = m_mgr->GetWorkspacePaneNotebook();
    wxASSERT(notebook);

    int pos = notebook->GetPageIndex("CMake Help");
    if(pos != wxNOT_FOUND) {
        CMakeHelpTab* helpTab = dynamic_cast<CMakeHelpTab*>(notebook->GetPage(pos));
        if(helpTab) {
            helpTab->Stop();
        }
        notebook->RemovePage(pos);
    }

    // Unbind events
    wxTheApp->Unbind(wxEVT_COMMAND_MENU_SELECTED, &CMakePlugin::OnSettings, this, XRCID("cmake_settings"));

    EventNotifier::Get()->Unbind(wxEVT_SHOW_WORKSPACE_TAB, &CMakePlugin::OnToggleHelpTab, this);
    EventNotifier::Get()->Unbind(wxEVT_CONTEXT_MENU_PROJECT, &CMakePlugin::OnProjectContextMenu, this);
    EventNotifier::Get()->Unbind(wxEVT_CONTEXT_MENU_WORKSPACE, &CMakePlugin::OnWorkspaceContextMenu, this);
    EventNotifier::Get()->Unbind(wxEVT_PROJ_FILE_ADDED, &CMakePlugin::OnFileAdded, this);
    EventNotifier::Get()->Unbind(wxEVT_PROJ_FILE_REMOVED, &CMakePlugin::OnFileRemoved, this);
    Unbind(wxEVT_ASYNC_PROCESS_OUTPUT, &CMakePlugin::OnCMakeOutput, this);
    Unbind(wxEVT_ASYNC_PROCESS_TERMINATED, &CMakePlugin::OnCMakeTerminated, this);
}
开发者ID:Alexpux,项目名称:codelite,代码行数:26,代码来源:CMakePlugin.cpp

示例2: wxASSERT

void
CMakePlugin::UnPlug()
{
    wxASSERT(m_mgr);
    Notebook* notebook = m_mgr->GetWorkspacePaneNotebook();
    wxASSERT(notebook);

    size_t pos = notebook->GetPageIndex("CMake Help");
    if (pos != Notebook::npos) {
        CMakeHelpTab* helpTab = dynamic_cast<CMakeHelpTab*>( notebook->GetPage(pos) );
        if ( helpTab ) {
            helpTab->Stop();
        }
        notebook->RemovePage(pos);
    }
    
    
    // Unbind events
    wxTheApp->Unbind(wxEVT_COMMAND_MENU_SELECTED, &CMakePlugin::OnSettings, this, XRCID("cmake_settings"));

    EventNotifier::Get()->Unbind(wxEVT_CMD_PROJ_SETTINGS_SAVED, wxCommandEventHandler(CMakePlugin::OnSaveConfig), this);
    EventNotifier::Get()->Unbind(wxEVT_GET_PROJECT_BUILD_CMD, clBuildEventHandler(CMakePlugin::OnGetBuildCommand), this);
    EventNotifier::Get()->Unbind(wxEVT_GET_PROJECT_CLEAN_CMD, clBuildEventHandler(CMakePlugin::OnGetCleanCommand), this);
    EventNotifier::Get()->Unbind(wxEVT_GET_IS_PLUGIN_MAKEFILE, clBuildEventHandler(CMakePlugin::OnGetIsPluginMakefile), this);
    EventNotifier::Get()->Unbind(wxEVT_PLUGIN_EXPORT_MAKEFILE, clBuildEventHandler(CMakePlugin::OnExportMakefile), this);
    EventNotifier::Get()->Unbind(wxEVT_WORKSPACE_LOADED, wxCommandEventHandler(CMakePlugin::OnWorkspaceLoaded), this);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:27,代码来源:CMakePlugin.cpp

示例3: RemovePage

bool clMultiBook::RemovePage(size_t page, bool notify)
{
    Notebook* book;
    size_t bookIndex;
    size_t modIndex;
    if(GetBookByPageIndex(page, &book, bookIndex, modIndex)) {
        // Make sure that after we remove the page from its notebook
        // it has a valid parent (UpdateView() below might destory its parent
        // Notebook control)
        wxWindow* removedPage = book->GetPage(modIndex);

        // Update the history
        m_history->Pop(removedPage);

        removedPage->Reparent(this);
        bool res = book->RemovePage(modIndex, notify);
        UpdateView();
        return res;
    }
    return false;
}
开发者ID:lpc1996,项目名称:codelite,代码行数:21,代码来源:clMultiBook.cpp


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