本文整理汇总了C++中Notebook::GetPageText方法的典型用法代码示例。如果您正苦于以下问题:C++ Notebook::GetPageText方法的具体用法?C++ Notebook::GetPageText怎么用?C++ Notebook::GetPageText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notebook
的用法示例。
在下文中一共展示了Notebook::GetPageText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetTabVisible
/**
* Ensure that the CppCheck tab is visible
*/
void CppCheckPlugin::SetTabVisible(bool clearContent)
{
// Make sure that the Output pane is visible
wxAuiManager *aui = m_mgr->GetDockingManager();
if (aui) {
wxAuiPaneInfo &info = aui->GetPane(wxT("Output View"));
if (info.IsOk() && !info.IsShown()) {
info.Show();
aui->Update();
}
}
// Set the focus to the CppCheck tab
Notebook *book = m_mgr->GetOutputPaneNotebook();
if (book->GetPageText((size_t)book->GetSelection()) != wxT("CppCheck")) {
for (size_t i=0; i<book->GetPageCount(); i++) {
if (book->GetPageText(i) == wxT("CppCheck")) {
book->SetSelection(i);
break;
}
}
}
// clear the view contents
if ( clearContent ) {
m_view->Clear();
m_fileCount = m_filelist.GetCount();
m_fileProcessed = 1;
}
}
示例2: ToggleOutputPane
void PluginManager::ToggleOutputPane(const wxString& selectedWindow)
{
if(ManagerST::Get()->IsPaneVisible(wxT("Output View"))) {
if(!selectedWindow.IsEmpty()) {
wxString selectedTabName;
Notebook* book = clMainFrame::Get()->GetOutputPane()->GetNotebook();
int where = book->GetSelection();
if(where != wxNOT_FOUND) {
selectedTabName = book->GetPageText(where);
}
if(selectedTabName == selectedWindow) {
// The requested tab is already selected, just hide the pane
ManagerST::Get()->HidePane("Output View");
} else {
// The output pane is visible, but the selected tab is not the one we wanted
// Select it
ManagerST::Get()->ShowOutputPane(selectedWindow);
}
} else {
// The output pane is visible and the selected tab is the one we requested
// So just hide it
ManagerST::Get()->HidePane("Output View");
}
} else {
// The output pane is hidden, show it and select the requested tab
ManagerST::Get()->ShowOutputPane(selectedWindow);
}
}
示例3: DoCscopeCommand
void Cscope::DoCscopeCommand(const wxString &command, const wxString &findWhat, const wxString &endMsg)
{
// We haven't yet found a valid cscope exe, so look for one
wxString where;
if ( !ExeLocator::Locate( GetCscopeExeName(), where ) ) {
wxString msg; msg << _("I can't find 'cscope' anywhere. Please check if it's installed.") << wxT('\n')
<< _("Or tell me where it can be found, from the menu: 'Plugins | CScope | Settings'");
wxMessageBox( msg, _("CScope not found"), wxOK|wxCENTER|wxICON_WARNING );
return;
}
//try to locate the cscope database
wxArrayString output;
//set the focus to the cscope tab
Notebook *book = m_mgr->GetOutputPaneNotebook();
//make sure that the Output pane is visible
wxAuiManager *aui = m_mgr->GetDockingManager();
if (aui) {
wxAuiPaneInfo &info = aui->GetPane(wxT("Output View"));
if (info.IsOk() && !info.IsShown()) {
info.Show();
aui->Update();
}
}
wxString curSel = book->GetPageText((size_t)book->GetSelection());
if (curSel != CSCOPE_NAME) {
for (size_t i=0; i<(size_t)book->GetPageCount(); i++) {
if (book->GetPageText(i) == CSCOPE_NAME) {
book->SetSelection(i);
break;
}
}
}
//create the search thread and return
CscopeRequest *req = new CscopeRequest();
req->SetOwner (this );
req->SetCmd (command );
req->SetEndMsg (endMsg );
req->SetFindWhat (findWhat);
req->SetWorkingDir(m_mgr->GetSolution()->GetSolutionFileName().GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR));
CScopeThreadST::Get()->Add( req );
}
示例4: OnToggleHoldOpen
void OutputTabWindow::OnToggleHoldOpen(wxCommandEvent& e)
{
int sel = wxNOT_FOUND;
Notebook* book = clMainFrame::Get()->GetOutputPane()->GetNotebook();
if(book && (sel = book->GetSelection()) != wxNOT_FOUND) {
EditorConfigST::Get()->SetPaneStickiness(book->GetPageText(sel), e.IsChecked());
}
}
示例5: GetPageText
wxString clMultiBook::GetPageText(size_t page) const
{
Notebook* book;
size_t bookIndex;
size_t modIndex;
if(GetBookByPageIndex(page, &book, bookIndex, modIndex)) { return book->GetPageText(modIndex); }
return wxEmptyString;
}
示例6: OnModified
void Edit::OnModified(wxStyledTextEvent& WXUNUSED(event))
{
if (m_modified) {
return;
}
Notebook* notebook = static_cast<Notebook*>(GetParent());
const int page_index = notebook->GetPageIndex(this);
if (page_index > -1) {
wxString page_text = notebook->GetPageText(page_index);
page_text += wxT('*');
notebook->SetPageText(page_index, page_text);
m_modified = true;
}
}
示例7: SaveFile
bool Edit::SaveFile(const wxString &filename) {
// return if no change
if (!Modified()) return true;
if (m_modified) {
Notebook* notebook = static_cast<Notebook*>(GetParent());
const int page_index = notebook->GetPageIndex(this);
if (page_index > -1) {
wxString page_text = notebook->GetPageText(page_index);
if (page_text.EndsWith(wxT('*'))) {
page_text.RemoveLast();
notebook->SetPageText(page_index, page_text);
}
m_modified = false;
}
}
return wxStyledTextCtrl::SaveFile(filename);
}