2004-02-23 Thiago Milczarek Say��o <sayao@brturbo.com>

* gtk/TextBuffer.custom : add TextIter parm to InsertWithTags method.

svn path=/trunk/gtk-sharp/; revision=23374
This commit is contained in:
Mike Kestner 2004-02-23 17:43:13 +00:00
parent daaa22f5b6
commit 77f25f80ea
2 changed files with 12 additions and 8 deletions

View file

@ -1,3 +1,7 @@
2004-02-23 Thiago Milczarek Sayão <sayao@brturbo.com>
* gtk/TextBuffer.custom : add TextIter parm to InsertWithTags method.
2004-02-21 Mike Kestner <mkestner@ximian.com> 2004-02-21 Mike Kestner <mkestner@ximian.com>
* pango/Pango.metadata : mark some out params on Layout. * pango/Pango.metadata : mark some out params on Layout.

View file

@ -22,16 +22,16 @@ public void PasteClipboard (Gtk.Clipboard clipboard)
gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true);
} }
public void InsertWithTags (string text, params TextTag[] tags) public void InsertWithTags (TextIter iter, string text, params TextTag[] tags)
{ {
TextIter iter; TextIter start;
int offset = iter.Offset;
this.Insert (EndIter, text); Insert (iter, text);
iter = this.GetIterAtOffset (EndIter.Offset - text.Length);
start = GetIterAtOffset (offset);
iter = GetIterAtOffset (offset + text.Length);
foreach (TextTag t in tags) foreach (TextTag t in tags)
{ this.ApplyTag (t, start, iter);
this.ApplyTag (t, iter, EndIter);
}
} }