[Monodevelop-patches-list] r1100 - trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Mar 3 23:10:29 EST 2004
Author: tberman
Date: 2004-03-03 23:10:29 -0500 (Wed, 03 Mar 2004)
New Revision: 1100
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
Log:
adding a red text background to the current line of execution.
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-03-04 03:48:15 UTC (rev 1099)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs 2004-03-04 04:10:29 UTC (rev 1100)
@@ -57,11 +57,23 @@
public class SourceEditorBuffer : SourceBuffer, IClipboardHandler {
SourceLanguagesManager slm = new SourceLanguagesManager ();
+ TextTag markup;
public SourceEditorBuffer () : base (new SourceTagTable ())
{
+ markup = new TextTag ("breakpoint");
+ markup.Background = "red";
+ TagTable.Add (markup);
}
+ public void MarkupLine (int linenumber)
+ {
+ TextIter begin_line = GetIterAtLine (linenumber);
+ TextIter end_line = begin_line;
+ begin_line.LineOffset = 0;
+ end_line.ForwardToLineEnd ();
+ ApplyTag (markup, begin_line, end_line);
+ }
public void LoadFile (string file, string mime)
{
LoadText (File.OpenText (file).ReadToEnd (), mime);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-04 03:48:15 UTC (rev 1099)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-03-04 04:10:29 UTC (rev 1100)
@@ -101,7 +101,8 @@
public void ExecutingAt (int linenumber)
{
buf.ClearMarks (SourceMarkerType.ExecutionMark);
- buf.ToggleMark (linenumber, SourceMarkerType.ExecutionMark);
+ buf.ToggleMark (linenumber, SourceMarkerType.ExecutionMark);
+ buf.MarkupLine (linenumber);
}
public void SimulateKeyPress (ref Gdk.EventKey evnt)
More information about the Monodevelop-patches-list
mailing list