Example #1
0
		public TextEditorData (TextDocument doc)
		{
			LineHeight = 16;

			caret = new Caret (this);
			caret.PositionChanged += CaretPositionChanged;

			options = TextEditorOptions.DefaultOptions;
			
			document = doc;
			document.BeginUndo += OnBeginUndo;
			document.EndUndo += OnEndUndo;

			document.Undone += DocumentHandleUndone;
			document.Redone += DocumentHandleRedone;
			document.LineChanged += HandleDocLineChanged;
			document.TextReplaced += HandleTextReplaced;

			document.TextSet += HandleDocTextSet;
			document.Folded += HandleTextEditorDataDocumentFolded;
			document.FoldTreeUpdated += HandleFoldTreeUpdated;
			SearchEngine = new BasicSearchEngine ();

			HeightTree = new HeightTree (this);
			HeightTree.Rebuild ();
		}
Example #2
0
		public TextEditorData (TextDocument doc)
		{
			LineHeight = 16;

			caret = new Caret (this);
			caret.PositionChanged += CaretPositionChanged;

			options = TextEditorOptions.DefaultOptions;
			document = doc;
			AttachDocument ();
			SearchEngine = new BasicSearchEngine ();

			HeightTree = new HeightTree (this);
			HeightTree.Rebuild ();
			IndentationTracker = new DefaultIndentationTracker (document);
		}