Example #1
0
wxSTEditor *wxSTEditorNotebook::GetEditor( int page )
{
    wxSTEditorSplitter *splitter = GetEditorSplitter(page);
    if (splitter)
        return splitter->GetEditor();

    return NULL;
}
Example #2
0
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);
    }
}
Example #3
0
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;
}
Example #4
0
wxSTEditor *wxSTEditorFrame::GetEditor(int page) const
{
    wxSTEditorSplitter *splitter = GetEditorSplitter(page);
    return splitter ? splitter->GetEditor() : (wxSTEditor*)NULL;
}
Example #5
0
void wxSTEditorFrame::SetSendSTEEvents(bool send)
{
    if      (GetEditorNotebook()) GetEditorNotebook()->SetSendSTEEvents(send);
    else if (GetEditorSplitter()) GetEditorSplitter()->SetSendSTEEvents(send);
    else if (GetEditor())         GetEditor()->SetSendSTEEvents(send);
}