1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
4
using ICSharpCode.SharpDevelop.Editor;
6
using ICSharpCode.SharpDevelop.Dom.Refactoring;
8
namespace SearchAndReplace
11
/// This iterator iterates on a text buffer strategy.
13
public interface ITextIterator
16
/// The text buffer strategy
23
/// Gets the current char this is the same as
24
/// GetCharRelative(0)
26
/// <exception cref="System.InvalidOperationException">
27
/// If this method is called before the first MoveAhead or after
28
/// MoveAhead or after MoveAhead returns false.
35
/// The current position=offset of the text iterator cursor
43
/// Gets a char relative to the current position (negative values
46
/// <exception cref="System.InvalidOperationException">
47
/// If this method is called before the first MoveAhead or after
48
/// MoveAhead or after MoveAhead returns false.
50
char GetCharRelative(int offset);
53
/// Moves the iterator position numChars
55
bool MoveAhead(int numChars);
58
/// Rests the iterator
63
/// The find object calls the InformReplace method to inform the text iterator
64
/// about the replace operation on the TextBuffer. The text iterator must update
65
/// all internal offsets to the new offsets (if neccessary)
67
void InformReplace(int offset, int length, int newLength);