Minimally imitate editor.EditorWindow class.
| 38 | |
| 39 | |
| 40 | class Editor: |
| 41 | '''Minimally imitate editor.EditorWindow class. |
| 42 | ''' |
| 43 | def __init__(self, flist=None, filename=None, key=None, root=None, |
| 44 | text=None): # Allow real Text with mock Editor. |
| 45 | self.text = text or Text() |
| 46 | self.undo = UndoDelegator() |
| 47 | |
| 48 | def get_selection_indices(self): |
| 49 | first = self.text.index('1.0') |
| 50 | last = self.text.index('end') |
| 51 | return first, last |
| 52 | |
| 53 | |
| 54 | class UndoDelegator: |
no outgoing calls
searching dependent graphs…