// ---------------------------------------------------------------------------- void BrowseMarks::ImportBrowse_Marks() // ---------------------------------------------------------------------------- { // rebuild BrowseMarks from scintilla browse marks #if defined(LOGGING) ///LOGIT( _T("BT ImportBrowse_Marks") ); #endif //-EditorBase* eb = m_pEditorBase ; EditorBase* eb = m_pEdMgr->GetEditor(m_filePath); #if defined(LOGGING) LOGIT(_T("BT ImportBrowse_Marks entered with no active editor base.")); #endif // This can happens when editing script for example . if (not eb) return; cbEditor* pcbEditor = Manager::Get()->GetEditorManager()->GetBuiltinEditor( eb ) ; if (not pcbEditor) return; ClearAllBrowse_Marks(); cbStyledTextCtrl* pControl = pcbEditor->GetControl(); //-int line = pControl->MarkerNext( 0, 1<<BROWSETRACKER_MARKER); int line = pControl->MarkerNext( 0, 1<<GetBrowseMarkerId()); while( line != -1) { int posn = pControl->PositionFromLine( line ); RecordMark( posn ); //-line = pControl->MarkerNext( ++line, 1<<BROWSETRACKER_MARKER); line = pControl->MarkerNext( ++line, 1<<GetBrowseMarkerId()); } }//ImportBrowse_Marks
// ---------------------------------------------------------------------------- void BrowseMarks::ImportBook_Marks() // ---------------------------------------------------------------------------- { // rebuild Book_Marks from scintilla browse marks #if defined(LOGGING) ///LOGIT( _T("ImportBook_Marks") ); #endif //-EditorBase* eb = m_pEditorBase ; EditorBase* eb = m_pEdMgr->GetEditor(m_filePath); #if defined(LOGGING) if (not eb) asm("int3"); /*trap*/ #endif if (not eb) return; cbEditor* pcbEditor = Manager::Get()->GetEditorManager()->GetBuiltinEditor( eb ) ; if (not pcbEditor) return; cbStyledTextCtrl* pControl = pcbEditor->GetControl(); if (not pControl) return; ClearAllBrowse_Marks(); int line = pControl->MarkerNext( 0, 1<<BOOKMARK_MARKER); while( line != -1) { int posn = pControl->PositionFromLine( line ); RecordMark( posn ); line = pControl->MarkerNext( ++line, 1<<BOOKMARK_MARKER); } }//ImportBook_Marks