本文整理汇总了C#中Gtk.ForwardToLineEnd方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ForwardToLineEnd方法的具体用法?C# Gtk.ForwardToLineEnd怎么用?C# Gtk.ForwardToLineEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk.ForwardToLineEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBlockExtents
public static void GetBlockExtents (ref Gtk.TextIter start,
ref Gtk.TextIter end,
int threshold,
Gtk.TextTag avoid_tag)
{
// Move start and end to the beginning or end of their
// respective paragraphs, bounded by some threshold.
start.LineOffset = Math.Max (0, start.LineOffset - threshold);
// FIXME: Sometimes I need to access this before it
// returns real values.
int bug = end.CharsInLine;
if (end.CharsInLine - end.LineOffset > threshold + 1 /* newline */)
end.LineOffset += threshold;
else
end.ForwardToLineEnd ();
if (avoid_tag != null) {
if (start.HasTag (avoid_tag))
start.BackwardToTagToggle (avoid_tag);
if (end.HasTag (avoid_tag))
end.ForwardToTagToggle (avoid_tag);
}
}
示例2: RemoveBullet
public void RemoveBullet (ref Gtk.TextIter iter)
{
Gtk.TextIter end;
Gtk.TextIter line_end = iter;
line_end.ForwardToLineEnd ();
if (line_end.LineOffset < 2) {
end = GetIterAtLineOffset (iter.Line, 1);
} else {
end = GetIterAtLineOffset (iter.Line, 2);
}
// Go back one more character to delete the \n as well
iter = GetIterAtLine (iter.Line - 1);
iter.ForwardToLineEnd ();
Delete(ref iter, ref end);
}
示例3: GetBlockExtents
void GetBlockExtents (ref Gtk.TextIter start, ref Gtk.TextIter end)
{
// FIXME: Should only be processing the largest match string
// size, so we don't slow down for large paragraphs
start.LineOffset = 0;
end.ForwardToLineEnd ();
}