本文整理汇总了C++中Notebook::InsertPage方法的典型用法代码示例。如果您正苦于以下问题:C++ Notebook::InsertPage方法的具体用法?C++ Notebook::InsertPage怎么用?C++ Notebook::InsertPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notebook
的用法示例。
在下文中一共展示了Notebook::InsertPage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertPage
bool clMultiBook::InsertPage(size_t index, wxWindow* page, const wxString& label, bool selected, const wxBitmap& bmp)
{
Notebook* b;
size_t modindex;
size_t bookindex;
if(GetBookByPageIndex(index, &b, bookindex, modindex)) {
bool res = b->InsertPage(modindex, page, label, selected, bmp);
if(res) { m_history->Push(page); }
return res;
} else {
AddPage(page, label, selected, bmp);
return true;
}
}
示例2: phpResources
PhpPlugin::PhpPlugin(IManager* manager)
: IPlugin(manager)
, m_clangOldFlag(false)
, m_browser(NULL)
, m_debuggerPane(NULL)
, m_xdebugLocalsView(NULL)
, m_xdebugEvalPane(NULL)
, m_showWelcomePage(false)
{
m_longName = wxT("PHP Plugin for the codelite IDE");
m_shortName = wxT("PHP");
// Instantiate the bitmaps, we do this so they will be populated in wxXmlResource
// Sigleton class
PHPImages images;
PHPWorkspace::Get()->SetPluginManager(m_mgr);
XDebugManager::Initialize(this);
// Add our UI
// create tab (possibly detached)
Notebook* book = m_mgr->GetWorkspacePaneNotebook();
if(IsWorkspaceViewDetached()) {
// Make the window child of the main panel (which is the grand parent of the notebook)
DockablePane* cp = new DockablePane(
book->GetParent()->GetParent(), book, PHPStrings::PHP_WORKSPACE_VIEW_TITLE, wxNullBitmap, wxSize(200, 200));
m_workspaceView = new PHPWorkspaceView(cp, m_mgr);
cp->SetChildNoReparent(m_workspaceView);
} else {
m_workspaceView = new PHPWorkspaceView(book, m_mgr);
book->InsertPage(0, m_workspaceView, PHPStrings::PHP_WORKSPACE_VIEW_TITLE, true);
}
PHPCodeCompletion::Instance()->SetManager(m_mgr);
PHPEditorContextMenu::Instance()->ConnectEvents();
PHPParserThread::Instance()->Start();
// Pass the manager class to the context menu manager
PHPEditorContextMenu::Instance()->SetManager(m_mgr);
// Connect events
EventNotifier::Get()->Connect(
wxEVT_CC_SHOW_QUICK_OUTLINE, clCodeCompletionEventHandler(PhpPlugin::OnShowQuickOutline), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_DBG_UI_DELTE_ALL_BREAKPOINTS, clDebugEventHandler(PhpPlugin::OnXDebugDeleteAllBreakpoints), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CREATE_NEW_WORKSPACE, wxCommandEventHandler(PhpPlugin::OnNewWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_SHOWING, clNewProjectEventHandler(PhpPlugin::OnNewProject), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_FINISHED, clNewProjectEventHandler(PhpPlugin::OnNewProjectFinish), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_IS_WORKSPACE_OPEN, clCommandEventHandler(PhpPlugin::OnIsWorkspaceOpen), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CLOSE_WORKSPACE, clCommandEventHandler(PhpPlugin::OnCloseWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_WORKSPACE, clCommandEventHandler(PhpPlugin::OnOpenWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_RELOAD_WORKSPACE, clCommandEventHandler(PhpPlugin::OnReloadWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_RESOURCE, wxCommandEventHandler(PhpPlugin::OnOpenResource), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_WORKSPACE_FILES, wxCommandEventHandler(PhpPlugin::OnGetWorkspaceFiles), NULL, this);
EventNotifier::Get()->Connect(wxEVT_CMD_GET_CURRENT_FILE_PROJECT_FILES,
wxCommandEventHandler(PhpPlugin::OnGetCurrentFileProjectFiles),
NULL,
this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_ACTIVE_PROJECT_FILES, wxCommandEventHandler(PhpPlugin::OnGetActiveProjectFiles), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_FIND_IN_FILES_MASK, clCommandEventHandler(PhpPlugin::OnGetFiFMask), NULL, this);
EventNotifier::Get()->Connect(wxEVT_FILE_SAVED, clCommandEventHandler(PhpPlugin::OnFileSaved), NULL, this);
EventNotifier::Get()->Connect(wxEVT_PHP_LOAD_URL, PHPEventHandler(PhpPlugin::OnLoadURL), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_ALL_EDITORS_CLOSED, wxCommandEventHandler(PhpPlugin::OnAllEditorsClosed), NULL, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_CONNECTED, &PhpPlugin::OnDebugSatrted, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_SESSION_ENDED, &PhpPlugin::OnDebugEnded, this);
EventNotifier::Get()->Connect(wxEVT_GOING_DOWN, clCommandEventHandler(PhpPlugin::OnGoingDown), NULL, this);
CallAfter(&PhpPlugin::DoCreateDebuggerPanes);
// Extract all CC files from PHP.zip into the folder ~/.codelite/php-plugin/cc
wxFileName phpResources(clStandardPaths::Get().GetDataDir(), "PHP.zip");
if(phpResources.Exists()) {
clZipReader zipReader(phpResources);
wxFileName targetDir(clStandardPaths::Get().GetUserDataDir(), "");
targetDir.AppendDir("php-plugin");
// Don't extract the zip if one of the files on disk is newer or equal to the zip timestamp
wxFileName fnSampleFile(targetDir.GetPath(), "basic.php");
fnSampleFile.AppendDir("cc");
if(!fnSampleFile.Exists() || // the sample file does not exists
// Or the resource file (PHP.zip) is newer than the sample file
(phpResources.GetModificationTime().GetTicks() > fnSampleFile.GetModificationTime().GetTicks())) {
targetDir.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
zipReader.Extract("*", targetDir.GetPath());
//.........这里部分代码省略.........