Browse Source

document ILineTracker.SetLineLength

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4426 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
a257a5b2e9
  1. 3
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/ILineTracker.cs
  2. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/InlineObjectRun.cs

3
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/ILineTracker.cs

@ -32,6 +32,9 @@ namespace ICSharpCode.AvalonEdit.Document @@ -32,6 +32,9 @@ namespace ICSharpCode.AvalonEdit.Document
/// <summary>
/// Is called immediately before a document line changes length.
/// This method will be called whenever the line is changed, even when the length stays as it is.
/// The method might be called multiple times for a single line because
/// a replacement is internally handled as removal followed by insertion.
/// </summary>
void SetLineLength(DocumentLine line, int newTotalLength);

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/InlineObjectRun.cs

@ -43,6 +43,8 @@ namespace ICSharpCode.AvalonEdit.Rendering @@ -43,6 +43,8 @@ namespace ICSharpCode.AvalonEdit.Rendering
throw new ArgumentNullException("context");
// remove inline object if its already added, can happen e.g. when recreating textrun for word-wrapping
// TODO: certainly the text view should handle this internally? external code might want to use InlineObjectRun,
// but doesn't have access to textLayer.RemoveInlineObject
context.TextView.textLayer.RemoveInlineObject(this.Element);
return new InlineObjectRun(1, this.TextRunProperties, this.Element);

Loading…
Cancel
Save