本文整理汇总了C#中Gtk.TextBuffer.MoveMark方法的典型用法代码示例。如果您正苦于以下问题:C# TextBuffer.MoveMark方法的具体用法?C# TextBuffer.MoveMark怎么用?C# TextBuffer.MoveMark使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.TextBuffer
的用法示例。
在下文中一共展示了TextBuffer.MoveMark方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Redo
public override void Redo (TextBuffer buffer)
{
TextIter insertIter = buffer.GetIterAtOffset (index);
buffer.InsertRange (ref insertIter, chop.Start, chop.End);
buffer.MoveMark (buffer.SelectionBound, buffer.GetIterAtOffset (index));
buffer.MoveMark (buffer.InsertMark, buffer.GetIterAtOffset (index + chop.Length));
}
示例2: Undo
public override void Undo (TextBuffer buffer)
{
#if DEBUG
Console.WriteLine ("DEBUG: Chop Text: {0} Length: {1}", chop.Text, chop.Length);
#endif
TextIter startIter = buffer.GetIterAtOffset (index);
TextIter endIter = buffer.GetIterAtOffset (index + chop.Length);
buffer.Delete (ref startIter, ref endIter);
buffer.MoveMark (buffer.InsertMark, buffer.GetIterAtOffset (index));
buffer.MoveMark (buffer.SelectionBound, buffer.GetIterAtOffset (index));
}
示例3: AppendTextWithoutScroll
public void AppendTextWithoutScroll (TextBuffer buffer, string text)
{
TextIter iter;
text = text.Replace("\0","");
buffer.MoveMark(buf.InsertMark, buffer.EndIter);
if (text.Equals ("") == false) {
iter = buffer.EndIter;
buffer.Insert (iter, text);
}
iter = buffer.EndIter;
buffer.Insert (iter, "\n");
}