Beispiel #1
0
        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();
        }
Beispiel #2
0
        private void HighlightEvent(Note note, int i)
        {
            NoteBuffer buf = note.Buffer;

            Console.WriteLine("Highlight line:" + i);
            Gtk.TextIter start = buf.GetIterAtLine(i);
            Gtk.TextIter end   = start;
            end.ForwardToLineEnd();

            buf.ApplyTag("reminder", start, end);
        }
        void SetupTimer(Note note, TextIter start, TextIter end)
        {
            if (!start.StartsLine())
                start.BackwardLine();
            if (!end.EndsLine())
                end.ForwardToLineEnd ();

            Buffer.RemoveTag("reminder", start, end);
            //Buffer.RemoveAllTags(start, end); // This breaks stuff - what purpose does it serve?
            SetupTimer(Note, start.GetSlice(end), start.Line);
        }