Beispiel #1
0
void DbViewerPanel::OnPageChanged(NotebookEvent& event)
{
    if( !m_SuppressUpdate ) {
        ErdPanel* pPanel = wxDynamicCast(m_mgr->GetPage( event.GetSelection() ), ErdPanel);
        if (pPanel)	m_pThumbnail->SetCanvas( pPanel->GetCanvas() );
        else
            m_pThumbnail->SetCanvas(NULL);
    } else
        m_SuppressUpdate = false;

    event.Skip();
}
Beispiel #2
0
void MainBook::OnPageChanged(NotebookEvent& e)
{
    int newSel = e.GetSelection();
    if (newSel != wxNOT_FOUND && m_reloadingDoRaise) {
        wxWindow *win = m_book->GetPage((size_t)newSel);
        if(win) {
            SelectPage(win);
            //LEditor *editor = dynamic_cast<LEditor*>(win);
            //if(editor) {
            //	ManagerST::Get()->UpdatePreprocessorFile(editor);
            //}
        }
    }
    e.Skip();
}
Beispiel #3
0
void DbViewerPanel::OnPageClosing(NotebookEvent& event)
{
    m_SuppressUpdate = true;
    m_pThumbnail->SetCanvas(NULL);

    event.Skip();
}
void OutputViewControlBar::OnPageChanged(NotebookEvent& event)
{
	size_t cursel = m_book->GetSelection();
	if ( cursel != Notebook::npos ) {
		wxString selectedPageText = m_book->GetPageText(cursel);
		DoMarkActive( selectedPageText );
	}
	event.Skip();
}
Beispiel #5
0
void MainBook::OnClosePage(NotebookEvent& e)
{
    clWindowUpdateLocker locker( this );
    int where = e.GetSelection();
    if(where == wxNOT_FOUND) {
        return;
    }
    wxWindow *page = m_book->GetPage((size_t)where);
    if(page)
        ClosePage(page);
}
Beispiel #6
0
void MainBook::OnPageChanging(NotebookEvent& e)
{
    LEditor *editor = GetActiveEditor();
    if(editor) {
        editor->HideCompletionBox();
        editor->CallTipCancel();
    }
#if HAS_LIBCLANG
    ClangCodeCompletion::Instance()->CancelCodeComplete();
#endif
    e.Skip();
}
Beispiel #7
0
void MainBook::OnPageClosing(NotebookEvent &e)
{
    e.Skip();

    LEditor *editor = dynamic_cast<LEditor*>(m_book->GetPage(e.GetSelection()));
    if (editor) {
        if (AskUserToSave(editor)) {
            SendCmdEvent(wxEVT_EDITOR_CLOSING, (IEditor*)editor);
        } else {
            e.Veto();
        }

    } else {

        // Unknow type, ask the plugins - maybe they know about this type
        wxNotifyEvent closeEvent(wxEVT_NOTIFY_PAGE_CLOSING);
        closeEvent.SetClientData( m_book->GetPage(e.GetSelection()) );
        EventNotifier::Get()->ProcessEvent(closeEvent);
        if( !closeEvent.IsAllowed() ) {
            e.Veto();
        }
    }
}