| 7046 | } |
| 7047 | |
| 7048 | void Editor::SetDocPointer ( Document *document ) |
| 7049 | { |
| 7050 | //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); |
| 7051 | pdoc->RemoveWatcher ( this, 0 ); |
| 7052 | pdoc->Release(); |
| 7053 | if ( document == NULL ) { |
| 7054 | pdoc = new Document(); |
| 7055 | } else { |
| 7056 | pdoc = document; |
| 7057 | } |
| 7058 | pdoc->AddRef(); |
| 7059 | // Ensure all positions within document |
| 7060 | sel.Clear(); |
| 7061 | targetStart = 0; |
| 7062 | targetEnd = 0; |
| 7063 | braces[0] = invalidPosition; |
| 7064 | braces[1] = invalidPosition; |
| 7065 | vs.ReleaseAllExtendedStyles(); |
| 7066 | // Reset the contraction state to fully shown. |
| 7067 | cs.Clear(); |
| 7068 | cs.InsertLines ( 0, pdoc->LinesTotal() - 1 ); |
| 7069 | SetAnnotationHeights ( 0, pdoc->LinesTotal() ); |
| 7070 | llc.Deallocate(); |
| 7071 | NeedWrapping(); |
| 7072 | pdoc->AddWatcher ( this, 0 ); |
| 7073 | SetScrollBars(); |
| 7074 | Redraw(); |
| 7075 | } |
| 7076 | |
| 7077 | void Editor::SetAnnotationVisible ( int visible ) |
| 7078 | { |
nothing calls this directly
no test coverage detected