예제 #1
0
        public override void Redo(Gtk.TextBuffer buffer)
        {
            RemoveSplitTags(buffer);

            Gtk.TextIter start_iter = buffer.GetIterAtOffset(start);
            Gtk.TextIter end_iter   = buffer.GetIterAtOffset(end);
            buffer.Delete(ref start_iter, ref end_iter);
            buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(start));
            buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(start));
        }
예제 #2
0
        public override void Undo(Gtk.TextBuffer buffer)
        {
            int tag_images = GetSplitOffset();

            Gtk.TextIter start_iter = buffer.GetIterAtOffset(index - tag_images);
            Gtk.TextIter end_iter   = buffer.GetIterAtOffset(index - tag_images + chop.Length);
            buffer.Delete(ref start_iter, ref end_iter);
            buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(index - tag_images));
            buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(index - tag_images));

            ApplySplitTags(buffer);
        }
예제 #3
0
        public override void Undo(Gtk.TextBuffer buffer)
        {
            // Tag images change the offset by one, but only when deleting.
            Gtk.TextIter start_iter = buffer.GetIterAtOffset(Offset);
            Gtk.TextIter end_iter   = buffer.GetIterAtOffset(Offset + chop.Length + 1);
            buffer.Delete(ref start_iter, ref end_iter);
            buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(Offset));
            buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(Offset));

            Tag.WidgetLocation = null;

            ApplySplitTags(buffer);
        }
예제 #4
0
파일: Utils.cs 프로젝트: thioshp/tomboy
 public void Erase()
 {
     Gtk.TextIter start_iter = Start;
     Gtk.TextIter end_iter   = End;
     buffer.Delete(ref start_iter, ref end_iter);
 }