wxSTEditor *wxSTEditorNotebook::GetEditor( int page ) { wxSTEditorSplitter *splitter = GetEditorSplitter(page); if (splitter) return splitter->GetEditor(); return NULL; }
void wxSTEditorNotebook::SetSendSTEEvents(bool send) { int n, count = (int)GetPageCount(); for (n = 0; n < count; n++) { wxSTEditorSplitter *splitter = GetEditorSplitter(n); if (splitter) splitter->SetSendSTEEvents(send); } }
int wxSTEditorNotebook::FindEditorPage(const wxSTEditor* editor) { int sel = GetSelection(); // assume that we want the selected editor so check it first if ((sel >= 0) && GetEditorSplitter(sel) && ((GetEditorSplitter(sel)->GetEditor1() == editor) || (GetEditorSplitter(sel)->GetEditor2() == editor)) ) { return sel; } else { int n, n_pages = (int)GetPageCount(); for (n = 0; n < n_pages; n++) { if (n == sel) continue; if (GetEditorSplitter(n) && ((GetEditorSplitter(n)->GetEditor1() == editor) || (GetEditorSplitter(n)->GetEditor2() == editor)) ) { return n; } } } return wxNOT_FOUND; }
wxSTEditor *wxSTEditorFrame::GetEditor(int page) const { wxSTEditorSplitter *splitter = GetEditorSplitter(page); return splitter ? splitter->GetEditor() : (wxSTEditor*)NULL; }
void wxSTEditorFrame::SetSendSTEEvents(bool send) { if (GetEditorNotebook()) GetEditorNotebook()->SetSendSTEEvents(send); else if (GetEditorSplitter()) GetEditorSplitter()->SetSendSTEEvents(send); else if (GetEditor()) GetEditor()->SetSendSTEEvents(send); }