public DisassemblyView() { DocumentTitle = GettextCatalog.GetString("Disassembly"); sw = new Gtk.ScrolledWindow(); editor = TextEditorFactory.CreateNewEditor(); editor.IsReadOnly = true; asmMarker = TextMarkerFactory.CreateAsmLineMarker(editor); editor.Options = DefaultSourceEditorOptions.PlainEditor; sw.AddWithViewport(editor); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.ShowAll(); sw.Vadjustment.ValueChanged += OnScrollEditor; sw.VScrollbar.ButtonPressEvent += OnPress; sw.VScrollbar.ButtonReleaseEvent += OnRelease; sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; sw.ShadowType = Gtk.ShadowType.In; sw.Sensitive = false; DebuggingService.StoppedEvent += OnStop; }
public void RemoveMarker(ITextLineMarker lineMarker) { if (lineMarker == null) { throw new ArgumentNullException(nameof(lineMarker)); } textEditorImpl.RemoveMarker(lineMarker); }
public void AddMarker(int lineNumber, ITextLineMarker lineMarker) { if (lineMarker == null) { throw new ArgumentNullException(nameof(lineMarker)); } AddMarker(GetLine(lineNumber), lineMarker); }
public void AddMarker(IDocumentLine line, ITextLineMarker lineMarker) { if (line == null) { throw new ArgumentNullException(nameof(line)); } if (lineMarker == null) { throw new ArgumentNullException(nameof(lineMarker)); } textEditorImpl.AddMarker(line, lineMarker); }
public DisassemblyView () { ContentName = GettextCatalog.GetString ("Disassembly"); sw = new Gtk.ScrolledWindow (); editor = TextEditorFactory.CreateNewEditor (); editor.IsReadOnly = true; asmMarker = TextMarkerFactory.CreateAsmLineMarker (editor); editor.Options = DefaultSourceEditorOptions.PlainEditor; sw.AddWithViewport (editor); sw.HscrollbarPolicy = Gtk.PolicyType.Automatic; sw.VscrollbarPolicy = Gtk.PolicyType.Automatic; sw.ShowAll (); sw.Vadjustment.ValueChanged += OnScrollEditor; sw.VScrollbar.ButtonPressEvent += OnPress; sw.VScrollbar.ButtonReleaseEvent += OnRelease; sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask; sw.ShadowType = Gtk.ShadowType.In; sw.Sensitive = false; DebuggingService.StoppedEvent += OnStop; }
void ITextEditorImpl.RemoveMarker (ITextLineMarker lineMarker) { var debugPair = lineMarker as DebugMarkerPair; if (debugPair != null) { debugPair.Remove (); return; } var textLineMarker = lineMarker as TextLineMarker; if (textLineMarker == null) throw new InvalidOperationException ("Tried to add an incompatible text marker."); TextEditor.Document.RemoveMarker (textLineMarker); }
void ITextEditorImpl.AddMarker (IDocumentLine line, ITextLineMarker lineMarker) { var debugPair = lineMarker as DebugMarkerPair; if (debugPair != null) { debugPair.AddTo (TextEditor.Document, ((DocumentLineWrapper)line).Line); return; } var textLineMarker = lineMarker as TextLineMarker; if (textLineMarker == null) throw new InvalidOperationException ("Tried to add an incompatible text marker. Use the MarkerHost to create compatible ones."); if (lineMarker is IUnitTestMarker) { var actionMargin = TextEditor.ActionMargin; if (actionMargin != null) { actionMargin.IsVisible = true; } } TextEditor.Document.AddMarker (((DocumentLineWrapper)line).Line, textLineMarker); }